git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c6a01d9)
Fix incorrect error code for CREATE/ALTER TABLE COMPRESSION
Sat, 8 May 2021 01:18:05 +0000 (10:18 +0900)
Sat, 8 May 2021 01:18:05 +0000 (10:18 +0900)
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


diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 3b5d41168391837cbee53e58e6087ac54f5d6a70..591bf01189b113a0feaa99e3366dd3c5156e8a4f 100644 (file)
--- 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;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /