mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Pre-beta mechanical code beautification.
Run pgindent, pgperltidy, and reformat-dat-files. This set of diffs is a bit larger than typical. We've updated to pg_bsd_indent 2.1.2, which properly indents variable declarations that have multi-line initialization expressions (the continuation lines are now indented one tab stop). We've also updated to perltidy version 20230309 and changed some of its settings, which reduces its desire to add whitespace to lines to make assignments etc. line up. Going forward, that should make for fewer random-seeming changes to existing code. Discussion: https://postgr.es/m/20230428092545.qfb3y5wcu4cm75ur@alvherre.pgsql
This commit is contained in:
@@ -4482,17 +4482,17 @@ EncodeInterval(struct pg_itm *itm, int style, char *str)
|
||||
case INTSTYLE_SQL_STANDARD:
|
||||
{
|
||||
bool has_negative = year < 0 || mon < 0 ||
|
||||
mday < 0 || hour < 0 ||
|
||||
min < 0 || sec < 0 || fsec < 0;
|
||||
mday < 0 || hour < 0 ||
|
||||
min < 0 || sec < 0 || fsec < 0;
|
||||
bool has_positive = year > 0 || mon > 0 ||
|
||||
mday > 0 || hour > 0 ||
|
||||
min > 0 || sec > 0 || fsec > 0;
|
||||
mday > 0 || hour > 0 ||
|
||||
min > 0 || sec > 0 || fsec > 0;
|
||||
bool has_year_month = year != 0 || mon != 0;
|
||||
bool has_day_time = mday != 0 || hour != 0 ||
|
||||
min != 0 || sec != 0 || fsec != 0;
|
||||
min != 0 || sec != 0 || fsec != 0;
|
||||
bool has_day = mday != 0;
|
||||
bool sql_standard_value = !(has_negative && has_positive) &&
|
||||
!(has_year_month && has_day_time);
|
||||
!(has_year_month && has_day_time);
|
||||
|
||||
/*
|
||||
* SQL Standard wants only 1 "<sign>" preceding the whole
|
||||
|
||||
Reference in New Issue
Block a user