Re: [GENERAL] Executing a user created function twice give an error

2008-12-05 Thread Wajid Khattak
Thanks for all of you help. It's working now :-) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Executing a user created function twice give an error

2008-12-04 Thread Grzegorz Jaƛkiewicz
On Thu, Dec 4, 2008 at 9:45 AM, A. Kretschmer <[EMAIL PROTECTED]> wrote: > test=*# select * from tmp_table(); > ERROR: relation with OID 187431854 does not exist that's a known problem, it was fixed in 8.3. I would strongly advice you to upgrade, shall you depend on temporary tables in plpgsql.

Re: [GENERAL] Executing a user created function twice give an error

2008-12-04 Thread A. Kretschmer
am Thu, dem 04.12.2008, um 9:23:31 + mailte Wajid Khattak folgendes: > Did try by encapsulating the create and drop queries within EXECUTE, but it > seems to be giving the same error. The changed function is as follows: You need to execute the insert-statement also: test=# create or replac

Re: [GENERAL] Executing a user created function twice give an error

2008-12-04 Thread Wajid Khattak
- Original Message - From: "A. Kretschmer" <[EMAIL PROTECTED]> To: pgsql-general@postgresql.org Sent: 02 December 2008 12:50:44 o'clock (GMT) Europe/London Subject: Re: [GENERAL] Executing a user created function twice give an error am Tue, dem 02.12.2008

Re: [GENERAL] Executing a user created function twice give an error

2008-12-02 Thread Raymond O'Donnell
On 02/12/2008 12:50, A. Kretschmer wrote: > PG cached the plan and the also the OID for affected tables. To avoid > this, use EXECUTE 'insert your query here' for create or delete tables > within plpgsql. This has been fixed in 8.3 - you no longer have to construct dynamically any statements whic

Re: [GENERAL] Executing a user created function twice give an error

2008-12-02 Thread A. Kretschmer
am Tue, dem 02.12.2008, um 12:36:26 + mailte Wajid Khattak folgendes: > Thank for your reply. > > Could you please elaborate it a little bit further by referring to the > fucntion as I am quite new to Postgres. Sure, read the doku: http://www.postgresql.org/docs/current/static/plpgsql-stat

Re: [GENERAL] Executing a user created function twice give an error

2008-12-02 Thread Wajid Khattak
:20 o'clock (GMT) Europe/London Subject: Re: [GENERAL] Executing a user created function twice give an error am Tue, dem 02.12.2008, um 11:11:44 + mailte Wajid Khattak folgendes: > Hi, > > PostgreSQL 8.1.11 > > I have created a function that works fine when run for the first

Re: [GENERAL] Executing a user created function twice give an error

2008-12-02 Thread A. Kretschmer
am Tue, dem 02.12.2008, um 11:11:44 + mailte Wajid Khattak folgendes: > Hi, > > PostgreSQL 8.1.11 > > I have created a function that works fine when run for the first time after > that it gives an error until I open another Query window. Use EXECUTE for DDL-Statements, for instance, creat

[GENERAL] Executing a user created function twice give an error

2008-12-02 Thread Wajid Khattak
Hi, PostgreSQL 8.1.11 I have created a function that works fine when run for the first time after that it gives an error until I open another Query window. The function is as follows /// CREATE OR REPLACE FUNCTION func_snappointtonetwork(p_pointtobesnapped "varcha