php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61805 Does not behave as expected when NOTICE issued
Submitted: 2012-04-22 00:28 UTC Modified: 2012-04-22 00:32 UTC
From: keiouu at gmail dot com Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 5.3.10 OS: Ubuntu 12.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
19 - 12 = ?
Subscribe to this entry?

 
 [2012-04-22 00:28 UTC] keiouu at gmail dot com
Description:
------------
Hello,

I have the following script:

pg_query("DROP SEQUENCE IF EXISTS test_seq;");

Have also tried:

pg_query('DROP SEQUENCE IF EXISTS "test_seq";');

Both issue warnings:

E_WARNING: pg_query(): Query failed: ERROR:  relation "test_seq" does not exist 
in /home/keiouu/tikapot/framework/databases/postgres.php on line 64
Exception 1!


Which would be fine but I have set:

pgsql.ignore_notice = 1


A phpinfo confirmed that it is set.

As there is no easy way of seeing if a sequence exists (that I know of) I don't 
believe any warning should be issued.

Test script:
---------------
pg_query("DROP SEQUENCE IF EXISTS test_seq;");

Expected result:
----------------
Nothing

Actual result:
--------------
E_WARNING: pg_query(): Query failed: ERROR:  relation "test_seq" does not exist 
in /home/keiouu/tikapot/framework/databases/postgres.php on line 64
Exception 1!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-22 00:32 UTC] keiouu at gmail dot com
It was an issue with my setup, one worker hadnt been restarted to get the new 
configuration.
 [2012-04-22 00:32 UTC] keiouu at gmail dot com
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 10:01:26 2024 UTC