Den 2013-12-16 12:28 skrev Mark Rotteveel såhär: > On Mon, 16 Dec 2013 12:09:07 +0100, Kjell Rilbe <kjell.ri...@datadia.se> > wrote: >> 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 >> Value'); > 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).
Good point regarding unset. How would you suggest to do that in any of the suggested syntaxes? Perhaps like this (suugesting keyword "tags" instead of "attributes"): alter user x tags (drop a, b = 'bbb'); Trying a syntax more like altering tables: create user x password 'pwd' tag a = 'a' tag b = 'b' tag c = null; alter user x drop tag a set tag b = 'b'; The set keyword would add the tag if not already present and update it otherwise.. Kjell -- -------------------------------------- Kjell Rilbe DataDIA AB E-post: kj...@datadia.se Telefon: 08-761 06 55 Mobil: 0733-44 24 64 ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel