Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: Relation mi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 5 Topic 3110 of 3323
Post > Topic >>

Re: Relation missing?

by gentosaker@[EMAIL PROTECTED] ("A B") May 13, 2008 at 03:43 PM

In this function I create no table, I just do insert into various
already existing tables.
It is not a prepared statement, but a function I created, so I'm not
sure if EXECUTE is what I should use.
This function has successfully run many times before, over several days.

Excuse my ignorance, but what is DDL commands? Is that like creating
tables?


2008/5/13 A. Kretschmer <andreas.kretschmer@[EMAIL PROTECTED]
>:
> am  Tue, dem 13.05.2008, um 15:08:51 +0200 mailte A B folgendes:
>
>
> > I got an error
>  >
>  > SELECT ERecord(100, 3492,'2008-05-13 10:25:57', 1, 0);
>  >
>  > gave me (translating into english)
>  >
>  > ERROR:  relation with OID 31330 doesn't exist
>  > CONTEXT:  SQL-statement: "INSERT INTO eLog (customer,shop,event,time)
>  > VALUES ( $1 , $2 , $3 , $4 )"
>  > PL/pgSQL function "erecord" line 5 at SQL statement
>  >
>  > ERecord is a function written in PL/pgSQL... so what can this mean?
>
>  Wild gues: within this function you create this table and you don't use
>  EXECUTE for that. When you start a new session, the first time yout
>  function works fine, but the second call fails. Right?
>
>  PG caches the plan and the OID's for objects, because this fact it
fails
>  the second time. To prevent this, use EXECUTE for all DDL-commands.
>
>
>  Andreas
>  --
>  Andreas Kretschmer
>  Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
>  GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net
>
>  --
>  Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
>  To make changes to your subscription:
>  http://www.postgresql.org/mailpref/pgsql-novice
>

-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 5 Posts in Topic:
Relation missing?
gentosaker@[EMAIL PROTECT  2008-05-13 15:08:51 
Re: Relation missing?
andreas.kretschmer@[EMAIL  2008-05-13 15:38:15 
Re: Relation missing?
gentosaker@[EMAIL PROTECT  2008-05-13 15:43:52 
Re: Relation missing?
andreas.kretschmer@[EMAIL  2008-05-13 15:53:27 
Re: Relation missing?
brucejhyatt@[EMAIL PROTEC  2008-05-13 10:20:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 5:25:59 CST 2008.