Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j9F3P-0001qz-Cn for pgsql-general@arkaria.postgresql.org; Tue, 03 Mar 2020 21:26:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j9F3M-0004l0-6A for pgsql-general@arkaria.postgresql.org; Tue, 03 Mar 2020 21:26:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j9F3L-0004ks-Sc for pgsql-general@lists.postgresql.org; Tue, 03 Mar 2020 21:26:11 +0000 Received: from mailbackend.panix.com ([166.84.1.89]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j9F3E-0005Vm-2p for pgsql-general@lists.postgresql.org; Tue, 03 Mar 2020 21:26:11 +0000 Received: from panix5.panix.com (panix5.panix.com [166.84.1.5]) by mailbackend.panix.com (Postfix) with ESMTP id 48X96d5v0Kz1xd5; Tue, 3 Mar 2020 16:26:01 -0500 (EST) Received: by panix5.panix.com (Postfix, from userid 17622) id 48X96d4D7CzfYm; Tue, 3 Mar 2020 16:26:01 -0500 (EST) Date: Tue, 3 Mar 2020 16:26:01 -0500 From: stan To: Tom Lane Cc: pgsql-general@lists.postgresql.org Subject: Re: Examing cotets of NEW & OLD in a function programed in perl Message-ID: <20200303212601.GA6469@panix.com> References: <20200303173901.GA5019@panix.com> <6106.1583258340@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6106.1583258340@sss.pgh.pa.us> X-Editor: gVim List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Mar 03, 2020 at 12:59:00PM -0500, Tom Lane wrote: > stan writes: > > I need to write a generic function to process data before allowing the > > insert or update to continue. > > To do this, I need to be able to examine the NEW, and OLD structures > > without prior knowledge of the structure of the table that fired the > > trigger. > > AFAIR, they're just hashes in Perl, so you should be able to do > stuff like iterating over the hash keys. > > regards, tom lane So, they should just be visible as OLD, and NEW as hasshes? Sorry for my lack of understnading. -- "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." -- Benjamin Franklin