3

I've set a prompt in my sqlplus glogin.sql a little bit long, mainly because of some internal variables and control sequence. Starting sqlplus I get the following error:

String beginning "truncated_prompt..." is too long. Maximum size is 50 characters.
SQL>

...and yes, my prompt is really truncated to 50 characters.

What to do? Is it possible to somehow make this limit higher? (I already tried SET LONG and SET LONGC without any change.)

(Reacting comment) I have this long prompt, because I have some control sequences in it, which make it so beautiful. And I am calling it through rlwrapper, which makes the normal keys (page up/down, history search, tab completion, etc) also working, just as in a good command line application.

2
  • It's not possible. Why on earth do you want a prompt so long?
    – Philᵀᴹ
    Commented May 6, 2014 at 9:40
  • @Phil I have some control sequences in it, which make my prompt so beautiful. And I am calling it through rlwrapper, which makes the normal keys (page up/down, history search, tab completion, etc) also very userfriendly. But finally, I found a solution. If you gave the downvote, maybe this explanation has the worth of removing/upvoting it.
    – peterh
    Commented May 6, 2014 at 9:53

1 Answer 1

4

Finally, I found an answer!

The trick is, that the 50 char limit is for the string before the variable substitution! The size of the substituted string isn't limited. In my case, shorting _connect_identifier to a temporal variable _ci was enough:

DEFINE _ci=&_connect_identifier
SET SQLPROMPT "(long things)_user'@'_ci'(long things)"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.