pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHelp with command syntax?
4+ messages / 4 participants
[nested] [flat]
* Help with command syntax?
@ 2007-11-13 15:35 Carol Walter <walterc@indiana.edu>
2007-11-13 16:08 ` Re: Help with command syntax? Scott Whitney <swhitney@journyx.com>
2007-11-13 16:11 ` Re: Help with command syntax? Alexander Stanier <alexander.stanier@egsgroup.com>
2007-11-13 16:17 ` Re: Help with command syntax? isk <isk@rdw.ru>
0 siblings, 3 replies; 4+ messages in thread
From: Carol Walter @ 2007-11-13 15:35 UTC (permalink / raw)
To: pgsql-admin
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
pg_database-_size(km). The response I get says there is no column
"km". I think I must be using the wrong syntax, but haven't found a
reference to what the correct syntax is.
Thanks,
Carol Walter
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Help with command syntax?
2007-11-13 15:35 Help with command syntax? Carol Walter <walterc@indiana.edu>
@ 2007-11-13 16:08 ` Scott Whitney <swhitney@journyx.com>
2 siblings, 0 replies; 4+ messages in thread
From: Scott Whitney @ 2007-11-13 16:08 UTC (permalink / raw)
To: pgsql-admin
select datid from pg_stat_database where datname='km';
select database_size(that_id);
-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Carol Walter
Sent: Nov 13, 2007 9:35 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Help with command syntax?
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
pg_database-_size(km). The response I get says there is no column
"km". I think I must be using the wrong syntax, but haven't found a
reference to what the correct syntax is.
Thanks,
Carol Walter
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Help with command syntax?
2007-11-13 15:35 Help with command syntax? Carol Walter <walterc@indiana.edu>
@ 2007-11-13 16:11 ` Alexander Stanier <alexander.stanier@egsgroup.com>
2 siblings, 0 replies; 4+ messages in thread
From: Alexander Stanier @ 2007-11-13 16:11 UTC (permalink / raw)
To: Carol Walter <walterc@indiana.edu>; +Cc: pgsql-admin
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 documentation says there is a function that will do what
> I need. The function is pg_database_size(name). I tried select
> pg_database-_size(km). The response I get says there is no column
> "km". I think I must be using the wrong syntax, but haven't found a
> reference to what the correct syntax is.
>
> Thanks,
> Carol Walter
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
> This email has been scanned for viruses by Blackspider's Mail Control
> System.For more information please visit http://www.blackspider.com
This message has been scanned for malware by SurfControl plc. www.surfcontrol.com
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Help with command syntax?
2007-11-13 15:35 Help with command syntax? Carol Walter <walterc@indiana.edu>
@ 2007-11-13 16:17 ` isk <isk@rdw.ru>
2 siblings, 0 replies; 4+ messages in thread
From: isk @ 2007-11-13 16:17 UTC (permalink / raw)
To: Carol Walter <walterc@indiana.edu>; +Cc: pgsql-admin
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 that will do what
> I need. The function is pg_database_size(name). I tried select
> pg_database-_size(km). The response I get says there is no column
> "km". I think I must be using the wrong syntax, but haven't found a
> reference to what the correct syntax is.
> Thanks,
> Carol Walter
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
> http://archives.postgresql.org
--
С уважением,
isk mailto:isk@rdw.ru
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2007-11-13 16:17 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-11-13 15:35 Help with command syntax? Carol Walter <walterc@indiana.edu>
2007-11-13 16:08 ` Scott Whitney <swhitney@journyx.com>
2007-11-13 16:11 ` Alexander Stanier <alexander.stanier@egsgroup.com>
2007-11-13 16:17 ` isk <isk@rdw.ru>
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