Skip to content

Commit 9681f21

Browse files
committed
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
1 parent c6a01d9 commit 9681f21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/commands/tablecmds.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -18640,7 +18640,7 @@ GetAttributeCompression(Form_pg_attribute att, char *compression)
1864018640
cmethod = CompressionNameToMethod(compression);
1864118641
if (!CompressionMethodIsValid(cmethod))
1864218642
ereport(ERROR,
18643-
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
18643+
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1864418644
errmsg("invalid compression method \"%s\"", compression)));
1864518645

1864618646
return cmethod;

0 commit comments

Comments
 (0)