try replacing double quotes with single quotes and you should be fine i
think
~Jas
On 3/5/07, Peter Schonefeld <peter(dot)schonefeld(at)gmail(dot)com> wrote:
>
> Hi, could someone please let me know what i'm doing wrong here?
>
> 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 +")";
> EXECUTE sql;
> RETURN '';
> END;
>
> $$ LANGUAGE 'plpgsql' VOLATILE;
>
> I get the error: "ERROR: 42703: column \"INSERT INTO \" does not exist"
>
> Cheers
> Pete
>