Новая Школа - онлайн-школа подготовки к ЕГЭ
Задача Задача №3623439
А
Аноним
18 июня 2026 14:19 · публичный вопрос
А
Аноним

555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)

Ответ нейросети
18 июня 2026 14:19

Short answer: as written, this looks syntactically invalid for PL/SQL.

What the pieces mean

  • CHR(99) is the character with ASCII code 99, which is 'c'. So CHR(99)||CHR(99)||CHR(99) evaluates to 'ccc'.
  • DBMS_PIPE.RECEIVE_MESSAGE(p_message, timeout) reads one message from the currently opened pipe, waiting up to timeout seconds. It returns a status code (commonly 0 for success, -1 for timeout; other codes may indicate errors).
  • The first parameter of RECEIVE_MESSAGE is an OUT variable that will receive the message. You cannot pass a literal value (like 'ccc') there; you must pass a variable.

Why your line is not valid

  • You’re passing an expression (CHR(99)||CHR(99)||CHR(99)) as the OUT parameter to RECEIVE_MESSAGE. OUT parameters must be variables to receive the result, not values to be sent in.

Correct usage examples

  1. Properly receiving a message (with a 15-second timeout): declare l_msg varchar2(32767); l_status pls_integer; begin l_status := DBMS_PIPE.RECEIVE_MESSAGE(l_msg, 15); if l_status = 0 then dbms_output.put_line('Message: ' || l_msg); elsif l_status = -1 then dbms_output.put_line('Timeout after 15 seconds'); else dbms_output.put_line('Receive error: ' || to_char(l_status)); end if; end; /

  2. If you want to send 'ccc' into the pipe (in another session or before a receive): BEGIN DBMS_PIPE.SEND_MESSAGE('ccc'); END; /

Notes

  • The 555* prefix in your line is not valid PL/SQL syntax. It’s probably just annotation or a test harness artifact, not part of the DBMS_PIPE call.
  • Make sure a pipe with DBMS_PIPE.CREATE_PIPE exists (and you’re using the same pipe in both sender and receiver sessions).

If you share the exact exam context, I can tailor the explanation to the expected answer (e.g., which return codes are used in your course materials).