Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TEeWL-0002JM-RS for pgsql-sql@postgresql.org; Thu, 20 Sep 2012 11:02:14 +0000 Received: from mx23.belgacom.be ([213.181.45.233]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TEeWI-0002Dd-Ni for pgsql-sql@postgresql.org; Thu, 20 Sep 2012 11:02:12 +0000 X-IronPort-AV: E=Sophos;i="4.80,453,1344204000"; d="scan'208,217";a="25798203" Received: from unknown (HELO A03005.BGC.NET) ([10.120.129.161]) by mx23.belgacom.be with ESMTP; 20 Sep 2012 13:01:17 +0200 X-TM-IMSS-Message-ID: <03a141570000b6ad@belgacom.be> Received: from A04021.BGC.NET ([10.120.135.22]) by belgacom.be ([10.120.129.161]) with ESMTP (TREND IMSS SMTP Service 7.1; TLSv1/SSLv3 AES128-SHA (128/128)) id 03a141570000b6ad ; Thu, 20 Sep 2012 13:01:15 +0200 Received: from A04059.BGC.NET ([10.121.135.30]) by A04021.BGC.NET ([10.120.135.22]) with mapi id 14.01.0355.002; Thu, 20 Sep 2012 13:01:15 +0200 From: "BACHELART PIERRE (CIS/SCC)" To: "pgsql-sql@postgresql.org" Subject: matching a timestamp field Thread-Topic: matching a timestamp field Thread-Index: Ac2XHVl6Z/YUrpUBQZG3Rsr5m58Vjg== Date: Thu, 20 Sep 2012 11:01:15 +0000 Message-ID: <3C56CD7AD881324BB4C60AA5CE2C5CC11720019A@A04059.BGC.NET> Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.111.9.140] Content-Type: multipart/alternative; boundary="_000_3C56CD7AD881324BB4C60AA5CE2C5CC11720019AA04059BGCNET_" MIME-Version: 1.0 X-Pg-Spam-Score: -2.4 (--) X-Archive-Number: 201209/47 X-Sequence-Number: 36849 --_000_3C56CD7AD881324BB4C60AA5CE2C5CC11720019AA04059BGCNET_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Why is my sql below accepted in 8.1.19 and refused in 8.4.9 ??? Is there something I have missed in the doc ? Welcome to psql 8.1.19, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit ansroc=3D# select * from s12hwdb where record ~'2012-09-20' limit 5; host | exchange | rit | board | var | lceid | pceid | mnem | = eq | rtyp | rv | cetype | record | type | zone ----------+----------+---------+----------+------+-------+-------+-------+-= ---+------+----+----------+---------------------+------+------ and5032t | and5032t | 01a0301 | 21122994 | ebjb | 0000 | 000c | con3a | e= | ef03 | b1 | plce#xfx | 2012-09-20 11:50:02 | H | a1 and5032t | and5032t | 01a0307 | 21406298 | aaca | 0000 | 000c | mmca | e= | ef03 | b1 | plce#xfx | 2012-09-20 11:50:02 | H | a1 and5032t | and5032t | 01a0309 | 21406298 | aaca | 0000 | 000c | mmca | s= | ef03 | b1 | plce#xfx | 2012-09-20 11:50:02 | H | a1 and5032t | and5032t | 01a0311 | 21407930 | aaaa | 0000 | 000c | mmcb | e= | ef03 | b1 | plce#xfx | 2012-09-20 11:50:02 | H | a1 and5032t | and5032t | 01a0313 | 21407932 | abca | 0000 | 000c | mcud | e= | ef03 | b1 | plce#xfx | 2012-09-20 11:50:02 | H | a1 (5 rows) ansroc=3D# \q psql (8.4.9) Type "help" for help. ansroc=3D# select * from s12hwdb where record ~'2012-09-20' limit 5; ERROR: operator does not exist: timestamp without time zone ~ unknown LINE 1: select * from s12hwdb where record ~'2012-09-20' limit 5; ^ HINT: No operator matches the given name and argument type(s). You might n= eed to add explicit type casts. ansroc=3D# Pierre. +32 471 68 12 23 ________________________________ ***** Disclaimer ***** http://www.belgacom.be/maildisclaimer --_000_3C56CD7AD881324BB4C60AA5CE2C5CC11720019AA04059BGCNET_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello,

 

 

Why is my sql below accepted in 8.1.19 and refused i= n 8.4.9 ???

Is there something I have missed in the doc ?

 

 

Welcome to psql 8.1.19, the PostgreSQL interactive t= erminal.

Type:  \copyright for distribution terms

       \h for help wit= h SQL commands

       \? for help wit= h psql commands

       \g or terminate= with semicolon to execute query

       \q to quit

 

ansroc=3D# select * from s12hwdb where record ~'2012= -09-20' limit 5;

   host   | exchange | &nbs= p; rit   |  board   | var  | lceid | pceid | = mnem  | eq | rtyp | rv |  cetype  |    &= nbsp;  record        | type | zone<= /p>

----------+----------+---------+--------= --+------+-------+-------+-------+----+------+-= ---+----------+---------------------+------+------

and5032t | and5032t | 01a0301 | 21122994 | ebjb | 00= 00  | 000c  | con3a | e  | ef03 | b1 | plce#xfx | 2012-09-20= 11:50:02 | H    | a1

and5032t | and5032t | 01a0307 | 21406298 | aaca | 00= 00  | 000c  | mmca  | e  | ef03 | b1 | plce#xfx | 2012-= 09-20 11:50:02 | H    | a1

and5032t | and5032t | 01a0309 | 21406298 | aaca | 00= 00  | 000c  | mmca  | s  | ef03 | b1 | plce#xfx | 2012-= 09-20 11:50:02 | H    | a1

and5032t | and5032t | 01a0311 | 21407930 | aaaa | 00= 00  | 000c  | mmcb  | e  | ef03 | b1 | plce#xfx | 2012-= 09-20 11:50:02 | H    | a1

and5032t | and5032t | 01a0313 | 21407932 | abca | 00= 00  | 000c  | mcud  | e  | ef03 | b1 | plce#xfx | 2012-= 09-20 11:50:02 | H    | a1

(5 rows)

 

ansroc=3D# \q

 

 

 

psql (8.4.9)

Type "help" for help.

ansroc=3D# select * from s12hwdb where record ~'2012= -09-20' limit 5;

ERROR:  operator does not exist: timestamp with= out time zone ~ unknown

LINE 1: select * from s12hwdb where record ~'2012-09= -20' limit 5;

        &nbs= p;            &= nbsp;           &nbs= p;         ^

HINT:  No operator matches the given name and a= rgument type(s). You might need to add explicit type casts.

ansroc=3D#

 

 

 

 

Pierre.

+32 471 68 12 23

 




***** Disclaimer *****
http://www.belgacom.be/maildisclaimer
--_000_3C56CD7AD881324BB4C60AA5CE2C5CC11720019AA04059BGCNET_--