Re: [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)] - Mailing list psycopg

From
Subject Re: [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)]
Date
Msg-id BA25E6A9A6B2B54EB96F4F12F3683E0319E59A14@dlrexmbx02.intra.dlr.de
Whole thread Raw
In response to Re: [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)]  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
List psycopg
hi karsten,

thanks a lot, i see now. i get a python datetime object, not a result string. i was to fixed to my database way of
thinking

with

In [6]: rows[0][0].isoformat()
Out[6]: '2013-07-29T09:02:00+00:00'

i get what i want.

an additional question: for more complex queries it is  a little bit time consuming to change all queries with mogrify.
doyou know if it is possible to send raw sql to the database and to get only the output from the database back without
anykind of python object creation. 

kind regards
christian




-----Ursprüngliche Nachricht-----
Von: psycopg-owner@postgresql.org [mailto:psycopg-owner@postgresql.org] Im Auftrag von Karsten Hilbert
Gesendet: Donnerstag, 1. August 2013 13:11
An: psycopg@postgresql.org
Betreff: Re: [psycopg] [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0,
name=None)),)]

On Thu, Aug 01, 2013 at 09:24:11AM +0000, Christian.Strobl@dlr.de wrote:

> i want to create an timestamp with to_timestamp() and i get always an
> output like this
>
> [(datetime.datetime(2013, 7, 29, 9, 2,
> tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)]

...

> is this a problem of my code or a bug?

Neither. It is normal behaviour.

I suppose you are expecting something else but you'd need to explain that.

Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


--
Sent via psycopg mailing list (psycopg@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/psycopg


psycopg by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: [(datetime.datetime(2013, 7, 29, 9, 2, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)]
Next
From: Daniele Varrazzo
Date:
Subject: Re: Fw: Problem with psycopg2, bytea, and memoryview