Search Postgresql Archives

Re: character datatype explaination sought

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"James B. Byrne" <byrnejb@xxxxxxxxxxxxx> writes:
> I am testing Idempiere and have run across this in an example:
> character(1) DEFAULT 'Y'::bpchar NOT NULL,

> How does this differ from

> character(1) DEFAULT 'Y' NOT NULL,

It doesn't.  The former is just written with an explicit cast,
which the latter lacks, but the end result will be the same
because the parser will coerce the DEFAULT expression to the
column's type anyway.

(It helps to know that for reasons lost in the depths of time,
Postgres' internal name for the char(N) type is "bpchar".)

			regards, tom lane





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux