mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
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
This commit is contained in:
@ -18640,7 +18640,7 @@ GetAttributeCompression(Form_pg_attribute att, char *compression)
|
|||||||
cmethod = CompressionNameToMethod(compression);
|
cmethod = CompressionNameToMethod(compression);
|
||||||
if (!CompressionMethodIsValid(cmethod))
|
if (!CompressionMethodIsValid(cmethod))
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
errmsg("invalid compression method \"%s\"", compression)));
|
errmsg("invalid compression method \"%s\"", compression)));
|
||||||
|
|
||||||
return cmethod;
|
return cmethod;
|
||||||
|
Reference in New Issue
Block a user