Re: [HACKERS] cannot cast bpchar and varchar - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: [HACKERS] cannot cast bpchar and varchar
Date
Msg-id 199902110508.OAA01832@ext16.sra.co.jp
Whole thread Raw
In response to Re: [HACKERS] cannot cast bpchar and varchar  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
> >Will look at this. Question: how *should* we compare bpchar and varchar?
> >It may be that we should have some explicit comparison or coersion
> >routines to make things work smoothly.
> 
> Not sure. I will check some SQL books at home.

According to the standard, the result of comparison between a fixed
length char (bpchar) and a variable length char (varchar or text) may
vary depending on an attribute "PAD SPACE" or "NO PAD" of the
COLLATION. Since we do not have COLLATION (yet), we need to have
another way to decide which scheme (PAD SPACE or NO PAD) should be
employed. Possible solution might be:

o decide at compile time. always use one of them at runtime.

o decide at runtime. new set command or an environment variable might be used.

Comments?
---
Tatsuo Ishii


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] interface libpq Makefile.in patch
Next
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] PostgreSQL and Solaris 7?