Re: [SQL]

2012-09-22 Thread David Johnston
On Sep 22, 2012, at 20:15, JORGE MALDONADO wrote: > I have the following query: > > SELECT > sem_clave, > to_char(secc_esp_media.sem_fechareg,'TMMon-DD-') as sem_fechareg, > sem_seccion, > sem_titulo, > sem_enca, > tmd_nombre, > tmd_archivo, > tmd_origen, > gen_nombre, > smd_nombre, > prm_ur

[SQL] transactions and ecpg

2012-09-22 Thread Wayne Cuddy
I'm looking at some code that a coworker ported from Informix to Postgres 9.0. The Informix database did not have transaction logging enabled thus no begins/aborts/commits/rollbacks where in the original code. The way the code has been ported there are still no begin statements in the code, only co

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] Problem with committing the update

2012-09-22 Thread Jasen Betts
On 2012-09-13, BeeBee wrote: > Hi all, > > I have a problem updating the record using store procedure (LANGUAGE > plpgsql).I have attach the query. it all looks good to me. -- ⚂⚃ 100% natural -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription

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