VACUUM (PARALLEL) option processing not using DefElem the way it was intended - Mailing list pgsql-hackers

From David Rowley
Subject VACUUM (PARALLEL) option processing not using DefElem the way it was intended
Date
Msg-id CAApHDvovH14tNWB+WvP6TSbfi7-=TysQ9h5tQ5AgavwyWRWKHA@mail.gmail.com
Whole thread Raw
Responses Re: VACUUM (PARALLEL) option processing not using DefElem the way it was intended
List pgsql-hackers
I was just looking at the VACUUM option processing and I saw that the
code to process the PARALLEL option doesn't make use of the code in
defGetInt32() that's meant to handle empty and non-integer parameters.
ExecVacuum() has code to handle an empty PARALLEL parameters, but not
non-integer ones. That goes through to defGetInt32().

# vacuum (parallel 'bananas') pg_class;
ERROR:  parallel requires an integer value

I feel if we're going to show that message for non-integer, then why
not the same one for empty parameter rather than handling that with a
custom message in the caller.

The attached is what I had in mind.

David

Attachment

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Logical Replication of sequences
Next
From: Tomas Vondra
Date:
Subject: Re: Should we update the random_page_cost default value?