Skip site navigation (1) Skip section navigation (2)

Re: Backend-internal SPI operations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mark Hollomon" <mhh(at)nortelnetworks(dot)com>
Cc: Jan Wieck <janwieck(at)Yahoo(dot)com>, Mike Mascari <mascarm(at)mascari(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Backend-internal SPI operations
Date: 2000-08-30 20:28:12
Message-ID: 22049.967667292@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
"Mark Hollomon" <mhh(at)nortelnetworks(dot)com> writes:
> 2. CREATE RULE ... AS ON SELECT DO INSTEAD ... sets relkind to RELKIND_VIEW
> 	and deletes any relation files.

>   q: If we find an index, should we drop it, or complain, or ignore it?
>   q: Should the code check to see if the relation is empty (no valid tuples)?

I think we can ignore indexes.  However, it seems like a wise move to
refuse to convert a nonempty table to view status, *especially* if we
are going to blow away the physical file.  Otherwise mistyping the
relation name in a CREATE RULE could be disastrous (what? you wanted
that data?)

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-08-30 21:29:51
Subject: Important 7.0.* fix to ensure buffers are released
Previous:From: Tom LaneDate: 2000-08-30 19:31:46
Subject: Re: [BUG] calling lo_creat()

pgsql-patches by date

Next:From: Tom LaneDate: 2000-08-30 21:29:51
Subject: Important 7.0.* fix to ensure buffers are released
Previous:From: Mark HollomonDate: 2000-08-30 19:24:57
Subject: Re: Backend-internal SPI operations

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group