> regression=# create table baz as select f1 || 'z' as f1 from foo;
> SELECT
> regression=# \d baz
> Table "baz"
> Column | Type | Modifiers
> --------+--------+-----------
> f1 | bpchar |
>
> The argument here is about how much intelligence it's reasonable to
> expect the system to have. It's very clearly not feasible to derive
> a length limit automagically in every case. How hard should we try?
I don't think we can try in this case, especially because our functions
are all burried down in adt/. However, I don't think creating a bpchar
with no length is a proper solution. Should we just punt to text in
these cases? Seems cleaner, perhaps even throw an elog(NOTICE)
mentioning the promotion to text.
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026