Re: [HACKERS] 'a' == 'a ' - Mailing list pgsql-general

From Tom Lane
Subject Re: [HACKERS] 'a' == 'a '
Date
Msg-id 3776.1129780058@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] 'a' == 'a '  (Chris Travers <chris@travelamericas.com>)
Responses Re: [HACKERS] 'a' == 'a '  (Greg Stark <gsstark@mit.edu>)
List pgsql-general
Chris Travers <chris@travelamericas.com> writes:
> If I understand the spec correctly, it seems to indicate that this is
> specific to the locale/character set.

The spec associates padding behavior with collations, which per spec are
separate from the datatypes --- that is, you should be able to able to
specify a collation for each string-type table column (whether char(N)
or varchar(N)) and even for each literal string constant.  We do not
currently have that capability, and accordingly fall back to binding
PAD SPACE behavior to char(N) and NO PAD behavior to varchar(N).

AFAICS this choice is allowed by the spec since the default collation is
implementation-defined.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [pgsql-advocacy] Oracle buys Innobase
Next
From: "surabhi.ahuja"
Date:
Subject: Re: server , client encoding issue