Received: from datasoft.com (maniac.datasoft.com [63.228.155.187]) by postgresql.org (8.11.3/8.11.1) with SMTP id f5KMXSa91452 for ; Wed, 20 Jun 2001 18:33:28 -0400 (EDT) (envelope-from kristis.makris@datasoft.com) Message-Id: <200106202233.f5KMXSa91452@postgresql.org> Received: (qmail 31156 invoked from network); 20 Jun 2001 22:33:25 -0000 Received: from dsco-user.datasoft.com (HELO leonidas.corp.datasoft.com) (63.228.155.190) by maniac.datasoft.com with SMTP; 20 Jun 2001 22:33:25 -0000 Subject: Re: Using the extract() function in plpgsql From: Kristis Makris To: Peter Eisentraut Cc: pgsql-sql@postgresql.org In-Reply-To: Content-Type: text/plain X-Mailer: Evolution (0.9/+cvs.2001.03.14.20.47 - Preview Release) Date: 20 Jun 2001 15:33:25 -0700 Mime-Version: 1.0 X-Archive-Number: 200106/319 X-Sequence-Number: 3606 Hi Peter, Thanks for looking into this. I tried the CREATE TABLE AS syntax within an EXECUTE command but I still get the same error message. The CREATE TABLE AS docs mention that this syntax is "functionalily equivalent" to the SELECT INTO, so it's no surprise that I get the same error message: NOTICE: The execStmt is: CREATE TEMPORARY TABLE test AS SELECT extract(epoch from interval '62 days 22:30:48') ERROR: EXECUTE of SELECT ... INTO is not implemented yet The issue here is: How can I call the extract() function by providing a variable (instead of a hardcoded value) within plpgsql ? The EXECUTE statement facilitates building the *exact* string that should be executed (with no variables interleaved within it), but seems to be coming short on the implementation at the moment. How would the Postgres guys recommend using these functions with variables passed into it instead of hardcoded values? On 20 Jun 2001 23:44:43 +0200, Peter Eisentraut wrote: > Kristis Makris writes: > > > ERROR: EXECUTE of SELECT ... INTO is not implemented yet > > CREATE TABLE AS > > -- > Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter > > ---------------------------------------------------------------