Re: advice on extensions needed

Поиск
Список
Период
Сортировка
От Brook Milligan
Тема Re: advice on extensions needed
Дата
Msg-id 200008251819.MAA25810@biology.nmsu.edu
обсуждение исходный текст
Ответ на Re: advice on extensions needed  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> - Is it possible to write functions to automatically convert one  >   extended type into another?  If so, how
shouldthis be done?
 
  A function named the same as a type, with one argument of some other  type, is treated as an implicit type conversion
ruleby the parser.
 

Just to make sure I understand.  Suppose I create two user-defined
types A and B and want interconversions.  I will need the following
functions, right?
/* I/O */
A * A_in (const char *);
char * A_out (const A *);
B * B_in (const char *);
char * B_out (const B *);
/* conversions */
A * A (const B *);
B * B (const A *);

Thanks again.

Cheers,
Brook


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

Предыдущее
От: John McKown
Дата:
Сообщение: Access PostgreSQL server via SSL/Internet
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Performance on inserts