Skip site navigation (1) Skip section navigation (2)

RE: [INTERFACES] Problem using libpsql.a

From: Craig Orsinger <orsingerc(at)epg-gw1(dot)lewis(dot)army(dot)mil>
To: Chris Williams <chris_d_williams(at)itd(dot)sterling(dot)com>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: RE: [INTERFACES] Problem using libpsql.a
Date: 1998-09-09 21:13:11
Message-ID: XFMail.980909141311.orsingerc@epg-gw1.lewis.army.mil (view raw or flat)
Thread:
Lists: pgsql-interfaces
On 09-Sep-98 Chris Williams wrote:
> I have an application that forks of a process and is updating a table in my
> postgres database.  When
> I have the parent process query that table to see how much has completed I
> get weird results.
> Sometimes it works, sometimes it core dumps, and sometimes I get back a NULL
> results structure.  But
> if I type that same query into my psql window, I get back the correct results
> everytime.  Currently
> I don't do any type of locking on any of the tables.  My question is should I
> be doing some locking
> and why is the query using the psql command prompt working and my direct call
> in my C code isn't?

        Looks to me like your parent process may be getting interrupted
by the SIGCHLD signal from the child process. Are you examining errno on
return from your query? Might want to do that and print out the value if
it's something other than '0'.


----------------------------------
Date: 09-Sep-98  Time: 14:09:38

Craig Orsinger                  (email: <orsingerc(at)epg(dot)lewis(dot)army(dot)mil>)
Logicon RDA
Bldg. 8B28                      "Just another megalomaniac with ideas above his
6th & F Streets                 station. The Universe is full of them."
Ft. Lewis, WA   98433                   - The Doctor
----------------------------------

In response to

pgsql-interfaces by date

Next:From: Dave PageDate: 1998-09-10 08:53:16
Subject: subscribe
Previous:From: rhayhowDate: 1998-09-09 20:58:34
Subject: Getting embedded SQL to return html tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group