Re: [INTERFACES] [pgaccess-users] RE:

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: [INTERFACES] [pgaccess-users] RE:
Дата
Msg-id 3D2CDD94.5ECA7540@Yahoo.com
обсуждение исходный текст
Ответ на Re: [INTERFACES] [pgaccess-users] RE: bugzilla.pgaccess.org  (Bradley Baetz <bbaetz@student.usyd.edu.au>)
Список pgsql-hackers
Rod Taylor wrote:
> 
> > However, is there an easy way of obtaining the list of columns (and their
> > types/indexes/etc) in a table, so that we can recreate table a with just
> > that column missing? One which won't break when the underlying pg_* schema
> > changes?
> 
> I see.  No, not that I know of.  You could take an SQL dump of the DB
> and work on that, then restore at the end of the upgrade process -- but
> thats not so good :)

One way to make the application more DB version independent is to
hide the system catalog version specific stuff in views. Whatever
information you need from the catalog, wrap it into bzdd_*
functions and views (BugZillaDataDictionary). If the catalog
changes, you just change the functions and views.

You finally end up with one .sql file per supported BZ/PG
combination. But that's alot better than bunches of if()'s in the
application code.


Jan

-- 

#======================================================================#
# It's easier to get forgiveness for being wrong than for being
right. #
# Let's break this rule - forgive
me.                                  #
#==================================================
JanWieck@Yahoo.com #


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bradley Baetz
Дата:
Сообщение: Re: [INTERFACES] [pgaccess-users] RE: bugzilla.pgaccess.org
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [INTERFACES] [pgaccess-users] RE: bugzilla.pgaccess.org