Re: Modular Type Libraries: was A real currency type

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, tshipley(at)deru(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Modular Type Libraries: was A real currency type
Date: 2006-03-22 09:17:18
Message-ID: 20060322091718.GA29954@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Tue, Mar 21, 2006 at 10:39:03PM -0500, Tom Lane wrote:
> AFAICS, the main part of the type system that isn't modular is the
> support for type parameters (a/k/a typmod), such as the maximum length
> for varchar or the precision/scale for numeric. We could certainly
> invent an API for interpreting such parameters. But in the current state
> of the system the types that have such parameters have to be hard-wired
> into the SQL grammar, and I don't see how to get rid of that hard-wiring
> without breaking a whole lot of stuff. Any bison gurus hanging about?

We've been here before:

http://archives.postgresql.org/pgsql-hackers/2005-08/msg01142.php

Turns out it isn't too hard, except there are a number of limitations.
Unfortunatly I seem to have the deleted the patch I created then. :(

Summerising the thread then:

- It made some changes to what was and wasn't a reserved word.
- Character sets for CHAR types still fall outside the system.
- Some other changes in behaviour

I'm not sure if much has changed since that discussion.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gavin Hamill 2006-03-22 09:25:04 pg 8.1.3 on AIX
Previous Message surabhi.ahuja 2006-03-22 08:10:13 back slash separated values

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2006-03-22 10:03:34 Re: [PATCHES] Automatically setting work_mem
Previous Message Simon Riggs 2006-03-22 07:48:19 Re: Automatically setting work_mem