Re: [HACKERS] Correcting Error message

2010-02-26 Thread Tom Lane
Jaime Casanova writes: > On Fri, Feb 26, 2010 at 7:12 PM, Michael Glaesemann > 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(1

Re: [HACKERS] Correcting Error message

2010-02-26 Thread Jaime Casanova
On Fri, Feb 26, 2010 at 7:12 PM, Michael Glaesemann 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:  type "varchar2" d

Re: [HACKERS] Correcting Error message

2010-02-26 Thread Michael Glaesemann
On Feb 26, 2010, at 21:03 , Tom Lane wrote: Michael Glaesemann 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.*

Re: [HACKERS] Correcting Error message

2010-02-26 Thread Tom Lane
Michael Glaesemann 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 relying on th

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 DEFAU

[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; $$ LAN