As Ayesh says, I'm starting to feel like I need to provide a completely new
feature separately tbh…
The following issues are completely bugs and should at least be fixed.
https://github.com/php/php-src/issues/12581
Saki
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visi
Hi,
I think this is probably the same problem that Matteo ran into, but when using
emulate mode, pgsql errors out with code like this:
```
true,
],
);
$db->exec('CREATE TABLE test2 (val BOOLEAN)');
$stmt = $db->prepare('INSERT INTO test2 VALUES(:val)');
$stmt->bindValue(':val', 1, PDO::PA
Hi Hans,
> I think it'd be a good idea if they used FILTER_VALIDATE_BOOLEAN and
> FILTER_VALIDATE_INTEGER type logic, with an error if conversion fails..
This can be difficult. Forcing an error is highly likely to destroy the
existing user environment.
> I wonder if PDO::PARAM_BOOL_OR_NULL wou
Hi, Matteo
> Regarding this past issue with PostgreSQL, it can be solved by
> treating numbers larger than `int4` as `unknown` (as is the case now)
> rather than as `int8` (as in previous attempts).
I'm sorry, this was my mistake.
select 1::boolean ; -- returns `t`
select 1 = true ; -- `ERR
I couldn't express myself well in English, I'm sure my words were bad. sorry.
Saki
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
Hi, Matteo,
> The last time I tried to fix the PDO_PARAM_INT behavior on pdo_pgsql I broke
> Laravel and surely many other projects.
> https://github.com/php/php-src/pull/6801
Thank you for providing an important example.
Regarding this past issue with PostgreSQL, it can be solved by
treating n
I should have said that the spec was broken, not the code. By that logic, my PR
is probably broken as well. I did additional research on each DB to see if the
specs were broken.
Saki
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
Hi Matteo,
> I'm sure there are several bugs w/ types in PDO.
>
> Perhaps some can be fixed, but I would be very careful touching that part.
>
> The last time I tried to fix the PDO_PARAM_INT behaviour on pdo_pgsql I broke
> Laravel and surely many other projects.
>
> I'm afraid that most libr
I think it'd be a good idea if they used FILTER_VALIDATE_BOOLEAN and
FILTER_VALIDATE_INTEGER type logic, with an error if conversion fails..
I wonder if PDO::PARAM_BOOL_OR_NULL would be worthwhile
On Sun, Nov 5, 2023, 10:10 Saki Takamachi wrote:
> Hi,
>
> To think more deeply about this issue,
Hi Saki,
Il 04/11/2023 07:59, Saki Takamachi ha scritto:
Hi internals,
As shown in the following issue, the behavior of `PDO::PARAM_` is
inconsistent and I would like to fix this.
https://github.com/php/php-src/issues/12603
First, I tried fixed pdo_pgsql.
https://github.com/php/php-src/pu
Hi,
To think more deeply about this issue, I investigated various cases in major
databases. It's too big to write in an email, so I posted it in the comments of
the issue.
https://github.com/php/php-src/issues/12603#issuecomment-1793679776
Regards.
Saki
--
PHP Internals - PHP Runtime Developm
Hi Kentaro,
The case you presented certainly confuses us very much. Although it is outside
the scope of this discussion, it certainly seems like it would be better to
improve it from a safety perspective.
BOOL probably has the most problems; for example, when you pass str, the
boolean value wi
Hi, internals.
> As shown in the following issue, the behavior of `PDO::PARAM_` is
> inconsistent and I would like to fix this.
> https://github.com/php/php-src/issues/12603
I consider the current behavior a bug.
And some of them contain behaviors that are very confusing to users.
> It may b
Hi Hans,
Thank you, I will discuss it and improve it in a way that everyone is satisfied
with.
Saki
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
I had no idea PDO's PARAM_INT and PARAM_BOOL was so buggy, good catch!
On Sat, Nov 4, 2023, 07:59 Saki Takamachi wrote:
> Hi internals,
>
> As shown in the following issue, the behavior of `PDO::PARAM_` is
> inconsistent and I would like to fix this.
> https://github.com/php/php-src/issues/1
Hi, Ayesh,
I forgot to tell you one important thing.
Binding of parameters is not actually done in the `bind`method, but in the
`execute()` method. Therefore, when preparing a new method, a slightly larger
mechanism is required to determine which method the parameter was set through.
Regar
>
> Hi internals,
>
> As shown in the following issue, the behavior of `PDO::PARAM_` is
> inconsistent and I would like to fix this.
> https://github.com/php/php-src/issues/12603
>
> First, I tried fixed pdo_pgsql.
> https://github.com/php/php-src/pull/12605
>
> Eventually I plan to make simil
Hi internals,
As shown in the following issue, the behavior of `PDO::PARAM_` is
inconsistent and I would like to fix this.
https://github.com/php/php-src/issues/12603
First, I tried fixed pdo_pgsql.
https://github.com/php/php-src/pull/12605
Eventually I plan to make similar changes to all b
18 matches
Mail list logo