Re: 'show databases' in psql way? - Mailing list pgsql-sql

From Greg Sabino Mullane
Subject Re: 'show databases' in psql way?
Date
Msg-id b34ce33d30d33dce75724a2c9620d8ec@biglumber.com
Whole thread Raw
In response to Re: 'show databases' in psql way?  ("Arash Zaryoun" <Arash_Zaryoun@CBC.CA>)
List pgsql-sql
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
To be pedantic about it, use:
SELECT pg_catalog.quote_ident(datname) AS database
FROM pg_catalog.pg_database ORDER BY 1;
or if using version 8 or higher:
SELECT pg_catalog.quote_ident(datname) AS database,
pg_catalog.quote_ident(spcname) AS tablespace
FROM pg_catalog.pg_database
JOIN pg_catalog.pg_tablespace t ON (dattablespace=t.oid)
ORDER BY 1;
- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200411022120
-----BEGIN PGP SIGNATURE-----
iD8DBQFBiFTSvJuQZxSWSsgRApflAJ0RiVndbc6u//cXX/S7uM8K91lWbgCfYVbC
MsRNWlP446AcvHm0UaGgEVo=
=S8Ft
-----END PGP SIGNATURE-----




pgsql-sql by date:

Previous
From: Ferindo Middleton Jr
Date:
Subject: Insert/Update Perl Function involving two tables needing to by 'in sync'
Next
From: Andrew Sullivan
Date:
Subject: Re: vacuum analyze slows sql query