X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8F380D1C513 for ; Sun, 10 Aug 2003 03:58:19 +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 16695-07 for ; Sun, 10 Aug 2003 00:56:52 -0300 (ADT) Received: from www.postgresql.com (www.postgresql.com [64.117.225.209]) by svr1.postgresql.org (Postfix) with ESMTP id D17D2D1F4C8 for ; Sun, 10 Aug 2003 00:57:01 -0300 (ADT) Received: from gebeat.local (unknown [212.223.2.210]) by www.postgresql.com (Postfix) with SMTP id BEB9CCF7130 for ; Sat, 9 Aug 2003 21:37:26 -0300 (ADT) Received: (qmail 4754 invoked from network); 10 Aug 2003 00:31:06 -0000 Received: from unknown (HELO server) (info@unixserver.info@217.229.66.178) by gebeat.ecore.net with SMTP; 10 Aug 2003 00:31:06 -0000 Message-ID: <025d01c35ed7$0ad4e590$3214a8c0@server> From: "Bernd Hoffmann" To: References: <01b101c35eb3$6e75b2b0$3214a8c0@server> <200308091804.10545.akopciuch@olympusproject.org> Subject: Re: functions with plpgsql Date: Sun, 10 Aug 2003 02:33:36 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/34 X-Sequence-Number: 2211 Hallo Andy, > I do not think you can evaluate a declared vairable as a table name in the > SELECT statement. where can I find some docu about declare a table by variable. > I don't think you really need to do this though. If you have the table name > already. > why go: > SELECT next_id(logs); > SELECT MAX(id) + 1 FROM logs; it's only a example, I got everytime the error: PostgreSQL meldet: ERROR: parser: parse error at or near "$1" PS.: Excuse me, for my bad english :) MfG Bernd