Tom Lane wrote:
Yeah, adding a column to one of the core "bootstrap" tables is a real
PITA.  But I guess we don't do it often enough to justify having more
infrastructure for that.

Maybe we should beef up the comments in those few stratgegic headers files a bit though.

Now to use the field ....
If it hasn't occurred to you already: please add a test or two in
typ_sanity.sql to check that the column is sane, eg the type it points
to is a varlena type that points back to the element type.

Yeah, I have the test below so far - will fix more when I have the name generation bit done.



-- Make sure typarray points to a varlena array type of our own base
SELECT p1.oid, p1.typname as basetype, p2.typname as arraytype,
      p2.typelem, p2.typlen
FROM   pg_type p1 left join pg_type p2 on (p1.typarray = p2.oid)
WHERE  p1.typarray <> 0 AND
      (p2.oid IS NULL OR p2.typelem <> p1.oid OR p2.typlen <> -1);

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to