Toad World® Forums

Highlighting (formatting) table names from different schema


#1

Hi,

When I’m working with tables located in my own schema nice formatting is applied based on my settings.

I was wondering how to apply the same settings while referencing objects from different schema (those have public synonyms).

Changing current schema from menu did not work.

I was pretty sure it used to work.


#2

If you have the option to highlight views enabled, views from different schemas become highlighted as they are loaded into the Schema Browser. It looks like tables don’t behave the same way, but I guess they should, for consistency. I’ll fix that for the next version.


#3

oops, my prior reply wasn’t quite right. Tables from other schemas are being highlighted in the Editor after they are loaded in the Schema Browser (assuming that the option is enabled in Options|Editor|Display). But what I did notice is that if I type SCHEMA.TABLENAME in the editor, then it doesn’t get highlighted, but if I just type TABLENAME in the editor, then it does get highlighted. Mike probably has something to say about that.


#4

The feature has some inconsistency. I think the intended design is to highlight connected schema objects; however, we do add SYS views to the list when “View names” is checked for highlighting. Some work would need to be done to make it right. Toad has to
query for those object names and if you’re connected as schema A then which other schemas should be loaded? Toad won’t know if you intend to work with schema B, C, D, etc. on a particular day. Should all tables by all schemas be loaded to be 100% safe? Working
from the current schema dropdown could work, but changing current schema issues ALTER SESSION SET current_schema before several other actions which may not be desirable just to get syntax highlighting.

Michael

On 05/11/2015 09:29 AM, John Dorlon wrote:

RE: Highlighting (formatting) table names from different schema

Reply by John Dorlon
oops, my prior reply wasn’t quite right. Tables from other schemas are being highlighted in the Editor after they are loaded in the Schema Browser (assuming that the option is enabled in Options|Editor|Display). But what I did notice is that if I type
SCHEMA.TABLENAME in the editor, then it doesn’t get highlighted, but if I just type TABLENAME in the editor, then it does get highlighted. Mike probably has something to say about that.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.


#5

The majority of tables I work with are in a different schema than the user I am logged in as. I do have the schemas I use in my Favorite schemas. Would it be possible to have TOAD read that list and use it to determine which ones to highlight?

On Mon, May 11, 2015 at 9:53 AM, Michael Staszewski bounce-mstaszew@toadworld.com wrote:

Re: Highlighting (formatting) table names from different schema

Reply by Michael Staszewski
The feature has some inconsistency. I think the intended design is to highlight connected schema objects; however, we do add SYS views to the list when “View names” is checked for highlighting. Some work would need to be done to make it right. Toad has to
query for those object names and if you’re connected as schema A then which other schemas should be loaded? Toad won’t know if you intend to work with schema B, C, D, etc. on a particular day. Should all tables by all schemas be loaded to be 100% safe? Working
from the current schema dropdown could work, but changing current schema issues ALTER SESSION SET current_schema before several other actions which may not be desirable just to get syntax highlighting.

Michael

On 05/11/2015 09:29 AM, John Dorlon wrote:

RE: Highlighting (formatting) table names from different schema

Reply by John Dorlon
oops, my prior reply wasn’t quite right. Tables from other schemas are being highlighted in the Editor after they are loaded in the Schema Browser (assuming that the option is enabled in Options|Editor|Display). But what I did notice is that if I type
SCHEMA.TABLENAME in the editor, then it doesn’t get highlighted, but if I just type TABLENAME in the editor, then it does get highlighted. Mike probably has something to say about that.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle - Beta notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag this post as spam/abuse.


Phyllis Helton

Data Magician
Digital Strategies, Cru | Data Sciences & Analytics
Office :phone: 407-515-4452

phyllis.helton@cru.org


#6

How are you accessing these tables? Are you using the current schema dropdown, fully qualifying them with schema.tablename, or are you referencing a public synonym?

From: phyllis.helton_1150 [mailto:bounce-phyllishelton_1150@toadworld.com]

Sent: Tuesday, May 12, 2015 8:37 AM

To: toadoraclebeta@toadworld.com

Subject: Re: [Toad for Oracle - Beta Discussion Forum] Highlighting (formatting) table names from different schema

Re: Highlighting (formatting) table names from different schema

Reply by phyllis.helton_1150

The majority of tables I work with are in a different schema than the user I am logged in as. I do have the schemas I use in my Favorite schemas. Would it be possible to have
TOAD read that list and use it to determine which ones to highlight?

On Mon, May 11, 2015 at 9:53 AM, Michael Staszewski bounce-mstaszew@toadworld.com wrote:

Re: Highlighting (formatting) table names from different
schema

Reply by Michael Staszewski

The feature has some inconsistency. I think the intended design is to highlight connected schema objects; however, we do add SYS views to the list when “View names” is checked
for highlighting. Some work would need to be done to make it right. Toad has to query for those object names and if you’re connected as schema A then which other schemas should be loaded? Toad won’t know if you intend to work with schema B, C, D, etc. on a
particular day. Should all tables by all schemas be loaded to be 100% safe? Working from the current schema dropdown could work, but changing current schema issues ALTER SESSION SET current_schema before several other actions which may not be desirable just
to get syntax highlighting.

Michael

On 05/11/2015 09:29 AM, John Dorlon wrote:

RE: Highlighting (formatting) table names from different
schema

Reply by John Dorlon

oops, my prior reply wasn’t quite right. Tables from other schemas are being highlighted in the Editor after they are loaded in the Schema Browser (assuming that the option is enabled in Options|Editor|Display).
But what I did notice is that if I type SCHEMA.TABLENAME in the editor, then it doesn’t get highlighted, but if I just type TABLENAME in the editor, then it does get highlighted. Mike probably has something to say about that.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.

Phyllis Helton

Data Magician

Digital Strategies, Cru | Data Sciences & Analytics

Office :phone: 407-515-4452

phyllis.helton@cru.org

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.


#7

I’m usually using public synonyms.

current_schema drop down would be an option too (maybe it’s worth adding it as an option to particular connection).

While implementing would it be possible to give a choice to user, if he prefers public synonyms or current schema?

Currently formatting is assigned to Users_Table “class” are you planning to create new ones or reuse same settings? (I ain’t sure if it’s necessary)


#8
  • current_schema drop down would be an option too
    For using syns I don’t think we should consider this. It’s not intuitive and executes alter session so it’s not a good solution just to get highlighting.

  • would it be possible to give a choice to user, if he prefers public synonyms or current schema?.. are you planning to create new ones or reuse same settings? (I ain’t sure if it’s necessary)
    Perhaps if it’s not too costly a query to fetch syns and resolve each to table, view, PL/SQL, or other would be ideal. We could divide them into the three options that we have, discarding any that don’t fit. That wouldn’t require any additional options or settings and executed in the background it would “just work” although you might experience a delay in syntax highlighting of syns if your database is large or connection to it is slow.

Object lists for highlighting could be saved to disk on exit too and refreshed on next startup. The cached lists would be a little out of date until we refresh it, but generally should be pretty close to accurate unless many objects have been added/removed since you last logged on.

Michael


#9

#10

If you choose caching, please make it a menu item with shortcut to call it directly from Editor.


#11

I’m not sure what you mean. Toad already queries tables, etc. for highlighting when you make a connection. This is done via background thread and once finished the list is loaded into the editor to apply highlighting. I’m thinking the list could just be saved as well and loaded when you make a connection. That will give you instant access to highlighting of all objects that were known when you last connected. The background queries could still execute and refresh the list. There’s nothing there you would need to access.


#12

What I meant is that list for highlighting is not refreshed when I refresh list of objects in Toad Insight drop down. It takes opening Schema browser to get highlighting right.

example

create table x_test as select * from dual;

then

select * from x_ (here comes Ctrl + dot to display TI DD with all objects, where I use refresh for obvious reasons - new table ends up in DropDown - I can choose it from list)

now my statement is:

select * from x_test

and highlighting for x_test table is not being applied until I open Schema Browser.

What I meant is to tie this “refresh of highlighting” to some menu option with shortcut rather than waiting for opening a SB that can be sloooow.

Chris


#13

It can refresh from Code Insight too. That’s no problem.

From: fisher_359 [mailto:bounce-fisher_359@toadworld.com]

Sent: Tuesday, May 12, 2015 11:31 AM

To: toadoraclebeta@toadworld.com

Subject: RE: [Toad for Oracle - Beta Discussion Forum] Highlighting (formatting) table names from different schema

RE: Highlighting (formatting) table names from different schema

Reply by fisher_359

What I meant is that list for highlighting is not refreshed when I refresh list of objects in Toad Insight drop down. It takes opening Schema browser to get highlighting right.

example

create table x_test as select * from dual;

then

select * from x_ (here comes Ctrl + dot to display TI DD with all objects, where I use refresh for obvious reasons - new table ends up in DropDown - I can choose it from list)

now my statement is:

select * from x_test

and highlighting for x_test table is not being applied until I open Schema Browser.

What I meant is to tie this “refresh of highlighting” to some menu option with shortcut rather than waiting for opening a SB that can be sloooow.

Chris

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.


#14

I’m using schema.table_name and not usually connecting to the schema, though sometimes I am connected.

On Tue, May 12, 2015 at 11:35 AM, Michael Staszewski bounce-mstaszew@toadworld.com wrote:

RE: Highlighting (formatting) table names from different schema

Reply by Michael Staszewski
It can refresh from Code Insight too. That’s no problem.

From: fisher_359 [mailto:bounce-fisher_359@toadworld.com]

Sent: Tuesday, May 12, 2015 11:31 AM

To: toadoraclebeta@toadworld.com

Subject: RE: [Toad for Oracle - Beta Discussion Forum] Highlighting (formatting) table names from different schema

RE: Highlighting (formatting) table names from different schema

Reply by fisher_359

What I meant is that list for highlighting is not refreshed when I refresh list of objects in Toad Insight drop down. It takes opening Schema browser to get highlighting right.

example

create table x_test as select * from dual;

then

select * from x_ (here comes Ctrl + dot to display TI DD with all objects, where I use refresh for obvious reasons - new table ends up in DropDown - I can choose it from list)

now my statement is:

select * from x_test

and highlighting for x_test table is not being applied until I open Schema Browser.

What I meant is to tie this “refresh of highlighting” to some menu option with shortcut rather than waiting for opening a SB that can be sloooow.

Chris

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle - Beta notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag this post as spam/abuse.


Phyllis Helton

Data Magician
Digital Strategies, Cru | Data Sciences & Analytics
Office :phone: 407-515-4452

phyllis.helton@cru.org