Re: Inserting a constant along with field values.

Поиск
Список
Период
Сортировка
От Pól Ua Laoínecháin
Тема Re: Inserting a constant along with field values.
Дата
Msg-id CAF4RT5QK-qZ=JTKHfEcZHDcc1vrNpPjfrp6m2KHAeEa5-fPvFA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Inserting a constant along with field values.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
> If you're trying to figure out what the join condition should be:
> you don't need one, because the single row from "cte c" is supposed
> to join to every row of the x/y join result.  So you could just
> write "ON true".  Or leave it off altogether by writing CROSS JOIN,
> or by using comma syntax, like

> ... FROM xtab x JOIN ytab y ON x.x_key = y.y_key, cte c

That worked a treat, thanks Tom! I was wandering (lonely as a cloud
perhaps?) along that route, but I just couldn't get it to work. Maybe
I just needed the input of someone like yourself to convince me that I
was, in fact, on the right track.

Thanks again and rgs,

Pól...

>                         regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Inserting a constant along with field values.
Следующее
От: Mark Bannister
Дата:
Сообщение: PL/pgsql insert into failing even with returning into clause