X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id E0FE1D1C4CD for ; Fri, 25 Jul 2003 18:49:13 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 60428-06 for ; Fri, 25 Jul 2003 15:48:26 -0300 (ADT) Received: from out005.verizon.net (out005pub.verizon.net [206.46.170.143]) by svr1.postgresql.org (Postfix) with ESMTP id B1DBED1C4BB for ; Fri, 25 Jul 2003 15:49:11 -0300 (ADT) Received: from localhost ([127.0.0.1]) by out005.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20030725184912.HHCX20032.out005.verizon.net@localhost> for ; Fri, 25 Jul 2003 13:49:12 -0500 X-Mailer: Openwave WebEngine, version 2.8.10 (webedge20-101-190-20021211) From: To: Subject: locks and variable substitution Date: Fri, 25 Jul 2003 13:49:12 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out005.verizon.net from [127.0.0.1] at Fri, 25 Jul 2003 13:49:12 -0500 Message-Id: <20030725184912.HHCX20032.out005.verizon.net@localhost> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/380 X-Sequence-Number: 14494 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.