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 function "pe
--- Begin Message ---
thanks Justin, my problem resolved, but i trying to re-create table and
function, i'm using PGAdmin III to Create Script
table and function before delete my table and function, after that I run Create
Sript without change my script
and working well
my question is : wheth
ataherster writes:
> ... 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
This looks like a known limitation in plpgsql: it's not very good with
rowtypes that contain
ataherster wrote:
hai all, i'm trying create function like this
CREATE OR REPLACE FUNCTION penjualan(idcb integer)
RETURNS SETOF penjualan AS
but this function is not work with this error : ERROR: structure of
query does not match function result type
CONTEXT: PL/pgSQL function "penjualan
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