You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation of the parameter rows of the function pg_copy_from: "Values should be linefeed terminated." So the first code block should be accepted.
With PHP 8.1, both code blocks produce no output as expected.
I have not tested PHP 8.2 and PHP 8.3.
With PHP 8.4, the error above appears as a regression.
PHP Version
PHP 8.4.5
Operating System
Alma Linux 9
The text was updated successfully, but these errors were encountered:
pg_copy_to() produces arrays of records that do include linefeeds.
So now pg_copy_from() cannot handle output from pg_copy_to().
Nor can it handle output from file().
So there are multiple reasons to restore the old behaviour.
Thanks in advance to everyone looking into this issue.
Description
After creating a PostgreSQL table with:
The following code:
Resulted in this output:
But I expected no output instead.
As the error messages indicates: Although I have given only one row of data, PostgreSQL sees two rows.
The following code, however (note the missing linefeed in the array element), applied to the same database:
Resulted in no output, as expected.
According to the documentation of the parameter
rows
of the functionpg_copy_from
: "Values should be linefeed terminated." So the first code block should be accepted.With PHP 8.1, both code blocks produce no output as expected.
I have not tested PHP 8.2 and PHP 8.3.
With PHP 8.4, the error above appears as a regression.
PHP Version
PHP 8.4.5
Operating System
Alma Linux 9
The text was updated successfully, but these errors were encountered: