Re: BUG #12819: CREATE TYPE fails within CREATE SCHEMA

From: John R Pierce <pierce(at)hogranch(dot)com>
To: postgresql(dot)org(at)ciotog(dot)net, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12819: CREATE TYPE fails within CREATE SCHEMA
Date: 2015-03-02 18:03:14
Message-ID: 54F4A5E2.1010608@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 3/2/2015 8:55 AM, postgresql(dot)org(at)ciotog(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Kevin Grittner 2015-03-02 20:55:13 Re: BUG #12816: Problem in usung psql
Previous Message Tom Lane 2015-03-02 17:53:55 Re: BUG #12819: CREATE TYPE fails within CREATE SCHEMA