PostgreSQL-For-Wordpress / postgresql-for-wordpress

A maintained fork of https://wordpress.org/plugins/postgresql-for-wordpress/
GNU General Public License v2.0
209 stars 68 forks source link

Make int size replacements more robust. #90

Closed mattbucci closed 5 months ago

mattbucci commented 6 months ago

In Alter and Create Table rewriters there are lines like the following

        ' bigint(40)'   => ' bigint',
        ' bigint(20)'   => ' bigint',
        ' bigint(10)'   => ' int',
        ' int(11)'      => ' int',
        ' int(10)'      => ' int',

Instead these should be aliased 1 by one and the numeric should be arbitrary, so bigint(x) becomes bigint The full list of numeric types can be found here: https://www.postgresql.org/docs/current/datatype-numeric.html