Re: missing rename support - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: missing rename support
Date
Msg-id 20130118182027.GE16126@tamriel.snowman.net
Whole thread Raw
In response to Re: missing rename support  (Ali Dar <ali.munir.dar@gmail.com>)
Responses Re: missing rename support
List pgsql-hackers
* Ali Dar (ali.munir.dar@gmail.com) wrote:
> Find attached an initial patch for ALTER RENAME RULE feature. Please
> note that it does not have any documentation yet.

Just took a quick look through this.  Seems to be alright, but why do we
allow renaming ON SELECT rules at all, given that they must be named
_RETURN?  My thinking would be to check for that case and error out if
someone tries it.

You should try to keep variables lined up:
Relation    pg_rewrite_desc;HeapTuple   ruletup;
+    Oid owningRel;

should be:
Relation    pg_rewrite_desc;HeapTuple   ruletup;
+    Oid            owningRel;

I'd also strongly recommend looking through that entire function very
carefully.  Code that's been #ifdef'd out tends to rot.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: in-catalog Extension Scripts and Control parameters (templates?)
Next
From: Stephen Frost
Date:
Subject: Re: in-catalog Extension Scripts and Control parameters (templates?)