Re: SELECT CAST(123 AS char) -> 1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ken Johanson <pg-user(at)kensystem(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT CAST(123 AS char) -> 1
Date: 2008-02-13 00:30:53
Message-ID: 6808.1202862653@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ken Johanson <pg-user(at)kensystem(dot)com> writes:
>>> What is wrong with using VARCHAR for your
>>> purpose????????????????????????????

> Simply that a commonly used database (my) does not support it.

They do support char(n) in this context, which would have the advantage
of being standards compliant as well as de-facto portable.

> Even at the expense of its standards deviation, and for doubting the
> vendor(s) will the change behavior (and break the app).

You say that with a straight face while arguing for us to diverge from
the spec? It seems unlikely to me that other DBs would change their
historical behavior except to make it comply to spec.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Johanson 2008-02-13 00:48:37 Re: SELECT CAST(123 AS char) -> 1
Previous Message Ken Johanson 2008-02-13 00:17:06 Re: SELECT CAST(123 AS char) -> 1