Re: [HACKERS] 'a' == 'a '

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Travers <chris(at)travelamericas(dot)com>
Cc: josh(at)agliodbs(dot)com, pgsql-hackers(at)postgresql(dot)org, Dann Corbit <DCorbit(at)connx(dot)com>, Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, Terry Fielder <terry(at)ashtonwoodshomes(dot)com>, Tino Wildenhain <tino(at)wildenhain(dot)de>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, Richard_D_Levine(at)raytheon(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: [HACKERS] 'a' == 'a '
Date: 2005-10-20 03:47:38
Message-ID: 3776.1129780058@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Chris Travers <chris(at)travelamericas(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message surabhi.ahuja 2005-10-20 03:57:29 server , client encoding issue
Previous Message Tom Lane 2005-10-20 03:19:02 Re: [pgsql-advocacy] Oracle buys Innobase

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2005-10-20 06:17:13 Re: [HACKERS] 'a' == 'a '
Previous Message Alvaro Herrera 2005-10-20 02:49:42 Re: [HACKERS] Call for translators