From: | "Mario Alberto Soto Cordones" <mario_soto(at)compuall(dot)cl> |
---|---|
To: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | |
Date: | 2003-03-21 18:50:23 |
Message-ID: | 33010.192.168.1.100.1048272623.squirrel@mail.compuall.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
HI, i have a following function., but not work.
CREATE or replace FUNCTION get_nombre(numeric,numeric,text) RETURNS setof
cumaalu AS '
SELECT cunomalu,cuappalu,cuapmalu FROM cumaalu
WHERE siempalu = $1 and
cusesalu = $2 and
curutalu = $3;
' LANGUAGE SQL;
the error say
PostgreSQL ha dicho: ERROR: function declared to return cumaalu does not
SELECT the right number of columns (49)
Your query:
CREATE FUNCTION get_nombre(numeric,numeric,text) RETURNS setof cumaalu AS '
SELECT cunomalu,cuappalu,cuapmalu FROM cumaalu
WHERE siempalu = $1 and
cusesalu = $2 and
curutalu = $3;
' LANGUAGE SQL
please any idea., i canṫ't use select * becose the table its very long.
thank
From | Date | Subject | |
---|---|---|---|
Next Message | Achilleus Mantzios | 2003-03-21 19:20:01 | Re: cast of integer to bool doesn't work (anymore?) |
Previous Message | Achilleus Mantzios | 2003-03-21 18:46:17 | Re: cast of integer to bool doesn't work (anymore?) |