Re: Something's busted in plpgsql composite-variable handling

2018-08-29 Thread Jonathan S. Katz
On 8/28/18 12:06 PM, Pavel Stehule wrote: > > > 2018-08-28 17:04 GMT+02:00 Jonathan S. Katz >: > > >> On Aug 28, 2018, at 10:45 AM, Pavel Stehule >> mailto:pavel.steh...@gmail.com>> wrote: >> >> >> >> 2018-08-28 16:38 GMT+02:00 Jonathan S. KatzĀ >

Re: Something's busted in plpgsql composite-variable handling

2018-08-28 Thread Pavel Stehule
2018-08-28 17:04 GMT+02:00 Jonathan S. Katz : > > On Aug 28, 2018, at 10:45 AM, Pavel Stehule > wrote: > > > > 2018-08-28 16:38 GMT+02:00 Jonathan S. Katz : > >> >> > On Aug 26, 2018, at 4:09 PM, Tom Lane wrote: >> > >> > I wrote: >> >> [ dropping and recreating a composite type confuses

Re: Something's busted in plpgsql composite-variable handling

2018-08-28 Thread Jonathan S. Katz
> On Aug 28, 2018, at 10:45 AM, Pavel Stehule wrote: > > > > 2018-08-28 16:38 GMT+02:00 Jonathan S. Katz >: > > > On Aug 26, 2018, at 4:09 PM, Tom Lane > > wrote: > > > > I wrote: > >> [ dropping and recreating a composite type

Re: Something's busted in plpgsql composite-variable handling

2018-08-28 Thread Pavel Stehule
2018-08-28 16:38 GMT+02:00 Jonathan S. Katz : > > > On Aug 26, 2018, at 4:09 PM, Tom Lane wrote: > > > > I wrote: > >> [ dropping and recreating a composite type confuses plpgsql ] > >> That's not very nice. What's worse is that it works cleanly in v10, > >> making this a regression, no doubt

Re: Something's busted in plpgsql composite-variable handling

2018-08-28 Thread Jonathan S. Katz
> On Aug 26, 2018, at 4:09 PM, Tom Lane wrote: > > I wrote: >> [ dropping and recreating a composite type confuses plpgsql ] >> That's not very nice. What's worse is that it works cleanly in v10, >> making this a regression, no doubt caused by the hacking I did on >> plpgsql's handling of

Re: Something's busted in plpgsql composite-variable handling

2018-08-26 Thread Tom Lane
I wrote: > [ dropping and recreating a composite type confuses plpgsql ] > That's not very nice. What's worse is that it works cleanly in v10, > making this a regression, no doubt caused by the hacking I did on > plpgsql's handling of composite variables. After further poking, I've concluded

Something's busted in plpgsql composite-variable handling

2018-08-26 Thread Tom Lane
While answering someone's question I was motivated to try this: regression=# create type comp_type as (f1 int, f2 int); CREATE TYPE regression=# create function foo(int) returns int language plpgsql as ' declare z comp_type; begin z.f1 = $1; z.f2 = $1+1; return z.f1 + z.f2; end'; CREATE