cees.van.zeeland@xs4all.nl writes:
> -- Follow the next steps to produce an unexpected error
> -- The next 16 lines work fine
> CREATE DATABASE new
> WITH ENCODING='LATIN1'
> TEMPLATE=template0
> LC_COLLATE='C'
> LC_CTYPE='C'
> CONNECTION LIMIT=-1;
> DROP TABLE IF EXISTS category CASCADE;
> CREATE TABLE category
> (
> category_id SERIAL PRIMARY KEY
> ,category_name varchar(30) NOT NULL
> ,category_description varchar(200) NOT NULL
> );
AFAICS you didn't reconnect to database "new", so table "category" is
in whatever database you connected to originally.
> DROP DATABASE new;
If you had reconnected, it would not have allowed you to drop the current
database ...
regards, tom lane