Subject | Re: [firebird-support] Table and Sequence names by reference |
---|---|
Author | Daniel L. Miller |
Post date | 2013-11-10T06:56:13Z |
On 11/9/2013 9:05 AM, Ann Harrison
wrote:
In straight PSQL, variables cannot be used as table or column names. You can get around that limit by building a statement and using EXECUTE STATEMENT to run it. That has some slightly odd behavior in terms of security - my recollection is that the statement is run with the user's privileges not the privileges of the procedure. The statement in an EXECUTE STATEMENT is not cached - it must be parsed, compiled, and optimized each time it runs.
Does that mean that if I'm going to update a sequence within a trigger or procedure, I should use the legacy gen_id() function instead of the 'alter sequence'?
-- Daniel