Re: stand-alone composite types patch (was [HACKERS] Proposal:

Bruce Momjian <pgman@candle.pha.pa.us>

From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Joe Conway <mail@joeconway.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Patches <pgsql-patches@postgresql.org>
Date: 2002-08-15T02:43:01Z
Lists: pgsql-hackers

Attachments

Sorry. this patch fails to apply.  A change to catalog/heap.c doesn't
seem to fit anywhere.  I have attached the reject.


---------------------------------------------------------------------------

Joe Conway wrote:
> Tom Lane wrote:
> > If you did it that way then you'd not need that ugly kluge in
> > RemoveType.  What you'd need instead is some smarts (a kluge!?) in
> > setting up the dependency.  Currently that dependency is made in
> > TypeCreate which doesn't know what sort of relation it's creating
> > a type for.  Probably the best answer is to pull that particular
> > dependency out of TypeCreate, and make it (in the proper direction)
> > in AddNewRelationType.
> 
> Fixed.
> 
> > Also, I'm not following the point of the separation between
> > DefineCompositeType and DefineCompositeTypeRelation; nor do I see a need
> > for a CommandCounterIncrement call in there.
> 
> Fixed.
> 
> 
> > You have missed a number of places where this new relkind ought to
> > be special-cased the same way RELKIND_VIEW is --- for example
> > CheckAttributeNames and AddNewAttributeTuples, since a composite type
> > presumably shouldn't have system columns associated.  I'd counsel
> > looking at all references to RELKIND_VIEW to see which places also need
> > to check for RELKIND_COMPOSITE_TYPE.
> 
> Yup, I had missed lots of things, not the least of which was pg_dump. 
> New patch attached includes pg_dump, psql (\dT), docs, and regression 
> support.
> 
> There is also a small adjustment to the expected output file for 
> select-having. I was getting a regression failure based on ordering of 
> the results, so I added ORDER BY clauses.
> 
> Passes all regression tests. If no more objections, please apply.
> 
> Thanks,
> 
> Joe
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073