X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id A15B99DCB66 for ; Wed, 30 Nov 2005 06:35:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 06723-09 for ; Wed, 30 Nov 2005 06:35:56 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 7A8419DCB69 for ; Wed, 30 Nov 2005 06:35:53 -0400 (AST) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 131F2401912; Wed, 30 Nov 2005 10:35:50 +0000 (GMT) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id E5CF6FF1A; Wed, 30 Nov 2005 10:35:55 +0000 (GMT) Message-ID: <438D808B.3030706@archonet.com> Date: Wed, 30 Nov 2005 10:35:55 +0000 From: Richard Huxton User-Agent: Thunderbird 1.5 (X11/20051025) MIME-Version: 1.0 To: NosyMan Cc: pgsql-sql@postgresql.org Subject: Re: Help needed References: <200511291531.30441.leif@solumslekt.org> <200511291701.26148.leif@solumslekt.org> <200511291747.49570.leif@solumslekt.org> <200511301118.28795.nosyman@gmail.com> In-Reply-To: <200511301118.28795.nosyman@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[AWL=0.000] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/281 X-Sequence-Number: 23532 NosyMan wrote: > Hi everyone, > > I have some kind of strange problem. I want to build general parametrized > trigger for my database. The parameter sent to the trigger contains a column > name that trigger should be check. > The 'vt' variable contains the column name. In the above statement I want that > NEW.vt to be interpreted as NEW.constant_value_id. It is possible to do this? Not in pl/pgsql - try one of the more interpreted languages - tcl/perl/python etc. Oh, and try not to reply to a previous message when starting a new thread - it can mess with threading in some mail packages. -- Richard Huxton Archonet Ltd