Re: Accessing system information functions
От | Pavel Stehule |
---|---|
Тема | Re: Accessing system information functions |
Дата | |
Msg-id | CAFj8pRC5kyxfkbbiYmA=9jA2gTS6mhD-nXOS77vODG9rsxKU4g@mail.gmail.com обсуждение исходный текст |
Ответ на | Accessing system information functions ("Johnson, Bruce E - (bjohnson)" <Johnson@pharmacy.arizona.edu>) |
Список | pgsql-general |
Hi
po 25. 9. 2023 v 19:51 odesílatel Rob Sargent <robjsargent@gmail.com> napsal:
On Sep 25, 2023, at 5:05 AM, Johnson, Bruce E - (bjohnson) <Johnson@pharmacy.arizona.edu> wrote: Environment: Ubuntu 22.04 lts, postgres 15 installed via postgres.org repositoryI am attempting to use the system information functions here: https://www.postgresql.org/docs/15/functions-info.htmlI’m logged on as the postgres superuser on the hostTrying any of the functions gives me a syntax errorpostgres=# pg_database_size(avi);
ERROR: syntax error at or near "pg_database_size"
LINE 1: pg_database_size(avi);
Do I have to add anything to the search_path?postgres=# show search_path;
search_path
-----------------
"$user", public
(1 row)
you are missing SELECT keyword
(2023-09-25 20:05:08) postgres=# select pg_database_size('postgres');
┌──────────────────┐
│ pg_database_size │
╞══════════════════╡
│ 7901667 │
└──────────────────┘
(1 row)
┌──────────────────┐
│ pg_database_size │
╞══════════════════╡
│ 7901667 │
└──────────────────┘
(1 row)
Regards
Pavel
And single quote name. 'avi'--
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group
Institutions do not have opinions, merely customs
В списке pgsql-general по дате отправления: