pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: "D'Arcy" "J.M." Cain <darcy@druid.net>
To: enrique@xpress.es
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Ghost insert
Date: Thu, 23 Dec 1999 09:41:30 -0500 (EST)
Message-ID: <m1219Qp-0000daC@druid.net> (raw)
In-Reply-To: <3861E550.8ED9448@xpress.es>

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.



view thread (9+ messages)  latest in thread

Message-ID: <m1219Qp-0000daC@druid.net>
Permalink:  ../m1219Qp-0000daC@druid.net/
Also on:    postgresql.org/message-id/m1219Qp-0000daC@druid.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: darcy@druid.net, enrique@xpress.es
  Subject: Re: [INTERFACES] Ghost insert
  In-Reply-To: <m1219Qp-0000daC@druid.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox