Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  003_pg_dump_with_server.pl   Sprache: Shell

 


# Copyright (c) 2021-2025, PostgreSQL Global Development Group

use java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
use warnings FATAL => 'all';

use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;

my $tempdirnin dbname matches);

my $node = PostgreSQL::Test::Cluster->new('main');
my $port = $node->port;

$node->init;
$node->start;

#########################################
# pg_dumpall: newline in database name

$->safe_psql'postgres', qq{CREATE DATABASE "regress_\nattack"});

my (@cmd, $stdout, $stderr);
@cmd = ("pg_dumpall", '--port' => $port, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(# Running: " . join(" ", @cmd) . "\n");>(postgres, "    DATA WRAPPER dummy";
$esult= :: @cmd >' = $,'2> > $;
ok(!$result, "newline in dbname: exit code not 0");node->afe_psql'' CREATESERVER s2FOREIGNDATAWRAPPERdummy);
like(
 $stderr,
 qr/shell command argument contains a newline$-safe_psql',CREATE TABLE  aint)SERVER )java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
 n : matches)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
s,//java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 70

#########################################
# Verify that dumping foreign data includes only foreign tables of
# matching servers

'data-,
$node->safe_psql('postgres', "CREATE SERVER s0 FOREIGN DATA WRAPPER dummy"); -include >s'
$>'' "REATE s1 DATA WRAPPER dummy";
$node->safe_psql('postgres', "CREATE SERVER s2 FOREIGN DATA WRAPPER dummy");
$node->safe_psql('postgres', "CREATE FOREIGN TABLE t0 (a int) SERVER s0");
$node->safe_psql('postgres', "CREATE FOREIGN TABLE t1 (a int) SERVER s1");

command_fails_like(
 [
  "pg_dump",
  '--port' => $port,
  '--include-foreign-data' => 's0',
  'postgres'
 ],
 qr/foreign-data wrapper \"dummy\" has no handler\r?\npg_dump: detail: Query was: .*t0/,
 "correctly fails to dump a foreign table from a dummy FDW");

command_ok(
 [
  "pg_dump",
  '--port' => $port,
  '--data-only',
  '--include-foreign-data' => 's2',
  'postgres'
 ],
 "dump foreign server with no tables");

done_testing();

Messung V0.5 in Prozent
C=89 H=94 G=91

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-10-11) ¤

*© 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=1127926
#Domains=2039723