From: | Dave Page <dpage(at)postgresql(dot)org> |
---|---|
To: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
Cc: | pgadmin-hackers(at)postgresql(dot)org |
Subject: | Re: Patch to add typmod's functions to a type's creation statement |
Date: | 2007-11-26 10:50:50 |
Message-ID: | 474AA50A.3080702@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Guillaume Lelarge wrote:
> Hi all,
>
> Here is a patch to support this new PostgreSQL 8.3 feature : the
> possibility to add type modifier input and ouput functions to a newly
> created type.
Unfortunately this still needs some work. I found the following issues:
- The typemod in/out functions are not included the reverse engineered
SQL displayed on the main window when a type with such functions is
selected (for reference, try pg_catalog.time).
- I'm not so keen on the labelling. I would suggest:
'Typmod in function'/'Typmod out function' in the properties list.
'Typmod in func'/'Typmod out func' on dlgType.
- The code that loads the combo boxes in dlgType is broken. It's
currently in loop designed to load the I/O and Send/Receive functions
(which is somewhat broken in itself). The doc at
http://www.postgresql.org/docs/8.3/static/sql-createtype.html describes
the general signature of functions that are appropriate.
[as a side note, the code here seems somewhat broken in general wrt the
handling of the whole create function/create type chicken and egg
scenario - I'll make a note to review that]
> I tried many things but wasn't able to test it. If someone has an
> example of a use of this statement, can he send it to me or can he test
> my patch ? Thanks.
Look at the code for the time datatype in pg_catalog. You can create
your own experimental types from it's reverse-engineers SQL (once the
first item above is fixed).
Patch NOT applied.
Regards, Dave.
From | Date | Subject | |
---|---|---|---|
Next Message | svn | 2007-11-26 16:29:01 | SVN Commit by dpage: r6828 - trunk/pgadmin3 |
Previous Message | Raphaël Enrici | 2007-11-25 11:04:05 | Re: pgadmin3 1.8.0 for ubuntu/dapper and |