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

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: On Ubuntu 12.04 i do have two psql one of those isn't working
Дата
Msg-id 5056D57B.3020506@iol.ie
обсуждение исходный текст
Ответ на On Ubuntu 12.04 i do have two psql one of those isn't working  (Yvon Thoraval <yvon.thoraval@gmail.com>)
Ответы Re: On Ubuntu 12.04 i do have two psql one of those isn't working  (Yvon Thoraval <yvon.thoraval@gmail.com>)
Список pgsql-general
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@iol.ie


В списке pgsql-general по дате отправления:

Предыдущее
От: "Albe Laurenz"
Дата:
Сообщение: Re: application for postgres Log
Следующее
От: Thomas Guettler
Дата:
Сообщение: Slow counting still true?