0

Please i am trying to create a table in postgres using pgadmin. After selecting from the "Inherit from" drop down, i am getting the following error

ERROR: syntax error at or near "%"
LINE 2: INHERIT public.%22Staff%22;

enter image description here

2
  • What happens when you take out the double quotes around "Staff"? Commented Nov 28, 2019 at 18:30
  • I cannot edit it. Commented Nov 28, 2019 at 19:53

1 Answer 1

3

This is a bug in pgAdmin4 as it doesn't appear to handle quoted object names, at least for inheritance.

I have now reported this bug to the PgAdmin community.

In the meantime, you may wish to take the SQL it generates (visible on the SQL tab) and manually edit then run it, replacing %22 with ". Or you could use table names without quoting, which will cause it to lose it's casing, so that may or may not be an issue for you.

Disclosure: I am an EnterpriseDB (EDB) employee.

Sign up to request clarification or add additional context in comments.

1 Comment

You won't be able to edit the SQL in the SQL tab, but you can copy and paste it into the Query Editor. That's the lightning bolt icon button on the main window, or go to Tools > Query Tool.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.