[HACKERS] Correcting Error message

2010-02-26 Thread Piyush Newe
Hi, Consider following testcase, CREATE TABLE footable(id int4, name varchar2(10)); CREATE FUNCTION foofunc(a footable, b integer DEFAULT 10) RETURNS integer AS $$ SELECT 123; $$ LANGUAGE SQL; CREATE FUNCTION foofunc(a footable, b numeric DEFAULT 10) RETURNS integer AS $$ SELECT 123; $$

Re: [HACKERS] Correcting Error message

2010-02-26 Thread Michael Glaesemann
On Feb 26, 2010, at 3:30 , Piyush Newe wrote: Hi, Consider following testcase, CREATE TABLE footable(id int4, name varchar2(10)); CREATE FUNCTION foofunc(a footable, b integer DEFAULT 10) RETURNS integer AS $$ SELECT 123; $$ LANGUAGE SQL; CREATE FUNCTION foofunc(a footable, b numeric

Re: [HACKERS] Correcting Error message

2010-02-26 Thread Tom Lane
Michael Glaesemann g...@seespotcode.net writes: On Feb 26, 2010, at 3:30 , Piyush Newe wrote: SELECT (footable.*).foofunc FROM footable; ERROR: column footable.foofunc does not exist Is that calling syntax correct? I'd think it should be: SELECT foofunc(footable.*, 10) FROM footable; He's

Re: [HACKERS] Correcting Error message

2010-02-26 Thread Michael Glaesemann
On Feb 26, 2010, at 21:03 , Tom Lane wrote: Michael Glaesemann g...@seespotcode.net writes: On Feb 26, 2010, at 3:30 , Piyush Newe wrote: SELECT (footable.*).foofunc FROM footable; ERROR: column footable.foofunc does not exist Is that calling syntax correct? I'd think it should be:

Re: [HACKERS] Correcting Error message

2010-02-26 Thread Jaime Casanova
On Fri, Feb 26, 2010 at 7:12 PM, Michael Glaesemann g...@seespotcode.net wrote: In any event, I couldn't get your example to work on Postgres 8.4 regardless due to the varchar2 type. Which version of Postgres are you using? test=# CREATE TABLE footable(id int4, name varchar2(10)); ERROR:  

Re: [HACKERS] Correcting Error message

2010-02-26 Thread Tom Lane
Jaime Casanova jcasa...@systemguards.com.ec writes: On Fri, Feb 26, 2010 at 7:12 PM, Michael Glaesemann g...@seespotcode.net wrote: In any event, I couldn't get your example to work on Postgres 8.4 regardless due to the varchar2 type. Which version of Postgres are you using? test=# CREATE