This discussion is archived
4 Replies Latest reply: Jan 2, 2013 8:35 AM by 917006 RSS

How to omit schema/user from auto-completion of table name?

917006 Newbie
Currently Being Moderated
BH

Hello,

It seems auto-completion of table names now also prefixes the schema/user.
I.e. instead of auto-completing "my_table_name" it now inserts "theuser.my_table_name"

This used to not be the case (I just got the latest version 3.2.20.09).

Any way to switch this off (as SQL Developer used to behave in older versions) ?
Can't seem to find anything in Tools > Preferences > Code Editor > Completion Insight.

Thanks in advance!
  • 1. Re: How to omit schema/user from auto-completion of table name?
    Jeff Smith SQLDev PM ACE Moderator
    Currently Being Moderated
    So when you type my_tabl and hit ctrl+Space to invoke code insight, the my_table_name is listed in the pop-up as theuser.my_table_name?

    Are you logged in as 'theuser' or as someone else?


    I'm logged in as the object owner. When I invoke code insight for a 'local' object, I'm not seeing the schema being prefixed.
  • 2. Re: How to omit schema/user from auto-completion of table name?
    917006 Newbie
    Currently Being Moderated
    BH

    Hey Jeff, thanks for quick reply

    I'm not the object owner, although I also don't think I'm logged in as 'theuser'. I think we have some custom setup where us developers can only use tables from 'theuser', or some-such (unsure of the details about this, I can find out from our DBAs).

    The point is though, regardless of under what I'm logged in as, older versions of SQL Developer used to just insert the table name without the prefix. It must be some new feature that it also inserts the schema/user prefix, but I'd assume such a new feature would also come with an option to switch it off.

    Any ideas?

    Edited by: user13523697 on Jan 2, 2013 8:23 AM
  • 3. Re: How to omit schema/user from auto-completion of table name?
    Jeff Smith SQLDev PM ACE Moderator
    Currently Being Moderated
    Unless it's actually a synonym, using just the object name without the schema prefix would results in an ORA- b/c the database wouldn't be able to resolve the object name. So if anything, I would treat this new feature as a bug fix, where the old behavior was 'bad.'

    Now if it's actually a synonym that you have been granted, or if it's a public synonym, then we shouldn't be including the schema prefix, and from what I can tell, we're not.

    Example, type
    all and then hit ctrl+space

    SQL Dev should pop up all the public synonyms for the data dictionary SYS tables, e.g. ALL_TYPES, ALL_USERS, etc. When I select one, it doesn't prefix with SYS.

    Why don't you want the schema prefix? Not sure that it matters, but just personally curious.
  • 4. Re: How to omit schema/user from auto-completion of table name?
    917006 Newbie
    Currently Being Moderated
    BH

    Ah yes the word "synonym" definitely rings a bell, I think our custom setup I was speaking of has something to do with it.

    I don't see much popping up when I type "all" and then Ctrl+Space, maybe I don't have permissions for the "all" stuff.

    In any case, I guess it's no big deal really - I'm just not used to having all this extra 'theuser.' cluttering my queries. And from what you tell me it really shouldn't show up, so I dunno...
    What can I ask my DBA about this that may help understand the situation better?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points