Re: [HACKERS] Interesting behaviour !

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: [HACKERS] Interesting behaviour !
Дата
Msg-id 378D7C74.99700FF7@alumni.caltech.edu
обсуждение исходный текст
Ответ на RE: [HACKERS] Interesting behaviour !  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Ответы RE: [HACKERS] Interesting behaviour !  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Список pgsql-hackers
> Each type has a typeinput(char * => type ) proc and a typeoutput(
> type -> char *) proc.
> Doesn't int2in(int4out()) convert int4 to int2 ?
> However,typeinput proc causes elog(ERROR) in most cases if it
> couldn't convert correctly.

Conversion using an intermediate string is possible, but not the
preferred technique.

The "automatic type coersion" code, used earlier in the parser, uses
the convention that any single-argument function taking the source
type as input and with the same name as the target type can be used
for type conversion. For example, the function int4(int2) would
convert int2 to int4. There are now routines in the parser for
choosing conversion strategies and for finding candidates, and these
could be reused for similar purposes when trying to match index
arguments.
                 - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


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

Предыдущее
От: Adriaan Joubert
Дата:
Сообщение: Re: [HACKERS] header files for spi.h/trigger.h]
Следующее
От: Zeugswetter Andreas IZ5
Дата:
Сообщение: Re: [HACKERS] Re: Arrays versus 'type constant' syntax