Re: [SQL] matching a timestamp field

2012-09-22 Thread BACHELART PIERRE (CIS/SCC)
Hello, The solution I just found on the Net (Thanks to Samuel Gendler) ansroc=# select * from s12hwdb where record::text ~ '2012-09-20 11:50:02' limit 5; host | exchange | rit | board | var | lceid | pceid | mnem | eq | rtyp | rv | cetype | record| type | zone

Re: [SQL] matching a timestamp field

2012-09-22 Thread Pavel Stehule
Hello 2012/9/20 BACHELART PIERRE (CIS/SCC) : > 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 ? > you cannot use ~ operator for timestamp, it is nonsense - use '=' instead see 8.3 release notes http://www.postgr

Re: [SQL] matching a timestamp field

2012-09-22 Thread Andreas Kretschmer
BACHELART PIERRE (CIS/SCC) wrote: > Hello, > > > > > > Why is my sql below accepted in 8.1.19 and refused in 8.4.9 ??? > > Welcome to psql 8.1.19, the PostgreSQL interactive terminal. > > ansroc=# select * from s12hwdb where record ~'2012-09-20' limit 5; > > > psql (8.4.9) > > > ERR

[SQL] matching a timestamp field

2012-09-22 Thread BACHELART PIERRE (CIS/SCC)
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