|
Home > Archive > PostgreSQL Bugs > December 2005 > plpgsql TEMP table issue not fixed in 8.1?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
plpgsql TEMP table issue not fixed in 8.1?
|
|
| Josh Berkus 2005-08-31, 8:24 pm |
| Folks,
I'd swear somebody committed a fix for the issue with temp tables inside
plpgsql functions, like, months ago. Yet I still get:
ERROR: relation with OID 16607 does not exist
CONTEXT: SQL statement "INSERT INTO tmp_runs ( run_id, batch, machine )
VALUES ( NEXTVAL('runs_run_id
_seq'), $1 , $2 [ $3 ] )"
PL/pgSQL function " generate_test_series
" line 67 at SQL statement
ERROR: relation with OID 16607 does not exist
This is CVS as of a week ago.
--
--Josh
Josh Berkus
Aglio Database Solutions
San Francisco
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
| |
| Tom Lane 2005-09-01, 3:25 am |
| Josh Berkus <josh@agliodbs.com> writes:
> I'd swear somebody committed a fix for the issue with temp tables inside
> plpgsql functions, like, months ago.
Nope.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Jim Klo 2005-12-16, 1:23 pm |
| > Folks,
>
>I'd swear somebody committed a fix for the issue with temp tables
inside
>plpgsql functions, like, months ago. Yet I still get:
>ERROR: relation with OID 16607 does not exist
>CONTEXT: SQL statement "INSERT INTO tmp_runs ( run_id, batch, machine
)
>VALUES ( NEXTVAL('runs_run_id
_seq'), $1 , $2 [ $3 ] )"
> PL/pgSQL function " generate_test_series
" line 67 at SQL
statement
>ERROR: relation with OID 16607 does not exist
I'm having a similar problem:
ERROR: relation with OID 7121526 does not exist
CONTEXT: SQL statement "SELECT * INTO temp tmp_resourcequeue from
resourcequeue where timeblockid in (select timeblockid from
tmp_timeblock)"
PL/pgSQL function "archivetimeblocks" line 54 at SQL statement
Works the first time, but not the second... even tho the temp table has
been explicitly dropped between executions.
Is there a fix or workaround for this yet?
Jim Klo
Sr. Web Systems Engineer
Web Associates
http://webassociates.com
| |
| Neil Conway 2005-12-16, 1:24 pm |
| On Thu, 2005-12-15 at 11:09 -0800, Jim Klo wrote:
> I’m having a similar problem:
>
> ERROR: relation with OID 7121526 does not exist
> CONTEXT: SQL statement "SELECT * INTO temp tmp_resourcequeue from resourcequeue where timeblockid in (select timeblockid from tmp_timeblock)"
> PL/pgSQL function "archivetimeblocks" line 54 at SQL statement
>
> Works the first time, but not the second… even tho the temp table has been explicitly dropped between executions.
>
> Is there a fix or workaround for this yet?
Only the workarounds that have always existed: drop and recreate the
function, disconnect and then reconnect the client application, or
reference the temp table using EXECUTE only. The underlying problem
(invalidation of cached query plans) has not yet been fixed.
-Neil
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
|
|
|
|
|