[ask] Return Query
| От | ataherster |
|---|---|
| Тема | [ask] Return Query |
| Дата | |
| Msg-id | 49BC9D5D.2060401@yahoo.co.id обсуждение исходный текст |
| Ответ на | Re: ODBC limitation?? (Martin Gainty <mgainty@hotmail.com>) |
| Ответы |
Re: [ask] Return Query
Re: [ask] Return Query |
| Список | pgsql-general |
hai all, i'm trying create function like this CREATE OR REPLACE FUNCTION penjualan(idcb integer) RETURNS SETOF penjualan AS $BODY$ BEGIN IF ($1 IS NULL) THEN return query SELECT * FROM PENJUALAN; ELSE return query SELECT * FROM PENJUALAN WHERE IDCABANG=$1; END IF; END; $BODY$ LANGUAGE 'plpgsql' VOLATILE COST 100 ROWS 1000; but this function is not work with this error : ERROR: structure of query does not match function result type CONTEXT: PL/pgSQL function "penjualan" line 6 at RETURN QUERY on the time i try with other table and working well thanks for your help
В списке pgsql-general по дате отправления: