Re: Foreign key joins revisited

Поиск
Список
Период
Сортировка
От Isaac Morland
Тема Re: Foreign key joins revisited
Дата
Msg-id CAMsGm5c17V+bsZFVkDep54cgVtZXaLjDO9W7U-1VEF_9fxczaA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Foreign key joins revisited  ("Joel Jacobson" <joel@compiler.org>)
Ответы Re: Foreign key joins revisited  (Sascha Kuhl <yogidabanli@gmail.com>)
Список pgsql-hackers
On Sun, 26 Dec 2021 at 16:24, Joel Jacobson <joel@compiler.org> wrote:
 
I think if we combine the ON KEY ... TO ... part of my idea, with your idea, we have a complete neat solution.

Maybe we can make them a little more similar syntax wise though.

Could you accept "ON KEY" instead of "FOREIGN KEY" for your idea?
And would a simple dot work instead of ->?

I’m not fixed on the details; writing FOREIGN KEY just felt natural, and I copied the -> from the earlier messages, but I didn’t really mean to promote those specific syntax elements.

One question to consider: which columns get included in the join and under what names? When we join USING there is just one copy of each column in the USING, not one from each source table. This is one of the nicest features of USING. With this new feature it seems like it might make sense to omit the join fields from the added table; tricky bit is they don't necessarily have the same name as existing fields as must be the case with USING.

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

Предыдущее
От: "Joel Jacobson"
Дата:
Сообщение: Re: Foreign key joins revisited
Следующее
От: "Joel Jacobson"
Дата:
Сообщение: Re: Foreign key joins revisited