clever COMMENT/description usage -- internationalizing?

From: will trillich <will(at)serensoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: clever COMMENT/description usage -- internationalizing?
Date: 2001-03-20 18:00:54
Message-ID: 20010320120054.A19015@mail.serensoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 20, 2001 at 08:26:58AM -0800, Roderick A. Anderson wrote:
> On Mon, 19 Mar 2001, will trillich wrote:
> > i'm wondering if any devious minds out there are using it for
> > something clever and useful, instead of doing the
> > roll-your-own table cross-lookups that i've been hobbling
> > together for the past few weeks...
>
> Nothing devious but back in my Oracle days we included comments on all
> tables and attributes. What better place to store the information about
> the database than in the database (metadata?). I wrote so scripts (pretty
> ORacle and Data General AOS/VS specific) that generated documentation for
> an application using the comments.
> Too often someone would walk in and want to know which attribute to use
> to tie one table to another. (I had some pretty good report writers that
> weren't computer people.) After getting this generate HTML and onto our
> Intranet they could just run the report and see all the tables, columns,
> primary keys, foreign keys, and information about each of them. Made my
> life simpler - when I could get them to use it - and I'd use it instead of
> keeping printed stuff lying around.

sounds reasnable -- and just like what the pg_description table
was intended for.

how about internationalizing the comments? i can do

comment on column mytable.afield is 'general data stuff';

to get an english description -- how would y'all recommend
splitting up different languages? i'm thinking of doing something
like

comment on column mytable.thisfield is
'join=lookupTableName.lookupField/valueField
en=general data
fr=information generale
es=informacion' ;

and then using some sort of split function to break it on
<perl> ($lang)=([^\n]+) </perl> ...

any commentary from you pg/sql folks? is there a sneakier or
more flexible/powerful way? maybe i should go ahead and roll my
own schematic...?

--
It is always hazardous to ask "Why?" in science, but it is often
interesting to do so just the same.
-- Isaac Asimov, 'The Genetic Code'

will(at)serensoft(dot)com
http://newbieDoc.sourceforge.net/ -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-03-20 18:02:22 Re: Re: [GENERAL] Re: temp table creation
Previous Message Tom Lane 2001-03-20 17:56:28 Re: sorting on inet type?