r/programming • • 12d ago

PostgreSQL 19 Released!

https://www.postgresql.org/about/news/postgresql-19-released-3449/
838 Upvotes

33 comments sorted by

View all comments

Show parent comment

19

u/baseballlover723 11d ago

makes it easier to read when related columns are next to each other. Or are in some kind of grouping.

An easy scenario to image is you start with 1 metric column, say column 2 of 10. And then some years later you come up with another metric, and you want to see how it compares to your original metric. If it's in column 3, you can shift your eyes back and forth between them quite easily. If you have to cross 8 unrelated columns, then it's much less efficient for you to process the data.

And for the sake of argument, lets say that those 8 columns contain secondary information and the query takes some time to run, so simply omitting the other information also creates a big hassle.

6

u/badmonkey0001 11d ago

makes it easier to read when related columns are next to each other. Or are in some kind of grouping.

It also makes CREATE statements cleaner to read if anyone needs a non-GUI reason.

7

u/halcyon_aporia 11d ago

You could always just run a select with the columns you want in the order you want, can't you? The result set will be in the order you select them.

11

u/baseballlover723 11d ago

I mean you could. But doing something every single time you want to use a * query (which is quite common for me) is a huge annoyance.

Just like how I could just type out my underlying view query every single time instead of just querying a view I wrote once.

Convenience is worth something imo. And needing to type out all of my columns for most of my queries is very inconvenient.

3

u/josh_ml_1127 11d ago

Convenience wins; listing all columns for most queries is a pain.

2

u/SenoraRaton 11d ago

I mean you could. But doing something every single time you want to use a * query (which is quite common for me) is a huge annoyance.

Store it as a view and access the view directly?

5

u/baseballlover723 11d ago

So then I have a table I never use, and a view that is virtually identical to the table I never use. And they both have to have names, which ideally describe them, but can't be the same.

I mean it works, but it doesn't feel like a good solution to me cause 2 things that apparently do the same thing is sure to cause confusion.

2

u/OSS-Corpo-Shit 6d ago

When my users are using my software and they tell me about these things they do to work around things my software does, I take that as an indication that my software needs to change.