Re: [PATCH] Extend ALTER OPERATOR to support adding commutator, negator, hashes, and merges

jian he <jian.universality@gmail.com>

From: jian he <jian.universality@gmail.com>
To: Tommy Pavlicek <tommypav122@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, pgsql-hackers@lists.postgresql.org, Tomas Vondra <tomas.vondra@enterprisedb.com>
Date: 2023-10-12T03:53:53Z
Lists: pgsql-hackers
errmsg("operator attribute \"negator\" cannot be changed if it has
already been set")));
I feel like the above message is not very helpful.

Something like the following may be more helpful for diagnosis.
errmsg("operator %s's attribute \"negator\" cannot be changed if it
has already been set", operatorname)));

when I "git apply", I've noticed some minor whitespace  warning.

Other than that, it looks fine.



Commits

  1. Strip Windows newlines from extension script files manually.

  2. Read extension script files in text not binary mode.

  3. Improve reporting of errors in extension script files.

  4. Improve parser's reporting of statement start locations.

  5. Extend ALTER OPERATOR to allow setting more optimization attributes.

  6. Core support for "extensions", which are packages of SQL objects.