pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedStored procedures and relations
2+ messages / 2 participants
[nested] [flat]
* Stored procedures and relations
@ 2003-11-28 09:20 FET <bilaribilari@yahoo.com>
2003-11-29 03:09 ` Re: Stored procedures and relations Stephan Szabo <sszabo@megazone.bigpanda.com>
0 siblings, 1 reply; 2+ messages in thread
From: bilaribilari@yahoo.com @ 2003-11-28 09:20 UTC (permalink / raw)
To: pgsql-sql
Hi everybody,
I have a stored procedure that drops table A and then creates table A
again. The table A has no constraints on any columns. When I execute
the stored procedure by saying: SELECT sp_myproc(); It gives me an
error saying : Relation 68428 does not exist.
When I remove the CREATE FUNCTION and the stuff used to make it a
stored procedure, and run the commands in the procedure, it works
correctly.
This behaviour is observed on all stored procedures on PG-SQL. I would
really appreciate any help or interpretation of this error. By the
way, the same stored procedure (with the syntax changed of course)
works perfectly on MS SQL Server.
Thanks in advance.
Regards.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Stored procedures and relations
2003-11-28 09:20 Stored procedures and relations FET <bilaribilari@yahoo.com>
@ 2003-11-29 03:09 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
0 siblings, 0 replies; 2+ messages in thread
From: Stephan Szabo @ 2003-11-29 03:09 UTC (permalink / raw)
To: FET <bilaribilari@yahoo.com>; +Cc: pgsql-sql
On Fri, 28 Nov 2003, FET wrote:
> Hi everybody,
> I have a stored procedure that drops table A and then creates table A
> again. The table A has no constraints on any columns. When I execute
> the stored procedure by saying: SELECT sp_myproc(); It gives me an
> error saying : Relation 68428 does not exist.
>
> When I remove the CREATE FUNCTION and the stuff used to make it a
> stored procedure, and run the commands in the procedure, it works
> correctly.
>
> This behaviour is observed on all stored procedures on PG-SQL. I would
> really appreciate any help or interpretation of this error. By the
> way, the same stored procedure (with the syntax changed of course)
> works perfectly on MS SQL Server.
You haven't given too many details about what your function does, but, in
general if you're accessing a table whose structure is being dynamically
modified during/between calls, you'll currently want to be using EXECUTE
on queries relating to that table.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-11-29 03:09 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-28 09:20 Stored procedures and relations FET <bilaribilari@yahoo.com>
2003-11-29 03:09 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox