I’d like to suggest you guys to implement a new feature.
Actually is an alias for a existent feature.
INSERT INTO Table SET
“Field1” = ‘text’,
“Field2” = ‘text’;
There were a few follow-ups questioning the purposes and/or sanity of wanting such a feature, all of which were trumped by [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00999.php this tight response]:
There is an SQL standard way to do this and we have no intention of
extending that. If you want standard code, use the standard syntax.
MySQL, if it supports this, is just encouraging you to write
non-standard SQL. You can complain to them.”
Now, if you’ve spent any time in the PostgreSQL project, you’ve heard this before (this was actually posted more than once in this given thread). Heck, this is so status quo, EnterpriseDB has used it as a foundation for not contributing back features like packages and pl/sql support. The problem is it really isn’t true.
PostgreSQL has, over the years, added non-standard syntax, as has every other major database. It’s almost a requirement, given as soon as you add [http://www.postgresql.org/docs/8.2/static/sql-createindex.html CREATE INDEX] you’ve wavered away. Of course everyone implements indexes so maybe you’d dismiss that example, but then what about [http://www.postgresql.org/docs/current/interactive/queries-limit.html LIMIT and OFFSET] ? Niether of these are in the standard, and AFAIK the only other database that implements these commands is MySQL, but this is one of the best extension of the language I’ve ever seen, and one I doubt any PostgreSQL user wants to get rid of, so I wonder if those who advocate that we cling so tight to the SQL Standard consider these things a mistake? Maybe they do, but then I wonder, why haven’t they started objecting to some of the non-standard enhancments coming in 8.3? (OK, I haven’t verified, but I’m pretty sure the new XML support and TEXT Search aren’t 100% SQL compliant)
Don’t get me wrong, I’m not advocating we throw the standards out the window. I think features that outright violate the standard (Oracle’s brain-dead NULL = ” behavior comes to mind) are a bad idea. Honestly I’m not even sure we should include the aforementioned “INSERT … SET” syntax; the upsides seem pretty negligable. But one of the good things about open source is supposed to be incorporating others good ideas, no matter where they come from; so if we’re talking about extending the standard to increase portability, accessability, and usability, I think we ought to discuss the feature openly rather than hide behind the excuse of non-standards compliance.