Re: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Stand ards
От | Thomas Lockhart |
---|---|
Тема | Re: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Stand ards |
Дата | |
Msg-id | 3B20EAD9.75ECA9C3@fourpalms.org обсуждение исходный текст |
Ответ на | AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Stand ards (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>) |
Ответы |
Re: Re: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Stand ards
Re: Re: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Stand ards |
Список | pgsql-hackers |
> The real problem with accepting this Microsoftism is that it's a trap > for unwary programmers. Case 1: someone who's not studied SQL in detail > might experiment with examples involving "foo = NULL" and jump to > reasonable but entirely incorrect conclusions about how comparisons > involving NULL operate. Case 2: someone who *has* studied SQL, and is > also aware that we accept unadorned NULLs, will also draw the wrong > conclusions about what this construct will do. Bottom line: this kluge > surprises everyone except those who already know it exists. I don't > like systems that surprise their users in inconsistent ways. These were all points that were brought up and discussed when the hack was implemented. At the time, the trade between implementing a construct which is *not allowed* in SQL9x vs enabling the M$Access community to migrate to PostgreSQL was hashed over and a consensus was reached that the benefits to allowing it outweighed the drawbacks. I was of the initial opinion that we should not support M$ pathelogical non-standard constructs (jeez, they should know better, and probably do, so it is likely a pathetic attempt to lock in users). But since the construct is not allowed (or useless), why would anyone feel they need to use it? Clearly it is not the case that "this kluge surprises everyone except those who already know it exists." We have had a strong consensus that SQL9x standard constructs should be the norm for PostgreSQL, so no need to rehash that. The issue boils down to, as it did when it first came up, whether we will make it easier for M$Access users to start migrating to PostgreSQL. If newer versions of Access emit standard constructs, then it would be even easier to say that we should jettison the construct. But if not, istm that we are killing a usability feature on principle, not from need, and it may be premature to do that. Using a "SET xxx" switch is not a step in the right direction istm since it requires an extra PostgreSQL-specific command to get things working with Access. We aren't teaching SQL, we are trying to let people get to their data. btw, I *was* suprised to see the "IS UNKNOWN" construct. It's been lurking in my reference books for years. afaict it is very uncommonly used, since most RDBMSes accept IS NULL as an equivalent. But is is trivial to add to the grammar. - Thomas
В списке pgsql-hackers по дате отправления: