pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Stanier <alexander.stanier@egsgroup.com>
To: Carol Walter <walterc@indiana.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: Help with command syntax?
Date: Tue, 13 Nov 2007 16:11:53 +0000
Message-ID: <4739CCC9.8080704@egsgroup.com> (raw)
In-Reply-To: <658CC899-491C-4388-B440-23422C30D9D2@indiana.edu>
References: <658CC899-491C-4388-B440-23422C30D9D2@indiana.edu>

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



view thread (4+ messages)  latest in thread

Message-ID: <4739CCC9.8080704@egsgroup.com>
Permalink:  ../4739CCC9.8080704@egsgroup.com/
Also on:    postgresql.org/message-id/4739CCC9.8080704@egsgroup.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: alexander.stanier@egsgroup.com, walterc@indiana.edu
  Subject: Re: Help with command syntax?
  In-Reply-To: <4739CCC9.8080704@egsgroup.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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