Live data from Hacker News

PostgreSQL 15

postgresql.org

1–10 of 132 posts

Re: PostgreSQL 15

#2
Glad to see all the new regex functions. I recently moved a database from AWS Redshift to Postgres on Heroku and was shocked to see how many functions like regexp_substr() weren't available. Wish this had come sooner so I didn't have to rewrite so many of my queries.

Re: PostgreSQL 15

#5
MERGE feature is interesting. But specifically on the revoking CREATE permissions for the public (or default) schema, this is a step in the right direction. Some of the defaults in Postgres can be more secure. For example, the first time I use a POSTGRES_PASSWORD to configure a password, changing this password involves more steps than just changing the values of the ENV, because it doesn't take the changed value there after.

Structured logging with JSON is going to improve a lot of debugging, again a great productive change.

Also, any idea when the docker image for Postgres 15 will be available?

Re: PostgreSQL 15

#6
post #3

SQL MERGE looks great! I hope I remember it when the time comes, instead of writing 3 separate queries. edit: Postgres docs on MERGE: https://www.postgresql.org/docs/15/sql-merge.html

I'm actually surprised to hear that MERGE is only now available on Postgres.

I'm now interesting in hearing about other standard (what I have come to expect as standard) SQL that's not or only now available on Postgres?

Re: PostgreSQL 15

#7
post #3

SQL MERGE looks great! I hope I remember it when the time comes, instead of writing 3 separate queries. edit: Postgres docs on MERGE: https://www.postgresql.org/docs/15/sql-merge.html

Hmmm. The doc kinda suggests that this might be more efficient than doing it with separate commands:

"First, the MERGE command performs a join from data_source to target_table_name producing zero or more candidate change rows. For each candidate change row, the status of MATCHED or NOT MATCHED is set just once, after which WHEN clauses are evaluated in the order specified. For each candidate change row, the first clause to evaluate as true is executed."

Anybody know more about this?

From lots of experience with SQL Server, I know that over there, MERGE is not more efficient, it's just syntactic sugar - and in fact it's buggy syntactic sugar, as there are some conditions where it doesn't handle concurrency properly.

Re: PostgreSQL 15

#8
post #6
post #3

SQL MERGE looks great! I hope I remember it when the time comes, instead of writing 3 separate queries. edit: Postgres docs on MERGE: https://www.postgresql.org/docs/15/sql-merge.html

I'm actually surprised to hear that MERGE is only now available on Postgres. I'm now interesting in hearing about other standard (what I have come to expect as standard) SQL that's not or only now available on Postgres?

Well MS SQL Merge statement is not very good, and I personally avoid it, and most places I worked in recommend to avoid it, except in the simplest scenarios

From the docs "At scale, MERGE may introduce complicated concurrency issues or require advanced troubleshooting. As such, plan to thoroughly test any MERGE statement before deploying to production."

I dont know if its better in PQSQL , but they took their time, so maybe it is

Re: PostgreSQL 15

#9
post #2

Glad to see all the new regex functions. I recently moved a database from AWS Redshift to Postgres on Heroku and was shocked to see how many functions like regexp_substr() weren't available. Wish this had come sooner so I didn't have to rewrite so many of my queries.

That’s an interesting change from a analytical to transactional postgres flavour. What workload is on this DB?

Re: PostgreSQL 15

#10
I'm a little bit confused on the "sorting perf improvements" bit. Does that mean that if I have a query with a `SORT BY`, it will literally "just be faster"? Surely that sounds too good to be true...?
Post reply on HN