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