Thanks for the pointers, Tom. Sorry my search didn't turn those up.
On Fri, Nov 18, 2022 at 3:18 PM Tom Lane wrote:
>
> Nikhil Benesch writes:
> > Both DuckDB and Snowflake, as of recently, support a nonstandard `EXCLUDE`
> > clause in the SELECT list to allow excluding
Both DuckDB and Snowflake, as of recently, support a nonstandard `EXCLUDE`
clause in the SELECT list to allow excluding fields from a wildcard [0] [1].
Example from the DuckDB announcement [2]:
SELECT * EXCLUDE (jar_jar_binks, midichlorians) FROM star_wars
Is there any appetite for adding thi
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
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
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
On Fri, Oct 23, 2020 at 2:35 PM Tom Lane wrote:
>
> "David G. Johnston" writes:
> > On Fri, Oct 23, 2020 at 8:47 AM Nikhil Benesch
> > wrote:
> >> Is there another option I'm missing? Would there be interest in
> >> extending split part so tha
On Fri, Oct 23, 2020 at 2:21 PM David G. Johnston
wrote:
> I'm torn here because this would be the first usage of this concept in
> PostgreSQL (I think).
Yeah, I also have some qualms about this design in the context of Postgres.
Particularly because Postgres allows arrays to begin at negative i
their own.
* It is inefficient. When the strings are large reversing the
strings is a silly waste of compute.
On Fri, Oct 23, 2020 at 12:03 PM PALAYRET Jacques
wrote:
>
> Hello,
>
> reverse(split_part(reverse('foo bar baz'), ' ', 1)) -> 'baz'
Hi,
Suppose I need to split a string on a delimiter and select one of the
resulting components. If I want a specific component counting from the
start, that's easy:
split_part('foo bar baz', ' ', 1) -> 'foo'
But if I want the last component, I have several less-than-ideal options:
1. (strin