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