Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  pltcl_call.sql

  Sprache: SQL
 

CREATE PROCEDURE test_proc1()
LANGUAGE pltcl
AS $$
unset
$$;

CALL test_proc1();


CREATE PROCEDURE test_proc2()
LANGUAGE pltcl
AS $$
return 5
$$;

CALL test_proc2();


CREATE TABLE test1 (a int);

CREATE PROCEDURE test_proc3(x int)
LANGUAGE pltcl
AS $$
spi_exec "INSERT INTO test1 VALUES ($1)"
$$;

CALL test_proc3(55);

SELECT * FROM test1;


-- output arguments

CREATE PROCEDURE test_proc5(INOUT a text)
LANGUAGE pltcl
AS $$
set aa [concat $1 "+" $1]
return [list a $aa]
$$;

CALL test_proc5('abc');


CREATE PROCEDURE test_proc6(a intINOUT b intINOUT c int)
LANGUAGE pltcl
AS $$
set bb [expr $2 * $1]
set cc [expr $3 * $1]
return [list b $bb c $cc]
$$;

CALL test_proc6(234);


-- OUT parameters

CREATE PROCEDURE test_proc9(IN a intOUT b int)
LANGUAGE pltcl
AS $$
elog NOTICE "a: $1"
return [list b [expr {$1 * 2}]]
$$;

DO $$
DECLARE _a int; _b int;
BEGIN
  _a := 10; _b := 30;
  CALL test_proc9(_a, _b);
  RAISE NOTICE '_a: %, _b: %', _a, _b;
END
$$;


-- syntax error in result tuple

CREATE PROCEDURE test_proc10(INOUT a text)
LANGUAGE pltcl
AS $$
return [list a {$a + $a}])
$$;

CALL test_proc10('abc');


DROP PROCEDURE test_proc1;
DROP PROCEDURE test_proc2;
DROP PROCEDURE test_proc3;

DROP TABLE test1;

Messung V0.5 in Prozent
C=97 H=100 G=98

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-08-07) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002