Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Postgres/src/pl/plpython/sql/   (The Python Language ©)  Datei vom 11.4.2026 mit Größe 772 B image not shown  

Quelle  plpython_quote.sql

  Sprache: SQL
 

-- test quoting functions

CREATE FUNCTION quote(t text, how text) RETURNS text AS $$
    if how == "literal":
        return plpy.quote_literal(t)
    elif how == "nullable":
        return plpy.quote_nullable(t)
    elif how == "ident":
        return plpy.quote_ident(t)
    else:
        raise plpy.Error("unrecognized quote type %s" % how)
$$ LANGUAGE plpython3u;

SELECT quote(t, 'literal'FROM (VALUES
       ('abc'),
       ('a''bc'),
       ('''abc'''),
       (''),
       (''''),
       ('xyzv')) AS v(t);

SELECT quote(t, 'nullable'FROM (VALUES
       ('abc'),
       ('a''bc'),
       ('''abc'''),
       (''),
       (''''),
       (NULL)) AS v(t);

SELECT quote(t, 'ident'FROM (VALUES
       ('abc'),
       ('a b c'),
       ('a " ''abc''')) AS v(t);

Messung V0.5 in Prozent
C=91 H=97 G=93

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

*© 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.