Re: Summary: changes needed in function defaults behavior
От | Dimitri Fontaine |
---|---|
Тема | Re: Summary: changes needed in function defaults behavior |
Дата | |
Msg-id | 479DD92A-1622-456C-A0F3-33D243DD2D09@hi-media.com обсуждение исходный текст |
Ответ на | Re: Summary: changes needed in function defaults behavior (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Le 18 déc. 08 à 00:56, Tom Lane a écrit : > "Pavel Stehule" <pavel.stehule@gmail.com> writes: >> do you remember on request for using "default" keyword in funccall? >> This should be solution. In view, you don't store select foo(11), but >> you have to store select foo(11, default, default). > > Seems pretty ugly; keep in mind you'd be looking at that notation > constantly (in \d, EXPLAIN, etc), not just in dumps. Well, considering it could solve the issue at hand without semantics revisiting, it doesn't seem that ugly to me. Forcing the users of default arguments to see they are using them all over the places is fine by me. And being able to put in default explicitly when calling the function could also be a nice feature for people auto-generating calling code. From what we get on IRC it's far easier for peopleto special case DEFAULT rather than special case list constructions, as already possible in INSERT statements. > I think the most conservative thing to do is to treat varying > numbers of > defaults as ambiguous for now. We can relax that later without > breaking > working code, but we couldn't go the other way if something else comes > up. If a user vote is worth anything, I'd vote for explicit default notation please. - - dim -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAklKE8EACgkQlBXRlnbh1blAUwCeOPUglnybmjL1DKCoq56mB5Te 12MAn3zLhPJihx8LTVN8luELQrHMEQrJ =+htG -----END PGP SIGNATURE-----
В списке pgsql-hackers по дате отправления: