Re: [PATCH] Optional OR REPLACE in CREATE OPERATOR statement

2023-03-21 Thread Gregory Stark (as CFM)
On Tue, 5 Jul 2022 at 11:29, Tom Lane wrote: > > No, that's not acceptable. CREATE OR REPLACE should always produce > exactly the same final state of the object, but in this case we cannot > change the underlying function if the operator already exists. It sounds like this patch isn't the

Re: Re[2]: [PATCH] Optional OR REPLACE in CREATE OPERATOR statement

2022-12-12 Thread Nikita Malakhov
Hi, Svetlana, yes, Tom means that CREATE OR REPLACE should always produce the same result no matter which branch actually worked - CREATE or REPLACE. REPLACE case must produce exactly the same result as you've mentioned - DROP and CREATE. As for IF NOT EXISTS option I agree, it seems a

Re[2]: [PATCH] Optional OR REPLACE in CREATE OPERATOR statement

2022-07-06 Thread Svetlana Derevyanko
  >Вторник, 5 июля 2022, 18:29 +03:00 от Tom Lane : >  >=?UTF-8?B?U3ZldGxhbmEgRGVyZXZ5YW5rbw==?= < s.derevya...@postgrespro.ru > >writes: >> It seems useful to have [OR REPLACE] option in CREATE OPERATOR statement, as >> in CREATE FUNCTION. This option may be good for writing extension update

Re: [PATCH] Optional OR REPLACE in CREATE OPERATOR statement

2022-07-05 Thread Tom Lane
=?UTF-8?B?U3ZldGxhbmEgRGVyZXZ5YW5rbw==?= writes: > It seems useful to have [OR REPLACE] option in CREATE OPERATOR statement, as > in CREATE FUNCTION. This option may be good for writing extension update > scripts, to avoid errors with re-creating the same operator. No, that's not acceptable.

[PATCH] Optional OR REPLACE in CREATE OPERATOR statement

2022-07-05 Thread Svetlana Derevyanko
  Hello hackers,   It seems useful to have [OR REPLACE] option in CREATE OPERATOR statement, as in CREATE FUNCTION. This option may be good for writing extension update scripts, to avoid errors with re-creating the same operator.   Because of cached query plans, only RESTRICT and JOIN options