Re: Selecting timestamp from Database

From: Richard Harley <richard(at)scholarpack(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Selecting timestamp from Database
Date: 2013-04-08 14:15:24
Message-ID: 7E00160F-427F-4937-90BA-9DA576205203@scholarpack.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


That returns nothings also. But I have spied the problem now:
select ATTENDANCE.timestamp::text from attendance order by timestamp desc limit 1
return the actual timestamp: 2013-04-08 12:42:40.089952
> So the theory I'm wondering about is that the stored data in fact
> contains (some values with) fractional seconds, but Richard's
> client-side software isn't bothering to show those, misleading him
> into entering values that don't actually match the stored data.
> Looking at the table directly with psql would prove it one way
> or the other.

This is it. It was the psycopg adapter. My bad!!
Thanks Adrian / Tom.
Rich

On 8 Apr 2013, at 14:58, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> wrote:

> On 04/08/2013 06:49 AM, Richard Harley wrote:
>> It's
>>
>> Column | Type |
>> Modifiers
>> --------------+-----------------------------+-------------------------------------------------------------------
>> attendanceid | integer | not null default
>> nextval('attendance_attendanceid_seq'::regclass)
>> entered | date | not null default
>> ('now'::text)::date
>> timeperiod | character(2) |
>> timestamp | timestamp without time zone | default now()
>>
>
>
> Well timestamp is not time zone aware, so I have no idea where your time zone offsets are coming from.
>
> What happens if you do:
> "select timestamp from attendance where timestamp = ' '2012-12-14 12:02:45';
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2013-04-08 15:07:17 postgresql command line exploit found in the wild
Previous Message Tom Lane 2013-04-08 14:12:54 Re: Selecting timestamp from Database