Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 40498475CA9 for ; Thu, 16 Jan 2003 23:42:03 -0500 (EST) Received: from web12702.mail.yahoo.com (web12702.mail.yahoo.com [216.136.173.239]) by postgresql.org (Postfix) with SMTP id 8FA7E475BC3 for ; Thu, 16 Jan 2003 23:42:02 -0500 (EST) Message-ID: <20030117044207.10247.qmail@web12702.mail.yahoo.com> Received: from [203.146.122.153] by web12702.mail.yahoo.com via HTTP; Thu, 16 Jan 2003 20:42:07 PST Date: Thu, 16 Jan 2003 20:42:07 -0800 (PST) From: chester c young Subject: Re: cannot create function that uses variable table name To: Matthew Nuzum Cc: pgsql-sql@postgresql.org In-Reply-To: <001d01c2bdd9$191b07f0$6700a8c0@mattspc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/272 X-Sequence-Number: 11137 --- Matthew Nuzum wrote: > I thought I would be crafty and devise a function that would always > return the highest numbered item in the table. But it doesn’t work. > It always gives me a parse error at $1. Here’s the function: build the query as a string and execute it. __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com