Re: BUG #4939: error query result

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: BUG #4939: error query result
Дата
Msg-id 407d949e0907232228s7ad30d9o2154452ded6df4ad@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #4939: error query result  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #4939: error query result  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Fri, Jul 24, 2009 at 6:02 AM, Tom Lane<tgl@sss.pgh.pa.us> wrote:
> I think the only thing we could do about it is downgrade the implicit
> casts to "name", which seems like a cure worse than the disease ---
> it'd interfere with searches in the system catalogs.

We could try to avoid user-visible functions like current_user
returning "name" data types. If no user-visible functions returned
"name" then this wouldn't happen unless people were actually querying
catalog tables.

that would mean changing the return type of these functions:

 getpgusername
 current_user
 session_user
 current_database
 current_schema
 getdatabaseencoding
 pg_client_encoding
 pg_encoding_to_char
 pg_get_userbyid


The only downside I see is that it means a strdup when these functions
are called which might be annoying. However now that I look a number
of them are actually already calling namein anyways. Are they used
internally in places that expect a name?

--
greg
http://mit.edu/~gsstark/resume.pdf

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4939: error query result
Следующее
От: "Robert Treat"
Дата:
Сообщение: BUG #4940: Performance regression between 8.2 and 8.3.7