Re: help with libpq program

From: "Dann Corbit" <DCorbit(at)connx(dot)com>
To: "marcelo Cortez" <jmdc_marcelo(at)yahoo(dot)com(dot)ar>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: help with libpq program
Date: 2007-06-19 02:08:48
Message-ID: D425483C2C5C9F49B5B7A41F894415470100074C@postal.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Where is your actual copy statement?
What is your field delimiter?

Why not post the actual C code for your program, if it is not too long?

I guess from what you have posted that the delimiter you supplied does not match the delimiter from your copy statement.

> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-
> owner(at)postgresql(dot)org] On Behalf Of marcelo Cortez
> Sent: Saturday, June 16, 2007 9:04 PM
> To: pgsql-general(at)postgresql(dot)org
> Subject: [GENERAL] help with libpq program
>
>
> folks
>
> i need help with libpq program ,i made on C program
> for
> wrapper libpq.dll program , the routine failing is
> copy from stdin interface.
>
> PQputCopyData return 1 (AKA ok)
> PQputCopyEnd return 1 (AKA ok)
> but nothing is append to database.
> tailing log file
>
> invalid input syntax for integer: "3 hello world
> 4.5
> "
> CONTEXT: COPY foo, line 1, column a: "3 hello
> world 4.5
> "
> STATEMENT: copy foo from stdin
>
> data seems to be correct
> "3\ hello world \ 4.5\n"
> "\\.\n"
>
> database ( is for one example found at google)
> create table foo (a int4, b char(16), d float8);
> copy foo from stdin;
>
> "3\ hello world \ 4.5\n"
> "\\.\n"
>
> I'm wrong?
>
> what is way to diagnose?
> any sugestion are welcomed
> best regards
>
> MDC
>
> PD: any example are welcomed too.
>
>
>
>
>
>
>
> __________________________________________________
> Preguntá. Respondé. Descubrí.
> Todo lo que querías saber, y lo que ni imaginabas,
> está en Yahoo! Respuestas (Beta).
> ¡Probalo ya!
> http://www.yahoo.com.ar/respuestas
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-06-19 02:12:55 Re: pg_restore out of memory
Previous Message Harvey, Allan AC 2007-06-19 01:46:35 Re: Trigger function that works with both updates and deletes?