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

PostgreSQL error showing `relation "--" does not exist` on `Show table records` #216

Closed
gulshan opened this issue May 7, 2019 · 4 comments

Comments

2 participants
@gulshan
Copy link

commented May 7, 2019

Describe the bug
On Show table records command in PostgreSQL error showing relation "public.aspnetuserroles" does not exist

To Reproduce
Steps to reproduce the behavior:

  1. Connect to a Postgresql DB
  2. Go to any table
  3. Right click on table name
  4. Select Show table records
  5. See error-
INFO: Executing SQLTools.showRecords
ERROR: Error:  relation "public.aspnetuserroles" does not exist
ERROR: Error:  { [Error: relation "public.aspnetuserroles" does not exist
	at handleResponse (C:\Users\User1\.vscode\extensions\mtxr.sqltools-0.18.0\extension.js:2164:48)
	at processMessageQueue (C:\Users\User1\.vscode\extensions\mtxr.sqltools-0.18.0\extension.js:1991:17)
	at Immediate.module.exports.setImmediate (C:\Users\User1\.vscode\extensions\mtxr.sqltools-0.18.0\extension.js:1975:13)
	at runCallback (timers.js:696:18)
	at tryOnImmediate (timers.js:667:5)
	at processImmediate (timers.js:649:5)]
  code: -32001,
  data: { dialect: 'PostgreSQL', dialectOptions: {} } }

Expected behavior
See the records from the selected table.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • SQLTools Version: 0.18.0
  • VSCode Version: 1.33.1
  • Dialect Used: PostgreSQL
  • OS: Windows

Additional context
The name of the table was AspNetUserRoles. But it seems SQLTools is using the lowercase version public.aspnetuserroles. This may cause the error.

@gulshan gulshan added the bug label May 7, 2019

@project-bot project-bot bot added this to To do in Kanban May 7, 2019

@mtxr

This comment has been minimized.

Copy link
Owner

commented May 7, 2019

Hi @gulshan,

We are not chaning the case of the table. Might be something else this error. Even though take a look https://blog.xojo.com/2016/09/28/about-postgresql-case-sensitivity/

Could you share an screenshot of your Tree view? Also here is it working with both table names, i've created one without double quoting and another with quoutes "AspNetUserRoles".

https://imgur.com/DXWXubo

Let me know how it goes.

@mtxr mtxr added the investigating label May 7, 2019

@gulshan

This comment has been minimized.

Copy link
Author

commented May 8, 2019

Then may be casing is not the problem. Other actions like Describe table and Generate insert query are working without any problem. The database is a typical ASP.NET core "identity" database generated by the framework. Here is the tree view-

Annotation 2019-05-08 164241

@mtxr

This comment has been minimized.

Copy link
Owner

commented May 8, 2019

I see whats happening now. It's missing to escape chars. I'll fix this today and release. Thanks!

@mtxr mtxr closed this in 71a435a May 8, 2019

Kanban automation moved this from To do to To be released May 8, 2019

@gulshan

This comment has been minimized.

Copy link
Author

commented May 9, 2019

It is working now with the new version. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.