Re: Inconsistent compilation error

2018-04-25 Thread Adrian Klaver
On 04/25/2018 05:33 AM, raf wrote: Adrian Klaver wrote: On 04/18/2018 06:02 PM, r...@raf.org wrote: Hmm, wonder if there is an oops in the below: http://www.pygresql.org/contents/changelog.html Version 5.0 (2016-03-20) Changes in the DB-API 2 module (pgdb): "SQL commands are always handle

Re: Inconsistent compilation error

2018-04-25 Thread raf
Adrian Klaver wrote: > On 04/18/2018 06:02 PM, r...@raf.org wrote: > > Hi, > > > > > > > But I'm getting this compilation error when it tries to load this > > function: > > > > ERROR: too many parameters specified for RAISE > > CONTEXT: compilation of PL/pgSQL function "tla_audit_d

Re: Inconsistent compilation error

2018-04-25 Thread raf
Adrian Klaver wrote: > On 04/18/2018 06:02 PM, r...@raf.org wrote: > > Hi, > > > > postgresql-9.5.12 on debian-9 > > > > I have a stored function with code that looks like: > > > > create or replace function tla_audit_delete_thing() > > returns boolean stable language plpgsql as $$ >

Re: Inconsistent compilation error

2018-04-25 Thread raf
David G. Johnston wrote: > On Wed, Apr 18, 2018 at 7:04 PM, Melvin Davidson > wrote: > > > > > Normally, literals are inside the first quotes. IE: raise notice ' > > blah_history.original_id' %', r; > > > > ​But a compiler doesn't care about human concepts like "normally" - it just > cares abou

Re: Inconsistent compilation error

2018-04-25 Thread raf
Tom Lane wrote: > r...@raf.org writes: > > I have a stored function with code that looks like: > > > raise notice '% %', 'blah_history.original_id', r; > > > But I'm getting this compilation error when it tries to load this > > function: > > > ERROR: too many parameters specifi

Re: Inconsistent compilation error

2018-04-19 Thread Melvin Davidson
On Thu, Apr 19, 2018 at 8:13 AM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wednesday, April 18, 2018, Adrian Klaver > wrote: >> >> Hmm, wonder if there is an oops in the below: >> >> http://www.pygresql.org/contents/changelog.html >> >> Version 5.0 (2016-03-20) >> Changes in the

Re: Inconsistent compilation error

2018-04-19 Thread David G. Johnston
On Wednesday, April 18, 2018, Adrian Klaver wrote: > > Hmm, wonder if there is an oops in the below: > > http://www.pygresql.org/contents/changelog.html > > Version 5.0 (2016-03-20) > Changes in the DB-API 2 module (pgdb): > "SQL commands are always handled as if they include parameters, i.e. > li

Re: Inconsistent compilation error

2018-04-18 Thread Adrian Klaver
On 04/18/2018 06:02 PM, r...@raf.org wrote: Hi, But I'm getting this compilation error when it tries to load this function: ERROR: too many parameters specified for RAISE CONTEXT: compilation of PL/pgSQL function "tla_audit_delete_thing" near line 9 Traceback (most recent

Re: Inconsistent compilation error

2018-04-18 Thread Adrian Klaver
On 04/18/2018 06:02 PM, r...@raf.org wrote: Hi, postgresql-9.5.12 on debian-9 I have a stored function with code that looks like: create or replace function tla_audit_delete_thing() returns boolean stable language plpgsql as $$ declare r record; status boolean

Re: Inconsistent compilation error

2018-04-18 Thread David G. Johnston
On Wed, Apr 18, 2018 at 7:04 PM, Melvin Davidson wrote: > > Normally, literals are inside the first quotes. IE: raise notice ' > blah_history.original_id' %', r; > ​But a compiler doesn't care about human concepts like "normally" - it just cares about "syntactically correct" and as David and Tom

Re: Inconsistent compilation error

2018-04-18 Thread Tom Lane
r...@raf.org writes: > I have a stored function with code that looks like: > raise notice '% %', 'blah_history.original_id', r; > But I'm getting this compilation error when it tries to load this > function: > ERROR: too many parameters specified for RAISE That is ... weird. T

Re: Inconsistent compilation error

2018-04-18 Thread Melvin Davidson
> I'm unsure why you're considering >'blah_history.original_id' not to be an argument here. On Wed, Apr 18, 2018 at 9:50 PM, David Rowley wrote: > On 19 April 2018 at 13:28, Melvin Davidson wrote: > > It is not fine. You have specifed TWO percent signs (%) which requires > TWO > > argumenrts, >

Re: Inconsistent compilation error

2018-04-18 Thread David Rowley
On 19 April 2018 at 13:28, Melvin Davidson wrote: > It is not fine. You have specifed TWO percent signs (%) which requires TWO > argumenrts, > but you have only provided ONE -> r. I'm confused about this statement. Did you perhaps overlook the fact that there are in fact two arguments? I'm unsur

Re: Inconsistent compilation error

2018-04-18 Thread Melvin Davidson
On Wed, Apr 18, 2018 at 9:02 PM, wrote: > Hi, > > postgresql-9.5.12 on debian-9 > > I have a stored function with code that looks like: > > create or replace function tla_audit_delete_thing() > returns boolean stable language plpgsql as $$ > declare > r record; > statu