From: | Amit Langote <amitlangote09(at)gmail(dot)com> |
---|---|
To: | Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: problem with RETURNING and update row movement |
Date: | 2020-06-14 13:48:12 |
Message-ID: | CA+HiwqEo2kXuYwS6XPuRMD2vFmcKKVW3vsgJu6+vQumzCb5OXQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Jun 14, 2020 at 4:23 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> Hi Amit-san,
>
> On Thu, Jun 11, 2020 at 6:10 PM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> > Reproduction steps:
> >
> > create table foo (a int, b int) partition by list (a);
> > create table foo1 (c int, b int, a int);
> > alter table foo1 drop c;
> > alter table foo attach partition foo1 for values in (1);
> > create table foo2 partition of foo for values in (2);
> > create table foo3 partition of foo for values in (3);
> > create or replace function trigfunc () returns trigger language
> > plpgsql as $$ begin new.b := 2; return new; end; $$;
> > create trigger trig before insert on foo2 for each row execute
> > function trigfunc();
> > insert into foo values (1, 1), (2, 2), (3, 3);
> > update foo set a = 2 from (values (1), (2), (3)) s(x) where a = s.x returning *;
> > ERROR: attribute 5 of type record has wrong type
> > DETAIL: Table has type record, but query expects integer.
>
> Reproduced. Could you add the patch to the next commitfest so that it
> doesn't get lost?
Done. Thank you for taking a look.
https://commitfest.postgresql.org/28/2597/
--
Amit Langote
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Ranier Vilela | 2020-06-14 16:41:50 | Re: Postgresql13_beta1 (could not rename temporary statistics file) Windows 64bits |
Previous Message | Josef Šimánek | 2020-06-14 12:32:33 | [PATCH] Initial progress reporting for COPY command |