3 ms·
I should really learn some PG and move away from MySQL. But at 40 years old i have a problem learning how to sit properly. sigh
by Joyfield 11y ago
I should really learn some PG and move away from MySQL. But at 40 years old i have a problem learning how to sit properly. sigh
- minimaxir 11y agoSyntax-wise, Postgres is not much different from MySQL. You just have to learn how to use window functions which takes a bit.
- mdaniel 11y agoI don't think people have a concern that Postgres is the one with the wacky syntax. And it's been my experience that unless the team is very disciplined, if a language offers a thing, you'll find it in the codebase. Thus, ripping out all the backticks where you've used "select" or "from" as a column name isn't a postgres problem. To really go out on a limb, I would posit that MySQL's view on RDBMS functionality influences its use, which I bet does not square with more traditional systems. Anytime one finds a shift in world view, the code becomes hard to rewrite and still behave the same way.
- chucksmash 11y agoIt's certainly possible to use Postgres productively without ever doing anything advanced. My use case can pretty well be summed up as "things an ORM can do for you out of the box." As a developer living in the shallow end of the RDBMS pool, switching a hobby project over is a matter of hours. If your usage is similar, learning it well enough to get by could just be a matter of: apt-get install postgres
- smacktoward 11y agoFor longtime MySQL users (like myself, ahem), I've found the biggest initial hurdle to be the different syntax the stock MySQL and Postgres clients use. When dropping into a Postgres environment I have to constantly look up what the Postgres commands are to do simple stuff like list all tables or describe a table's structure. It's not that the Postgres commands are particularly abstruse or anything, just that they're non-obvious if you're unfortunate enough to have spent 99% of your life marinating in MySQL.
- tajen 11y agoPostgres is often closer to the SQL standard. For example escaping column names is specified by SQL-99 with double-quotes (") whereas MySQL by default refuses this and requires backticks (`, same as Oracle). Compared to MySQL, the presence of schemas is a big win for me (same as 'user' in Oracle). Also, I can't move away from Postgres because it's the only DBMS which supports transactional DDL, which the ability to roll back an "add column" as part of a transaction. http://stackoverflow.com/questions/2901453/sql-standard-to-escape-column-names http://stackoverflow.com/questions/2901453/sql-standard-to-e...
- McGlockenshire 11y agoParent seems to be discussing the cli toolset, where many commands are composed of a backslash and one or two letters, whereas the mysql cli expects verbose commands, like SHOW TABLES and DESCRIBE tablename.
- tajen 11y agoIt's true that the lack of SHOW and DESCRIBE in Postgres is annoying. Makes it difficult to get the same result from a SQL client.