Re: Psycopg2 : error message.

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Psycopg2 : error message.
Дата
Msg-id 53766169.8000404@aklaver.com
обсуждение исходный текст
Ответ на Re: Psycopg2 : error message.  (skeeved <skeeved@skeeved.org>)
Список pgsql-general
On 05/16/2014 08:07 AM, skeeved wrote:
> Looks like you have an invalid connection string:
>
> conn=psycopg2.connect("dbname='busard_test' user='laurent' host='localhost' password='cactus’")
>
> Try removing the double quotes, they are obscuring the parameter names and values:
>
> conn=psycopg2.connect(dbname=‘busard_test', user=‘laurent', host=‘localhost', password='cactus’)
>
> You were also missing some punctuation between the parameters.

See below for the two ways of specifying connection parameters:

http://initd.org/psycopg/docs/module.html#psycopg2.connect

The OPs way is correct, the only thing is the single quotes are redundant.

>
> --
> skeeved
>


--
Adrian Klaver
adrian.klaver@aklaver.com


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

Предыдущее
От: dinesh kumar
Дата:
Сообщение: Re: Monitoring Streaming Replication in 9.2
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Psycopg2 : error message.