Peter Eisentraut <pete...@gmx.net> writes: > On 11/21/12 9:42 AM, Robert Haas wrote: >> On Mon, Nov 19, 2012 at 6:19 PM, Peter Eisentraut <pete...@gmx.net> wrote: >>> I continue to be of the opinion that allowing this second case to work >>> is not desirable.
>> 1. Why? > Because a strongly-typed system should not cast numbers to strings > implicitly. Does the equivalent of the lpad case work in any other > strongly-typed programming language? The argument here is basically between ease of use and ability to detect common programming mistakes. It's not clear to me that there is any principled way to make such a tradeoff, because different people can reasonably put different weights on those two goals. >> 2. What's your counter-proposal? > Leave things as they are. FWIW, I agree with Peter. It's been like this for a long time and whether the system would be easier to use or not, it would definitely be uglier and harder to explain. ("Assignment casts are used only for assignments ... except when they aren't.") I notice that the proposed patch is devoid of documentation. Perhaps after Robert is done writing the necessary changes to the SGML docs about type conversions and casts, he'll agree this is pretty ugly. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers