| From: | Egor Pugin <egor(dot)pugin(at)gmail(dot)com> |
|---|---|
| To: | Peter Geoghegan <pg(at)heroku(dot)com> |
| Cc: | pgsql-bugs <pgsql-bugs(at)postgresql(dot)org> |
| Subject: | Re: BUG #14327: UPSERT requires full path to column |
| Date: | 2016-09-19 10:08:59 |
| Message-ID: | CAHtU+mpT22XCe5f5smYQgSHfhi5-5aGW91re1sGXDeB5R7q6ag@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Thanks!
But is this expected behavior and not a bug?
On 19 September 2016 at 13:06, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> On Mon, Sep 19, 2016 at 1:06 AM, <egor(dot)pugin(at)gmail(dot)com> wrote:
>> I've noticed upsert query won't work if I do not write 'schema.TABLE.column'
>> instead of simple 'column' in 'on conflict do update set' query.
>
> Use an alias. e.g.:
>
> INSERT INTO statistics."MostPopularDependencies" as mpd ...
>
> You can then reference columns using mpd.downloads_week, etc
>
> --
> Peter Geoghegan
--
Egor Pugin
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Huan Ruan | 2016-09-19 13:21:13 | Re: BUG #14319: Logical decoding dropping statements in subtransactions |
| Previous Message | Peter Geoghegan | 2016-09-19 10:06:19 | Re: BUG #14327: UPSERT requires full path to column |