[GENERAL] What is the proper query - Mailing list pgsql-general

From Igor Korot
Subject [GENERAL] What is the proper query
Date
Msg-id CA+FnnTzcoQUW0p-NSgHev9YUYusdH5ZeFq-W4sF=EbNLPV-rzQ@mail.gmail.com
Whole thread Raw
Responses Re: [GENERAL] What is the proper query  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: [GENERAL] What is the proper query  (Igor Korot <ikorot01@gmail.com>)
List pgsql-general
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 by date:

Previous
From: Fadhel J Muhammad
Date:
Subject: [GENERAL] Postgresql_for_odoo
Next
From: Dylan Luong
Date:
Subject: Re: [GENERAL] pg_rewind - restore new slave failed to startup duringrecovery