Annotation of embedaddon/php/ext/pgsql/tests/80_bug39971.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #39971 (pg_insert/pg_update do not allow now() to be used for timestamp fields)
3: --SKIPIF--
4: <?php
5: require_once('skipif.inc');
6: ?>
7: --FILE--
8: <?php
9:
10: require_once('config.inc');
11:
12: $dbh = @pg_connect($conn_str);
13: if (!$dbh) {
14: die ("Could not connect to the server");
15: }
16:
17: pg_query("CREATE TABLE php_test (id SERIAL, tm timestamp NOT NULL)");
18:
19: $values = array('tm' => 'now()');
20: pg_insert($dbh, 'php_test', $values);
21:
22: $ids = array('id' => 1);
23: pg_update($dbh, 'php_test', $values, $ids);
24:
25: pg_query($dbh, "DROP TABLE php_test");
26: pg_close($dbh);
27: ?>
28: ===DONE===
29: --EXPECT--
30: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>