On Tue, Dec 03, 2002 at 10:56:47AM -0800, David Wheeler wrote:
> On Tuesday, December 3, 2002, at 10:34  AM, Jeff Boes wrote:
> 
> >Nope, not quite:
> >
> >$ grep pg_ Pg.pm
> >
> >of Pg.pm 1.13 will show you that it relies on pg_database, pg_user,
> >pg_class, pg_description, pg_attribute, pg_type, pg_index, pg_attrdef,
> >and pg_relcheck.  All but the last one are still in 7.3.
> >table_attributes is present in 1.13, and uses most of the listed 
> >tables.
> 
> Apparently, pg_relcheck was merged into another table in 7.3. Bummer 
> for backwards compatibility, that. I'll try to figure out how the new 
> query should work in the next few days, but if anyone beats me to it, 
> patches welcome.
> 
> I guess this also means that DBD::Pg really needs to be changed to 
> always detect the version of the database it connects to so that it can 
> do the right thing. Tim, is there a DBI-standard way to story/provide 
> an RDBMS version number?

$version = get_info(18); # SQL_DBMS_VER

But note that the result needs to be formatted in a particular way:
e.g. 06.50.0201

Google found http://www.4d.com/ACIDOC/CMU/CMU11922.HTM saying:

SQL_DBMS_VER (ODBC 1.0)

A character string indicating the version of the DBMS product
accessed by the driver. The version is of the form ##.##.####, where
the first two digits are the major version, the next two digits are
the minor version, and the last four digits are the release version.
The driver must render the DBMS product version in this form, but
can also append the DBMS product-specific version as well. For
example, "04.01.0000 Rdb 4.1".

You might find this interesting:
http://www.geocrawler.com/archives/3/105/2001/1/0/5030630/

Driver authors are reminded that the DBI docs say:

Because some DBI methods make use of get_info(), drivers are strongly
encouraged to support I<at least> the following very minimal set
of information types to ensure the DBI itself works properly:
 
 Type  Name                        Example A     Example B
 ----  --------------------------  ------------  ------------
   17  SQL_DBMS_NAME               'ACCESS'      'Oracle'
   18  SQL_DBMS_VER                '03.50.0000'  '08.01.0721'
   29  SQL_IDENTIFIER_QUOTE_CHAR   '`'           '"'
   41  SQL_CATALOG_NAME_SEPARATOR  '.'           '@'
  114  SQL_CATALOG_LOCATION        1             2

Tim.

Reply via email to