Re: Using the extract() function in plpgsql

From: Kristis Makris <kristis(dot)makris(at)datasoft(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Using the extract() function in plpgsql
Date: 2001-06-26 19:58:51
Message-ID: 200106261958.f5QJwsa45412@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

On 21 Jun 2001 15:28:29 +0100, Richard Huxton wrote:
> From: "Kristis Makris" <kristis(dot)makris(at)datasoft(dot)com>
>
> > 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
>
> In the example above you can just CREATE the table then INSERT into it -
> avoids the whole issue. Is the example accurate?
>
> - Richard Huxton

Creating the temporary table first, and then inserting into it seems to
be a *somehow* functional workaround. However, the function cannot be
called again a second time during the same session, since the temporary
table already exists. Is there a way a table can be created truly
temporary, existing only within the scope of a plpgsql function?

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Dave Harkness 2001-06-26 20:48:04 Re: High Memory Usage Patch -- Disregard my last message
Previous Message Bruce Momjian 2001-06-26 19:19:28 Re: Re: [ADMIN] High memory usage [PATCH]

Browse pgsql-sql by date

  From Date Subject
Next Message Jim 2001-06-26 21:59:00 Text manipulation in SQL
Previous Message Jason Earl 2001-06-26 16:28:22 Re: Changing datatype of a column