Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id F0D31633968 for ; Thu, 22 Oct 2009 17:41:33 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 29503-04 for ; Thu, 22 Oct 2009 20:41:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f210.google.com (mail-fx0-f210.google.com [209.85.220.210]) by mail.postgresql.org (Postfix) with ESMTP id 1159B633919 for ; Thu, 22 Oct 2009 17:41:21 -0300 (ADT) Received: by fxm6 with SMTP id 6so9510545fxm.19 for ; Thu, 22 Oct 2009 13:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=68Snrfx3SarIxuppWhG/JJfOlAE3QsIdl+nFwFB+AZQ=; b=XTYgqC9v+fkxCLyKKdH+puEsj5gRBnLEq22cVuORAfkkHk9neE2fpboDvr75rbxiY5 +FkZcV6JAOIaFHd6h2nFbWELMvjUY2sqDTrqp3wJMFB4KzNg2Lt2v0Qw2pFNOtsJhjnz 6fZe82KIZD9fUtVef21YtaykTqKv9nDeVUsig= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=DNmAN4n1pp954FNb00dGkxUgzNMrU6Ss9PkQnFx1bvHpU4VSY4PUQpe9f67NoN1lXU gnDdBO87AFa4bT2pb0xdJKEeg6pT8PcuzZd4395baUK5552s+TMCITUUaC90Q9DBFuQ9 QDJ5YvKAbvZdEt4wKUQeFgU2ehh4ZOmbIAJG0= MIME-Version: 1.0 Received: by 10.204.7.92 with SMTP id c28mr9971843bkc.170.1256244080369; Thu, 22 Oct 2009 13:41:20 -0700 (PDT) Date: Thu, 22 Oct 2009 16:41:20 -0400 Message-ID: <22431f1b0910221341l371b8303w9b3a525afa598d1@mail.gmail.com> Subject: question about timestamp with tz From: the6campbells To: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=00151758858c295f6304768c1e4c X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.389 tagged_above=-10 required=5 tests=AWL=-0.280, BAYES_05=-1.11, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200910/113 X-Sequence-Number: 33312 --00151758858c295f6304768c1e4c Content-Type: text/plain; charset=ISO-8859-1 Question.. is there a way that I can get Postgres to return the tz as supplied on the insert statement insert into TTSTZ(RNUM, CTSTZ) values ( 0, null); insert into TTSTZ(RNUM, CTSTZ) values ( 1, timestamp with time zone '2000-12-31 12:00:00.0-05:00'); insert into TTSTZ(RNUM, CTSTZ) values ( 2, timestamp with time zone '2000-12-31 12:00:00+00:00'); insert into TTSTZ(RNUM, CTSTZ) values ( 3, timestamp with time zone '2000-12-31 12:00:00.0+05:00'); select rnum, CTSTZ 0;"" 1;"2000-12-31 12:00:00-05" 2;"2000-12-31 07:00:00-05" 3;"2000-12-31 02:00:00-05" select rnum, extract (hour from ctstz), extract (timezone_hour from ctstz) from ttstz 0;; 1;12;-5 2;7;-5 3;2;-5 --00151758858c295f6304768c1e4c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Question.. is there a way that I can get Postgres to return the tz as = supplied on the insert statement=A0

insert into TT= STZ(RNUM, CTSTZ) values ( 0, null);
insert into TTSTZ(RNUM, CTSTZ= ) values ( 1, timestamp with time zone '2000-12-31 12:00:00.0-05:00'= ;);
insert into TTSTZ(RNUM, CTSTZ) values ( 2, timestamp with time zone &#= 39;2000-12-31 12:00:00+00:00');
insert into TTSTZ(RNUM, CTSTZ= ) values ( 3, timestamp with time zone '2000-12-31 12:00:00.0+05:00'= ;);

select rnum, CTSTZ

0;&quo= t;"
1;"2000-12-31 12:00:00-05"
2;"2= 000-12-31 07:00:00-05"
3;"2000-12-31 02:00:00-05"<= /div>

select rnum, extract (hour from ctstz), extract (timezo= ne_hour from ctstz) from ttstz

0;;
= 1;12;-5
2;7;-5
3;2;-5



--00151758858c295f6304768c1e4c--