Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YSUgo-0008Tb-3Q for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Mar 2015 18:03:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YSUgn-00072y-Hh for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Mar 2015 18:03:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YSUgl-00070F-SV for pgsql-bugs@postgresql.org; Mon, 02 Mar 2015 18:03:32 +0000 Received: from hogranch.com ([75.101.82.47]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YSUgh-0003AO-B8 for pgsql-bugs@postgresql.org; Mon, 02 Mar 2015 18:03:30 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id t22I3JH05652; Mon, 2 Mar 2015 10:03:19 -0800 Message-ID: <54F4A5E2.1010608@hogranch.com> Date: Mon, 02 Mar 2015 10:03:14 -0800 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: postgresql.org@ciotog.net, pgsql-bugs@postgresql.org Subject: Re: BUG #12819: CREATE TYPE fails within CREATE SCHEMA References: <20150302165554.2546.2997@wrigleys.postgresql.org> In-Reply-To: <20150302165554.2546.2997@wrigleys.postgresql.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 3/2/2015 8:55 AM, postgresql.org@ciotog.net wrote: > When creating objects within a CREATE SCHEMA definition, "CREATE TYPE" fails > with 'ERROR: syntax error at or near "TYPE"'. > > Eg: > postgres=# CREATE SCHEMA foo > postgres-# CREATE TYPE foo.bar AS ENUM('ONE','TWO','THREE'); > ERROR: syntax error at or near "TYPE" > LINE 2: CREATE TYPE foo.bar AS ENUM('ONE','TWO','THREE'); > ^ > no ; on the first command, so that got read as CREATE SCHEMA foo CREATE TYPE .... which isn't a valid command. -- john r pierce 37N 122W somewhere on the middle of the left coast -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs