Search Postgresql Archives

Re: copy/duplicate database schemas

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/06/10 03:21, Jamie Kahgee wrote:
> I have an application in a schema and now i need to create other schemas
> b/c the app needs to support different languages,  is there an easy way
> to copy an entire schema to a new one (tables, contents, trigges,
> functions, etc..)?

Others have replied with suggestions on how to do this, so I won't
repeat that - but I think you need to look at the bigger picture.

If you copy your app into multiple schema then modify each to localize
them, you're going to have a maintenance nightmare on your hands if you
ever intend to fix bugs or add new features to your app. All the copies,
including copies in languages you don't speak, will have to be kept up
to date.

You might want to investigate internationalization options instead,
where you can process your "master" sources to produce a list of
strings, and have translators translate those strings. Your code loads
the string lists, and depending on the setting for the "current
language" decides which mapping of strings to translations to use when
emitting messages.

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.
However, it'll save you a LOT of pain not to maintain five (or more -
new translations are always required) versions of your code down the track.

--
Craig Ringer

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux