Re: Dumped SQL failed to execute with ERROR "GROUP BY position -1 is not in select list"

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Haotian Chen <charliett2233(at)outlook(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Dumped SQL failed to execute with ERROR "GROUP BY position -1 is not in select list"
Date: 2023-12-03 22:08:00
Message-ID: CAApHDvp2Bvjjd0gVha0s-8CBkN8k5t5VjOBWVTqQ_jDdFDD87w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 4 Dec 2023 at 02:38, Haotian Chen <charliett2233(at)outlook(dot)com> 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 an "oid_symbol". Perhaps Int4NegOperator is ok. (I think
Int4UnaryMinusOperator might be on the verbose side.). The code that
parses pg_operator.dat will then define that constant in
pg_operator_d.h. You can then use that and the other ones you defined
for the numeric operator instead of hard coding the Oids in the patch.

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Davin Shearer 2023-12-03 22:38:28 Re: Emitting JSON to file using COPY TO
Previous Message Jeff Davis 2023-12-03 21:16:20 Re: Change GUC hashtable to use simplehash?