postgres.git / summary / log / commit / refs

commit    ec13f71049cda06ea55a67783b822d98824f4d15
Author:   Nathan Bossart <nathan@postgresql.org>
Date:     Sat Aug 29 15:23:23 2026 +0000
First released in: 19.0

    Disallow ONLY in REPACK commands.
    
    The REPACK grammar accepts ONLY before the table name and * after
    the table name, but that's neither documented nor handled in the
    code.  Perhaps REPACK should support that syntax, but for now let's
    just bring it in line with its documentation.
    
    Oversight in commit ac58465e06.
    
    Reviewed-by: Antonin Houska <ah@cybertec.at>
    Discussion: https://postgr.es/m/apBTsWGwkLXVh8Ow%40nathan
    Backpatch-through: 19


src/backend/parser/gram.y | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index a33c3aaeeb2..2df39a48fc6 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -12543,25 +12543,25 @@ CreateConversionStmt: *****************************************************************************/ RepackStmt: - REPACK opt_utility_option_list vacuum_relation USING INDEX name + REPACK opt_utility_option_list qualified_name opt_name_list USING INDEX name { RepackStmt *n = makeNode(RepackStmt); n->command = REPACK_COMMAND_REPACK; - n->relation = (VacuumRelation *) $3; - n->indexname = $6; + n->relation = makeVacuumRelation($3, InvalidOid, $4); + n->indexname = $7; n->usingindex = true; n->params = $2; $$ = (Node *) n; } - | REPACK opt_utility_option_list vacuum_relation opt_usingindex + | REPACK opt_utility_option_list qualified_name opt_name_list opt_usingindex { RepackStmt *n = makeNode(RepackStmt); n->command = REPACK_COMMAND_REPACK; - n->relation = (VacuumRelation *) $3; + n->relation = makeVacuumRelation($3, InvalidOid, $4); n->indexname = NULL; - n->usingindex = $4; + n->usingindex = $5; n->params = $2; $$ = (Node *) n; }