Re: [HACKERS] proposal: PL/Pythonu - function ereport

2015-10-16 Thread Pavel Stehule
2015-10-16 8:12 GMT+02:00 Craig Ringer : > On 16 October 2015 at 02:47, Pavel Stehule > wrote: > > > postgres=# do $$ > > x = plpy.SPIError('Nazdarek'); > > x.spidata = (100, "Some detail", "some hint", None, None); > > raise x; > > $$ language

Re: [HACKERS] proposal: PL/Pythonu - function ereport

2015-10-16 Thread Craig Ringer
On 16 October 2015 at 02:47, Pavel Stehule wrote: > postgres=# do $$ > x = plpy.SPIError('Nazdarek'); > x.spidata = (100, "Some detail", "some hint", None, None); > raise x; > $$ language plpythonu; Shouldn't that look more like raise plpy.SPIError(msg="Message",

Re: [HACKERS] proposal: PL/Pythonu - function ereport

2015-10-15 Thread Pavel Stehule
Hi 2015-10-09 15:22 GMT+02:00 Peter Eisentraut : > On 10/8/15 6:11 AM, Pavel Stehule wrote: > > We cannot to raise PostgreSQL exception with setting all possible > > fields. > > Such as? If there are fields missing, let's add them. > > > I propose new function > > > >

Re: [HACKERS] proposal: PL/Pythonu - function ereport

2015-10-09 Thread Pavel Stehule
2015-10-09 15:22 GMT+02:00 Peter Eisentraut : > On 10/8/15 6:11 AM, Pavel Stehule wrote: > > We cannot to raise PostgreSQL exception with setting all possible > > fields. > > Such as? If there are fields missing, let's add them. > > > I propose new function > > > >

Re: [HACKERS] proposal: PL/Pythonu - function ereport

2015-10-09 Thread Peter Eisentraut
On 10/8/15 6:11 AM, Pavel Stehule wrote: > We cannot to raise PostgreSQL exception with setting all possible > fields. Such as? If there are fields missing, let's add them. > I propose new function > > plpy.ereport(level, [ message [, detail [, hint [, sqlstate, ... ) That's not how

Re: [HACKERS] proposal: PL/Pythonu - function ereport

2015-10-08 Thread Pavel Stehule
2015-10-08 12:11 GMT+02:00 Pavel Stehule : > Hi > > We cannot to raise PostgreSQL exception with setting all possible fields. > I propose new function > > plpy.ereport(level, [ message [, detail [, hint [, sqlstate, ... ) > > The implementation will be based on

<    1   2