Re: [PATCH] Support for Array ELEMENT Foreign Keys

From: Noah Misch <noah(at)leadboat(dot)com>
To: Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Support for Array ELEMENT Foreign Keys
Date: 2012-09-27 16:56:52
Message-ID: 20120927165652.GB25353@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 18, 2012 at 05:52:51PM +0200, Marco Nenciarini wrote:
> please find attached the refreshed v1 patch.

I perused this version in comparison to the last version I reviewed, finding
minor problems. First, a warning:

tablecmds.c: In function `ATExecAddConstraint':
tablecmds.c:5898: warning: `fk_element_type' may be used uninitialized in this function
tablecmds.c:5898: note: `fk_element_type' was declared here

I don't see an actual bug; add a dead store to silence the compiler.

> *** a/src/test/regress/parallel_schedule
> --- b/src/test/regress/parallel_schedule
> *************** test: event_trigger
> *** 94,100 ****
> # ----------
> # Another group of parallel tests
> # ----------
> ! test: select_views portals_p2 foreign_key cluster dependency guc bitmapops combocid tsearch tsdicts foreign_data window xmlmap functional_deps advisory_lock json
>
> # ----------
> # Another group of parallel tests
> --- 94,100 ----
> # ----------
> # Another group of parallel tests
> # ----------
> ! test: select_views portals_p2 foreign_key cluster dependency guc bitmapops combocid tsearch tsdicts foreign_data window xmlmap functional_deps advisory_lock element_foreign_key

Keep that json test.

> + errmsg("array ELEMENT foreign keys only support NO ACTION "
> + "and RESTRICT actions")));

Project style is not to break message literals; instead, let the line run
long. There are a few more examples of this in your patch.

Those problems are isolated and do not impugn design, so committer time would
be just as well-spent on the latest version. As such, I'm marking the patch
Ready for Committer. Thanks to Rafal Pietrak for his helpful review.

nm

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Johnston 2012-09-27 17:08:13 Re: Oid registry
Previous Message Robert Haas 2012-09-27 16:52:41 Re: Oid registry