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

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

Нейросеть17 июня 2026 22:59

Short interpretation:

  • CHR(99) is the character with ASCII code 99, which is 'c'.
  • CHR(99)||CHR(99)||CHR(99) evaluates to 'ccc'.
  • DBMS_PIPE.RECEIVE_MESSAGE is a PL/SQL procedure that retrieves the next message from a database pipe into a buffer (an IN OUT VARCHAR2) with a timeout in seconds. A timeout of 0 means non-blocking: return immediately if no message is available.

Important note about syntax:

  • RECEIVE_MESSAGE expects an IN OUT variable for the message buffer, not a string literal. So the line as written would not compile in PL/SQL because you’re passing a literal ('ccc') to an IN OUT parameter.
  • The usual usage is to declare a buffer variable and pass that variable.

Correct usage example:

DECLARE l_msg VARCHAR2(32767); BEGIN l_msg := NULL; -- or you can initialize it, e.g., l_msg := CHR(99)||CHR(99)||CHR(99); DBMS_PIPE.RECEIVE_MESSAGE(l_msg, 0); -- non-blocking DBMS_OUTPUT.PUT_LINE('Received: ' || NVL(l_msg, '')); END;

Notes for exam:

  • If a message is available, l_msg will contain that message after the call.
  • If no message is available and timeout is 0, the call returns immediately and l_msg is unchanged (often NULL or whatever was in it). If you set a nonzero timeout, the call will wait up to that many seconds for a message.
  • To use this in practice you must have created the pipe (CREATE_PIPE) and (optionally) sent messages (SEND_MESSAGE) from some session.
555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),0)
Short interpretation: - CHR(99) is the character with ASCII code 99, which is 'c'. - CHR(99)||CHR(99)||CHR(99) evaluates to 'ccc'. - DBMS_PIPE.RECEIVE_MESSAGE is a PL/SQL procedure that retrieves the next message from a database pipe into a buffer (an IN OUT VARCHAR2) with a timeout in seconds. A timeout of 0 means non-blocking: return immediately if no message is available. Important note about syntax: - RECEIVE_MESSAGE expects an IN OUT variable for the message buffer, not a string literal. So the line as written would not compile in PL/SQL because you’re passing a literal ('ccc') to an IN OUT parameter. - The usual usage is to declare a buffer variable and pass that variable. Correct usage example: DECLARE l_msg VARCHAR2(32767); BEGIN l_msg := NULL; -- or you can initialize it, e.g., l_msg := CHR(99)||CHR(99)||CHR(99); DBMS_PIPE.RECEIVE_MESSAGE(l_msg, 0); -- non-blocking DBMS_OUTPUT.PUT_LINE('Received: ' || NVL(l_msg, '')); END; Notes for exam: - If a message is available, l_msg will contain that message after the call. - If no message is available and timeout is 0, the call returns immediately and l_msg is unchanged (often NULL or whatever was in it). If you set a nonzero timeout, the call will wait up to that many seconds for a message. - To use this in practice you must have created the pipe (CREATE_PIPE) and (optionally) sent messages (SEND_MESSAGE) from some session.