"ezra epstein" <ee_newsgroup_post@prajnait.com> writes:
> IF NOT EXISTS(SELECT 1 FROM merchandise.ds_item($1) WHERE "client_key" =
> $2) THEN
> [ works, but this doesn't: ]
> SELECT INTO rec * FROM merchandise.ds_item($1) WHERE "client_key" = %2;
If that's an accurate transcription, then your error is using %2 where
you meant $2.
regards, tom lane