Re: Bug #513: union all changes char(3) column definition

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>, stiening(at)cannon(dot)astro(dot)umass(dot)edu, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #513: union all changes char(3) column definition
Date: 2001-11-22 04:13:28
Message-ID: 200111220413.fAM4DSH15042@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

> How many special cases like that do you want to put into the allegedly
> datatype-independent CREATE TABLE code?
>
> If I thought this were the only case then I'd not object ... but it
> looks like a slippery slope from here.
>
> And --- it's not like replacing "bpchar" with "text" actually buys us
> any useful new functionality. AFAICS it's just a cosmetic thing.
>
> regards, tom lane
>
> PS: On the other hand, we might consider attacking the problem from
> the reverse direction, ie *removing* code. For example, if there
> weren't redundant || operators for char and varchar, then every ||
> operation would yield text, and the example we're looking at would
> work the way you want for free. I've thought for awhile that we
> could use a pass through pg_proc and pg_operator to remove some
> entries we don't really need.

Can we convert bpchar to text in create table if no typmod is supplied?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Kostis 2001-11-22 15:04:50 UPDATE fails on large table
Previous Message Tom Lane 2001-11-22 04:08:37 Re: Bug #513: union all changes char(3) column definition

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2001-11-22 06:57:54 Re: More FK patches
Previous Message Tom Lane 2001-11-22 04:08:37 Re: Bug #513: union all changes char(3) column definition