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
Is it intentional that LATERAL elements in a USING clause of a DELETE
statement can't reference the table declared in the FROM clause?
Here's a somewhat contrived example. Suppose I have a table with one
jsonb column:
create table int_arrays (int_array jsonb);
insert into int_arrays value
Thanks David and Paul,
You have helped me a lot.
Regards
Johann.
On 28 March 2018 at 20:49, David G. Johnston wrote:
> On Tuesday, March 27, 2018, Johann Spies wrote:
>>
>> In the past I could use this in a query:
>>
>> SELECT
>> DISTINCT ut,
>> CASE
>> WHEN xpa
On Tuesday, March 27, 2018, Johann Spies wrote:
> In the past I could use this in a query:
>
> SELECT
> DISTINCT ut,
> CASE
> WHEN xpath_exists ('//t:address_spec/t:country/text()',
> q.address_spec,
> p.ns)
> THEN unnest
On 03/28/2018 05:22 AM, Johann Spies wrote:
Thanks Paul.
I was hesitant to post my full query. It is a long and complicated
query.
Ha ha, you aren't joking. :-)
With something that long I don't think I'd want to split every xpath
call into a new join. I guess you could try it and see though
Thanks Paul.
I was hesitant to post my full query. It is a long and complicated
query. But here it is now:
WITH p AS (
SELECT
ARRAY [ ARRAY [ 't',
'http://scientific.thomsonreuters.com/schema/wok5.4/public/FullRecord'
] ] AS ns),
uts AS (
SELECT
s.ut
FROM
wos
On 03/27/2018 03:22 AM, Johann Spies wrote:
In the past I could use this in a query:
SELECT
DISTINCT ut,
CASE
WHEN xpath_exists ('//t:address_spec/t:country/text()',
q.address_spec,
p.ns)
THEN unnest (xpath ('//t:
In the past I could use this in a query:
SELECT
DISTINCT ut,
CASE
WHEN xpath_exists ('//t:address_spec/t:country/text()',
q.address_spec,
p.ns)
THEN unnest (xpath ('//t:address_spec/t:country/text()',
q
13 matches
Mail list logo