Hacker News new | ask | show | jobs
by silvestrov 883 days ago
It would be really nice if PostgreSQL and sqlite implemented this natively as it really feels how SQL should be (re)designed today.

It also makes writing complex queries easier as it would be possible to split out actions in multiple steps where you can see what columns and types you have created (and found) so far.

Complex SQL is like complex C++: works if you get it right, but no help whatsoever for figuring out what mistake you made when messing up. Step-by-step is such a great help.

2 comments

On one hand SQL has some oddities, on the other I'd rather there not be yet more different-but-equivalent ways to do things in SQL. I think the current state is good enough.
Though I can see a strict subset of SQL being useful. First I'd axe the timestamp type in favor of always using timestamptz, cause those two things don't mean what most people think.
I think that Perl taught us that there should only be one correct way to do something. Otherwise you wind up with a write-only language that nobody else can ever maintain.