Re: Transaction question - Mailing list pgsql-general

From Jeff Ross
Subject Re: Transaction question
Date
Msg-id 4FFE07FB.1050807@wykids.org
Whole thread Raw
In response to Re: Transaction question  (Marcin Mańk <marcin.mank@gmail.com>)
List pgsql-general
On 7/11/12 4:24 PM, Marcin Mańk wrote:


On Tue, Jul 10, 2012 at 10:06 PM, Jeff Ross <jross@wykids.org> wrote:
 
2012-06-19 15:37:36.283752500 <www%wykids> LOG:  statement: update survey_response set srv_resp_submitted = now() where srv_resp_srv_id = 2 and srv_resp_pp_id = 25399

jross@wykids localhost# select * from survey_response where srv_resp_submitted is not null and srv_resp_srv_id = 2 and srv_resp_pp_id not in (select srv_answers_pp_id from survey_answers where srv_answers_srv_id = 2);
 srv_resp_id | srv_resp_srv_id | srv_resp_pp_id | srv_resp_invite       |    srv_resp_first_look     | srv_resp_submitted
-------------+-----------------+----------------+----------------------------+----------------------------+----------------------------
        5674 |               2 |          25399 | 2012-06-19 15:12:49.589233 | 2012-06-19 15:33:05.547012 | 2012-06-19 15:38:16.724393


The timestamps don't match - something updated the record after 15:37:36  . 
Also, are the fields like srv_answers_srv_id character fields? The inserts are quoting them like varchars, which seems odd.

Greetings
Marcin
!DSPAM:4ffdfd2b110892010192983!
Yes, that was a copy / paste error that I tried to fix rather than re-do.  I explained that up thread.

I just posted the table definition but they are integer fields.  As far as the quoting of integer fields, that is the way Pear DB does inserts.  What's the harm?

Jeff


pgsql-general by date:

Previous
From: Jeff Ross
Date:
Subject: Re: Transaction question
Next
From: Adrian Klaver
Date:
Subject: Re: Transaction question