-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug] 73498 Incorrect SQL generated for pg_copy_to() #2214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Please add a test. Thanks. |
@duncan3dc I suppose it does, it is just good to have a test specific for this for each bug fix so it is easier to find any regressions that may occur later on :) |
@KalleZ Thinking about it further, I think this change should standalone from the bug. I think something else is causing the bug, and the error message is slightly misleading |
@duncan3dc nope, it doesn't. Please see the reproduce snippet in the ticket. The linked test uses a table name directly, that tells the difference. Thanks. |
@weltling I've changed this pr now to just be about updating the |
@duncan3dc but this is still the bugfix to 73498 :) So renaming the PR doesn't sound right. PostgreSQL before 7.3 just doesn't support the sub select syntax. But there are yet two syntax changes in the versions that we support. That's what we need to test, easy done with just modifying the other test. Thanks. |
Comment on behalf of krakjoe at php.net: labelling |
Postgres uses the DELIMITER keyword since 7.3 And WITH is no longer required/used
@weltling Sorry for the confusion, thanks for bearing with me. I've added a test and completed the bugfix now |
this change effectivly means that support with postgres < 7.3 was dropped, correct? if so, please mention it in the changelog. |
These PostgreSQL versions are already not supported in PHP, besides they're EOL. Thanks. |
@weltling What is the currently minimal supported version? If pgsql < 7.3 is not supported, there are probably some checks we can drop, e.g. going by config.m4 things like https://github.com/php/php-src/blob/master/ext/pgsql/config.m4#L75. (It would be nice in general if we could write down minimal versions for all libraries somewhere.) |
@nikic With PostgreSQL - to my current knowledge, the lowest supported in PHP is 8.1. For PHP 7.0 however, at least 9.3 is required for the proper 64-bit support. I was doing research some time ago because of another bug - even for the older EOL'd CentOS, RPMs for PG < 7.3 are not provided officially anymore https://yum.postgresql.org/repopackages.php . So lower than 7.3 is for sure out of question. Absolutely, having a list of versions defined would be useful. I used to maintain that wiki page for Windows libs https://wiki.php.net/internals/windows/libs , but now it just screams for update as I'd have to kill a half of a day to actualize it :) Meantime, there's also another approach, that i prepare for the dep update automation new SDK http://windows.php.net/downloads/php-sdk/deps/series/ , so it's more or less tracked. Except we in general try to maintain the wide compat, it seems to be hard. The most exts have no dedicated maintainers, who would know fine details. Nowadays, with a small exception, contributors are not concentrated on wider spectrum. And it's more about fixing issues, than tracking new features and versions :( Some initiative could be started, to maintain such a list globally, i'm just not sure it wouldn't end up in some unmaintained state as well. Thanks. |
Typo : "contributors ARE concentrated on wider spectrum" :) |
@weltling Maybe we could add another row to EXTENSIONS called for example DEPENDENCIES where would be the lowest supported version. Even if it ends up outdated, it will be clear that some versions are not supported so it might useful anyway. Just an idea... |
Postgres uses the
DELIMITER
keyword since 7.3 (released in 2002).All currently supported versions of postgres support
DELIMITER
so I don't think there's any reason to still useDELIMITERS