Re: [HACKERS] cannot cast bpchar and varchar

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: pgsql-hackers(at)postgreSQL(dot)org, t-ishii(at)sra(dot)co(dot)jp
Subject: Re: [HACKERS] cannot cast bpchar and varchar
Date: 1999-02-11 05:08:40
Message-ID: 199902110508.OAA01832@ext16.sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-02-11 05:18:06 Re: [HACKERS] interface libpq Makefile.in patch
Previous Message Tatsuo Ishii 1999-02-11 05:08:36 Re: [HACKERS] PostgreSQL and Solaris 7?