Re: using vars in ddl in procedure call

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: using vars in ddl in procedure call
Date: 2012-08-29 15:18:06
Message-ID: 10405.1346253486@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com> writes:
> Trying (failing) a test to see if I can run ddl in a procedure where elements of the ddl are vars. Consider...

You'll need to construct the command as a string value and then run it
with EXECUTE. Beware of quoting issues (quote_ident and quote_literal
are your friends).

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andres Freund 2012-08-29 15:23:47 Re: [postgis-users] pg_dump -s should use add_geometrycolumn(...)
Previous Message salah jubeh 2012-08-29 15:12:23 Re: using vars in ddl in procedure call