/php-src/ext/pgsql/tests/ |
H A D | 9999dropdb.phpt | 17 pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)"); 18 pg_query($db, "CREATE TABLE {$table_name_92} (textary text[], jsn json)"); 19 pg_query($db, "CREATE VIEW {$view_name} as SELECT * FROM {$table_name}"); 21 pg_query($db, "DROP VIEW {$view_name}"); 22 pg_query($db, "DROP TABLE {$table_name}"); 23 pg_query($db, "DROP TABLE {$table_name_92}"); 36 pg_query($db, "DROP VIEW IF EXISTS {$view_name}"); 37 pg_query($db, "DROP TABLE IF EXISTS {$table_name}"); 38 pg_query($db, "DROP TABLE IF EXISTS {$table_name_92}");
|
H A D | 01createdb.phpt | 17 if (!($q = @pg_query($db, "SELECT * FROM ".$table_name)) || !@pg_num_rows($q)) 19 pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)"); // Create table here 26 if (version_compare($v['server'], '9.2', '>=') && (!($q = @pg_query($db, "SELECT * FROM ".$table_na… 28 pg_query($db, "CREATE TABLE {$table_name_92} (textary text[], jsn json)"); // Create table here 35 pg_query($db, "CREATE VIEW {$view_name} AS SELECT * FROM {$table_name}"); 48 pg_query($db, "DROP TABLE IF EXISTS {$table_name} cascade"); 49 pg_query($db, "DROP TABLE IF EXISTS {$table_name_92} cascade");
|
H A D | pg_select_001.phpt | 15 pg_query($conn, "CREATE SCHEMA {$schema_name}"); 17 pg_query($conn, "CREATE TABLE {$schema_name}.foo (id INT, id2 INT)"); 18 pg_query($conn, "INSERT INTO {$schema_name}.foo VALUES (1,2)"); 19 pg_query($conn, "INSERT INTO {$schema_name}.foo VALUES (2,3)"); 21 pg_query($conn, "CREATE TABLE {$schema_name}.bar (id4 INT, id3 INT)"); 22 pg_query($conn, "INSERT INTO {$schema_name}.bar VALUES (4,5)"); 23 pg_query($conn, "INSERT INTO {$schema_name}.bar VALUES (6,7)"); 54 pg_query($conn, "DROP TABLE IF EXISTS {$schema_name}.foo"); 55 pg_query($conn, "DROP TABLE IF EXISTS {$schema_name}.bar"); 56 pg_query($conn, "DROP SCHEMA IF EXISTS {$schema_name}");
|
H A D | 09notice.phpt | 25 $res = pg_query($db, 'SET client_min_messages TO NOTICE;'); 32 pg_query($db, "BEGIN;"); 33 pg_query($db, "BEGIN;"); 34 pg_query($db, "BEGIN;"); 35 pg_query($db, "BEGIN;"); 60 Notice: pg_query(): %s already a transaction in progress in %s on line %d 62 Notice: pg_query(): %s already a transaction in progress in %s on line %d 64 Notice: pg_query(): %s already a transaction in progress in %s on line %d
|
H A D | pg_update_001.phpt | 16 pg_query($conn, "CREATE SCHEMA {$schema_name}"); 18 pg_query($conn, "CREATE TABLE {$table_name} (id INT, id2 INT)"); 19 pg_query($conn, "CREATE TABLE {$schema_name}.{$table_name} (id INT, id2 INT)"); 31 $rs = pg_query($conn, "SELECT * FROM {$table_name} UNION SELECT * FROM {$schema_name}.{$table_name}… 45 pg_query($conn, "DROP TABLE IF EXISTS {$table_name}"); 46 pg_query($conn, "DROP TABLE IF EXISTS {$schema_name}.{$table_name}"); 47 pg_query($conn, "DROP SCHEMA IF EXISTS {$schema_name}");
|
H A D | 06_bug73498.phpt | 15 pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)"); 16 pg_query($db, "CREATE VIEW {$view_name} as SELECT * FROM {$table_name}"); 17 pg_query($db, "INSERT INTO {$table_name} DEFAULT VALUES"); 32 pg_query($db, "DROP VIEW IF EXISTS {$view_name}"); 33 pg_query($db, "DROP TABLE IF EXISTS {$table_name}");
|
H A D | 18pg_escape_bytea_hex.phpt | 18 pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)"); 20 @pg_query($db, "SET bytea_output = 'hex'"); 25 pg_query($db, 'INSERT INTO '.$table_name.' (num, bin) VALUES (9876, \''.$esc_image.'\');'); 26 $result = pg_query($db, 'SELECT * FROM '.$table_name.' WHERE num = 9876'); 43 pg_query($db, "DROP TABLE IF EXISTS {$table_name}");
|
H A D | 18pg_escape_bytea_esc.phpt | 15 pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)"); 17 @pg_query($db, "SET bytea_output = 'escape'"); 22 pg_query($db, 'INSERT INTO '.$table_name.' (num, bin) VALUES (9876, \''.$esc_image.'\');'); 23 $result = pg_query($db, 'SELECT * FROM '.$table_name.' WHERE num = 9876'); 40 pg_query($db, "DROP TABLE IF EXISTS {$table_name}");
|
H A D | bug64609.phpt | 19 pg_query($db, "BEGIN"); 20 pg_query($db, "CREATE TYPE {$type_name} AS ENUM ('ok', 'ko')"); 21 pg_query($db, "CREATE TABLE {$table_name} (a {$type_name})"); 26 pg_query($db, "ROLLBACK");
|
H A D | bug37100.phpt | 17 @pg_query("SET bytea_output = 'escape'"); 19 pg_query("CREATE TABLE {$table_name} (binfield byteA) ;"); 20 pg_query("INSERT INTO {$table_name} VALUES (decode('0103AA000812','hex'))"); 23 $data = pg_query("SELECT binfield FROM {$table_name}"); 30 $data = pg_query($sql); 44 pg_query("DROP TABLE IF EXISTS {$table_name}");
|
H A D | 18pg_escape_bytea_before.phpt | 18 pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)"); 20 @pg_query($db, "SET bytea_output = 'escape'"); 22 pg_query($db, 'INSERT INTO '.$table_name.' (num, bin) VALUES (9876, E\''.$esc_image.'\');'); 23 $result = pg_query($db, 'SELECT * FROM '.$table_name.' WHERE num = 9876'); 40 pg_query($db, "DROP TABLE IF EXISTS {$table_name}");
|
H A D | bug37100_9.phpt | 18 pg_query($db, "CREATE TABLE {$table_name} (binfield byteA) ;"); 19 pg_query($db, "INSERT INTO {$table_name} VALUES (decode('0103AA000812','hex'))"); 22 $data = pg_query($db, "SELECT binfield FROM {$table_name}"); 29 $data = pg_query($db, $sql); 48 pg_query($db, "DROP TABLE IF EXISTS {$table_name}");
|
H A D | 06copy_2.phpt | 15 pg_query($db, "CREATE TABLE {$table_name} (x int)"); 17 pg_query($db, "COPY {$table_name} FROM STDIN"); 24 var_dump(pg_fetch_all_columns(pg_query($db, "SELECT * FROM {$table_name} ORDER BY 1"))); 32 pg_query($db, "DROP TABLE IF EXISTS {$table_name}");
|
H A D | pg_put_copy.phpt | 13 pg_query($db, "CREATE TABLE copystdin(id int, val text)"); 14 pg_query($db, "COPY copystdin(id, val) FROM STDIN"); 23 var_dump(pg_fetch_all(pg_query($db, "SELECT * FROM copystdin ORDER BY id"))); 28 pg_query($db, "COPY copystdin(id, val) FROM STDIN"); 34 var_dump(pg_fetch_all(pg_query($db, "SELECT * FROM copystdin ORDER BY id"))); 41 pg_query($db, "DROP TABLE IF EXISTS copystdin");
|
H A D | pg_delete_001.phpt | 16 pg_query($conn, "CREATE SCHEMA {$schema_name}"); 18 pg_query($conn, "CREATE TABLE {$table_name} (id INT, id2 INT)"); 19 pg_query($conn, "CREATE TABLE {$schema_name}.{$table_name} (id INT, id2 INT)"); 39 var_dump(pg_fetch_all(pg_query($conn, "SELECT * FROM {$table_name}"))); 40 var_dump(pg_fetch_all(pg_query($conn, "SELECT * FROM {$schema_name}.{$table_name}"))); 55 pg_query($conn, "DROP TABLE IF EXISTS {$table_name}"); 56 pg_query($conn, "DROP TABLE IF EXISTS {$schema_name}.{$table_name}"); 57 pg_query($conn, "DROP SCHEMA IF EXISTS {$schema_name}");
|
H A D | 80_bug32223.phpt | 11 @pg_query($conn, "CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL'"); 12 $res = @pg_query($conn, "CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean AS ' 35 $res = pg_query($dbh, "CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean AS ' 42 $res = pg_query($dbh, 'SET client_min_messages TO NOTICE;'); 44 $res = pg_query($dbh, 'SELECT test_notice()');
|
H A D | 14pg_update_9.phpt | 18 pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)"); 19 pg_query($db, "INSERT INTO {$table_name} VALUES(1, 'ABC', null)"); 20 pg_query($db, "INSERT INTO {$table_name} VALUES(1, 'ABC', null)"); 22 pg_query($db, "SET standard_conforming_strings = 0"); 39 pg_query($db, "DROP TABLE IF EXISTS {$table_name}");
|
H A D | 80_bug32223b.phpt | 11 @pg_query($conn, "CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL'"); 12 $res = @pg_query($conn, "CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean AS ' 35 $res = pg_query($dbh, "CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean AS ' 42 $res = pg_query($dbh, 'SET client_min_messages TO NOTICE;'); 46 $res = pg_query($dbh, 'SELECT test_notice()');
|
H A D | 17result.phpt | 15 pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)"); 16 pg_query($db, "INSERT INTO {$table_name} VALUES(1, 'ABC', null)"); 17 pg_query($db, "INSERT INTO {$table_name} VALUES(1, 'ABC', null)"); 20 $result = pg_query($db, $sql) or die('Cannot query db'); 38 pg_query($db, "DROP TABLE IF EXISTS {$table_name}");
|
H A D | 80_bug27597.phpt | 20 pg_query($dbh, "CREATE TABLE {$table_name} (id INT)"); 23 pg_query($dbh, "INSERT INTO {$table_name} (id) VALUES ($i)"); 31 $res = pg_query($dbh, "SELECT * FROM {$table_name}"); 50 pg_query($dbh, "DROP TABLE IF EXISTS {$table_name}");
|
H A D | 15pg_delete.phpt | 15 pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)"); 16 pg_query($db, "INSERT INTO {$table_name} VALUES(1, 'ABC', null)"); 17 pg_query($db, "INSERT INTO {$table_name} VALUES(1, 'ABC', null)"); 36 pg_query($db, "DROP TABLE IF EXISTS {$table_name}");
|
H A D | pg_insert_001.phpt | 16 pg_query($conn, "CREATE SCHEMA {$schema_name}"); 17 pg_query($conn, "CREATE TABLE {$schema_name}.{$table_name} (id INT, id2 INT)"); 36 pg_query($conn, "DROP TABLE IF EXISTS {$schema_name}.{$table_name}"); 37 pg_query($conn, "DROP SCHEMA IF EXISTS {$schema_name}");
|
H A D | bug65119.phpt | 17 pg_query($connection, "BEGIN"); 18 pg_query($connection, "CREATE TABLE {$table_name} (i INTEGER)"); 20 pg_query($connection, "ROLLBACK");
|
H A D | 06copy.phpt | 14 pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)"); 18 pg_query($db, "DELETE FROM $table_name"); 31 pg_query($db, "DROP TABLE IF EXISTS {$table_name}");
|
H A D | 16pg_result_status.phpt | 13 pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)"); 16 $result = pg_query($db, "BEGIN;END"); 27 pg_query($db, "DROP TABLE IF EXISTS {$table_name}");
|