Re: Accessing system information functions

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: "Johnson, Bruce E - (bjohnson)" <Johnson(at)pharmacy(dot)arizona(dot)edu>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Accessing system information functions
Date: 2023-09-25 11:18:06
Message-ID: 6dim6wcprwepp6v4oorlgh6wzjlrxx5qushbvvja24fb2txj4m@wkwbke2frjoy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2023-09-22 17:37 +0000, Johnson, Bruce E - (bjohnson) wrote:
> postgres=# pg_database_size(avi);
> ERROR: syntax error at or near "pg_database_size"
> LINE 1: pg_database_size(avi);

Call functions with SELECT, e.g.:

SELECT pg_database_size('avi');

Also, the database name must be a string.

> Do I have to add anything to the search_path?

Not for objects in schema pg_catalog which is always searched whether
it's listed in the search path or not.

--
Erik

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message shashidhar Reddy 2023-09-25 11:24:27 Postgres 11.5 not logging all sqls
Previous Message Thomas Kellerer 2023-09-25 08:40:08 Re: Right version of jdbc