pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: removing a DB??
3+ messages / 3 participants
[nested] [flat]

* Re: removing a DB??
@ 2000-11-27 11:34  Jens Hartwig <jhartwig@debis.com>
  parent: Bruno Boettcher <bboett@erm1.u-strasbg.fr>
  0 siblings, 1 reply; 3+ messages in thread

From: Jens Hartwig @ 2000-11-27 11:34 UTC (permalink / raw)
  To: bboett@erm1.u-strasbg.fr; +Cc: pgsql-sql

Hello Bruno,

you get a list of all available databases by issuing a query on
"pg_database":

  select * from pg_database;

What do you mean with "internal DB's"?

Regards, Jens

Bruno Boettcher schrieb:
> 
> hello,
> 
> i have a nice command to create a db 'createdb', but hows when you want
> to get rid of a DB??  searched for a removedb script....
> Took me some time to read through the
> man page, find out how the command actually works, look up the SQL
> commands and find out that there's also a DROP DATABASE SQL-command...
> 
> And then looking up that there'S really a dropdb command....
> 
> would be really nice if in the man page there was a short ref, telling
> me about related commands.....
> 
> Then the question arouse, if i can create and destroy databases from
> SQL, building my install script, it would be nice to test for the
> presence of a DB and in case of inexistence, create it on the fly.
> 
> For this it would be nice if i could have found for each possible command
> in psql the SQL counterpart, notably, how to list all available DB's
> through SQL.
> 
> BTW shouldn't \l display also the internal DB's ? If it would i could
> have searched for the right table....
> 
> --
> ciao bboett
> ==============================================================
> bboett@earthling.net
> http://inforezo.u-strasbg.fr/~bboett http://erm1.u-strasbg.fr/~bboett
> ===============================================================
> the total amount of intelligence on earth is constant.
> human population is growing....

-- 
Herzliche Grüße, Jens Hartwig

=============================================
Jens Hartwig
---------------------------------------------
debis Systemhaus GEI mbH
10875 Berlin
Tel.     : +49 (0)30 2554-3282
Fax      : +49 (0)30 2554-3187
Mobil    : +49 (0)170 167-2648
E-Mail   : jhartwig@debis.com
=============================================



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* removing a DB??
@ 2000-11-27 11:44  Bruno Boettcher <bboett@erm1.u-strasbg.fr>
  0 siblings, 1 reply; 3+ messages in thread

From: Bruno Boettcher @ 2000-11-27 11:44 UTC (permalink / raw)
  To: pgsql-sql

hello,

i have a nice command to create a db 'createdb', but hows when you want
to get rid of a DB??  searched for a removedb script....
Took me some time to read through the
man page, find out how the command actually works, look up the SQL
commands and find out that there's also a DROP DATABASE SQL-command...

And then looking up that there'S really a dropdb command....

would be really nice if in the man page there was a short ref, telling
me about related commands.....

Then the question arouse, if i can create and destroy databases from
SQL, building my install script, it would be nice to test for the
presence of a DB and in case of inexistence, create it on the fly.

For this it would be nice if i could have found for each possible command
in psql the SQL counterpart, notably, how to list all available DB's
through SQL.

BTW shouldn't \l display also the internal DB's ? If it would i could
have searched for the right table....

-- 
ciao bboett
==============================================================
bboett@earthling.net
http://inforezo.u-strasbg.fr/~bboett http://erm1.u-strasbg.fr/~bboett
===============================================================
the total amount of intelligence on earth is constant.
human population is growing....



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: removing a DB??
@ 2000-11-27 19:34  Mathijs Brands <mathijs@ilse.nl>
  parent: Jens Hartwig <jhartwig@debis.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Mathijs Brands @ 2000-11-27 19:34 UTC (permalink / raw)
  To: Jens Hartwig <jhartwig@debis.com>; +Cc: bboett@erm1.u-strasbg.fr; pgsql-sql

On Mon, Nov 27, 2000 at 12:34:38PM +0100, Jens Hartwig allegedly wrote:
> Hello Bruno,
> 
> you get a list of all available databases by issuing a query on
> "pg_database":
> 
>   select * from pg_database;
> 
> What do you mean with "internal DB's"?
> 
> Regards, Jens

You can also get a list of databases by executing psql -l from the
commandline.

My 0.02 euro,

Mathijs
-- 
"It is a great thing to start life with a small number of really good books
 which are your very own". 
        Sir Arthur Conan Doyle  (1859-1930)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2000-11-27 19:34 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-11-27 11:44 removing a DB?? Bruno Boettcher <bboett@erm1.u-strasbg.fr>
2000-11-27 11:34 ` Jens Hartwig <jhartwig@debis.com>
2000-11-27 19:34   ` Mathijs Brands <mathijs@ilse.nl>

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