Search Postgresql Archives

Re: On Ubuntu 12.04 i do have two psql one of those isn't working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17/09/2012 07:15, Yvon Thoraval wrote:
> 
> I'm testing my second PostgreSQL install on Xunutu 12.04 after a disk crash.
> 
> Everything went well using command line where i was able, after config
> and setup, to log into a db using :
> $ psql <IPV4 or IPV6 of the server> -U yt -d yt_tests
> 
> Then i wanted to test postgres thru php where i got Http error 500.
> 
> After that i discovered that i do have TWO psql installed :
> 
> the first :
> lrwxrwxrwx 1 root root 37 mars   6  2012 /usr/bin/psql ->
> ../share/postgresql-common/pg_wrapper 
> 
> the second :
> -rwxr-xr-x 1 root root 433224 août  17 00:58
> /usr/lib/postgresql/9.1/bin/psql

The first isn't a "real" psql - it's a symlink to pg_wrapper, which is
how Debian and Ubuntu allow you to run different Postgres versions and
clusters on the same machine. You call the client program (psql,
pg_dump, etc) you want as usual, but pass it the --cluster option, as
follows:

  psql --cluster 9.1/main (....)

and then pg_wrapper calls the correct version of the client program.


> 
> then, i wonder how to workaround this "installation bugg" because i
> suspect php is using the second not working psql where the first is the
> one being in my PATH.

PHP doesn't use psql, it uses libpq (the client library).

Ray.

-- 
Raymond O'Donnell :: Galway :: Ireland
rod@xxxxxx


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux