Re: [HACKERS] DEFAULT fixed

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] DEFAULT fixed
Date: 1999-05-23 00:55:56
Message-ID: 199905230055.UAA08555@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Does anyone have an opinion on this? Why does only DEFAULT have this
> > problem? Does anyone know how inserts of '' into char() fields get
> > padded with the proper atttypmod value? Do I need to pass atttypmod to
> > all the functions that call parse_coerce, so I can pass a value for all
> > cases?
>
> Possibly DEFAULT is the only case where the constant value created by
> the parser will get shoved directly into a tuple with no run-time
> coercion? That's strictly a guess. I agree this issue needs to be
> looked at more closely.
>
> Now that we know the problem comes from missing atttypmod info, it
> seems likely that related failures can occur for NUMERIC and other
> types that depend on atttypmod. (Are there any such types? Even
> if there aren't now, there will probably be more and more in future.)
> It might be best to just bite the bullet and make the parser carry
> around both the type's OID and typmod at all times.

That was my guess too, that atttypmod would become more important.

--
Bruce Momjian | http://www.op.net/~candle
maillist(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-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-05-23 01:06:22 Re: [HACKERS] GEQO optimizer (was Re: Backend message type 0x44 arrived while idle)
Previous Message Ole Gjerde 1999-05-23 00:30:44 Sequence nexvtal() and initdb/pg_proc problem