- Mailing list pgsql-sql

From Mario Alberto Soto Cordones
Subject
Date
Msg-id 33010.192.168.1.100.1048272623.squirrel@mail.compuall.cl
Whole thread Raw
Responses Re:  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List 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







pgsql-sql by date:

Previous
From: "Dan Winslow"
Date:
Subject: Seeking help with a query....
Next
From: Sethi Tarun-ETS017
Date:
Subject: newline character in SQL