Re: [HACKERS] Proposal: casts row to array and array to row

2011-11-05 Thread Noah Misch
On Tue, Oct 11, 2011 at 10:40:26AM +0200, Pavel Stehule wrote: What do you think about this idea? +1, belatedly. Having inherent casts to/from text since version 8.3 has smoothed out some aggravating corner cases. If the patch isn't invasive and the casts are all explicit-only, I anticipate a

Re: [HACKERS] Proposal: casts row to array and array to row

2011-10-12 Thread Pavel Stehule
2011/10/11 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: 2011/10/11 Robert Haas robertmh...@gmail.com: On Tue, Oct 11, 2011 at 4:40 AM, Pavel Stehule pavel.steh...@gmail.com wrote: What do you think about this idea? It's a bad one. Well, a ROW can contain

Re: [HACKERS] Proposal: casts row to array and array to row

2011-10-11 Thread Robert Haas
On Tue, Oct 11, 2011 at 4:40 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello A current limits of dynamic work with row types in PL/pgSQL can be decreased with a possible casts between rows and arrays. Now we have a lot of tools for arrays, and these tools should be used for rows too.

Re: [HACKERS] Proposal: casts row to array and array to row

2011-10-11 Thread Pavel Stehule
2011/10/11 Robert Haas robertmh...@gmail.com: On Tue, Oct 11, 2011 at 4:40 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello A current limits of dynamic work with row types in PL/pgSQL can be decreased with a possible casts between rows and arrays. Now we have a lot of tools for

Re: [HACKERS] Proposal: casts row to array and array to row

2011-10-11 Thread Pavel Stehule
sometimes he can use a numeric or int array, sometimes he have to select text array. Target type is selected by user, and cast fail when conversion is not possible. using a some selected type (for array field) allows a processing in plpgsql. motivation for this feature is simplification and

Re: [HACKERS] Proposal: casts row to array and array to row

2011-10-11 Thread Boszormenyi Zoltan
Hi, 2011-10-11 14:23 keltezéssel, Robert Haas írta: On Tue, Oct 11, 2011 at 4:40 AM, Pavel Stehulepavel.steh...@gmail.com wrote: Hello A current limits of dynamic work with row types in PL/pgSQL can be decreased with a possible casts between rows and arrays. Now we have a lot of tools for

Re: [HACKERS] Proposal: casts row to array and array to row

2011-10-11 Thread Pavel Stehule
2011/10/11 Boszormenyi Zoltan z...@cybertec.at: Hi, 2011-10-11 14:23 keltezéssel, Robert Haas írta: On Tue, Oct 11, 2011 at 4:40 AM, Pavel Stehulepavel.steh...@gmail.com  wrote: Hello A current limits of dynamic work with row types in PL/pgSQL can be decreased with a possible casts

Re: [HACKERS] Proposal: casts row to array and array to row

2011-10-11 Thread Merlin Moncure
On Tue, Oct 11, 2011 at 3:40 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello A current limits of dynamic work with row types in PL/pgSQL can be decreased with a possible casts between rows and arrays. Now we have a lot of tools for arrays, and these tools should be used for rows too.

Re: [HACKERS] Proposal: casts row to array and array to row

2011-10-11 Thread Pavel Stehule
2011/10/11 Merlin Moncure mmonc...@gmail.com: On Tue, Oct 11, 2011 at 3:40 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello A current limits of dynamic work with row types in PL/pgSQL can be decreased with a possible casts between rows and arrays. Now we have a lot of tools for

Re: [HACKERS] Proposal: casts row to array and array to row

2011-10-11 Thread Merlin Moncure
On Tue, Oct 11, 2011 at 8:18 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2011/10/11 Merlin Moncure mmonc...@gmail.com: On Tue, Oct 11, 2011 at 3:40 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello A current limits of dynamic work with row types in PL/pgSQL can be decreased with

Re: [HACKERS] Proposal: casts row to array and array to row

2011-10-11 Thread Pavel Stehule
2011/10/11 Merlin Moncure mmonc...@gmail.com: On Tue, Oct 11, 2011 at 8:18 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2011/10/11 Merlin Moncure mmonc...@gmail.com: On Tue, Oct 11, 2011 at 3:40 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello A current limits of dynamic work

Re: [HACKERS] Proposal: casts row to array and array to row

2011-10-11 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: 2011/10/11 Robert Haas robertmh...@gmail.com: On Tue, Oct 11, 2011 at 4:40 AM, Pavel Stehule pavel.steh...@gmail.com wrote: What do you think about this idea? It's a bad one. Well, a ROW can contain values of different types; an ARRAY can't.

Re: [HACKERS] Proposal: casts row to array and array to row

2011-10-11 Thread Merlin Moncure
On Tue, Oct 11, 2011 at 8:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: Pavel Stehule pavel.steh...@gmail.com writes: 2011/10/11 Robert Haas robertmh...@gmail.com: On Tue, Oct 11, 2011 at 4:40 AM, Pavel Stehule pavel.steh...@gmail.com wrote: What do you think about this idea? It's a bad one.