[ADMIN] Help with command syntax?

2007-11-13 Thread Carol Walter
Greetings, Can someone help me with the syntax for running a postgres function from the within psql? I need to know the size of several databases. The postgres documentation says there is a function that will do what I need. The function is pg_database_size(name). I tried select

Re: [ADMIN] Help with command syntax?

2007-11-13 Thread Scott Whitney
select datid from pg_stat_database where datname='km'; select database_size(that_id); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carol Walter Sent: Nov 13, 2007 9:35 AM To: pgsql-admin@postgresql.org Subject: [ADMIN] Help with command syntax

Re: [ADMIN] Help with command syntax?

2007-11-13 Thread Alexander Stanier
You need to put the database name in single quotes: select pg_database_size('km'); Regards, Alex. Carol Walter wrote: Greetings, Can someone help me with the syntax for running a postgres function from the within psql? I need to know the size of several databases. The postgres

Re: [ADMIN] Help with command syntax?

2007-11-13 Thread isk
select pg_database_size('km'); select pg_size_pretty(pg_database_size('km')) as size; Greetings, Can someone help me with the syntax for running a postgres function from the within psql? I need to know the size of several databases. The postgres documentation says there is a function