Re: [INTERFACES] Ghost insert - Mailing list pgsql-interfaces

From D'Arcy" "J.M." Cain
Subject Re: [INTERFACES] Ghost insert
Date
Msg-id m1219Qp-0000daC@druid.net
Whole thread Raw
In response to Ghost insert  (Enrique Rodriguez Lazaro <enrique@xpress.es>)
Responses Re: [INTERFACES] Ghost insert  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
Thus spake Enrique Rodriguez Lazaro
>  Hi.
>  
>  I am trying to do a interface from a web over my database postgresql
>  whit libpq.
>  
>  I can't do a simple 'insert' from libpq.

Just guessing here but is it possible that clientes is a view and you are
seeing the underlying table when you select after the insert?  In PostgreSQL,
views are real tables.  They just have an implied rule on select that gets
data from a SELECT statement instead of the named table.  See the following
URL for more details.
   http://www.postgresql.org/docs/programmer/rules890.htm

>  I'm doing this:
>  
>  sprintf(temp_string,"insert into clientes
>  values('fff','prueba','123','123','pepe gotera','jjjjjj','jjj')");
>  
>  res1=PQexec(conn,temp_string);
>  tuplas=PQresultStatus(res1);

If the above is not your problem then you might also try PQoidStatus(res1)
to see what the resulting OID is.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-interfaces by date:

Previous
From: Mike Mascari
Date:
Subject: Re: [INTERFACES] INTERFACES ODBC
Next
From: Tom Lane
Date:
Subject: Re: [INTERFACES] Ghost insert