Re: Getting reference key elements in right orders

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Getting reference key elements in right orders
Дата
Msg-id 18483.1274105394@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Getting reference key elements in right orders  (seiliki@so-net.net.tw)
Список pgsql-general
seiliki@so-net.net.tw writes:
> I need to know the match columns of referencing and referenced keys.

The query you show definitely won't match them up correctly, since that
=ANY test is not order-sensitive.  What you need to do is generate the
integers from 1 to array_length(conkey) and then join on attnum =
conkey[i], rather than using =ANY.  You can find some examples in the
information_schema views.  (In fact, you might well find that the
information_schema views are close enough already to what you need.)

            regards, tom lane

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

Предыдущее
От: Catalin BOIE
Дата:
Сообщение: Re: PANIC: corrupted item pointer: 32766
Следующее
От: sunpeng
Дата:
Сообщение: which function should i invoke to create a table and insert tuples?