On Mon, 16 Dec 2013 12:09:07 +0100, Kjell Rilbe <kjell.rilbe@...>
> Den 2013-12-16 11:50 skrev Dimitry Sibiryakov såhär:
>> 16.12.2013 8:08, Alex Peshkoff wrote:
>>> And what do you think about a case when (I use old syntax for an
>>> alter user x [set] password 'y' [set] a [to] 'a', b [to] 'b';
>>> Where should that set be placed? I prefer to:
>>> alter user x password 'y' set a = 'a', b = 'b';
>> IMHO, for syntax consistency "set" should be placed before all
>> changing parameters.
>> I.e. if password identifies user record to be changed, "set" after it
>> ok, but if
>> password is a subject to change, "set" should be before it.
> My thought exactly. I also wonder, if the general rule is to have
> "...item valuetoset..." as opposed to "...item = valuetoset...", why
> would you suddenly switch to "=" for user attributes? I actually think
> the original syntax seems more consistent.
> But all in all I do find it a bit foreign that undefined items
> (attributes) could be set "ad hoc" without defining them or containing
> them inside some construct that is intended for that purpose. In other
> words, a syntax like this would seem a bit more robust:
> create user x password 'y' attributes (a = 'a', b = 'b');
> alter user x set password 'yy' attributes (a = 'aa', b = 'bb');
> I assume attribute identifiers can be quoted as usual?
> creat user x password 'y' attributes ("Weird Named Attribute &%!" = 'The
I like this, but a problem with this is: what is the behavior if an
existing attribute for the user isn't specified in an ALTER USER ..
ATTRIBUTES(...)? Will that delete the attribute, or leave it untouched?
With the SET syntax this is better defined (although 'deleting' an
attribute isn't really possible with that syntax; and I consider
non-existence something else than being NULL).