|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-12-08 14:44 UTC] ppo at beeznest dot net
Description: ------------ Hi, having the equivalent of pg_result_error for notice messages would be great. There is also a problem if a query raises several notice messages. Could it be possible to return an array instead of a string, at least if there are several ones? Thanks, Pascal PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 20:00:01 2025 UTC |
Currently, only the last notice message is stored by pgsql module. /* {{{ _php_pgsql_notice_handler */ static void _php_pgsql_notice_handler(void *resource_id, const char *message) { php_pgsql_notice *notice; TSRMLS_FETCH(); if (! PGG(ignore_notices)) { notice = (php_pgsql_notice *)emalloc(sizeof(php_pgsql_notice)); notice->message = _php_pgsql_trim_message(message, (int *)¬ice->len); if (PGG(log_notices)) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s", notice- >message); } zend_hash_index_update(&PGG(notices), (ulong)resource_id, (void **)¬ice, sizeof(php_pgsql_notice *), NULL); } } /* }}} */ Nested hash for notices is required.