Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  plperl_call.out   Sprache: unbekannt

 
Spracherkennung für: .out vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

CREATE PROCEDURE test_proc1()
LANGUAGE plperl
AS $$
undef;
$$;
CALL test_proc1();
CREATE PROCEDURE test_proc2()
LANGUAGE plperl
AS $$
return 5
$$;
CALL test_proc2();
CREATE TABLE test1 (a int);
CREATE PROCEDURE test_proc3(x int)
LANGUAGE plperl
AS $$
spi_exec_query("INSERT INTO test1 VALUES ($_[0])");
$$;
CALL test_proc3(55);
SELECT * FROM test1;
 a  
----
 55
(1 row)

-- output arguments
CREATE PROCEDURE test_proc5(INOUT a text)
LANGUAGE plperl
AS $$
my ($a) = @_;
return { a => "$a+$a" };
$$;
CALL test_proc5('abc');
    a    
---------
 abc+abc
(1 row)

CREATE PROCEDURE test_proc6(a int, INOUT b int, INOUT c int)
LANGUAGE plperl
AS $$
my ($a, $b, $c) = @_;
return { b => $b * $a, c => $c * $a };
$$;
CALL test_proc6(234);
 b | c 
---+---
 6 | 8
(1 row)

-- OUT parameters
CREATE PROCEDURE test_proc9(IN a int, OUT b int)
LANGUAGE plperl
AS $$
my ($a, $b) = @_;
elog(NOTICE, "a: $a, b: $b");
return { b => $a * 2 };
$$;
DO $$
DECLARE _a int; _b int;
BEGIN
  _a := 10; _b := 30;
  CALL test_proc9(_a, _b);
  RAISE NOTICE '_a: %, _b: %', _a, _b;
END
$$;
NOTICE:  a: 10, b: 
NOTICE:  _a: 10, _b: 20
DROP PROCEDURE test_proc1;
DROP PROCEDURE test_proc2;
DROP PROCEDURE test_proc3;
DROP TABLE test1;

[Dauer der Verarbeitung: 0.21 Sekunden, vorverarbeitet 2026-08-08]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002