Re: [HACKERS] cannot cast bpchar and varchar

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] cannot cast bpchar and varchar
Date: 1999-02-10 04:32:24
Message-ID: 36C10BD8.A99D0F86@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> It seems that casting varchar and bpchar does not work.

Hmmm. It seems to be a combination of two problems:

1) not knowing which type should be preferred (or how to compare varchar
and bpchar; should I strip the blank padding from a bpchar? Probably
so...).

2) swallowing the type coersions since bpchar, varchar, and text are
considered to be binary compatible. I may have seen another instance of
this being a problem, and perhaps should figure out how to propagate the
new coerced type into the query rather than dropping it.

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.

Thanks for the report.

- Tom

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 1999-02-10 06:47:56 Re: [HACKERS] Keywords
Previous Message The Hermit Hacker 1999-02-10 04:16:30 Re: [HACKERS] PostgreSQL and Solaris 7?