Hacker News new | past | comments | ask | show | jobs | submit login

why not this?

SELECT jsonb_column.key FROM table; UPDATE table SET jsonb_column.key = '"value"';




Because the dot is used in table.column notation when the column name is ambiguous (in a join). Overloading it to also denote JSON field values would be confusing, the very thing the change mentioned in the article seeks to avoid.


It's got nothing to do with ambiguity, you're fundamentally thinking about dot notation wrong.

The dot notation is the actual naming convention, not using it is a convenient shortcut.

Many professional programmers would chew you out for not using it, being lazy and leaving it off can easily introduce unintended bugs.

For example, you add a new column to a table, and boom, half your SQL statements now fail because it's got the same name as an existing column on another table.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: