Re: newbie pl/pgsql question on trigger function error - Mailing list pgsql-general

From Tom Lane
Subject Re: newbie pl/pgsql question on trigger function error
Date
Msg-id 14733.1076426047@sss.pgh.pa.us
Whole thread Raw
In response to Re: newbie pl/pgsql question on trigger function error  (Mark Gibson <gibsonm@cromwell.co.uk>)
List pgsql-general
Mark Gibson <gibsonm@cromwell.co.uk> writes:
> Try this:

> my_query := ''create table '' || quote_ident(NEW.tablename)
>          || '' ( arg1 '' || quote_ident(NEW.arg1) || '');'';

quote_ident() seems appropriate for the table name, but you might want
to leave it off the type name.  For instance, if the argument is
'varchar(20)' then quote_ident would mess things up.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: number of rows in a cursor
Next
From: Tom Lane
Date:
Subject: Re: IP adrss and networks in Postgresql