| ▲ | Why It's So Hard to Add a Column in the Middle of a PostgreSQL Table(bytebase.com) | ||||||||||||||||
| 14 points by thunderbong 19 hours ago | 10 comments | |||||||||||||||||
| ▲ | HowTheStoryEnds 9 hours ago | parent | next [-] | ||||||||||||||||
> Product asks for an email column, and because you like a tidy schema, you want it right after name But why? SQL is supposed to be declarative, the whole point is that you don't need to care about such trivia. Only when you care about the order in a _result_ do you specify so. | |||||||||||||||||
| ▲ | 14 hours ago | parent | prev | next [-] | ||||||||||||||||
| [deleted] | |||||||||||||||||
| ▲ | wolvoleo 14 hours ago | parent | prev | next [-] | ||||||||||||||||
Huh interesting. I've always preferred MySQL anyway though these days I obviously use Mariadb because Oracle. | |||||||||||||||||
| |||||||||||||||||
| ▲ | audunw 12 hours ago | parent | prev | next [-] | ||||||||||||||||
“Here is the catch: that single integer is wearing three hats at once.” How many times did that point have to be reiterated in unnecessary AI style? Was the article AI generated. I hope so, if not it really shows how bad AI has degraded our ability to write. Could you at least have read over and cleaned up the prose a bit? That whole section could have been written in straight forward human language, and it would be shorter, clearer and less infuriating to read. | |||||||||||||||||
| |||||||||||||||||
| ▲ | rekabis 9 hours ago | parent | prev [-] | ||||||||||||||||
MSSQL Server has had this capability since forever. You can even graphically drag-and-drop column order from within SSMS (SQL Server Management Studio), although it’s always seemed sketch AF to me, and I wouldn’t want to do this with a large table unless I had backups and the site/app was set offline due to maintenance. Even Entity Framework (DotNet) has the ability to define column order, but only on table create (for sure). I cannot remember if an EF migration can insert a column anywhere into the middle or not. | |||||||||||||||||
| |||||||||||||||||