Re: Patch to add typmod's functions to a type's creation statement

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Patch to add typmod's functions to a type's creation statement
Дата
Msg-id 474AA50A.3080702@postgresql.org
обсуждение исходный текст
Ответ на Patch to add typmod's functions to a type's creation statement  (Guillaume Lelarge <guillaume@lelarge.info>)
Ответы Re: Patch to add typmod's functions to a type's creation statement  (Guillaume Lelarge <guillaume@lelarge.info>)
Список 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.

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Raphaël Enrici
Дата:
Сообщение: Re: pgadmin3 1.8.0 for ubuntu/dapper and
Следующее
От: svn@pgadmin.org
Дата:
Сообщение: SVN Commit by dpage: r6828 - trunk/pgadmin3