Re: [HACKERS] [PATCH] Generic type subscription

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: [HACKERS] [PATCH] Generic type subscription
Дата
Msg-id 75018189-bcfe-dbd8-5b75-c81e95ec7b10@BlueTreble.com
обсуждение исходный текст
Ответ на Re: [HACKERS] [PATCH] Generic type subscription  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 1/23/17 1:36 PM, Tom Lane wrote:
> Is there a way for a function
> in an extension to find the OID of one of its sibling functions?

Obviously there's regprocedure (or it's C equivalent), but then you're 
stuck re-computing at runtime. I've messed around with that a bit in an 
effort to have an extension depend on another extension that allows the 
user to specify it's schema. If you're already doing metaprogramming 
it's not an enormous problem... if you're not already doing that it 
sucks. Trying to make that work in C would be somewhere between 
impossible and a nightmare.

Since this kind of thing affects extensions that depend on extensions, 
it'd certainly be nice if there was some way to address it.

BTW, I actually do use SPI to call one of the reg casts in my variant 
type, but that's just a hack I used in the beginning and haven't gotten 
around to replacing. Since there's a static variable that gets set to 
the relevant OID it's not that bad performance-wise from what I can 
tell, but I suspect that's not something we want to be recommending to 
others...
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)



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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: [HACKERS] Checksums by default?
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] Checksums by default?