Re: Reference pg_user ?

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Reference pg_user ?
Дата
Msg-id m3k7s8h7ul.fsf@varsoon.denali.to
обсуждение исходный текст
Ответ на Reference pg_user ?  (Carsten Zerbst <carsten.zerbst@atlantec-es.com>)
Список pgsql-general
Carsten Zerbst <carsten.zerbst@atlantec-es.com> writes:

> But I need some additional information like name, email-addres and the
> like, so i tried to use something like:
>
> test=# create table users (
> test(# shortname name references pg_user,
> test(# lastname varchar not null,
> test(# email varchar not null
> test(# );
> NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY
> check(s)
> ERROR:  Referenced relation "pg_user" is not a table
> NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY
> check(s)
> ERROR:  Referenced relation "pg_user" is not a table
>
> Is it somehow possible to reference the system catalog with
> the users ?

pg_user is a view, not a table.  The actual table is pg_shadow, which
is not (and shouldn't be) readable by non-superusers, so you may run
into problems there.

-Doug
--
Doug McNaught       Wireboard Industries      http://www.wireboard.com/

      Custom software development, systems and network consulting.
      Java PostgreSQL Enhydra Python Zope Perl Apache Linux BSD...

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

Предыдущее
От: Merrill Oveson
Дата:
Сообщение: getting trigger to work
Следующее
От: Tom Lane
Дата:
Сообщение: Re: locking problems