From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, limaozeng <limaozeng(at)163(dot)com>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #4939: error query result |
Date: | 2009-07-24 05:28:48 |
Message-ID: | 407d949e0907232228s7ad30d9o2154452ded6df4ad@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, Jul 24, 2009 at 6:02 AM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)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?
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Treat | 2009-07-24 06:28:34 | BUG #4940: Performance regression between 8.2 and 8.3.7 |
Previous Message | Tom Lane | 2009-07-24 05:02:00 | Re: BUG #4939: error query result |