Re: pg_proc without oid?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_proc without oid?
Дата
Msg-id 10684.1171900239@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_proc without oid?  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: pg_proc without oid?  (Gregory Stark <stark@enterprisedb.com>)
Re: pg_proc without oid?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Am Montag, 19. Februar 2007 16:26 schrieb Tom Lane:
>> Peter Eisentraut <peter_e@gmx.net> writes:
>>> Am Montag, 19. Februar 2007 10:16 schrieb Magnus Hagander:
>>>> This breaks the fmgrtab generator on msvc.
>>
>>> It's intentional.
>> 
>> Kindly change that intention.

> What is wrong?

Well, in the first place Gen_fmgrtab.sh is producing garbage:

#define F_CURSOR_TO_XML DATAINSERT
#define F_CURSOR_TO_XMLSCHEMA DATAINSERT
#define F_QUERY_TO_XML DATAINSERT
#define F_QUERY_TO_XML_AND_XMLSCHEMA DATAINSERT
#define F_QUERY_TO_XMLSCHEMA DATAINSERT
#define F_TABLE_TO_XML DATAINSERT
#define F_TABLE_TO_XML_AND_XMLSCHEMA DATAINSERT
#define F_TABLE_TO_XMLSCHEMA DATAINSERT
#define F_BYTEAOUT 31
#define F_CHAROUT 33

const FmgrBuiltin fmgr_builtins[] = { { 0, "cursor_to_xml", 5, true, false, cursor_to_xml }, { 0,
"cursor_to_xmlschema",4, true, false, cursor_to_xmlschema }, { 0, "query_to_xml", 4, true, false, query_to_xml }, { 0,
"query_to_xml_and_xmlschema",4, true, false, query_to_xml_and_xmlschema }, { 0, "query_to_xmlschema", 4, true, false,
query_to_xmlschema}, { 0, "table_to_xml", 4, true, false, table_to_xml }, { 0, "table_to_xml_and_xmlschema", 4, true,
false,table_to_xml_and_xmlschema }, { 0, "table_to_xmlschema", 4, true, false, table_to_xmlschema }, { 31, "byteaout",
1,true, false, byteaout },
 

The fact that that table is broken means you're incurring expensive
linear searches to invoke these functions.  It's only by chance that
it works at all...

In the second place, if you don't want to predetermine OIDs for your
functions then they shouldn't be in hardwired pg_proc.h rows at all.
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Chatter on DROP SOMETHING IF EXISTS
Следующее
От: "Guillaume Smet"
Дата:
Сообщение: Re: n-gram search function