X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 593BC47580B for ; Fri, 28 Mar 2003 03:35:41 -0500 (EST) Received: from post.webmailer.de (natsmtp00.webmailer.de [192.67.198.74]) by postgresql.org (Postfix) with ESMTP id 41318474E44 for ; Fri, 28 Mar 2003 03:35:40 -0500 (EST) Received: from ianb.local (pD9EB1DB4.dip.t-dialin.net [217.235.29.180]) by post.webmailer.de (8.12.8/8.8.7) with ESMTP id h2S8Zc7S001182; Fri, 28 Mar 2003 09:35:39 +0100 (MET) Content-Type: text/plain; charset="iso-8859-1" From: Ian Barwick To: "jack" , Subject: Re: EXECUTE problem on schema Date: Fri, 28 Mar 2003 09:34:59 +0100 X-Mailer: KMail [version 1.4] References: <000f01c2f403$c6fc7bf0$1400a8c0@jac> <200303271111.24745.barwick@gmx.net> <004501c2f4c5$5116f970$1400a8c0@jac> In-Reply-To: <004501c2f4c5$5116f970$1400a8c0@jac> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200303280934.59317.barwick@gmx.net> X-Spam-Status: No, hits=-26.8 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,RCVD_IN_NJABL, RCVD_IN_OSIRUSOFT_COM,REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200303/625 X-Sequence-Number: 12663 On Friday 28 March 2003 01:59, jack wrote: (...) > And the following are the example. Aha, the problem is not EXECUTE but QUOTE_IDENT: test=3D# SELECT quote_ident('public.test_j2'); quote_ident=20=20=20=20 ------------------ "public.test_j2" (1 row) test=3D# SELECT * FROM "public.test_j2"; ERROR: Relation "public.test_j2" does not exist which is correct, because schema and relation names can contain periods. To quote a schema-qualified relation name you need something like "public"."test_j2" (or "public"."table.with_period_in_name") which quote_indent can't handle because it doesn't know whether the period is a schema / relation name divider or part of the relation name. This has come up before, see: http://archives.postgresql.org/pgsql-hackers/2002-11/msg00892.php It would probably be easiest to leave out the quote_ident from your function definition and do the quoting manually in the function call, if necessary, which mostly isn't. Ian Barwick barwick@gmx.net