Re: Arrays of Complex Types - Mailing list pgsql-hackers

From David Fetter
Subject Re: Arrays of Complex Types
Date
Msg-id 20070327193904.GE10585@fetter.org
Whole thread Raw
In response to Re: Arrays of Complex Types  (David Fetter <david@fetter.org>)
Responses Re: Arrays of Complex Types
List pgsql-hackers
On Tue, Mar 27, 2007 at 11:08:44AM -0700, David Fetter wrote:
> On Sun, Mar 25, 2007 at 10:18:14PM -0400, Tom Lane wrote:
> > David Fetter <david@fetter.org> writes:
> > > I've written up a patch intended to implement this on the
> > > non-pg_catalog tables and VIEWs, but while it builds, it doesn't
> > > initdb.  Enclosed are the patch and the error log.
> > > Any hints as to what I might look at?
> >
> > > creating template1 database in /var/lib/pgsql/pgsql/src/test/regress/./tmp_check/data/base/1 ... ok
> > > initializing pg_authid ... ok
> > > initializing dependencies ... ok
> > > creating system views ... ok
> > > loading system objects' descriptions ... FATAL:  cache lookup failed for type 11096
> > > child process exited with exit code 1
> >
> > That step of initdb creates a TEMP table ... maybe your patch
> > doesn't work for temp tables?  Anyway, you're certainly far enough
> > along there that you could fire up the postmaster and reproduce
> > the error in a normal debugging environment.
>
> I've done that, and thanks to Andrew of Supernews, I've got a
> slightly better patch, albeit one that bombs out at the same spot.
> In the patch attached, it appears that TypeCreate is not doing the
> right thing in pg_depend, either because I'm not invoking it right
> or because it needs more machinery.
>
> Any ideas?

Pardon the self-follow-up.

Per further discussion with Andrew of Supernews and Merlin Moncure,
I've added a check for compound types and moved the creation of the
array type from DefineRelation in backend/commands/tablecmds.c to
heap_create_with_catalog in backend/catalog/heap.c.

It now initdb's successfully, but fails on a lot of regression tests.

Please find attached the new patch vs. CVS TIP and the regression test
output.

Am I on the right track here?

Cheers,
D
--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!
Consider donating to PostgreSQL: http://www.postgresql.org/about/donate

Attachment

pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: sorted results on pgbuildfarm
Next
From: "Joris Dobbelsteen"
Date:
Subject: Re: Guarenteeing complex referencial integrity throughcustom triggers