X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id BF2BED1B458 for ; Fri, 28 Nov 2003 09:22:27 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 06674-03 for ; Fri, 28 Nov 2003 05:21:57 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 0E879D1B443 for ; Fri, 28 Nov 2003 05:21:56 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id hAS9LtNu010203 for ; Fri, 28 Nov 2003 09:21:55 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id hAS9KPV8010046 for pgsql-sql@postgresql.org; Fri, 28 Nov 2003 09:20:25 GMT From: bilaribilari@yahoo.com (FET) X-Newsgroups: comp.databases.postgresql.sql Subject: Stored procedures and relations Date: 28 Nov 2003 01:20:21 -0800 Organization: http://groups.google.com Lines: 18 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/326 X-Sequence-Number: 16140 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.