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

Invalid Postgresql query: "drop foreign key" #1247

Closed
TheColorRed opened this issue Dec 4, 2020 · 5 comments
Closed

Invalid Postgresql query: "drop foreign key" #1247

TheColorRed opened this issue Dec 4, 2020 · 5 comments

Comments

@TheColorRed
Copy link

TheColorRed commented Dec 4, 2020

Relates to: https://www.heidisql.com/forum.php?t=37283

When dropping a key in the "Foreign keys" tab, the command that is executed is this:

ALTER TABLE "example" DROP FOREIGN KEY "FK_key";

This throws an error:

ERROR: syntax error at or near "FOREIGN" LINE 2: DROP FOREIGN KEY "FK_key"

The proper syntax is (at least one that works) uses DROP CONSTRAINT instead of DROP FOREIGN KEY:

ALTER TABLE "example" DROP CONSTRAINT "FK_key";

PostgreSQL version:

$ SELECT VERSION()
PostgreSQL 12.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9), 64-bit
@narrowizard
Copy link

Same here, waiting for a fix release. is there any release plan for v11.3?

@ansgarbecker
Copy link
Collaborator

No date set for next releases. I only planned to release more often, probably with less modifications then.

@ansgarbecker ansgarbecker modified the milestones: v11.3, v11.4 May 30, 2021
@TheDude-gh
Copy link

This would be nice to have fixed asap.

@ansgarbecker ansgarbecker removed this from the v12.0 milestone Apr 14, 2022
@arecaps
Copy link

arecaps commented Mar 28, 2024

Any plan to fix this?

@ansgarbecker ansgarbecker added this to the v12.7 milestone Mar 28, 2024
@ansgarbecker
Copy link
Collaborator

Fixed in the next build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants