[Asterisk-code-review] cdr_pgsql cel_pgsql res_config_pgsql: compatibility with PostgreSQL 12 (...asterisk[13])

Joshua Colp asteriskteam at digium.com
Wed Oct 9 08:10:13 CDT 2019


Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13023 )

Change subject: cdr_pgsql cel_pgsql res_config_pgsql: compatibility with PostgreSQL 12
......................................................................


Patch Set 1:

> Patch Set 1:
> 
> > So my only concern is that 13 and 16 are LTS releases and we probably shouldn't break support for older (even EOL) versions of PostgreSQL.
> 
> I'd argue that even if we tried to support that old PostgreSQL versions, we'd have a hard time testing that, as there could be significant effort involved (make old postgresql compile on new OS, find old OS, ...) to even get a server that old.
> 
> > All 3 of the affected modules call PQserverVersion() at some point to determine the version of the server. Could we do the same here to ensure backwards compatibility?
> 
> Let's see: we don't have to care about servers "7.3 and older", as they already have their own SQL statement and I didn't touch that. Digging the old docs, I see that version 7.4 already has pg_attrdef.adbin and pg_get_expr():
>  - https://www.postgresql.org/docs/7.4/catalog-pg-attrdef.html
>  - https://www.postgresql.org/docs/7.4/functions-misc.html#FUNCTIONS-MISC-CATALOG-TABLE
> so at least in theory, the code should work. (The documentation of function pg_get_expr() has been moved around - it's now in "System Information Functions" https://www.postgresql.org/docs/12/functions-info.html#FUNCTIONS-INFO-CATALOG-TABLE and the automatic references across PostgreSQL releases doesn't work in that case). My initial assumption that the code wouldn't work seems to be wrong (just didn't find the relevant docs), but for testing that... see above.

I think based on your research it seems safe within the range of versions the change is used against.


-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13023
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I834cb3addf1937e19e87ede140bdd16cea531ebe
Gerrit-Change-Number: 13023
Gerrit-PatchSet: 1
Gerrit-Owner: Christoph Moench-Tegeder <cmt at burggraben.net>
Gerrit-Reviewer: Christoph Moench-Tegeder <cmt at burggraben.net>
Gerrit-Reviewer: Friendly Automation
Gerrit-CC: Joshua Colp <jcolp at digium.com>
Gerrit-CC: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Wed, 09 Oct 2019 13:10:13 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191009/ced92d81/attachment.html>


More information about the asterisk-code-review mailing list