| От | Michael Paquier |
|---|---|
| Тема | Re: pg_get_databasebyid(oid) |
| Дата | |
| Msg-id | 20190904035455.GB2170@paquier.xyz обсуждение исходный текст |
| Ответ на | Re: pg_get_databasebyid(oid) (Ibrar Ahmed <ibrar.ahmad@gmail.com>) |
| Ответы |
Re: pg_get_databasebyid(oid)
|
| Список | pgsql-hackers |
On Thu, Aug 29, 2019 at 03:47:40PM +0500, Ibrar Ahmed wrote: > I think its a user request and don't require to be in the core of > PostgreSQL. > A simple SQL function can fulfill the requirement of the user. > > CREATE OR REPLACE FUNCTION pg_get_databasebyid(dboid integer) RETURNS name > AS $$ > > SELECT datname from pg_database WHERE oid = dboid; > $$ LANGUAGE SQL; Indeed, I think that we can drop the patch. FWIW, I find the semantics of pg_get_userbyid() horrible when it comes to return a result for a non-existing user with its own way of defining how this information should show up. Returning NULL would be more natural, so I don't think that we should make more functions behave the same way. -- Michael
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера