From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Bundle of patches |
Date: | 2006-12-04 22:12:04 |
Message-ID: | 20061204221203.GD24581@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On Mon, Dec 04, 2006 at 02:04:26PM -0500, Tom Lane wrote:
> Teodor Sigaev <teodor(at)sigaev(dot)ru> writes:
> > 1) Typmod for user-defined types
> > http://www.sigaev.ru/misc/user_defined_typmod-0.7.gz
> > Patch is based on ideas from
> > http://archives.postgresql.org/pgsql-hackers/2004-06/msg00932.php
> > http://archives.postgresql.org/pgsql-hackers/2005-08/msg01007.php
>
> This one seems generally workable, but I really dislike the approach
> that's been used for passing typmod arguments to the typmod_in function.
> Representing them with an "internal" parameter means it'll be forever
> impossible to write typmod functions in anything but C, which seems an
> ugly restriction. Perhaps an array of int4 would be better? How much
> flexibility do we really want to provide for typmod arguments? Allowing
> full "expr_list" in the grammar seems less than sane, considering the
> result is still going to have to pack into 32 bits.
People have been discussion passing character set names as typmod
parameters, so restricting them to int4 seems too tight.
I'd favour the approach where the arguments to the typmod_in function
determine the types required. This allows the system to do proper
checking and casting and most important of all, good error messages,
eg:
ERROR: Invalid argument to type: must be one of
numeric(), numeric(integer), numeric(integer, integer)
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Luke Lonergan | 2006-12-04 23:03:58 | Re: old synchronized scan patch |
Previous Message | Martijn van Oosterhout | 2006-12-04 22:05:06 | Re: [HACKERS] Bundle of patches |
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2006-12-04 22:19:40 | Re: On-disk bitmap index implementation |
Previous Message | Martijn van Oosterhout | 2006-12-04 22:05:06 | Re: [HACKERS] Bundle of patches |