473,503 Members | 1,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

7.4 ERROR: CREATE LOCAL TEMPORARY TABLE ... ON COMMIT DROP inside a function

I found a post about something similar in an older release:
http://archives.postgresql.org/pgsql...8/msg00151.php

Here's the issue. Inside a function I'm calling
CREATE LOCAL TEMPORARY TABLE ds_copy_item_meta ( LIKE
merchandise.item_meta EXCLUDING DEFAULTS ) on COMMIT DROP;

Of course it might be that the ON COMMIT DROP is redundant, I don't know
enough about temp tables. Here's the problem, however, the first call of
the table works fine. The second call it complains about a bad OID. Could
it be that the bug that was fixed for regular temporary tables (without an
on commit modifier) somehow didn't get fixed for this construct?

The work-around has been to just not use the modifier, but I was surprised
by the OID error and think it might be incorrect behavior.

== Ezra Epstein.

Nov 12 '05 #1
1 4140
Typo, see below:

"ezra epstein" <ee***************@prajnait.com> wrote in message
news:xl********************@speakeasy.net...
I found a post about something similar in an older release:
http://archives.postgresql.org/pgsql...8/msg00151.php

Here's the issue. Inside a function I'm calling
CREATE LOCAL TEMPORARY TABLE ds_copy_item_meta ( LIKE
merchandise.item_meta EXCLUDING DEFAULTS ) on COMMIT DROP;

Of course it might be that the ON COMMIT DROP is redundant, I don't know
enough about temp tables. Here's the problem, however, the first call of
the table works fine. The second call it complains about a bad OID. Could

that should read: the first call of the function.
it be that the bug that was fixed for regular temporary tables (without an
on commit modifier) somehow didn't get fixed for this construct?

The work-around has been to just not use the modifier, but I was surprised
by the OID error and think it might be incorrect behavior.

== Ezra Epstein.

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3024
by: Morten Gulbrandsen | last post by:
mysql> USE company; Database changed mysql> mysql> DROP TABLE IF EXISTS EMPLOYEE; -------------- DROP TABLE IF EXISTS EMPLOYEE -------------- Query OK, 0 rows affected (0.00 sec)
8
8939
by: Kragen Sitaker | last post by:
ERROR: Cannot insert a duplicate key into unique index pg_class_relname_nsp_index We've been getting this error in our application every once in a while --- typically once an hour to once a day,...
2
1693
by: spied | last post by:
i get this error messages in my application: query error: ERROR: duplicate key violates unique constraint "pg_type_typname_nsp_index" failed query: SELECT packv_uid INTO TEMPORARY...
1
2558
by: Thomas F.O'Connell | last post by:
Is the ON COMMIT syntax available to temporary tables created using the CREATE TABLE AS syntax? If not, is there a way to drop such a table at the end of a transaction? -tfo -- Thomas F....
1
6562
by: Timothy Perrigo | last post by:
(PostgreSQL 8.0 beta 4 on Mac OS X 10.3.6) I'm working on a function which creates and populates a temporary table, then returns the number of records it has inserted. I'm getting an error,...
0
23442
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub)...
2
5315
by: Joe Salmeri | last post by:
I believe this bug is also related to the other problem I just reported. OS = Windows XP SP2 DB = Microsoft Access XP PROBLEM: When you use + (or &) to concatenation columns together and...
0
2027
by: cngtx | last post by:
Hi, I could not figure out why I am getting the following error when I initiated the Insert into the mainframe DB2 table from a server. I have created the trigger and the stored procedure (as shown...
5
8798
by: Rahul B | last post by:
Hi, I have very little knowledge about creating Procedures/functions in DB2. When i tried to create the test function like CREATE FUNCTION GET_TEST (P_TEST_ID INTEGER, P_SEL_OR_SORT...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7460
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.