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

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: and it's not a bunny rabbit, either
Date: 2010-12-29 17:29:23
Message-ID: 4D1B6FF3.2030603@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-12-29 17:49:19 Re: and it's not a bunny rabbit, either
Previous Message Tom Lane 2010-12-29 17:14:03 Re: Avoiding rewrite in ALTER TABLE ALTER TYPE