X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0B12B9DCB4A for ; Thu, 15 Dec 2005 09:03:20 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 96085-02 for ; Thu, 15 Dec 2005 09:03:23 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp2.actcom.co.il (smtp2.actcom.co.il [192.114.47.35]) by postgresql.org (Postfix) with ESMTP id 956409DCB0B for ; Thu, 15 Dec 2005 09:03:17 -0400 (AST) Received: from perpetual.jerusalem.plus.com (l192-114-46-179.broadband.actcom.net.il [192.114.46.179]) by smtp2.actcom.co.il (8.13.3/8.13.3) with ESMTP id jBFD3FWL032428 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 15 Dec 2005 15:03:20 +0200 Received: from daniel (helo=localhost) by perpetual.jerusalem.plus.com with local-esmtp (Exim 4.50) id 1Emt8o-0008Hn-PX for pgsql-interfaces@postgresql.org; Thu, 15 Dec 2005 15:27:26 +0200 Date: Thu, 15 Dec 2005 15:27:26 +0200 (IST) From: Daniel Ariel X-X-Sender: daniel@perpetual.jerusalem.plus.com To: pgsql-interfaces@postgresql.org Subject: Re: Obtaining information on the schema of tables which In-Reply-To: <10809.1134630815@sss.pgh.pa.us> Message-ID: References: <20051214173955.GA9238@wolff.to> <22357.1134583686@sss.pgh.pa.us> <10809.1134630815@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[UPPERCASE_25_50=0] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/25 X-Sequence-Number: 5893 OK, if I understand things correctly, comparing the CONSTRAINT_COLUMN_USAGE view: SQL2003 late draft: WHERE ( SCHEMA_OWNER = CURRENT_USER OR SCHEMA_OWNER IN ( SELECT ROLE_NAME FROM ENABLED_ROLES ) ) PG 7.4.7: WHERE pg_class.relowner=pg_user.usesysid AND pg_user.usename=current_user() What PG should be, in order to meet the SQL2003 standard: WHERE pg_class.relowner=pg_user.usesysid AND (pg_user.usename=current_user() OR pg_user IN (SELECT role_name FROM information_schema.enabled_roles) ) I cannot comment on other changes between SQL92 and 2003 until somebody can point me in the direction of the SQL92 spec. Please note that my quotes are based on the SQL as extracted from the views in the database, not those in CVS. Daniel