Unix Technical Forum

Sql - Error : Relation tmp_datos already exists

This is a discussion on Sql - Error : Relation tmp_datos already exists within the pgsql Sql forums, part of the PostgreSQL category; --> Hello! Mario Splivalo:Thank you very much for your helpl!!! I´m working with postgres 7.4.1. and VFoxPro 5. I call ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Sql

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 11:51 AM
Adriana Marcela Aguirre
 
Posts: n/a
Default Sql - Error : Relation tmp_datos already exists


Hello!

Mario Splivalo:Thank you very much for your helpl!!!



I´m working with postgres 7.4.1. and VFoxPro 5.
I call a function (Postgresql) many times from VFoxPro:

sql = "select * from f_rep_datos_lab( 'USUARIO')"
aaa=sqlexec(db_cone,sql, "report")



This function use temporary tables wich are created with "ON COMMIT DROP".

There is a problem because the temporary table already exists during the second execution of the function. ("Relation tmp_datos already exists")



But...iIf i call this function many times in the same PgAdmin' session, f.e., there weren't problems. The querys in that functions are execuded with "EXECUTE".



Whi?....what's wrong whit this calling?

Any idea will be welcome.



Thanks



Adriana





---------------------------------
1GB gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
Abrí tu cuenta aquí
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 11:51 AM
tobbe
 
Posts: n/a
Default Re: Sql - Error : Relation tmp_datos already exists

PgAdmin probably encloses all querys in transactions. Do you?

If not, try execute "BEGIN" and "COMMIT" just before and after your
query..

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:18 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com