FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.24k stars 212 forks source link

Mark inactive triggers in SHOW command (add new column to its output) [CORE4945] #5236

Open firebird-automations opened 9 years ago

firebird-automations commented 9 years ago

Submitted by: @pavel-zotov

Attachments: show-trigger-model-sample.PNG

Currently one may detect that trigger is INactive only by extracting its content. Command `show trigger' does not display such info neither in 2.5 nor in 3.0:

SQL> show trigger; Trigger name Invalid ================================ ======= TRG_CONNECT

Table name Trigger name Invalid ================================ ================================ ======= AGENTS AGENTS_BI DOC_LIST DOC_LIST_AIUD DOC_LIST DOC_LIST_BIUD . . . SQL> show trigger trg_connect; TRG_CONNECT, Sequence: 0, Type: ON CONNECT, Inactive Trigger text:

as begin execute procedure sp_init_ctx; . . . . end

It will be useful to add information about INactive trigger(s) to the output of SHOW TRIGGER command.

firebird-automations commented 9 years ago

Commented by: @asfernandes

It will grow up beyond 80 columns. Are we 'allowed' to do it in these days where nobody uses fixed 80-columns screens?

What we'll do anyway, when max. length of identifiers are increased?

firebird-automations commented 9 years ago
Modified by: @pavel-zotov Attachment: show\-trigger\-model\-sample\.PNG \[ 12814 \]
firebird-automations commented 9 years ago

Commented by: @pavel-zotov

> It will grow up beyond 80 columns

If this column will has name 'Active' than cursor will stay exactly on 81-th column after last character - plese see attached sceen sample.

firebird-automations commented 9 years ago

Commented by: @asfernandes

I think it should be named Inactive, like it is for Invalid, and mark only the "In*" items.

firebird-automations commented 9 years ago

Commented by: @pavel-zotov

This column ("Inactive") could be abbreviated to "Inact." (w/o quotes, of course) - IMO one may easy to understand what this mean. As for me, there is no problem about exceeding of 80th character: after 1st launch of cmd.exe we can change window properties (increase width) of this by right-clicking on its title bar + save and that's all. It will be auto-restored on all following launches.

PS. Oracle SQLPLUS has many cases when its output exceeds 80 chars, and nobody sees trouble with it :-)