X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 24770D1C944 for ; Thu, 24 Jul 2003 23:44:10 +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 86954-01 for ; Thu, 24 Jul 2003 20:43:26 -0300 (ADT) Received: from joeconway.com (66-146-172-86.skyriver.net [66.146.172.86]) by svr1.postgresql.org (Postfix) with ESMTP id 744FBD1C931 for ; Thu, 24 Jul 2003 20:44:07 -0300 (ADT) Received: from [206.19.64.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 4.0.6) with ESMTP-TLS id 13927 for pgsql-hackers@postgresql.org; Thu, 24 Jul 2003 16:08:21 -0700 Message-ID: <3F206EB3.9010904@joeconway.com> Date: Thu, 24 Jul 2003 16:41:39 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Hackers (PostgreSQL)" Subject: best way to determine start of new statement within a function? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/772 X-Sequence-Number: 41377 I know that I can use fcinfo->flinfo->fn_extra to determine if a particular function has been previously called within a given SQL statement execution, but what is the best way to determine that the current statement has or has not changed? Specifically I'd like to reset a variable within my PL/R interpreter each time a new SQL statement begins. Joe