Live data from Hacker News

Postgres 11 – A First Look

craigkerstiens.com

101–110 of 193 posts

Re: Postgres 11 – A First Look

#101
post #3

> Now you can quit Postgres by simply typing quit or exit. Previously you had to use Ctrl + D or \q While this is good to help out beginners a bit, people should really learn Ctrl + D. It works practically everywhere and saves tons of time guessing/remembering and even typing the correct incantation for the program you want to exit.

Original author here. Yes, it's great to learn Ctrl + D. But losing out on beginners that aren't familiar in favor of things that are naturally intuitive is a great way to make those who are new to programming and especially databases feel like they're dumb or not capable of it. I still recall the first time I was in vi and I couldn't figure out how to get out of the damn thing, and don't get me started on arrow keys…

The intuitive way to exit anything is Alt + F4.

Re: Postgres 11 – A First Look

#102
post #85

Earlier quoted context omitted.

> Why? Notice that parallel to MySQL's rise a particular loosely-typed, never-except, often-wrong programming language also became popular. To this day I feed my family with that language. The typical coder (not that I do not say "developer") who codes in PHP does not care about correctness. He does not understand why monetary values cannot be stored in floats, he does not know what bitwise manipulation is, he does n…

That's a broad generalization of PHP "coders" I think it's safe to say we've all seen good code a crap code -- regardless of language. It's not the wand, it's the magician. (nb: I've been building software for 20+ years, I use PHP (among others) and knew JOIN and types in PG before I ever saw PHP, I cannot be the only one)

Yes, but the proportions between "bad", lets rather call them inexperienced, "coders" and experienced coders varies strongly in different ecosystems.

PHP and JavaScript both democratized programming, as BASIC did years before, but that also meant that more tutorials and howtos for PHP were written by people relatively new to programming compared to say howtos on Haskell or C.

Re: Postgres 11 – A First Look

#103
post #37

A million things like this are why PostgreSQL is the only relational database I consider for, well, pretty much anything. Their approach of “build it safe and then make it fast” has been paying off in spades for a couple of decades now. Thanks for everything you do, psql maintainers!

100% naive question: why is mysql and their similars so popular then? Spanner and AWS Aurora base off of more mysql than postregsql from what I can tell. Why?

Probably accessibility.

Because MySQL for some reasons is more accessible[1] to beginners, juniors, average developers, and other people who may prefer a lower barrier of entry over correctness/safety (e.g. full-stack devs, managers, people who don't have much time); who form the bulk of the community combined.

It's the same for languages, frameworks, and other tech; as several people noted already.

[1] Or maybe "was"; in which case the answer becomes "historical superior accessibility".

Re: Postgres 11 – A First Look

#104
post #15

Earlier quoted context omitted.

You're wrong. I think the bike shed should be blue. ;)

This isn't really about alternatives. Bike shedding could be about exit-vs-quit or similar. Ctrl-d exists a layer above though. In a typical terminal / readline, your process will get an EOF / HUP signal which is treated like a clean-exit in most interactive cases and config-reload in many servers. Just like ctrl-c generates INT and ctrl-z generates STP. This is worth learning.

> Just like ctrl-c generates INT and ctrl-z generates STP.

It's very different. Ctrl-D does not generate signals. When written into the tty master, it forces the kernel to answer any pending read() syscalls on the tty slave, even if it means returning 0 bytes.

Programs then apply the convention of treating a read() that returns 0 bytes as meaning EOF (because that's how it works with all other file types that are not tty slaves).

Re: Postgres 11 – A First Look

#105
post #88

Earlier quoted context omitted.

With Postgres you don't need MongoDB, InfluxDB, or any other trendy thing, Postgres does it all, and better than all the wannabes.

Is that really true? Postgres is great, but it doesn't cater for _all_ use cases. For example, horizontal scalability is -- understandably for an ACID RDBMS -- not as trivial as it is for some document stores.

Check out what Citus are doing with PG https://www.citusdata.com

Re: Postgres 11 – A First Look

#106
post #37

A million things like this are why PostgreSQL is the only relational database I consider for, well, pretty much anything. Their approach of “build it safe and then make it fast” has been paying off in spades for a couple of decades now. Thanks for everything you do, psql maintainers!

100% naive question: why is mysql and their similars so popular then? Spanner and AWS Aurora base off of more mysql than postregsql from what I can tell. Why?

MyISAM made it popular back then, and the rest of it is inertia.

Re: Postgres 11 – A First Look

#107
post #37

Earlier quoted context omitted.

100% naive question: why is mysql and their similars so popular then? Spanner and AWS Aurora base off of more mysql than postregsql from what I can tell. Why?

I used both of them, but migrated to Postgres permanently a decade ago. Early on in my career, the biggest selling point for Mysql was the excellent web admin tool "phpMyAdmin" - it really helped get applications off the ground, since the core of most modern systems is the data model. Users could modify data, without your needing to create a UI for that use case. It conveniently used the same stack as the rest of the…

JetBrains' IDEs have Postgres data source support, I find that GUI really rather excellent for anything I've had to do and couldn't remember the syntax for.

Re: Postgres 11 – A First Look

#108

A million things like this are why PostgreSQL is the only relational database I consider for, well, pretty much anything. Their approach of “build it safe and then make it fast” has been paying off in spades for a couple of decades now. Thanks for everything you do, psql maintainers!

> “build it safe and then make it fast”

I have a lot of respect for the PostgreSQL team. But I think they don't care about the second part, or the constraints of the first part make it impossible. A simple example, the performance of a simple un-indexed DISTINCT on a single string column on a single table, is still quite bad for millions of rows.

Also to note, PostgreSQL has too many features for my taste. I get it's the selling point. But that usually correlates with poor performance and code complexity, too.

Of course, there's a problem of all modern fast database engines being proprietary. But by not addressing the performance problem, perhaps with an smaller engine lighter in features, open source is left biting the dust. And that's not good for the industry.

Re: Postgres 11 – A First Look

#109
post #37

Earlier quoted context omitted.

100% naive question: why is mysql and their similars so popular then? Spanner and AWS Aurora base off of more mysql than postregsql from what I can tell. Why?

MySQL was easier to run. Both for beginners where it was packaged with PHP and available with basically every webhost, and for advanced users that took advantage of the simple and reliable replication. There were a lot of problems with it, but the novice users didnt run into them and the advanced users knew how to deal with it. These decades of mainstream use carry a lot of momentum and many large companies continue…

> and is now being recognized and growing in popularity.

To be fair, PostgreSQL was noticed way before, Estonia's e-nation website was built on it (even the logic!) and I can't honestly remember when that thing has been down. The UI would need a bit of refreshing but I have the feeling if they're going to update it they're going to replace it all with something shittier.

Re: Postgres 11 – A First Look

#110
post #87

Earlier quoted context omitted.

Postgres has much better SQL support and has features which will make you smile if you end writing complex queries for some purposes (like reporting).

Yesterday a friend developer told me he was trying to code a query on MySQL to get the latest message of every conversation stored in a table like conversation id, timestamp, user id, message. I did that years ago so I told him he'll find a lot of solutions on Stackoverflow, ugly ones with MySQL and much better ones for PostgreSQL which has a nrow() function. A MySQL DBA solved that problem in that project I worked o…

I've had to debug a stored procedure, they're horrible when you have to do that. Just a big headache. I literally rewrote every single one of those procedures in the software's primary language, the code can now be easily debugged, logged, replaced and read.
Post reply on HN