pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kristis Makris <kristis.makris@datasoft.com>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Using the extract() function in plpgsql
Date: 20 Jun 2001 15:33:25 -0700
Message-ID: <200106202233.f5KMXSa91452@postgresql.org> (raw)
In-Reply-To: <Pine.LNX.4.30.0106202344190.725-100000@peter.localdomain>

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
> 
> ---------------------------------------------------------------




view thread (11+ messages)  latest in thread

Message-ID: <200106202233.f5KMXSa91452@postgresql.org>
Permalink:  ../200106202233.f5KMXSa91452@postgresql.org/
Also on:    postgresql.org/message-id/200106202233.f5KMXSa91452@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: kristis.makris@datasoft.com, peter_e@gmx.net
  Subject: Re: Using the extract() function in plpgsql
  In-Reply-To: <200106202233.f5KMXSa91452@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox