Menu

#4 need a way to change statement terminator

open
nobody
None
5
2005-08-23
2005-08-23
No

Currently the terminator is hard-coded to semicolon.
However, SQL/PSM uses semicolon to end statements
within a procedure definition. For example:

create specific method playing_card
for playing_card
begin
set self.card_suit = card_suit_init;
set self.card_rank = card_rank_init;
return self;
end;

But if you try this through sqlline, you'll get a
syntax error because the procedure definition gets
truncated at the first semicolon. Maybe something like:

set terminator @
create specific method playing_card
for playing_card
begin
set self.card_suit = card_suit_init;
set self.card_rank = card_rank_init;
return self;
end;
@

For now the workaround (really ugly) is to wrap
statements in unnatural ways to avoid semicolons at EOL:

create specific method playing_card
for playing_card
begin
set self.card_suit = card_suit_init; set
self.card_rank = card_rank_init; return self
; end;

Discussion


Log in to post a comment.