Re: [GENERAL] What is the proper query

Поиск
Список
Период
Сортировка
От Igor Korot
Тема Re: [GENERAL] What is the proper query
Дата
Msg-id CA+FnnTzqY=iWetP_C4QqCf9-k_o3_Amt7HUy-Sv8o7kc_2gUyA@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] What is the proper query  (Igor Korot <ikorot01@gmail.com>)
Список pgsql-general
Or this is the bug in 9.1?
Since it looks like there are 2 columns with the same info in 1 table/view....

Thank you.


On Tue, Aug 22, 2017 at 12:08 AM, Igor Korot <ikorot01@gmail.com> wrote:
> Hi, ALL,
> draft=# SELECT * FROM information_schema.key_column_usage WHERE
> table_schema = 'public' AND table_name = 'leaguescorehitter';
>  constraint_catalog | constraint_schema |        constraint_name
>   | table_catalog | table_schema |    table_name     | column_name |
> ordinal_position | position_in_unique_constraint
>
--------------------+-------------------+--------------------------------+---------------+--------------+-------------------+-------------+------------------+-------------------------------
>  draft              | public            | leaguescorehitter_id_fkey
>   | draft         | public       | leaguescorehitter | id          |
>              1 |                             1
>  draft              | public            | leaguescorehitter_id_fkey1
>   | draft         | public       | leaguescorehitter | id          |
>              1 |                             1
>  draft              | public            | leaguescorehitter_id_fkey1
>   | draft         | public       | leaguescorehitter | playerid    |
>              2 |                             2
>  draft              | public            |
> leaguescorehitter_scoreid_fkey | draft         | public       |
> leaguescorehitter | scoreid     |                1 |
>           1
> (4 rows)
>
> There are 3 foreign keys in that table.
>
> Is there a way to get values of 0, 1, 1, and 2 for the ordinal position?
>
> Thank you.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Porting libpq to QNX 4.25
Следующее
От: marcelo
Дата:
Сообщение: Re: [GENERAL] Porting libpq to QNX 4.25