Re: copy/duplicate database schemas

From: "Karsten Hilbert" <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: copy/duplicate database schemas
Date: 2010-06-24 12:19:37
Message-ID: 20100624121937.188340@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> > This adds significant complexity to your code, especially since (AFAIK)
> > there aren't really any good i18n tools for Pg's SQL, PL/PgSQL, etc.
>
> But there is - whether good or not: Go to
> http://gitorious.org/gnumed and browse the tree under
> gnumed/server/SQL/. Look at the i18n schema which provides
> functions for registering strings for translation and
> translating them (i18n.upd_tx()) and using translated
> strings nearly transparently in your queries like so:
>
> SELECT _(label) FROM your_label_table;
>
> Which will return label translated into what the connected
> user registered as his preferred language or in the source
> language if none registered or no translation available.

http://gitorious.org/gnumed/gnumed/trees/master/gnumed/gnumed/server/sql

Under this link look at gmI18N*.sql, note that below the versioned
directories there are several improvements and fixes but you'll get
the idea.

Karsten
--
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Norberto Delle 2010-06-24 12:34:48 Could not locate a valid checkpoint record
Previous Message tv 2010-06-24 10:40:36 Re: Bad query performance with more conditions?