Skip to content

Raise ext/pgsql requirements to PostGreSQL 7.4 #5611

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

Closed
wants to merge 5 commits into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented May 22, 2020

We can safely assume that users have at the very least libpq 7.4, for
which official support ended on 2010-10-01; even CentOS 6 has 8.4 now.
It is also noteworthy that PDO_PGSQL already requires libpq 7.4 or
later.


While having a closer look at removing the PG_VERSION dependency, I noticed that some of the code for older versions did version comparisions using PG_VERSION; these are gone with this patch, paving the way forward.

I wouldn't mind to even require libpq 9.1, though.

We can safely assume that users have at the very least libpq 7.4, for
which official support ended on 2010-10-01; even CentOS 6 has 8.4 now.
It is also noteworthy that PDO_PGSQL already requires libpq 7.4 or
later.
oid = PQoidValue(pgsql_result);
if (oid == InvalidOid) {
RETURN_FALSE;
}
PGSQL_RETURN_OID(oid);
#else
Z_STRVAL_P(return_value) = (char *) PQoidStatus(pgsql_result);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this code ever compiled with PHP 7, so requiring libpq 7.4 seems to be a no-brainer.

Too much copy pasta.
@cmb69
Copy link
Member Author

cmb69 commented May 22, 2020

cc @remicollet

Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a note to UPGRADING.

@nikic
Copy link
Member

nikic commented May 22, 2020

We can safely assume that users have at the very least libpq 7.4, for
which official support ended on 2010-10-01; even CentOS 6 has 8.4 now.
It is also noteworthy that PDO_PGSQL already requires libpq 7.4 or
later.

I'd also be happy with a followup that bumps pgsql + pdo_pgsql to 8.4. If even CentOS 6 has it, everyone has it :)

@remicollet
Copy link
Member

I'd also be happy with a followup that bumps pgsql + pdo_pgsql to 8.4.

Make sense

I wouldn't mind to even require libpq 9.1, though.

+1

Nobody serious will try to build PHP 8 on a so old distro providing some older version...

@cmb69
Copy link
Member Author

cmb69 commented May 22, 2020

Thanks! Applied as 4bc1d83.

I'll gladly follow up with another PR bumping the version further. :)

@cmb69 cmb69 closed this May 22, 2020
@cmb69 cmb69 deleted the cmb/pqsql-7.4 branch May 22, 2020 13:58
@nikic
Copy link
Member

nikic commented May 22, 2020

@remicollet Do you know since which version libpq ships with pkg-config file? We reverted the switch to pkg-config in PHP 7.4, but I wonder if it's okay to make it in PHP 8.0.

@cmb69
Copy link
Member Author

cmb69 commented May 22, 2020

According to a comment in ext/pgsql/config.m4, pkg-config is supported as of 9.3 (which seems to recent as minimum requirement for PHP 8; CentOS 7 is on 9.2 only).

@carusogabriel carusogabriel added this to the PHP 8.0 milestone May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants