update and tcl/tk - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject update and tcl/tk
Date
Msg-id 200012292104.eBTL4ru68105@hub.org
Whole thread Raw
Responses Re: update and tcl/tk  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Bruno LEVEQUE (bruno.leveque@libertysurf.fr) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
update and tcl/tk

Long Description
Sometime, when I want update data I cannot with TCL/tk but I can directly.

I use Linux Slackware 7.1 kernel  2.2.16 and postgresql 7.0.2

Sample Code
A example :

set datestyle to 'postgres, european'; select * from cheque where num_cpte=8 and date='09-11-2000' and ok='' and
cred=0.0;

reading /tmp/psql.edit.100.14034

 num_cpte |    date    | nb_cheq |  lib   | ok | deb | cred
----------+------------+---------+--------+----+-----+------
        8 | 09-11-2000 | 4919351 | gynéco |    | 200 |    0
(1 row)

Now I do an update with TCL/TK

global Hote

set conn [pg_connect banque -host $Hote -port "5432"]

set res [pg_exec $conn "set datestyle to 'postgres, european'; update cheque set ok='x' where num_cpte=8 and
date='09-11-2000'and nb_cheq=4919351 and lib like 'gynéco' and ok='' and deb=200.00 and cred=0.0"] 

puts stdout "[pg_result $res -status -error]"

PGRES_COMMAND_OK

set datestyle to 'postgres, european'; select * from cheque where num_cpte=8 and date='09-11-2000' and ok='' and
cred=0.0;

reading /tmp/psql.edit.100.14034

 num_cpte |    date    | nb_cheq |  lib   | ok | deb | cred
----------+------------+---------+--------+----+-----+------
        8 | 09-11-2000 | 4919351 | gynéco |    | 200 |    0
(1 row)


If I update directly

set datestyle to 'postgres, european'; update cheque set ok='x' where num_cpte=8 and date='09-11-2000' and
nb_cheq=4919351and lib like 'gynéco' and ok='' and deb=200.00 and cred=0.0 


It's well.

I can update some other line with my Tcl/Tk request.

Is it a bug ?

No file was uploaded with this report

pgsql-bugs by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: Conversion errors for datetime fields
Next
From: "Robert A. Weiler"
Date:
Subject: Table corruption on drop