ecute with ERROR "GROUP BY position -1 is
not in select list"
On Mon, 4 Dec 2023 at 02:38, Haotian Chen wrote:
> Yes, I updated my patch and just used oid numbers 558 and 1751 stand for
> int4um and numeric_uminus. Maybe we could define a macro for them,
> but seems unnecessa
On Mon, 4 Dec 2023 at 02:38, Haotian Chen wrote:
> Yes, I updated my patch and just used oid numbers 558 and 1751 stand for
> int4um and numeric_uminus. Maybe we could define a macro for them,
> but seems unnecessary.
The thing to do here is modify pg_operator.dat and give both of these
operators
ce.
Regards,
Haotian
发件人: Tom Lane
日期: 星期六, 2023年12月2日 03:57
收件人: Haotian Chen
抄送: pgsql-hack...@postgresql.org
主题: Re: Dumped SQL failed to execute with ERROR "GROUP BY position -1 is not in
select list"
Haotian Chen writes:
> postgres=# create view v1 as select * from t1 grou
Haotian Chen writes:
> postgres=# create view v1 as select * from t1 group by a,b,-1::int;
> CREATE VIEW
Hmm, surely that is a contrived case?
> After exploring codes, I suppose we should treat operator plus constant
> as -'nnn'::typename instead of const, my patch just did this by handling
> Op
Hi hackers,
I found that dumped view SQL failed to execute due to the explicit cast
of negative number, and I took a look at the defined SQL in view and then
found -1 in the group by clause. I suppose it’s the main reason the sql
cannot be executed and raised ERROR "GROUP BY position -1 is no