Re: BUG #13808: Upsert not working
От | Thomas Kellerer |
---|---|
Тема | Re: BUG #13808: Upsert not working |
Дата | |
Msg-id | n4a033$tv$1@ger.gmane.org обсуждение исходный текст |
Ответ на | BUG #13808: Upsert not working (tarunt@chisquare.in) |
Список | pgsql-bugs |
tarunt@chisquare.in schrieb am 09.12.2015 um 10:01: > The following bug has been logged on the website: > > INSERT INTO user_first_last AS ufl (UserId, > FirstLoginDate,LastLoginDate,FirstLoginAmt,LastLoginAmt) > select id, fdd, ldd,fda, lda > from daily_deposits > ON CONFLICT (UserId) > DO UPDATE > SET FirstLoginAmt = case when excluded.fdd < ufl.FirstLoginDate then > excluded.fda else ufl.FirstLoginAmt END, > LastLoginAmt = case when excluded.ldd > ufl.LastLoginDate then > excluded.lda else ufl.LastLoginAmt END, > FirstLoginDate = case when excluded.fdd < ufl.FirstLoginDate then > excluded.fdd else ufl.FirstLoginDate END, > LastLoginDate = case when excluded.ldd > ufl.LastLoginDate then > excluded.ldd else ufl.LastLoginDate END; > > ERROR: column excluded.fdd does not exist > LINE 6: SET FirstLoginAmt = case when excluded.fdd < ufl.FirstLogi... > ^ You already have a perfectly valid answer: http://stackoverflow.com/a/34166088/330315
В списке pgsql-bugs по дате отправления: