Re: Determing Postgres version - Mailing list pgsql-php

From Vince Vielhaber
Subject Re: Determing Postgres version
Date
Msg-id Pine.BSF.4.40.0112171301340.78569-100000@paprika.michvhf.com
Whole thread Raw
In response to Re: Determing Postgres version  ("Gary Hoffman" <ghoffman@ucsd.edu>)
List pgsql-php
On Mon, 17 Dec 2001, Gary Hoffman wrote:

> Well, I thought of that.
>
> Here's what I get:
> ERROR:  function version() does not exist
>
> Any other ideas, short of actually asking the ISP help desk?

I just did it and it worked fine:

        $query = "select version()";

        $res = pg_exec($conn,$query);
        if(!$res) {
                die("not found");
        }

        if(($x = pg_numrows($res)) < 1) {
                echo("not found in database\n");
                exit;
        }

        $row = pg_fetch_row($res,$ii);
        echo("version: $row[0]");


and it gives:

version: PostgreSQL 7.1.2 on i386-unknown-freebsd4.2, compiled by GCC 2.95.2

Maybe it's really old?


Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
         56K Nationwide Dialup from $16.00/mo at Pop4 Networking
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================




pgsql-php by date:

Previous
From: "Gary Hoffman"
Date:
Subject: Re: Determing Postgres version
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Determing Postgres version