thanks Tom Lane, my problem resolved, I'm trying to re-create my table and
function, and this working well
Tom Lane wrote:
ataherster writes:
... but this function is not work with this error :
ERROR: structure of query does not match function result type
CONTEXT: PL/pgSQL fun
on is : whether that bug in postgreSQL?
I feel afraid if will happen again like this by itself
thanks before for your help
Note : I'm sory about my english, my english is very bad
Justin wrote:
ataherster wrote:
hai all, i'm trying create function like this
CREATE OR R
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 'plpg