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

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

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

Short answer:

  • CHR(99)||CHR(99)||CHR(99) evaluates to the string 'ccc'. So the code is intending to receive a message from a pipe named 'ccc'.
  • DBMS_PIPE.RECEIVE_MESSAGE reads a message from that pipe with a timeout. The value 18.478 is presumably the timeout (in seconds), though the parameter is normally an integer, so 18.478 would be treated as 18.

Important caveats:

  • The snippet as written is not complete/valid PL/SQL. RECEIVE_MESSAGE requires an OUT parameter (or an OUT variable) to hold the received message, and optionally a status. You cannot pass 18.478 as the message destination.
  • You typically declare a variable to hold the message and pass it as an OUT parameter.

A correct, minimal example (assuming a 3-char pipe name 'ccc'):

  • Version with an OUT message only: declare v_pipe varchar2(30) := CHR(99)||CHR(99)||CHR(99); -- 'ccc' v_msg varchar2(32767); begin DBMS_PIPE.RECEIVE_MESSAGE(p_pipe => v_pipe, p_message => v_msg, p_timeout => 18); if v_msg is not null then dbms_output.put_line('Received: ' || v_msg); else dbms_output.put_line('No message within timeout'); end if; end;

  • Version with explicit status (if your version supports it): declare v_pipe varchar2(30) := 'ccc'; v_msg varchar2(32767); v_status boolean; begin DBMS_PIPE.RECEIVE_MESSAGE(p_pipe => v_pipe, p_message => v_msg, p_status => v_status, p_timeout => 18); if v_status then dbms_output.put_line('Received: ' || v_msg); else dbms_output.put_line('No message within timeout'); end if; end;

Notes:

  • DBMS_PIPE is an inter-process (intra-database) IPC mechanism using in-memory pipes. Messages are read in FIFO order per pipe.
  • The pipe named 'ccc' must exist (created via DBMS_PIPE.CREATE_PIPE or similar) before this call.
  • The 18.478 value will be treated as 18 if the parameter is an integer timeout; decimals are typically truncated.

If you want, tell me which Oracle version you’re targeting and I’ll tailor the exact, compile-tested syntax.

555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),18.478)
Short answer: - CHR(99)||CHR(99)||CHR(99) evaluates to the string 'ccc'. So the code is intending to receive a message from a pipe named 'ccc'. - DBMS_PIPE.RECEIVE_MESSAGE reads a message from that pipe with a timeout. The value 18.478 is presumably the timeout (in seconds), though the parameter is normally an integer, so 18.478 would be treated as 18. Important caveats: - The snippet as written is not complete/valid PL/SQL. RECEIVE_MESSAGE requires an OUT parameter (or an OUT variable) to hold the received message, and optionally a status. You cannot pass 18.478 as the message destination. - You typically declare a variable to hold the message and pass it as an OUT parameter. A correct, minimal example (assuming a 3-char pipe name 'ccc'): - Version with an OUT message only: declare v_pipe varchar2(30) := CHR(99)||CHR(99)||CHR(99); -- 'ccc' v_msg varchar2(32767); begin DBMS_PIPE.RECEIVE_MESSAGE(p_pipe => v_pipe, p_message => v_msg, p_timeout => 18); if v_msg is not null then dbms_output.put_line('Received: ' || v_msg); else dbms_output.put_line('No message within timeout'); end if; end; - Version with explicit status (if your version supports it): declare v_pipe varchar2(30) := 'ccc'; v_msg varchar2(32767); v_status boolean; begin DBMS_PIPE.RECEIVE_MESSAGE(p_pipe => v_pipe, p_message => v_msg, p_status => v_status, p_timeout => 18); if v_status then dbms_output.put_line('Received: ' || v_msg); else dbms_output.put_line('No message within timeout'); end if; end; Notes: - DBMS_PIPE is an inter-process (intra-database) IPC mechanism using in-memory pipes. Messages are read in FIFO order per pipe. - The pipe named 'ccc' must exist (created via DBMS_PIPE.CREATE_PIPE or similar) before this call. - The 18.478 value will be treated as 18 if the parameter is an integer timeout; decimals are typically truncated. If you want, tell me which Oracle version you’re targeting and I’ll tailor the exact, compile-tested syntax.