Feature request: Support RegEx filters in "Use filter for retrieval"

19 views
Skip to first unread message

DK

unread,
Jul 20, 2016, 3:34:31 PM7/20/16
to SQL Workbench/J - DBMS independent SQL tool
I use RegEx filter ^(?!DR\$)in all my Oracle connections to filter out a bunch of system tables (used for domain indexes) and finding myself constantly re-filtering after refresh in Database Explorer.

The option "Use filter for retrieval" works only for non-Regex filters as documented, but would it be possible to enhance it to support RegEx filters as well?

Thomas Kellerer

unread,
Jul 20, 2016, 3:48:38 PM7/20/16
to sql-wo...@googlegroups.com
> I use RegEx filter ^(?!DR\$)in all my Oracle connections to filter
> out a bunch of system tables (used for domain indexes) and finding
> myself constantly re-filtering after refresh in Database Explorer.

Why don't you apply that filter in the connection profile?


Dmitriy Korobskiy

unread,
Jul 22, 2016, 4:40:48 PM7/22/16
to sql-wo...@googlegroups.com
I tried: in the Catalog filer, right?

It did not work for me.

--
Dmitriy Korobskiy

Thomas Kellerer

unread,
Jul 24, 2016, 4:24:53 PM7/24/16
to sql-wo...@googlegroups.com
No. Oracle has not catalogs. You need to use the Schema filter.

Thomas

Dmitriy Korobskiy

unread,
Jul 26, 2016, 11:56:25 AM7/26/16
to sql-wo...@googlegroups.com
Yeah, I thought so too.
Schema filters are working just fine for me.

What I need is this functionality (use a RegEx filter on retrieve) in
the *object list in DbExplorer*. So, the filter is remembered fine in
the workspace. It's just not applied on object list retrieve.

--
Dmitriy Korobskiy

Thomas Kellerer

unread,
Jul 26, 2016, 12:14:19 PM7/26/16
to sql-wo...@googlegroups.com
Ah! Now I get it ;)

That indeed is possible. I already have such a filter to remove other "garbage".

This can be configured through the property:

workbench.db.oracle.exclude.tables

The default is:

workbench.db.oracle.exclude.tables=^BIN\\$.*|^MLOG\\$.*|RUPD\\$.*|^SYS_IOT_OVER.*

So if you want to add more expressions, you need add that line to your workbench.settings:

workbench.db.oracle.exclude.tables=^BIN\\$.*|^MLOG\\$.*|RUPD\\$.*|^SYS_IOT_OVER.*|^(?!DR\\$)

Note that you need to escape the backslash. The \\ is intentional!

If you edit workbench.settings, make sure you close SQL Workbench before doing so.

Thomas

Dmitriy Korobskiy

unread,
Jul 26, 2016, 2:28:36 PM7/26/16
to sql-wo...@googlegroups.com
Great! This worked like a charm:

workbench.db.oracle.exclude.tables=^BIN\\$.*|^MLOG\\$.*|RUPD\\$.*|^SYS_IOT_OVER.*|^DR\\$.*

Thanks a bunch!

BTW, can this be changed via WbSetConfig (on-the-fly ?)? I'm a bit fuzzy on which settings should be changed via WbSetConfig and which directly in workbench.settings.
-- 
Dmitriy Korobskiy

Thomas Kellerer

unread,
Jul 26, 2016, 2:52:53 PM7/26/16
to sql-wo...@googlegroups.com
> BTW, can this be changed via WbSetConfig (on-the-fly ?)?
>I'm a bit fuzzy on which settings should be changed via WbSetConfig and which directly in workbench.settings.

You can change every setting through WbSetConfig - although there you don't need to escape the \ so it would be:

wbsetconfig workbench.db.oracle.exclude.tables=^BIN\$.*|^MLOG\$.*|RUPD\$.*|^SYS_IOT_OVER.*|^DR\$.*

Thomas
Reply all
Reply to author
Forward
0 new messages