Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YSQL] ALTER OPERATOR SET <define> #2711

Closed
ddorian opened this issue Oct 24, 2019 · 6 comments
Closed

[YSQL] ALTER OPERATOR SET <define> #2711

ddorian opened this issue Oct 24, 2019 · 6 comments
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature
Projects

Comments

@ddorian
Copy link
Contributor

ddorian commented Oct 24, 2019

Add support for alter operator

@irizzant
Copy link

+1 For this I can't restore my dump because of this issue

@ddorian ddorian changed the title [YSQL] alter operator [YSQL] ALTER OPERATOR SET <define> Jan 31, 2020
@ddorian
Copy link
Contributor Author

ddorian commented Jan 31, 2020

@irizzant can you paste the full query ?

@frozenspider frozenspider added this to To do in YSQL via automation Jan 31, 2020
@frozenspider frozenspider added the kind/enhancement This is an enhancement of an existing feature label Jan 31, 2020
@frozenspider frozenspider moved this from To do to In progress in YSQL Jan 31, 2020
@irizzant
Copy link

@ddorian in reality I think this is issued through the activation of cube estension:

pg_restore: creating EXTENSION "cube"
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 3; 3079 436183759 EXTENSION cube 
pg_restore: [archiver (db)] could not execute query: ERROR:  ALTER OPERATOR SET <define> not supported yet
HINT:  Please report the issue on https://github.com/YugaByte/yugabyte-db/issues
    Command was: CREATE EXTENSION IF NOT EXISTS cube WITH SCHEMA public;

@frozenspider
Copy link
Contributor

@irizzant: Turns out, ALTER OPERATOR SET <define> wasn't the only thing necessary for cube extension to work, tracking it here: #3628
I'm working on it, should be ready soon.

@irizzant
Copy link

@frozenspider Thanks for the update I subscribed #3628 too

frozenspider added a commit that referenced this issue Mar 16, 2020
…nd ALTER EXTENSION

Summary:
Enabled support for the following grammar:
* `ALTER OPERATOR` syntax
  * `ALTER OPERATOR ... SET (...)`
  * `ALTER OPERATOR ... OWNER TO ...`
  * `ALTER OPERATOR ... SET SCHEMA ...`
* `OPERATOR FAMILY` syntax
  * `CREATE OPERATOR FAMILY`
  * `DROP OPERATOR FAMILY`
  * `ALTER OPERATOR FAMILY ... [ ADD | DROP ] ...`
  * `ALTER OPERATOR FAMILY ... SET SCHEMA ...`
* `ALTER EXTENSION` syntax
  * `ALTER EXTENSION ... UPDATE ...`
  * `ALTER EXTENSION ... SET SCHEMA ...`
  * `ALTER EXTENSION ... [ ADD | DROP ] ...`

Test Plan:
ybd --java-test org.yb.pgsql.TestPgRegressPgMiscIndependent
* Added the following to `yb_pg_misc_independent_serial_schedule`:
  * `yb_pg_alter_operator` (based on PG's `alter_operator`)
  * `yb_alter_operator_family` (small subsed of PG's `alter_generic`)

Reviewers: kannan, mihnea, dmitry, neil, neha

Reviewed By: neil, neha

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D7880
@frozenspider
Copy link
Contributor

Hey @irizzant, this specific issue has been resolved in a6d2160. While this does in principle allow you to use a cube extension (i.e. CREATE EXTENSION cube), note that it doesn't work exactly as it does in vanilla Postgres yet - specifically, you won't be able to apply ORDER BY to a cube-type column yet.

YSQL automation moved this from In progress to Done Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature
Projects
YSQL
  
Done
Development

No branches or pull requests

4 participants