Re: Inserting a constant along with field values. - Mailing list pgsql-novice

From Pól Ua Laoínecháin
Subject Re: Inserting a constant along with field values.
Date
Msg-id CAF4RT5QK-qZ=JTKHfEcZHDcc1vrNpPjfrp6m2KHAeEa5-fPvFA@mail.gmail.com
Whole thread Raw
In response to Re: Inserting a constant along with field values.  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Inserting a constant along with field values.
Next
From: Mark Bannister
Date:
Subject: PL/pgsql insert into failing even with returning into clause