From: | David Johnston <polobo(at)yahoo(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Add custom properties to a column's definition (pg_attribute) |
Date: | 2014-01-09 21:14:32 |
Message-ID: | 1389302072474-5786174.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Brooke Beacham wrote
> (without having to replicate/maintain a table of columns separately from
> the system catalog)
Just create the friggin' table and wrap whatever logic you want in a view
(or functions) so that you at least get usable results/defaults for any
columns you haven't added.
Any solution you pick has the risk of becoming out-of-sync so tossing out
the best solution does more harm than good.
In terms of "group" columns you might just consider creating two tables that
have a one-to-one relationship to each other (or three, the base table and
then group A and group B tables).
A lot depends on the why and structure of your model but there is no
standard facility for custom column meta-data and though the comment
facility can be used for this I much prefer to leave that for human
consumption and have something more structured and easily customize-able for
meta-data.
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Add-custom-properties-to-a-column-s-definition-pg-attribute-tp5786158p5786174.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Hiestand | 2014-01-09 21:49:35 | Re: postgres.app OS X psql character encoding (utf-8) problem |
Previous Message | Tom Lane | 2014-01-09 21:09:11 | Re: postgres.app OS X psql character encoding (utf-8) problem |