Re: Listing views - Mailing list pgsql-general

From Olivier Guilyardi
Subject Re: Listing views
Date
Msg-id 4118D122.9010809@xung.org
Whole thread Raw
In response to Re: Listing views  (Doug McNaught <doug@mcnaught.org>)
Responses Re: Listing views  (Doug McNaught <doug@mcnaught.org>)
List pgsql-general
Doug McNaught wrote:

> Olivier Guilyardi <ml@xung.org> writes:
>>Am I wrong or is this a backward compatibility issue that forbids
>>listing views/tables/whatever with an identical SQL query on 7.2 and 7.4 ?
>
> System catalog layouts have never been guaranteed for backward
> compatibility.  Going forward, the stable way to find out about your
> tables is the SQL_standard "information_schema" which first appeared in
> 7.4 IIRC.  This doesn't help you with 7.2 though--you'll have to
> handle it specially.  :(

Okay, that's what I thought : an initial little query to identify the server
version, so that subsequent queries can be adapted accordingly...

But, since this "What Postgresql version is this ?" query is silently performed
by the library I'm interested in, what the host application is not supposed to
know, it must be ensured that it's not going to break : is version() the way to
go ? Could there be some permission issues with very restrictive user accounts ?
Some better _only-one-query_ way to identify the server version/features ?

--
   og





pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: PostgreSQL 8.0 Feature List?
Next
From: Raphael Bauduin
Date:
Subject: Re: history tables with only one function?