pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedDrop Schema from Postgres
4+ messages / 3 participants
[nested] [flat]
* Drop Schema from Postgres
@ 2012-01-03 21:52 Tripura <k_tripura@hotmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Tripura @ 2012-01-03 21:52 UTC (permalink / raw)
To: pgsql-admin
Hi,
I am trying to execute a few postgres commands from a bash file
I am trying to drop a schema by writing the following line
DROP SCHEMA "xxx" IF EXISTS
I have two issues here -
1> I am not sure how to specify the db from which the schema should be
deleted
2> I am getting the following error message -- "DROP: command not found"
Can anyone help me with this issue
Thanku in advance
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Drop-Schema-from-Postgres-tp5118072p5118072.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Drop Schema from Postgres
@ 2012-01-05 16:22 Kevin Grittner <Kevin.Grittner@wicourts.gov>
parent: Tripura <k_tripura@hotmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Grittner @ 2012-01-05 16:22 UTC (permalink / raw)
To: Tripura <k_tripura@hotmail.com>; pgsql-admin
Tripura <k_tripura@hotmail.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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Drop Schema from Postgres
@ 2012-01-05 18:50 Walter Hurry <walterhurry@lavabit.com>
parent: Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 1 reply; 4+ messages in thread
From: Walter Hurry @ 2012-01-05 18:50 UTC (permalink / raw)
To: pgsql-admin
On Thu, 05 Jan 2012 10:22:59 -0600, Kevin Grittner wrote:
> Tripura <k_tripura@hotmail.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;
He's not even in psql
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Drop Schema from Postgres
@ 2012-01-05 20:58 Tripura <k_tripura@hotmail.com>
parent: Walter Hurry <walterhurry@lavabit.com>
0 siblings, 0 replies; 4+ messages in thread
From: Tripura @ 2012-01-05 20:58 UTC (permalink / raw)
To: pgsql-admin
Hi,
I got the solution for this issue.
Thanku
Date: Thu, 5 Jan 2012 10:51:13 -0800
From: ml-node+s1045698n5123527h28@n5.nabble.com
To: k_tripura@hotmail.com
Subject: Re: Drop Schema from Postgres
On Thu, 05 Jan 2012 10:22:59 -0600, Kevin Grittner wrote:
> Tripura <[hidden email]> 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;
He's not even in psql
--
Sent via pgsql-admin mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
If you reply to this email, your message will be added to the discussion below:
http://postgresql.1045698.n5.nabble.com/Drop-Schema-from-Postgres-tp5118072p5123527.html
To unsubscribe from Drop Schema from Postgres, click here.
NAML
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Drop-Schema-from-Postgres-tp5118072p5123827.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2012-01-05 20:58 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-01-03 21:52 Drop Schema from Postgres Tripura <k_tripura@hotmail.com>
2012-01-05 16:22 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2012-01-05 18:50 ` Walter Hurry <walterhurry@lavabit.com>
2012-01-05 20:58 ` Tripura <k_tripura@hotmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox