Most of my raise statements use short format strings, but every now and then I get a long one that
wraps around in my code and looks ugly. Example:

raise exception 'Delivery specification for Monitored Event [%:%:%] and Notification Template [%] does not exist.',
p_event, p_monitor, p_subscriber, p_template;

Also, assume that I've got this indented a few levels, so that he format string wraps in my code.

Is there any way to break the format string into multiple lines in my code, but still
have a single line message (no line breaks) appear on the console?

I tried this, but it didn't work:

raise exception 'Delivery specification for Monitored Event' || '[%:%:%] and Notification Template [%] does not exist.',
p_event, p_monitor, p_subscriber, p_template;

It's not that big of a deal, but maybe there's a cool trick I need to learn...

- Leon

Search Discussions

  • Jasen Betts at Feb 9, 2011 at 12:20 pm

    On 2011-02-06, Leon Starr wrote:

    I tried this, but it didn't work:

    raise exception 'Delivery specification for Monitored Event' || '[%:%:%] and Notification Template [%] does not exist.',
    p_event, p_monitor, p_subscriber, p_template;
    Raise is "special". The first argument only looks like a string.

    --
    ⚂⚃ 100% natural

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedFeb 6, '11 at 6:09a
activeFeb 9, '11 at 12:20p
posts2
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

Jasen Betts: 1 post Leon Starr: 1 post

People

Translate

site design / logo © 2022 Grokbase