Reject invalid databases in pg_get_database_ddl()

An invalid database has datconnlimit set to -2.  pg_get_database_ddl()
emits this verbatim as CONNECTION LIMIT = -2, which ALTER DATABASE
rejects.  Error out early instead.

Reported-by: Lakshmi N <[email protected]>
Author: Lakshmi N <[email protected]>
Reviewed-by: Amit Langote <[email protected]>
Reviewed-by: Euler Taveira <[email protected]>
Reviewed-by: Hu Xunqi <[email protected]>
Discussion: 
https://postgr.es/m/ca+3i_m8m1k2gfch+tu0jmaqh9frv+pfrftxdrjo+bqmwstm...@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cda0c4c5d6f581cddaa24cde02c583d1c8f5521d

Modified Files
--------------
src/backend/utils/adt/ddlutils.c | 10 ++++++++++
1 file changed, 10 insertions(+)

Reply via email to