Re: newbie pl/pgsql question on trigger function error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Gibson <gibsonm(at)cromwell(dot)co(dot)uk>
Cc: Wei Wang <ww220(at)cam(dot)ac(dot)uk>, pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: newbie pl/pgsql question on trigger function error
Date: 2004-02-10 15:14:07
Message-ID: 14733.1076426047@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mark Gibson <gibsonm(at)cromwell(dot)co(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-02-10 15:21:36 Re: IP adrss and networks in Postgresql
Previous Message Francois Suter 2004-02-10 15:09:30 Now that I have --enabled-nls...