Re: Rethinking user-defined-typmod before it's too late - Mailing list pgsql-hackers

From David Fetter
Subject Re: Rethinking user-defined-typmod before it's too late
Date
Msg-id 20070615162242.GJ13394@fetter.org
Whole thread Raw
In response to Rethinking user-defined-typmod before it's too late  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Jun 15, 2007 at 12:14:45PM -0400, Tom Lane wrote:

[snip]

> I propose changing the typmodin signature to "typmodin(cstring[])
> returns int4", that is, the typmods will be passed as strings not
> integers.  This will incur a bit of extra conversion overhead for
> the normal uses where the typmods are integers, but I think the gain
> in flexibility is worth it.  I'm inclined to make the code in
> parse_type.c take either integer constants, simple string literals,
> or unqualified names as input --- so you could write either
> tsvector('ru') or tsvector(ru) when using a type that wants a
> nonintegral typmod.
> 
> Note that the typmodout side is already OK since it is defined to
> return a string.
> 
> Comments?

+1 :)

Cheers,
D
-- 
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666                             Skype: davidfetter

Remember to vote!
Consider donating to PostgreSQL: http://www.postgresql.org/about/donate


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Rethinking user-defined-typmod before it's too late
Next
From: Teodor Sigaev
Date:
Subject: Re: How does the tsearch configuration get selected?