locks and variable substitution

From: <gack(at)verizon(dot)net>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: locks and variable substitution
Date: 2003-07-25 18:49:12
Message-ID: 20030725184912.HHCX20032.out005.verizon.net@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Is it possible to do variable substitution with explicit locks in plpgsql?
Something along the lines of

...

declare
big_string alias for $1;
excl_table text;

begin
--assuming big_string starts with something like table=table1!
excl_table := substr(big_string,7,(position(''!'' in big_string)-7));

lock table excl_table in exclusive mode;

...

Thanks very much.
g.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Elielson Fontanezi 2003-07-25 19:09:27 ERROR: DefineIndex: index function must be marked iscachable
Previous Message Dmitry Tkach 2003-07-25 16:05:31 Re: Query analyse