On Tue, 6 Mar 2007, Peter Schonefeld wrote:
> Hi Jas, thanks for the quick reply...I had started out with the single
> quotes, but had chaged it in my many efforts to get the thing to work...with
> the single quotes i'm getting the error:
>
> "ERROR: 42883: operator does not exist: \"unknown\" + character varying"
>
> ====
>
> CREATE OR REPLACE FUNCTION sc_insert_row(char(32),text,varchar(32)) RETURNS
> text AS $$
>
> DECLARE sql text;
> BEGIN
> sql := 'INSERT INTO '+ $3 +' ("id","body") VALUES ('+ $1 +','+ $2 +')';
In addition to the conversion to single quotes, you probably mean to be
using || (string concatenation) rather than + (addition) in the above.