Re: Using the extract() function in plpgsql

From: Kristis Makris <kristis(dot)makris(at)datasoft(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Using the extract() function in plpgsql
Date: 2001-06-20 22:33:25
Message-ID: 200106202233.f5KMXSa91452@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

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(at)gmx(dot)net http://funkturm.homeip.net/~peter
>
> ---------------------------------------------------------------

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2001-06-21 01:55:50 Re: High memory usage
Previous Message Rainer Mager 2001-06-20 22:19:54 RE: High memory usage

Browse pgsql-sql by date

  From Date Subject
Next Message Ross J. Reedstrom 2001-06-20 23:13:23 Re: commentds on redhats new database
Previous Message clayton cottingham 2001-06-20 22:28:34 commentds on redhats new database