postgres.git / summary / log / commit / refs

commit    9681f2160dcbe2a02fd2e2db2322ea204eff6562
Author:   Michael Paquier <michael@paquier.xyz>
Date:     Sat May 08 01:18:05 2021 +0000
First released in: 14.0

    Fix incorrect error code for CREATE/ALTER TABLE COMPRESSION
    
    Specifying an incorrect value for the compression method of an attribute
    caused ERRCODE_FEATURE_NOT_SUPPORTED to be raised as error.  Use instead
    ERRCODE_INVALID_PARAMETER_VALUE to be more consistent.
    
    Author: Dilip Kumar
    Discussion: https://postgr.es/m/CAFiTN-vH84fE-8C4zGZw4v0Wyh4Y2v=5JWg2fGE5+LPaDvz1GQ@mail.gmail.com


src/backend/commands/tablecmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 3b5d4116839..591bf01189b 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -18640,7 +18640,7 @@ GetAttributeCompression(Form_pg_attribute att, char *compression) cmethod = CompressionNameToMethod(compression); if (!CompressionMethodIsValid(cmethod)) ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("invalid compression method \"%s\"", compression))); return cmethod; [parent: c6a01d924939]