Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id 869A69F9B3F for ; Fri, 10 Nov 2006 10:28:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 76916-05 for ; Fri, 10 Nov 2006 10:28:56 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by postgresql.org (Postfix) with ESMTP id 43A359F93E4 for ; Fri, 10 Nov 2006 10:28:56 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so474755ugf for ; Fri, 10 Nov 2006 06:28:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=BJTj8aKtf2dGW7X51mbiZStYQtUrEE0jyw37ILaaVVTovaYzhmmvib2SIbHfUtmQ4hMdmFXiHYij0e/ck8l5S/9/VQu5LYoKv+Apf6D9OR5xiWpDps4jUZiD+FwxKw7EHkpRaZV0/ZFI+RBoKLqFmtaQYOWov3dex4PDjDORmJU= Received: by 10.67.19.13 with SMTP id w13mr944711ugi.1163168934103; Fri, 10 Nov 2006 06:28:54 -0800 (PST) Received: by 10.67.118.11 with HTTP; Fri, 10 Nov 2006 06:28:53 -0800 (PST) Message-ID: <55c095e90611100628m1322eea5jeeca3a94d90e1eb1@mail.gmail.com> Date: Fri, 10 Nov 2006 12:28:53 -0200 From: "Ezequias Rodrigues da Rocha" To: pgsql-sql@postgresql.org Subject: Between and miliseconds (timestamps) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_72587_14641845.1163168933788" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/108 X-Sequence-Number: 26760 ------=_Part_72587_14641845.1163168933788 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi list, I noticed that when we use the keyword between in SQL statements we must considerer all the miliseconds with 6 digits. I would like to know if we want to make a day selection we must use allways the max of possibilities like: select * from base.table where when between '2006-09-06 00:00:00.000000' and '2006-09-06 23:59:59.999999' order by 2 Is there a simplest way or not ? =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- A pior das democracias ainda =E9 melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ ------=_Part_72587_14641845.1163168933788 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi list,

I noticed that when we use the keyword between in SQL state= ments we must considerer all the miliseconds with 6 digits.

I would = like to know if we want to make a day selection we must use allways the max= of possibilities like:


select * from base.table
where when
between
'2006-09-= 06 00:00:00.000000'
and
'2006-09-06 23:59:59.999999'
order by 2
Is there a simplest way or not ?

=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
            = ;            &n= bsp;         Atenciosamente (S= incerely)
          &n= bsp;            = ; Ezequias Rodrigues da Rocha
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
A pior das democracias ainda =E9 melho= r do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorshi= ps
http://ezequiasrocha.= blogspot.com/ ------=_Part_72587_14641845.1163168933788--