Re: and it's not a bunny rabbit, either

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: and it's not a bunny rabbit, either
Дата
Msg-id 4D1B6FF3.2030603@enterprisedb.com
обсуждение исходный текст
Ответ на Re: and it's not a bunny rabbit, either  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: and it's not a bunny rabbit, either  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 29.12.2010 13:17, Robert Haas wrote:
> Did you read the whole thread?

Ah, sorry:

> I've had to change some of the heap_open(rv) calls to
> relation_open(rv) to avoid having the former throw the wrong error
> message before the latter kicks in.  I think there might be stylistic
> objections to that, but I'm not sure what else to propose.  I'm
> actually pretty suspicious that many of the heap_open(rv) calls I
> *didn't* change are either already a little iffy or likely to become
> so once the SQL/MED stuff for foreign tables goes in.  They make it
> easy to forget that we've got a whole pile of relkinds and you
> actually need to really think about which ones you can handle.

Hmm, I believe the idea of heap_open is to check that the relation is 
backed by a heap that you can read with heap_beginscan+heap_next. At the 
moment that includes normal tables, sequences and toast tables. Foreign 
tables would not fall into that category.

Yeah, you're right that most of the callers of heap_open actually want 
to a tighter check than that.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Avoiding rewrite in ALTER TABLE ALTER TYPE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: and it's not a bunny rabbit, either