On Mon, Oct 4, 2021 at 3:21 PM Tom Lane wrote:
> Not sure what to tell you about the state of the idea that the
> target table could be re-specified in FROM/USING. I'm hesitant
> to close the door on it permanently, because people do periodically
> wish to be able to left-join the target to somet
Michael Lewis writes:
> On Mon, Oct 4, 2021, 10:30 AM Nikhil Benesch
> wrote:
>> # delete from int_arrays using int_arrays;
>> ERROR: table name "int_arrays" specified more than once
>> Don't you need to use an alias for the table in the using clause?
You could, but then you'd be creating a se
Nikhil Benesch writes:
> On Mon, Oct 4, 2021 at 1:48 PM Tom Lane wrote:
>> My mental model of these things is that the target table is cross-joined
>> to the additional tables as though by a comma in FROM [...]
> Mine as well.
> I just managed to dredge up some history here though. Turns out yo
On Mon, Oct 4, 2021, 10:30 AM Nikhil Benesch
wrote:
> you can't reuse the FROM table name in the USING clause:
>
> # delete from int_arrays using int_arrays;
> ERROR: table name "int_arrays" specified more than once
> Don't you need to use an alias for the table in the using clause?
On Mon, Oct 4, 2021 at 1:48 PM Tom Lane wrote:
> My mental model of these things is that the target table is cross-joined
> to the additional tables as though by a comma in FROM [...]
Mine as well.
I just managed to dredge up some history here though. Turns out you
explicitly disabled this featu
Nikhil Benesch writes:
> Is it intentional that LATERAL elements in a USING clause of a DELETE
> statement can't reference the table declared in the FROM clause?
Hmm ... doesn't work for UPDATE, either.
My mental model of these things is that the target table is cross-joined
to the additional ta