From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | r(dot)zharkov(at)postgrespro(dot)ru |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #17465: Wrong error message while trying to change system column type. |
Date: | 2022-04-18 15:36:51 |
Message-ID: | 2283491.1650296211@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> accidentally I tried to change a system column data type on Windows and got
> a strange error message "no owned sequence found":
> postgres=# alter table t1 alter column cmin type text;
> ERROR: no owned sequence found
> postgres=# alter table t1 alter column cmax type text;
> ERROR: cannot alter system column "cmax"
Yeah, same here.
> I think the ATParseTransformCmd() function needs the same check as the check
> in the ATPrepAlterColumnType() function.
That seems pretty duplicative. I think it's sufficient to do something
like
- if (TupleDescAttr(tupdesc, attnum - 1)->attidentity)
+ if (attnum > 0 &&
+ TupleDescAttr(tupdesc, attnum - 1)->attidentity)
in the faulty code, and let the actual error message come out where
it does now.
Will fix, thanks for the report!
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2022-04-19 03:36:22 | BUG #17466: Is it possible to supplement the default compilation options of CFLAGS in configure file? |
Previous Message | PG Bug reporting form | 2022-04-18 11:13:28 | BUG #17465: Wrong error message while trying to change system column type. |