Re: SELECT CAST(123 AS char) -> 1 - Mailing list pgsql-general

From Tom Lane
Subject Re: SELECT CAST(123 AS char) -> 1
Date
Msg-id 6808.1202862653@sss.pgh.pa.us
Whole thread Raw
In response to Re: SELECT CAST(123 AS char) -> 1  (Ken Johanson <pg-user@kensystem.com>)
Responses Re: SELECT CAST(123 AS char) -> 1
List pgsql-general
Ken Johanson <pg-user@kensystem.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

pgsql-general by date:

Previous
From: "Leonel Nunez"
Date:
Subject: Re: Storing images as BYTEA or large objects
Next
From: Ken Johanson
Date:
Subject: Re: SELECT CAST(123 AS char) -> 1