[BUGS] Update doesnt process the changes - Mailing list pgsql-bugs
From | Zakharov, Andrey |
---|---|
Subject | [BUGS] Update doesnt process the changes |
Date | |
Msg-id | 3F693CCDF87C9742826D43FFF9F366BEAF18E26A@oro-mbox-02.luxoft.com Whole thread Raw |
List | pgsql-bugs |
Hello colleagues –
Could you please help me in this situation which I cannot understand:
SELECT version();
>> PostgreSQL 9.5.0, compiled by Visual C++ build 1800, 64-bit
create table apps as select /*...*/;
>> Table created.
select rnum, app_birth_country_id, app_birth_country from apps where rnum in (6609,1047336);
>>
rnum | app_birth_country_id | app_birth_country |
6609 | 1033302 | KAZ |
1047336 | 1033343 | UZB |
create temporary table tmp_Common(id int8, val varchar(254), val1 varchar(254)) on commit drop;
>> Table created.
-- fix birth country
insert into tmp_Common(id,val,val1) values
(36248,'1033343','UZB'),
(1080979,'1033396','TJK'),
(1047336,'1033343','UZB'),
(159885,'1033605','KGZ'),
(6609,'1033302','KAZ'),
(106775,'1033258','UKR'),
(224993,'1033258','UKR'),
(127388,'1033322','MDA'),
(313374,'1033362','RUS'),
(145361,'1033289','GEO'),
(209934,'1033431','ARM'),
(33522,'1033362','RUS'),
(31422,'1033362','RUS'),
(159885,'1033604','KGZ'),
(1325984,'1033604','KGZ'),
(6609,'1033302','KAZ'), -- this row is shown in the sample
(1047336,'1033302','KAZ') -- this row is shown in the sample
;
>> 17 rows inserted
update
apps
set
app_birth_country_id = a.val::int8,
app_birth_country = a.val1
from (
select
id,
val,
val1
from
tmp_Common
) a
where
apps.rnum = a.id
;
>> 14 rows updated.
select rnum, app_birth_country_id, app_birth_country from apps where rnum in (6609,1047336);
>>
rnum | app_birth_country_id | app_birth_country |
6609 | 1033302 | KAZ |
1047336 | 1033343 | UZB |
Values for rnum = 6609 kept unchanged. It’s OK. But for 1047336 the ones kept unchanged either. It’s not expected. Making table tmp_Common permanently doesn’t help.
Could you give me a clue – I’m doing something wrong or it’s bug?
PostgreSQL version is installed on Win7 Enterprise.
Thanx.
Andrew Zakharov | Luxoft Holding (NYSE:LXFT) is a leading provider of software development services and innovative IT solutions to a global client base consisting primarily of large multinational corporations. Headquartered in Zug, Switzerland Luxoft is listed on the New York Stock Exchange. For more information, please visit www.luxoft.com |
LinkedIn: AZakharov | |
This e-mail and any attachment(s) are intended only for the recipient(s) named above and others who have been specifically authorized to receive them. They may contain confidential information. If you are not the intended recipient, please do not read this email or its attachment(s). Furthermore, you are hereby notified that any dissemination, distribution or copying of this e-mail and any attachment(s) is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender by replying to this e-mail and then delete this e-mail and any attachment(s) or copies thereof from your system. Thank you. |
This e-mail and any attachment(s) are intended only for the recipient(s) named above and others who have been specifically authorized to receive them. They may contain confidential information. If you are not the intended recipient, please do not read this email or its attachment(s). Furthermore, you are hereby notified that any dissemination, distribution or copying of this e-mail and any attachment(s) is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender by replying to this e-mail and then delete this e-mail and any attachment(s) or copies thereof from your system. Thank you.
pgsql-bugs by date: