Re: Drop Schema from Postgres

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Tripura" <k_tripura(at)hotmail(dot)com>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: Drop Schema from Postgres
Date: 2012-01-05 16:22:59
Message-ID: 4F057A0302000025000443ED@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Tripura <k_tripura(at)hotmail(dot)com> wrote:

> I am trying to drop a schema by writing the following line
>
> DROP SCHEMA "xxx" IF EXISTS

The syntax requires:
DROP SCHEMA IF EXISTS "xxx";

> I have two issues here -
> 1> I am not sure how to specify the db from which the schema
> should be deleted

You connect to a particular database. All operations are against
that database.

> 2> I am getting the following error message -- "DROP: command not
> found"

Perhaps you should try this in an interactive session and paste the
actual error lines. I get this:

ERROR: syntax error at or near "IF"
LINE 1: DROP SCHEMA "xxx" IF EXISTS;

-Kevin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Walter Hurry 2012-01-05 18:50:15 Re: Drop Schema from Postgres
Previous Message Scott Marlowe 2012-01-05 15:06:19 Re: system is swapping (not actively), why?