Обсуждение: Information Schema - Can the views be applied to older versions of PostgreSQL

Поиск
Список
Период
Сортировка

Information Schema - Can the views be applied to older versions of PostgreSQL

От
mike.griffin@mygenerationsoftware.com
Дата:
My name is Mike Griffin and we are adding PostgreSQL support to our
product, MyGeneration. MyGeneration pulls meta-data from DBMS systems to
generate business objects and stored procedures and such.

We are using the .NET managed provider Npgsql.dll. We typically get meta
data from OleDb providers and they provide good meta, however, there are
none for PostgreSQL that support the meta data services, so we're hitting
system tables.  I'm very familiar with the INFORMATION SCHEMA views as
Microsoft SQL server and other databases support them, as does PostgreSQL
7.4 and up, however, if we only support 7.4 and up we'll be losing out on
most of the installed PostgreSQL user base.

So now I'm writing monster queries against system tables, I mean monster
queries. It's brutal.

So here's my question:

Can I take the INFORMATION SCHEMA views from 7.4 and install them in older
versions of PostgreSQL, if so, how far back can they work?

Mike Griffin
MyGeneration Software
http://www.mygenerationsoftware.com


Re: Information Schema - Can the views be applied to older versions of PostgreSQL

От
Tom Lane
Дата:
mike.griffin@mygenerationsoftware.com writes:
> Can I take the INFORMATION SCHEMA views from 7.4 and install them in older
> versions of PostgreSQL, if so, how far back can they work?

I doubt they would just drop in, but you could possibly adapt them
to mostly work...

            regards, tom lane

Re: Information Schema - Can the views be applied to older versions of PostgreSQL

От
Peter Eisentraut
Дата:
mike.griffin@mygenerationsoftware.com wrote:
> Can I take the INFORMATION SCHEMA views from 7.4 and install them in
> older versions of PostgreSQL, if so, how far back can they work?

No.  For your purposes, you maybe be able to backport them and
distribute the altered versions with your product.  For some cases this
might involve trivial adjustments, but there is no guarantee how
difficult it will get.