Re: has_table_priviledge

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: has_table_priviledge
Дата
Msg-id 3514.1051227534@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: has_table_priviledge  (ahoward <ahoward@fsl.noaa.gov>)
Ответы Re: has_table_priviledge  (ahoward <ahoward@fsl.noaa.gov>)
Список pgsql-general
ahoward <ahoward@fsl.noaa.gov> writes:
> On Thu, 24 Apr 2003, Tom Lane wrote:
>> It does work, for me.  What PG version are you using, exactly?

>  PostgreSQL 7.2 on i686-pc-linux-gnu, compiled by GCC 2.96

Ah.  I see it too on 7.2.  It looks like the 7.2 parser is choosing
has_table_privilege(name, oid, text) in preference to
has_table_privilege(name, name, text).  I can get it to work on 7.2 by
putting in an explicit cast, ie, making the constraint read
    constraint c check
      (has_table_privilege(user, relname::name, 'update'))

Probably the reason 7.3 doesn't misbehave is that its function is
declared has_table_privilege(name, text, text).  That affects the
decision because 'text' is a preferred type and 'name' isn't.

            regards, tom lane


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: [NOVICE] ODBC & Access [Try 2]
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Factoring where clauses through UNIONS take 2