not permanent insert into stud values('myname') - Mailing list pgsql-interfaces

From rony khoury
Subject not permanent insert into stud values('myname')
Date
Msg-id 35BECC00.1059EB7@cyberia.net.lb
Whole thread Raw
List pgsql-interfaces
 

Hello ,

following is a part of my code , can any body tell me why it works fine ,
but 'myname' does not remain permanent in the table although I'm loging in as postgres
and see 'myname' in the result when I run the program ?

thanks ,
Rony .

--------------------- C code -------------------
res = PQexec(conn,"insert into stud values('myname')");
PQclear(res);
res = PQexec(conn,"select * from stud");
 
for (i=0;i<PQntuples(res);i++) {
  printf("\n answer is %s",PQgetvalue(res,i,0));

---------------------- output -----------------------
#a.out
answer is rony
answer is myname
#
----------------------------------------------------------
 

pgsql-interfaces by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Coping with backend crash in libpq
Next
From: Hannu Krosing
Date:
Subject: Re: [INTERFACES] not permanent insert into stud values('myname')