mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Phase 3 of pgindent updates.
Don't move parenthesized lines to the left, even if that means they flow past the right margin. By default, BSD indent lines up statement continuation lines that are within parentheses so that they start just to the right of the preceding left parenthesis. However, traditionally, if that resulted in the continuation line extending to the right of the desired right margin, then indent would push it left just far enough to not overrun the margin, if it could do so without making the continuation line start to the left of the current statement indent. That makes for a weird mix of indentations unless one has been completely rigid about never violating the 80-column limit. This behavior has been pretty universally panned by Postgres developers. Hence, disable it with indent's new -lpl switch, so that parenthesized lines are always lined up with the preceding left paren. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
This commit is contained in:
@ -545,7 +545,7 @@ DefineOpClass(CreateOpClassStmt *stmt)
|
||||
if (OidIsValid(storageoid))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||
errmsg("storage type specified more than once")));
|
||||
errmsg("storage type specified more than once")));
|
||||
storageoid = typenameTypeId(NULL, item->storedtype);
|
||||
|
||||
#ifdef NOT_USED
|
||||
@ -619,8 +619,8 @@ DefineOpClass(CreateOpClassStmt *stmt)
|
||||
errmsg("could not make operator class \"%s\" be default for type %s",
|
||||
opcname,
|
||||
TypeNameToString(stmt->datatype)),
|
||||
errdetail("Operator class \"%s\" already is the default.",
|
||||
NameStr(opclass->opcname))));
|
||||
errdetail("Operator class \"%s\" already is the default.",
|
||||
NameStr(opclass->opcname))));
|
||||
}
|
||||
|
||||
systable_endscan(scan);
|
||||
@ -1085,8 +1085,8 @@ assignOperTypes(OpFamilyMember *member, Oid amoid, Oid typeoid)
|
||||
if (!amroutine->amcanorderbyop)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||
errmsg("access method \"%s\" does not support ordering operators",
|
||||
get_am_name(amoid))));
|
||||
errmsg("access method \"%s\" does not support ordering operators",
|
||||
get_am_name(amoid))));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1142,7 +1142,7 @@ assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid)
|
||||
if (procform->prorettype != INT4OID)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||
errmsg("btree comparison procedures must return integer")));
|
||||
errmsg("btree comparison procedures must return integer")));
|
||||
|
||||
/*
|
||||
* If lefttype/righttype isn't specified, use the proc's input
|
||||
@ -1163,7 +1163,7 @@ assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid)
|
||||
if (procform->prorettype != VOIDOID)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||
errmsg("btree sort support procedures must return void")));
|
||||
errmsg("btree sort support procedures must return void")));
|
||||
|
||||
/*
|
||||
* Can't infer lefttype/righttype from proc, so use default rule
|
||||
|
Reference in New Issue
Block a user