summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-12-29 00:34:30 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-12-29 00:34:30 +0000
commit79d524dc1e320cd38bbf6716f2f9f43df68cc037 (patch)
treebf6b827cf7bb54117c47560f9af80623b00e2884 /ext/pgsql/tests
parent2820e6c1faf174af4a432b8ca66bd82e3e2263c1 (diff)
downloadphp-git-79d524dc1e320cd38bbf6716f2f9f43df68cc037.tar.gz
Fixed bug #39971 (pg_insert/pg_update do not allow now() to be used for
timestamp fields).
Diffstat (limited to 'ext/pgsql/tests')
-rw-r--r--ext/pgsql/tests/80_bug39971.phpt30
1 files changed, 30 insertions, 0 deletions
diff --git a/ext/pgsql/tests/80_bug39971.phpt b/ext/pgsql/tests/80_bug39971.phpt
new file mode 100644
index 0000000000..45d26319d3
--- /dev/null
+++ b/ext/pgsql/tests/80_bug39971.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Bug #39971 (pg_insert/pg_update do not allow now() to be used for timestamp fields)
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+?>
+--FILE--
+<?php
+
+require_once('config.inc');
+
+$dbh = @pg_connect($conn_str);
+if (!$dbh) {
+ die ("Could not connect to the server");
+}
+
+pg_query("CREATE TABLE php_test (id SERIAL, tm timestamp NOT NULL)");
+
+$values = array('tm' => 'now()');
+pg_insert($dbh, 'php_test', $values);
+
+$ids = array('id' => 1);
+pg_update($dbh, 'php_test', $values, $ids);
+
+pg_query($dbh, "DROP TABLE php_test");
+pg_close($dbh);
+?>
+===DONE===
+--EXPECT--
+===DONE===