Re: [INTERFACES] Ghost insert

From: "D'Arcy" "J(dot)M(dot)" Cain <darcy(at)druid(dot)net>
To: enrique(at)xpress(dot)es (Enrique Rodriguez Lazaro)
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Ghost insert
Date: 1999-12-23 14:41:30
Message-ID: m1219Qp-0000daC@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at){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.

In response to

  • Ghost insert at 1999-12-23 09:03:12 from Enrique Rodriguez Lazaro

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 1999-12-23 15:15:55 Re: [INTERFACES] Ghost insert
Previous Message Mike Mascari 1999-12-23 13:28:13 Re: [INTERFACES] INTERFACES ODBC