473,785 Members | 2,851 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_me ta ( LIKE
merchandise.ite m_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 4168
Typo, see below:

"ezra epstein" <ee************ ***@prajnait.co m> wrote in message
news:xl******** ************@sp eakeasy.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_me ta ( LIKE
merchandise.ite m_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
3046
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
9026
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, although it varies over time. The daemon that gets the error exits and restarts a few seconds later. Usually it's fine then, but sometimes the error happens three or more times in a row. Occasionally, instead, we get "ERROR: Cannot insert a...
2
1716
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 my_new_to1c FROM new_to1c connection error: no connection to the server it's my code: for (;;) { doquery("begin work");
1
2582
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. O'Connell Co-Founder, Information Architect Sitening, LLC
1
6588
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, though, after successive invocations of the function (I can call it once successfully, but on the next call I get an error). I've been able to reproduce the error with the following sample function: create or replace function test() returns...
0
23511
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) 5: Procedure call or argument is not valid. 6: Overflow. 7: Out of memory.
2
5328
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 the columns are of type text and the combined length exceed 255 this causes pyodbc to fail and python to crash.
0
2071
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 below). If I insert a row into the table using batch sql job on mainframe, the stored procedure is triggered by the db2 trigger successfully after a row is inserted into the table. However, if I do the same insert through front-end apps using a...
5
8840
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 INTEGER,
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7499
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6739
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.