Home
last modified time | relevance | path

Searched refs:pg_query (Results 1 – 25 of 70) sorted by relevance

123

/php-src/ext/pgsql/tests/
H A D9999dropdb.phpt17 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 D01createdb.phpt17 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 Dpg_select_001.phpt15 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 D09notice.phpt25 $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 Dpg_update_001.phpt16 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 D06_bug73498.phpt15 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 D18pg_escape_bytea_hex.phpt18 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 D18pg_escape_bytea_esc.phpt15 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 Dbug64609.phpt19 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 Dbug37100.phpt17 @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 D18pg_escape_bytea_before.phpt18 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 Dbug37100_9.phpt18 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 D06copy_2.phpt15 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 Dpg_put_copy.phpt13 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 Dpg_delete_001.phpt16 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 D80_bug32223.phpt11 @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 D14pg_update_9.phpt18 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 D80_bug32223b.phpt11 @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 D17result.phpt15 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 D80_bug27597.phpt20 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 D15pg_delete.phpt15 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 Dpg_insert_001.phpt16 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 Dbug65119.phpt17 pg_query($connection, "BEGIN");
18 pg_query($connection, "CREATE TABLE {$table_name} (i INTEGER)");
20 pg_query($connection, "ROLLBACK");
H A D06copy.phpt14 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 D16pg_result_status.phpt13 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}");

Completed in 21 milliseconds

123