You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a table named events. Autocomplete doesn't work in query involving this table (at least for a JOIN condition and a SELECT column), unless I quote the table name.
postgres@localhost:postgres> SELECT descri* FROM events;
Cursor at *, having just typed i the completions I see are:
pg_describe_object() function
col_description() function
obj_description() function
shobj_description() function
binary_upgrade_set_record_init_privs() function
describe keyword
If I change s/events/"events"/ and retype the i:
postgres@localhost:postgres> SELECT descri FROM "events";
then I see:
description column
pg_describe_object() function
col_description() function
obj_description() function
shobj_description() function
binary_upgrade_set_record_init_privs() function
describe keyword
as expected.
I'm using Vi-mode, if that matters (I don't think it does). Is this expected, or is there something special about the table name events? Interestingly, if I call the table not_events I don't need to quote the table name for the columns to autocomplete.
Your environment
Please provide your OS and version information. Ubuntu 16.04 x64
Having dug into this, sqlparse is (incorrectly, for Postgres) treating events as a keyword, rather than an identifier. I've followed up on a promising-sounding PR that would allow us to use sqlparse in "Postgres" mode, where eventswouldn't be considered a keyword, but for now, I don't see an easy way to fix this issue
Description
We have a table named
events
. Autocomplete doesn't work in query involving this table (at least for a JOIN condition and a SELECT column), unless I quote the table name.Reproduction
Then
Cursor at
*
, having just typedi
the completions I see are:If I change
s/events/"events"/
and retype thei
:then I see:
as expected.
I'm using Vi-mode, if that matters (I don't think it does). Is this expected, or is there something special about the table name
events
? Interestingly, if I call the tablenot_events
I don't need to quote the table name for the columns to autocomplete.Your environment
Ubuntu 16.04 x64
pip freeze
command.The text was updated successfully, but these errors were encountered: