Re: Patch: Use notices in PDO
| From: | Samuel ROZE | Date: | Fri, 09 Oct 2009 12:06:01 +0000 |
| Subject: | Re: Patch: Use notices in PDO | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-45706@lists.php.net to get a copy of this message | ||
Well, if I understood, DBMS_OUTPUT returns user's notices or warning,
but no errors ?
In the standart way, in console, how the notices are printed ?
Is DBMS_OUTPUT used both by Pl/SQL function and Oracle functions?
Thanks.
Samuel.
2009/10/9 Christopher Jones <christopher.jones@oracle.com>:
>
> Samuel ROZE wrote:
>> It's a good idea.
>>
>> - PDO::NOTICES_FETCH -> PDO::NOTICES_ENABLED
>> - PDO::NOTICES_NONE -> PDO::NOTICES_DISABLED
>>
>> That's better ?
>
> That works.
>
>> I see that you are from the Oracle team. Can you explain me how oracle
>> works to raise notices like PostgreSQL ? Or can you build a proof of
>> concept to get notices from Oracle ?
>
> I'm equating your NOTICES to Oracle's DBMS_OUTPUT. See "Getting
> Output with DBMS_OUTPUT" on p 181 of:
>
>
> http://www.oracle.com/technology/tech/php/underground-php-oracle-manual.html
>
> Something similar could be coded in the PDO driver.
>
> The amount of text output could be quite large, depending on the
> user's coding style. Is your design extensible enough to allow for
> streaming/chunking if the interface needs to be enhanced?
>
> PL/SQL also has compile time warnings and errors that are handled
> differently, see "PL/SQL Success With Information Warnings" on p167.
>
> Chris
>
>
>>
>> Thanks.
>> Samuel.
>>
>> Le jeudi 08 octobre 2009 à 15:22 -0700, Christopher Jones a écrit :
>>> Samuel ROZE wrote:
>>>> Hi,
>>>>
>>>> I've make a patch which insert notices concepts to PDO. It create:
>>>> - PDO::noticeInfo() - to be like errorInfo
>>>> - PDO::ATTR_LOG_NOTICES, the name of the PDO parameter
>>>> - PDO::NOTICES_FETCH - fetch notices
>>> I initially took "FETCH" to mean it was related to a query; this
>>> wouldn't always be the case. What about calling it NOTICES_ENABLE?
>>>
>>> Chris
>>>
>>
>>
>
> --
> Blog: http://blogs.oracle.com/opal
> Twitter: http://twitter.com/ghrd
>