Broken pipe at PQconnectdb

Поиск
Список
Период
Сортировка
От Ross Murray
Тема Broken pipe at PQconnectdb
Дата
Msg-id 200308062041.h76Kf7o08340@rgsc1.nrn.nrcan.gc.ca
обсуждение исходный текст
Ответы Re: Broken pipe at PQconnectdb  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I thought I was having a C problem, but it appears only to be happening around
PQconnectdb. (In truth, execution stops so there may be other problems I haven't
got to yet.) I have, amongst much code:

   void main(int argc, char *argv[]){
    . . .
    char    *conxinfo . . .
    PGconn    *conx1 . . .
    . . .
    sprintf(conxinfo,"host=%s user=%s dbname=%s",argv[1],argv[2],argv[3]);
    . . .
    fprintf(stderr,"here ");
    conx1 = PQconnectdb(conxinfo);
    fprintf(stderr,"not here ");
    . . .

When run I get:

  here Segmentation Fault (core dumped)

The dump is: Broken pipe

Any clues?


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

Предыдущее
От: Michael Garriss
Дата:
Сообщение: Re: ANN: PostgreSQL syntax mode for Vim
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: Error while running pg_dump