Re: Recording foreign key relationships for the system catalogs

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема Re: Recording foreign key relationships for the system catalogs
Дата
Msg-id c5a51894-47a0-4f7f-8a36-973dfa720498@www.fastmail.com
обсуждение исходный текст
Ответ на Re: Recording foreign key relationships for the system catalogs  ("Joel Jacobson" <joel@compiler.org>)
Список pgsql-hackers
On Mon, Feb 1, 2021, at 20:33, Joel Jacobson wrote:
>Suggestions on how to fix:
>
>* Make is_array an boolean[], and let each element represent the is_array value for each fkcols element.
>
>* Change interface to be more like information_schema, and add a "ordinal_position" column, and return each column on a separate row.
>
>I think I prefer the latter since it's more information_schema-conformant, but any works.

Ops. I see a problem with just adding a "ordinal_position", since then one would also need enumerate the "foreing key" constraints or give them names like "constraint_name" in information_schema.table_constraints (since there can be multiple foreign keys per fktable, so there would be multiple e.g. ordinal_position=1 per fktable).

With this into consideration, I think the easiest and cleanest solution is to make is_array a boolean[].

I like the usage of arrays, it makes it much easier to understand the output,
as it's the visually easy to see what groups of columns that references what group of columns.

/Joel

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

Предыдущее
От: "Joel Jacobson"
Дата:
Сообщение: Re: Recording foreign key relationships for the system catalogs
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [sqlsmith] Failed assertion during partition pruning