Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group