From c7b8998ebbf310a156aa38022555a24d98fdbfb4 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 21 Jun 2017 15:18:54 -0400 Subject: [PATCH] Phase 2 of pgindent updates. Change pg_bsd_indent to follow upstream rules for placement of comments to the right of code, and remove pgindent hack that caused comments following #endif to not obey the general rule. Commit e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89 wasn't actually using the published version of pg_bsd_indent, but a hacked-up version that tried to minimize the amount of movement of comments to the right of code. The situation of interest is where such a comment has to be moved to the right of its default placement at column 33 because there's code there. BSD indent has always moved right in units of tab stops in such cases --- but in the previous incarnation, indent was working in 8-space tab stops, while now it knows we use 4-space tabs. So the net result is that in about half the cases, such comments are placed one tab stop left of before. This is better all around: it leaves more room on the line for comment text, and it means that in such cases the comment uniformly starts at the next 4-space tab stop after the code, rather than sometimes one and sometimes two tabs after. Also, ensure that comments following #endif are indented the same as comments following other preprocessor commands such as #else. That inconsistency turns out to have been self-inflicted damage from a poorly-thought-through post-indent "fixup" in pgindent. 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 --- contrib/bloom/bloom.h | 6 +- contrib/btree_gist/btree_utils_num.h | 14 +- contrib/btree_gist/btree_utils_var.c | 2 +- contrib/btree_gist/btree_utils_var.h | 2 +- contrib/btree_gist/btree_uuid.c | 2 +- contrib/cube/cubedata.h | 8 +- contrib/dblink/dblink.c | 4 +- contrib/file_fdw/file_fdw.c | 8 +- contrib/fuzzystrmatch/dmetaphone.c | 8 +- contrib/hstore/hstore.h | 4 +- contrib/hstore/hstore_io.c | 2 +- contrib/intarray/_int.h | 2 +- contrib/intarray/_int_tool.c | 2 +- contrib/isn/isn.c | 14 +- contrib/isn/isn.h | 2 +- contrib/lo/lo.c | 4 +- contrib/ltree/ltree.h | 2 +- contrib/ltree/ltree_gist.c | 4 +- contrib/pageinspect/pageinspect.h | 2 +- contrib/pg_buffercache/pg_buffercache_pages.c | 2 +- contrib/pg_standby/pg_standby.c | 10 +- .../pg_stat_statements/pg_stat_statements.c | 20 +-- contrib/pg_trgm/trgm.h | 2 +- contrib/pg_trgm/trgm_regexp.c | 4 +- contrib/pgcrypto/crypt-des.c | 2 +- contrib/pgcrypto/imath.c | 20 +-- contrib/pgcrypto/imath.h | 28 ++-- contrib/pgcrypto/internal.c | 4 +- contrib/pgcrypto/mbuf.h | 2 +- contrib/pgcrypto/md5.h | 2 +- contrib/pgcrypto/pgp.h | 4 +- contrib/pgcrypto/px-crypt.h | 2 +- contrib/pgcrypto/px.h | 4 +- contrib/pgcrypto/rijndael.c | 4 +- contrib/pgcrypto/rijndael.h | 2 +- contrib/pgcrypto/sha1.h | 2 +- contrib/pgstattuple/pgstatindex.c | 2 +- contrib/postgres_fdw/option.c | 4 +- contrib/postgres_fdw/postgres_fdw.c | 20 +-- contrib/postgres_fdw/postgres_fdw.h | 2 +- contrib/sepgsql/label.c | 8 +- contrib/sepgsql/sepgsql.h | 2 +- contrib/spi/refint.c | 2 +- contrib/spi/timetravel.c | 2 +- contrib/tablefunc/tablefunc.c | 4 +- contrib/tablefunc/tablefunc.h | 2 +- contrib/tcn/tcn.c | 4 +- contrib/uuid-ossp/uuid-ossp.c | 4 +- contrib/xml2/xpath.c | 12 +- contrib/xml2/xslt_proc.c | 8 +- src/backend/access/brin/brin_pageops.c | 4 +- src/backend/access/brin/brin_revmap.c | 2 +- src/backend/access/common/heaptuple.c | 14 +- src/backend/access/common/printsimple.c | 4 +- src/backend/access/common/tupconvert.c | 4 +- src/backend/access/gin/ginbulk.c | 2 +- src/backend/access/gin/ginfast.c | 4 +- src/backend/access/gin/ginscan.c | 2 +- src/backend/access/gin/ginvacuum.c | 2 +- src/backend/access/gist/gist.c | 2 +- src/backend/access/gist/gistbuild.c | 2 +- src/backend/access/gist/gistbuildbuffers.c | 2 +- src/backend/access/gist/gistget.c | 2 +- src/backend/access/hash/hashfunc.c | 6 +- src/backend/access/hash/hashsearch.c | 4 +- src/backend/access/hash/hashutil.c | 2 +- src/backend/access/heap/heapam.c | 24 +-- src/backend/access/heap/hio.c | 2 +- src/backend/access/heap/pruneheap.c | 7 +- src/backend/access/heap/rewriteheap.c | 22 +-- src/backend/access/heap/tuptoaster.c | 2 +- src/backend/access/index/genam.c | 2 +- src/backend/access/index/indexam.c | 4 +- src/backend/access/nbtree/nbtinsert.c | 2 +- src/backend/access/nbtree/nbtree.c | 11 +- src/backend/access/nbtree/nbtsearch.c | 2 +- src/backend/access/nbtree/nbtsort.c | 10 +- src/backend/access/rmgrdesc/xlogdesc.c | 2 +- src/backend/access/spgist/spgdoinsert.c | 6 +- src/backend/access/spgist/spgscan.c | 2 +- src/backend/access/spgist/spgvacuum.c | 4 +- src/backend/access/transam/clog.c | 2 +- src/backend/access/transam/slru.c | 14 +- src/backend/access/transam/timeline.c | 2 +- src/backend/access/transam/twophase.c | 6 +- src/backend/access/transam/twophase_rmgr.c | 8 +- src/backend/access/transam/xact.c | 17 +-- src/backend/access/transam/xlog.c | 27 ++-- src/backend/access/transam/xloginsert.c | 8 +- src/backend/access/transam/xlogreader.c | 2 +- src/backend/bootstrap/bootstrap.c | 6 +- src/backend/catalog/aclchk.c | 2 +- src/backend/catalog/dependency.c | 22 +-- src/backend/catalog/heap.c | 30 ++-- src/backend/catalog/index.c | 38 ++--- src/backend/catalog/indexing.c | 4 +- src/backend/catalog/namespace.c | 14 +- src/backend/catalog/objectaddress.c | 17 +-- src/backend/catalog/partition.c | 2 +- src/backend/catalog/pg_aggregate.c | 36 ++--- src/backend/catalog/pg_constraint.c | 4 +- src/backend/catalog/pg_operator.c | 2 +- src/backend/catalog/pg_type.c | 8 +- src/backend/catalog/storage.c | 2 +- src/backend/commands/aggregatecmds.c | 22 +-- src/backend/commands/alter.c | 6 +- src/backend/commands/analyze.c | 12 +- src/backend/commands/async.c | 16 +- src/backend/commands/cluster.c | 2 +- src/backend/commands/collationcmds.c | 4 +- src/backend/commands/copy.c | 42 +++--- src/backend/commands/dbcommands.c | 4 +- src/backend/commands/event_trigger.c | 4 +- src/backend/commands/extension.c | 12 +- src/backend/commands/functioncmds.c | 10 +- src/backend/commands/indexcmds.c | 8 +- src/backend/commands/opclasscmds.c | 2 +- src/backend/commands/operatorcmds.c | 14 +- src/backend/commands/portalcmds.c | 2 +- src/backend/commands/proclang.c | 26 ++-- src/backend/commands/sequence.c | 8 +- src/backend/commands/tablecmds.c | 141 +++++++++--------- src/backend/commands/tablespace.c | 4 +- src/backend/commands/trigger.c | 35 +++-- src/backend/commands/tsearchcmds.c | 4 +- src/backend/commands/typecmds.c | 72 ++++----- src/backend/commands/user.c | 25 ++-- src/backend/commands/vacuumlazy.c | 6 +- src/backend/commands/view.c | 2 +- src/backend/executor/execExpr.c | 8 +- src/backend/executor/execExprInterp.c | 12 +- src/backend/executor/execIndexing.c | 2 +- src/backend/executor/execMain.c | 2 +- src/backend/executor/execTuples.c | 4 +- src/backend/executor/execUtils.c | 2 +- src/backend/executor/functions.c | 12 +- src/backend/executor/nodeAgg.c | 9 +- src/backend/executor/nodeBitmapHeapscan.c | 12 +- src/backend/executor/nodeBitmapIndexscan.c | 2 +- src/backend/executor/nodeBitmapOr.c | 2 +- src/backend/executor/nodeGather.c | 2 +- src/backend/executor/nodeGatherMerge.c | 2 +- src/backend/executor/nodeHash.c | 2 +- src/backend/executor/nodeHashjoin.c | 2 +- src/backend/executor/nodeIndexscan.c | 18 +-- src/backend/executor/nodeLockRows.c | 2 +- src/backend/executor/nodeMergejoin.c | 14 +- src/backend/executor/nodeModifyTable.c | 5 +- src/backend/executor/nodeSamplescan.c | 2 +- src/backend/executor/nodeSeqscan.c | 4 +- src/backend/executor/nodeSetOp.c | 2 +- src/backend/executor/nodeTidscan.c | 8 +- src/backend/executor/nodeWindowAgg.c | 4 +- src/backend/executor/spi.c | 14 +- src/backend/executor/tqueue.c | 4 +- src/backend/lib/ilist.c | 2 +- src/backend/libpq/auth.c | 40 ++--- src/backend/libpq/be-fsstubs.c | 2 +- src/backend/libpq/hba.c | 8 +- src/backend/libpq/ifaddr.c | 8 +- src/backend/libpq/pqcomm.c | 30 ++-- src/backend/main/main.c | 10 +- src/backend/nodes/equalfuncs.c | 2 +- src/backend/nodes/list.c | 2 +- src/backend/nodes/makefuncs.c | 4 +- src/backend/nodes/nodeFuncs.c | 26 ++-- src/backend/nodes/params.c | 2 +- src/backend/nodes/readfuncs.c | 5 +- src/backend/nodes/tidbitmap.c | 6 +- src/backend/optimizer/geqo/geqo_cx.c | 2 +- src/backend/optimizer/geqo/geqo_erx.c | 2 +- src/backend/optimizer/geqo/geqo_misc.c | 2 +- src/backend/optimizer/geqo/geqo_mutation.c | 2 +- src/backend/optimizer/geqo/geqo_ox1.c | 2 +- src/backend/optimizer/geqo/geqo_ox2.c | 2 +- src/backend/optimizer/geqo/geqo_pmx.c | 2 +- src/backend/optimizer/geqo/geqo_pool.c | 2 +- src/backend/optimizer/geqo/geqo_px.c | 2 +- .../optimizer/geqo/geqo_recombination.c | 2 +- src/backend/optimizer/path/allpaths.c | 8 +- src/backend/optimizer/path/clausesel.c | 4 +- src/backend/optimizer/path/costsize.c | 4 +- src/backend/optimizer/path/equivclass.c | 8 +- src/backend/optimizer/path/indxpath.c | 14 +- src/backend/optimizer/path/joinpath.c | 4 +- src/backend/optimizer/path/pathkeys.c | 2 +- src/backend/optimizer/plan/createplan.c | 16 +- src/backend/optimizer/plan/initsplan.c | 26 ++-- src/backend/optimizer/plan/planagg.c | 4 +- src/backend/optimizer/plan/planmain.c | 2 +- src/backend/optimizer/plan/planner.c | 12 +- src/backend/optimizer/plan/setrefs.c | 6 +- src/backend/optimizer/prep/prepjointree.c | 8 +- src/backend/optimizer/prep/preptlist.c | 6 +- src/backend/optimizer/util/clauses.c | 16 +- src/backend/optimizer/util/orclauses.c | 2 +- src/backend/optimizer/util/pathnode.c | 35 +++-- src/backend/optimizer/util/placeholder.c | 2 +- src/backend/optimizer/util/plancat.c | 6 +- src/backend/optimizer/util/predtest.c | 52 +++---- src/backend/optimizer/util/relnode.c | 8 +- src/backend/optimizer/util/restrictinfo.c | 4 +- src/backend/optimizer/util/tlist.c | 12 +- src/backend/optimizer/util/var.c | 4 +- src/backend/parser/analyze.c | 12 +- src/backend/parser/parse_agg.c | 2 +- src/backend/parser/parse_clause.c | 4 +- src/backend/parser/parse_coerce.c | 10 +- src/backend/parser/parse_collate.c | 6 +- src/backend/parser/parse_cte.c | 4 +- src/backend/parser/parse_expr.c | 32 ++-- src/backend/parser/parse_func.c | 18 +-- src/backend/parser/parse_node.c | 4 +- src/backend/parser/parse_oper.c | 2 +- src/backend/parser/parse_relation.c | 12 +- src/backend/parser/parse_utilcmd.c | 8 +- src/backend/port/atomics.c | 6 +- src/backend/port/dynloader/aix.h | 4 +- src/backend/port/dynloader/cygwin.h | 4 +- src/backend/port/dynloader/darwin.c | 2 +- src/backend/port/dynloader/freebsd.c | 4 +- src/backend/port/dynloader/freebsd.h | 4 +- src/backend/port/dynloader/linux.c | 2 +- src/backend/port/dynloader/linux.h | 6 +- src/backend/port/dynloader/netbsd.c | 4 +- src/backend/port/dynloader/netbsd.h | 4 +- src/backend/port/dynloader/openbsd.c | 4 +- src/backend/port/dynloader/openbsd.h | 4 +- src/backend/port/dynloader/solaris.h | 4 +- src/backend/port/dynloader/win32.h | 4 +- src/backend/port/posix_sema.c | 2 +- src/backend/port/sysv_sema.c | 6 +- src/backend/port/sysv_shmem.c | 8 +- src/backend/port/win32_shmem.c | 8 +- src/backend/postmaster/autovacuum.c | 6 +- src/backend/postmaster/bgworker.c | 4 +- src/backend/postmaster/bgwriter.c | 4 +- src/backend/postmaster/checkpointer.c | 13 +- src/backend/postmaster/fork_process.c | 2 +- src/backend/postmaster/pgarch.c | 11 +- src/backend/postmaster/pgstat.c | 30 ++-- src/backend/postmaster/postmaster.c | 60 ++++---- src/backend/postmaster/startup.c | 2 +- src/backend/postmaster/syslogger.c | 16 +- src/backend/postmaster/walwriter.c | 6 +- src/backend/regex/regc_color.c | 7 +- src/backend/regex/regc_lex.c | 16 +- src/backend/regex/regc_locale.c | 2 +- src/backend/regex/regc_nfa.c | 16 +- src/backend/regex/regc_pg_locale.c | 2 +- src/backend/regex/regcomp.c | 16 +- src/backend/regex/rege_dfa.c | 12 +- src/backend/regex/regerror.c | 4 +- src/backend/regex/regexec.c | 10 +- src/backend/regex/regexport.c | 2 +- src/backend/replication/basebackup.c | 14 +- src/backend/replication/logical/logical.c | 4 +- src/backend/replication/logical/origin.c | 2 +- src/backend/replication/logical/proto.c | 8 +- .../replication/logical/reorderbuffer.c | 8 +- src/backend/replication/logical/snapbuild.c | 12 +- src/backend/replication/logical/tablesync.c | 2 +- src/backend/replication/logical/worker.c | 6 +- src/backend/replication/slot.c | 2 +- src/backend/replication/slotfuncs.c | 2 +- src/backend/replication/syncrep.c | 2 +- src/backend/replication/walreceiver.c | 3 +- src/backend/replication/walsender.c | 24 +-- src/backend/rewrite/rewriteHandler.c | 6 +- src/backend/statistics/dependencies.c | 2 +- src/backend/storage/buffer/bufmgr.c | 10 +- src/backend/storage/buffer/localbuf.c | 2 +- src/backend/storage/file/fd.c | 12 +- src/backend/storage/ipc/dsm_impl.c | 6 +- src/backend/storage/ipc/latch.c | 12 +- src/backend/storage/ipc/pmsignal.c | 2 +- src/backend/storage/ipc/procarray.c | 12 +- src/backend/storage/ipc/shmem.c | 4 +- src/backend/storage/ipc/sinvaladt.c | 4 +- src/backend/storage/large_object/inv_api.c | 4 +- src/backend/storage/lmgr/deadlock.c | 4 +- src/backend/storage/lmgr/lock.c | 12 +- src/backend/storage/lmgr/lwlock.c | 6 +- src/backend/storage/lmgr/predicate.c | 8 +- src/backend/storage/lmgr/s_lock.c | 12 +- src/backend/storage/lmgr/spin.c | 2 +- src/backend/storage/page/bufpage.c | 4 +- src/backend/storage/smgr/md.c | 4 +- src/backend/storage/smgr/smgr.c | 6 +- src/backend/tcop/fastpath.c | 4 +- src/backend/tcop/postgres.c | 52 +++---- src/backend/tcop/pquery.c | 7 +- src/backend/tcop/utility.c | 38 ++--- src/backend/tsearch/dict_thesaurus.c | 2 +- src/backend/tsearch/spell.c | 2 +- src/backend/tsearch/ts_locale.c | 14 +- src/backend/tsearch/ts_typanalyze.c | 2 +- src/backend/tsearch/wparser_def.c | 14 +- src/backend/utils/adt/acl.c | 4 +- src/backend/utils/adt/array_selfuncs.c | 2 +- src/backend/utils/adt/arrayfuncs.c | 28 ++-- src/backend/utils/adt/ascii.c | 6 +- src/backend/utils/adt/cash.c | 6 +- src/backend/utils/adt/date.c | 4 +- src/backend/utils/adt/datetime.c | 40 ++--- src/backend/utils/adt/float.c | 10 +- src/backend/utils/adt/formatting.c | 54 +++---- src/backend/utils/adt/geo_ops.c | 26 ++-- src/backend/utils/adt/int8.c | 2 +- src/backend/utils/adt/json.c | 2 +- src/backend/utils/adt/jsonfuncs.c | 24 +-- src/backend/utils/adt/like_match.c | 2 +- src/backend/utils/adt/nabstime.c | 6 +- src/backend/utils/adt/name.c | 9 +- src/backend/utils/adt/numeric.c | 14 +- src/backend/utils/adt/pg_locale.c | 34 ++--- src/backend/utils/adt/rangetypes_gist.c | 2 +- src/backend/utils/adt/rangetypes_selfuncs.c | 2 +- src/backend/utils/adt/rangetypes_typanalyze.c | 2 +- src/backend/utils/adt/ri_triggers.c | 39 +++-- src/backend/utils/adt/ruleutils.c | 32 ++-- src/backend/utils/adt/selfuncs.c | 17 +-- src/backend/utils/adt/tsquery.c | 10 +- src/backend/utils/adt/tsrank.c | 4 +- src/backend/utils/adt/tsvector_op.c | 2 +- src/backend/utils/adt/varbit.c | 6 +- src/backend/utils/adt/varlena.c | 40 ++--- src/backend/utils/adt/xml.c | 44 +++--- src/backend/utils/cache/attoptcache.c | 3 +- src/backend/utils/cache/catcache.c | 2 +- src/backend/utils/cache/inval.c | 2 +- src/backend/utils/cache/lsyscache.c | 2 +- src/backend/utils/cache/plancache.c | 4 +- src/backend/utils/cache/relcache.c | 20 +-- src/backend/utils/cache/relfilenodemap.c | 6 +- src/backend/utils/cache/relmapper.c | 4 +- src/backend/utils/cache/syscache.c | 8 +- src/backend/utils/cache/typcache.c | 4 +- src/backend/utils/error/elog.c | 20 +-- src/backend/utils/fmgr/dfmgr.c | 4 +- src/backend/utils/fmgr/fmgr.c | 8 +- src/backend/utils/fmgr/funcapi.c | 6 +- src/backend/utils/hash/dynahash.c | 6 +- src/backend/utils/init/globals.c | 8 +- src/backend/utils/init/miscinit.c | 4 +- src/backend/utils/init/postinit.c | 2 +- .../euc2004_sjis2004/euc2004_sjis2004.c | 2 +- .../conversion_procs/euc_tw_and_big5/big5.c | 8 +- .../utf8_and_iso8859/utf8_and_iso8859.c | 30 ++-- .../utf8_and_win/utf8_and_win.c | 4 +- src/backend/utils/mb/encnames.c | 2 +- src/backend/utils/mb/wchar.c | 92 ++++++------ src/backend/utils/misc/backend_random.c | 2 +- src/backend/utils/misc/guc.c | 18 +-- src/backend/utils/misc/ps_status.c | 24 +-- src/backend/utils/misc/sampling.c | 8 +- src/backend/utils/mmgr/aset.c | 14 +- src/backend/utils/mmgr/dsa.c | 4 +- src/backend/utils/mmgr/memdebug.c | 2 +- src/backend/utils/mmgr/slab.c | 2 +- src/backend/utils/resowner/resowner.c | 2 +- src/backend/utils/sort/logtape.c | 2 +- src/backend/utils/time/snapmgr.c | 7 +- src/backend/utils/time/tqual.c | 14 +- src/bin/initdb/findtimezone.c | 4 +- src/bin/initdb/initdb.c | 4 +- src/bin/pg_archivecleanup/pg_archivecleanup.c | 11 +- src/bin/pg_basebackup/pg_basebackup.c | 8 +- src/bin/pg_basebackup/pg_receivewal.c | 2 +- src/bin/pg_basebackup/pg_recvlogical.c | 6 +- src/bin/pg_basebackup/receivelog.c | 10 +- src/bin/pg_basebackup/receivelog.h | 7 +- src/bin/pg_basebackup/streamutil.h | 2 +- src/bin/pg_ctl/pg_ctl.c | 21 ++- src/bin/pg_dump/compress_io.c | 2 +- src/bin/pg_dump/dumputils.c | 2 +- src/bin/pg_dump/dumputils.h | 2 +- src/bin/pg_dump/parallel.c | 18 +-- src/bin/pg_dump/parallel.h | 2 +- src/bin/pg_dump/pg_backup.h | 17 +-- src/bin/pg_dump/pg_backup_archiver.c | 8 +- src/bin/pg_dump/pg_backup_archiver.h | 65 ++++---- src/bin/pg_dump/pg_backup_tar.c | 2 +- src/bin/pg_dump/pg_backup_utils.h | 2 +- src/bin/pg_dump/pg_dump.c | 18 +-- src/bin/pg_dump/pg_dump.h | 12 +- src/bin/pg_dump/pg_dump_sort.c | 2 +- src/bin/pg_resetwal/pg_resetwal.c | 4 +- src/bin/pg_rewind/copy_fetch.c | 2 +- src/bin/pg_rewind/datapagemap.h | 2 +- src/bin/pg_rewind/fetch.h | 2 +- src/bin/pg_rewind/file_ops.h | 2 +- src/bin/pg_rewind/filemap.h | 2 +- src/bin/pg_rewind/logging.h | 2 +- src/bin/pg_rewind/pg_rewind.c | 2 +- src/bin/pg_rewind/pg_rewind.h | 2 +- src/bin/pg_upgrade/file.c | 2 +- src/bin/pg_upgrade/pg_upgrade.h | 6 +- src/bin/pg_waldump/pg_waldump.c | 2 +- src/bin/pg_waldump/rmgrdesc.h | 2 +- src/bin/pgbench/pgbench.c | 36 ++--- src/bin/pgbench/pgbench.h | 2 +- src/bin/psql/command.c | 2 +- src/bin/psql/command.h | 2 +- src/bin/psql/common.c | 2 +- src/bin/psql/common.h | 2 +- src/bin/psql/conditional.h | 2 +- src/bin/psql/copy.c | 2 +- src/bin/psql/crosstabview.h | 2 +- src/bin/psql/describe.c | 2 +- src/bin/psql/describe.h | 2 +- src/bin/psql/help.c | 2 +- src/bin/psql/input.c | 2 +- src/bin/psql/input.h | 6 +- src/bin/psql/large_obj.h | 2 +- src/bin/psql/mainloop.c | 2 +- src/bin/psql/mainloop.h | 2 +- src/bin/psql/prompt.c | 2 +- src/bin/psql/prompt.h | 2 +- src/bin/psql/settings.h | 2 +- src/bin/psql/startup.c | 2 +- src/bin/psql/stringutils.h | 2 +- src/bin/psql/tab-complete.c | 16 +- src/bin/psql/tab-complete.h | 2 +- src/bin/psql/variables.c | 2 +- src/bin/psql/variables.h | 2 +- src/bin/scripts/common.c | 2 +- src/bin/scripts/common.h | 2 +- src/common/exec.c | 4 +- src/common/file_utils.c | 2 +- src/common/ip.c | 4 +- src/common/keywords.c | 2 +- src/common/md5.c | 36 ++--- src/common/pg_lzcompress.c | 2 +- src/common/psprintf.c | 2 +- src/common/scram-common.c | 2 +- src/common/sha2.c | 6 +- src/fe_utils/mbprint.c | 10 +- src/fe_utils/print.c | 8 +- src/fe_utils/string_utils.c | 6 +- src/include/access/amapi.h | 14 +- src/include/access/amvalidate.h | 2 +- src/include/access/attnum.h | 2 +- src/include/access/brin.h | 2 +- src/include/access/brin_internal.h | 2 +- src/include/access/brin_page.h | 2 +- src/include/access/brin_pageops.h | 2 +- src/include/access/brin_revmap.h | 2 +- src/include/access/brin_tuple.h | 2 +- src/include/access/brin_xlog.h | 2 +- src/include/access/clog.h | 2 +- src/include/access/commit_ts.h | 2 +- src/include/access/genam.h | 6 +- src/include/access/generic_xlog.h | 2 +- src/include/access/gin.h | 4 +- src/include/access/gin_private.h | 4 +- src/include/access/ginblock.h | 12 +- src/include/access/ginxlog.h | 12 +- src/include/access/gist.h | 6 +- src/include/access/gist_private.h | 22 +-- src/include/access/gistscan.h | 2 +- src/include/access/hash.h | 11 +- src/include/access/hash_xlog.h | 40 +++-- src/include/access/heapam.h | 2 +- src/include/access/heapam_xlog.h | 4 +- src/include/access/hio.h | 4 +- src/include/access/htup.h | 2 +- src/include/access/htup_details.h | 4 +- src/include/access/itup.h | 2 +- src/include/access/multixact.h | 2 +- src/include/access/nbtree.h | 8 +- src/include/access/nbtxlog.h | 6 +- src/include/access/parallel.h | 2 +- src/include/access/printsimple.h | 2 +- src/include/access/printtup.h | 2 +- src/include/access/reloptions.h | 2 +- src/include/access/relscan.h | 6 +- src/include/access/rewriteheap.h | 2 +- src/include/access/rmgr.h | 2 +- src/include/access/sdir.h | 2 +- src/include/access/skey.h | 21 ++- src/include/access/slru.h | 2 +- src/include/access/spgist.h | 33 ++-- src/include/access/spgist_private.h | 18 +-- src/include/access/spgxlog.h | 4 +- src/include/access/stratnum.h | 56 +++---- src/include/access/subtrans.h | 2 +- src/include/access/sysattr.h | 2 +- src/include/access/timeline.h | 2 +- src/include/access/transam.h | 2 +- src/include/access/tsmapi.h | 6 +- src/include/access/tupconvert.h | 2 +- src/include/access/tupdesc.h | 2 +- src/include/access/tupmacs.h | 4 +- src/include/access/tuptoaster.h | 4 +- src/include/access/twophase.h | 2 +- src/include/access/twophase_rmgr.h | 2 +- src/include/access/valid.h | 2 +- src/include/access/visibilitymap.h | 6 +- src/include/access/xact.h | 7 +- src/include/access/xlog.h | 27 ++-- src/include/access/xlog_internal.h | 2 +- src/include/access/xlogdefs.h | 2 +- src/include/access/xloginsert.h | 7 +- src/include/access/xlogreader.h | 4 +- src/include/access/xlogrecord.h | 4 +- src/include/bootstrap/bootstrap.h | 2 +- src/include/c.h | 18 +-- src/include/catalog/binary_upgrade.h | 2 +- src/include/catalog/catalog.h | 2 +- src/include/catalog/dependency.h | 12 +- src/include/catalog/genbki.h | 2 +- src/include/catalog/heap.h | 2 +- src/include/catalog/index.h | 2 +- src/include/catalog/indexing.h | 2 +- src/include/catalog/namespace.h | 2 +- src/include/catalog/objectaccess.h | 2 +- src/include/catalog/objectaddress.h | 2 +- src/include/catalog/opfam_internal.h | 2 +- src/include/catalog/partition.h | 4 +- src/include/catalog/pg_aggregate.h | 2 +- src/include/catalog/pg_am.h | 4 +- src/include/catalog/pg_amop.h | 2 +- src/include/catalog/pg_amproc.h | 2 +- src/include/catalog/pg_attrdef.h | 2 +- src/include/catalog/pg_attribute.h | 2 +- src/include/catalog/pg_auth_members.h | 2 +- src/include/catalog/pg_authid.h | 2 +- src/include/catalog/pg_cast.h | 10 +- src/include/catalog/pg_class.h | 28 ++-- src/include/catalog/pg_collation.h | 2 +- src/include/catalog/pg_collation_fn.h | 2 +- src/include/catalog/pg_constraint.h | 2 +- src/include/catalog/pg_constraint_fn.h | 2 +- src/include/catalog/pg_control.h | 6 +- src/include/catalog/pg_conversion.h | 2 +- src/include/catalog/pg_conversion_fn.h | 2 +- src/include/catalog/pg_database.h | 2 +- src/include/catalog/pg_db_role_setting.h | 2 +- src/include/catalog/pg_default_acl.h | 12 +- src/include/catalog/pg_depend.h | 2 +- src/include/catalog/pg_description.h | 2 +- src/include/catalog/pg_enum.h | 2 +- src/include/catalog/pg_event_trigger.h | 2 +- src/include/catalog/pg_extension.h | 2 +- src/include/catalog/pg_foreign_data_wrapper.h | 2 +- src/include/catalog/pg_foreign_server.h | 2 +- src/include/catalog/pg_foreign_table.h | 2 +- src/include/catalog/pg_index.h | 2 +- src/include/catalog/pg_inherits.h | 2 +- src/include/catalog/pg_inherits_fn.h | 2 +- src/include/catalog/pg_init_privs.h | 5 +- src/include/catalog/pg_language.h | 2 +- src/include/catalog/pg_largeobject.h | 6 +- src/include/catalog/pg_largeobject_metadata.h | 2 +- src/include/catalog/pg_namespace.h | 2 +- src/include/catalog/pg_opclass.h | 2 +- src/include/catalog/pg_operator.h | 2 +- src/include/catalog/pg_operator_fn.h | 2 +- src/include/catalog/pg_opfamily.h | 2 +- src/include/catalog/pg_partitioned_table.h | 2 +- src/include/catalog/pg_pltemplate.h | 2 +- src/include/catalog/pg_policy.h | 2 +- src/include/catalog/pg_proc.h | 18 +-- src/include/catalog/pg_proc_fn.h | 2 +- src/include/catalog/pg_publication.h | 2 +- src/include/catalog/pg_publication_rel.h | 2 +- src/include/catalog/pg_range.h | 2 +- src/include/catalog/pg_replication_origin.h | 2 +- src/include/catalog/pg_rewrite.h | 2 +- src/include/catalog/pg_seclabel.h | 5 +- src/include/catalog/pg_sequence.h | 2 +- src/include/catalog/pg_shdepend.h | 2 +- src/include/catalog/pg_shdescription.h | 2 +- src/include/catalog/pg_shseclabel.h | 5 +- src/include/catalog/pg_statistic.h | 2 +- src/include/catalog/pg_statistic_ext.h | 2 +- src/include/catalog/pg_subscription.h | 2 +- src/include/catalog/pg_subscription_rel.h | 18 +-- src/include/catalog/pg_tablespace.h | 2 +- src/include/catalog/pg_transform.h | 2 +- src/include/catalog/pg_trigger.h | 4 +- src/include/catalog/pg_ts_config.h | 2 +- src/include/catalog/pg_ts_config_map.h | 2 +- src/include/catalog/pg_ts_dict.h | 2 +- src/include/catalog/pg_ts_parser.h | 2 +- src/include/catalog/pg_ts_template.h | 2 +- src/include/catalog/pg_type.h | 6 +- src/include/catalog/pg_type_fn.h | 2 +- src/include/catalog/pg_user_mapping.h | 2 +- src/include/catalog/storage.h | 2 +- src/include/catalog/storage_xlog.h | 2 +- src/include/catalog/toasting.h | 2 +- src/include/commands/alter.h | 2 +- src/include/commands/async.h | 2 +- src/include/commands/cluster.h | 2 +- src/include/commands/collationcmds.h | 2 +- src/include/commands/comment.h | 2 +- src/include/commands/conversioncmds.h | 2 +- src/include/commands/copy.h | 2 +- src/include/commands/createas.h | 2 +- src/include/commands/dbcommands.h | 2 +- src/include/commands/dbcommands_xlog.h | 2 +- src/include/commands/defrem.h | 2 +- src/include/commands/discard.h | 2 +- src/include/commands/event_trigger.h | 2 +- src/include/commands/explain.h | 4 +- src/include/commands/extension.h | 2 +- src/include/commands/lockcmds.h | 2 +- src/include/commands/matview.h | 2 +- src/include/commands/policy.h | 2 +- src/include/commands/portalcmds.h | 2 +- src/include/commands/prepare.h | 4 +- src/include/commands/proclang.h | 2 +- src/include/commands/publicationcmds.h | 2 +- src/include/commands/schemacmds.h | 2 +- src/include/commands/seclabel.h | 2 +- src/include/commands/sequence.h | 2 +- src/include/commands/subscriptioncmds.h | 2 +- src/include/commands/tablecmds.h | 2 +- src/include/commands/tablespace.h | 2 +- src/include/commands/trigger.h | 2 +- src/include/commands/typecmds.h | 2 +- src/include/commands/user.h | 2 +- src/include/commands/vacuum.h | 21 ++- src/include/commands/variable.h | 2 +- src/include/commands/view.h | 2 +- src/include/common/base64.h | 2 +- src/include/common/config_info.h | 2 +- src/include/common/controldata_utils.h | 2 +- src/include/common/fe_memutils.h | 2 +- src/include/common/file_utils.h | 2 +- src/include/common/int128.h | 4 +- src/include/common/ip.h | 2 +- src/include/common/keywords.h | 2 +- src/include/common/pg_lzcompress.h | 2 +- src/include/common/relpath.h | 2 +- src/include/common/restricted_token.h | 2 +- src/include/common/saslprep.h | 2 +- src/include/common/scram-common.h | 2 +- src/include/common/sha2.h | 4 +- src/include/common/string.h | 2 +- src/include/common/unicode_norm.h | 2 +- src/include/common/unicode_norm_table.h | 8 +- src/include/common/username.h | 2 +- src/include/datatype/timestamp.h | 4 +- src/include/executor/execExpr.h | 42 +++--- src/include/executor/execParallel.h | 2 +- src/include/executor/execdebug.h | 8 +- src/include/executor/execdesc.h | 6 +- src/include/executor/executor.h | 2 +- src/include/executor/functions.h | 2 +- src/include/executor/hashjoin.h | 11 +- src/include/executor/instrument.h | 10 +- src/include/executor/nodeAgg.h | 2 +- src/include/executor/nodeAppend.h | 2 +- src/include/executor/nodeBitmapAnd.h | 2 +- src/include/executor/nodeBitmapHeapscan.h | 2 +- src/include/executor/nodeBitmapIndexscan.h | 2 +- src/include/executor/nodeBitmapOr.h | 2 +- src/include/executor/nodeCtescan.h | 2 +- src/include/executor/nodeCustom.h | 2 +- src/include/executor/nodeForeignscan.h | 2 +- src/include/executor/nodeFunctionscan.h | 2 +- src/include/executor/nodeGather.h | 2 +- src/include/executor/nodeGatherMerge.h | 2 +- src/include/executor/nodeGroup.h | 2 +- src/include/executor/nodeHash.h | 2 +- src/include/executor/nodeHashjoin.h | 2 +- src/include/executor/nodeIndexonlyscan.h | 2 +- src/include/executor/nodeIndexscan.h | 2 +- src/include/executor/nodeLimit.h | 2 +- src/include/executor/nodeLockRows.h | 2 +- src/include/executor/nodeMaterial.h | 2 +- src/include/executor/nodeMergeAppend.h | 2 +- src/include/executor/nodeMergejoin.h | 2 +- src/include/executor/nodeModifyTable.h | 2 +- .../executor/nodeNamedtuplestorescan.h | 2 +- src/include/executor/nodeNestloop.h | 2 +- src/include/executor/nodeProjectSet.h | 2 +- src/include/executor/nodeRecursiveunion.h | 2 +- src/include/executor/nodeResult.h | 2 +- src/include/executor/nodeSamplescan.h | 2 +- src/include/executor/nodeSeqscan.h | 2 +- src/include/executor/nodeSetOp.h | 2 +- src/include/executor/nodeSort.h | 2 +- src/include/executor/nodeSubplan.h | 2 +- src/include/executor/nodeSubqueryscan.h | 2 +- src/include/executor/nodeTableFuncscan.h | 2 +- src/include/executor/nodeTidscan.h | 2 +- src/include/executor/nodeUnique.h | 2 +- src/include/executor/nodeValuesscan.h | 2 +- src/include/executor/nodeWindowAgg.h | 2 +- src/include/executor/nodeWorktablescan.h | 2 +- src/include/executor/spi.h | 2 +- src/include/executor/spi_priv.h | 4 +- src/include/executor/tablefunc.h | 2 +- src/include/executor/tqueue.h | 2 +- src/include/executor/tstoreReceiver.h | 2 +- src/include/executor/tuptable.h | 4 +- src/include/fe_utils/mbprint.h | 2 +- src/include/fe_utils/print.h | 14 +- src/include/fe_utils/psqlscan.h | 2 +- src/include/fe_utils/psqlscan_int.h | 2 +- src/include/fe_utils/simple_list.h | 4 +- src/include/fe_utils/string_utils.h | 2 +- src/include/fmgr.h | 8 +- src/include/foreign/fdwapi.h | 2 +- src/include/foreign/foreign.h | 2 +- src/include/funcapi.h | 2 +- src/include/getaddrinfo.h | 10 +- src/include/getopt_long.h | 2 +- src/include/lib/binaryheap.h | 2 +- src/include/lib/bipartite_match.h | 2 +- src/include/lib/hyperloglog.h | 2 +- src/include/lib/ilist.h | 4 +- src/include/lib/knapsack.h | 2 +- src/include/lib/pairingheap.h | 2 +- src/include/lib/rbtree.h | 2 +- src/include/lib/simplehash.h | 6 +- src/include/lib/stringinfo.h | 2 +- src/include/libpq/auth.h | 2 +- src/include/libpq/be-fsstubs.h | 2 +- src/include/libpq/hba.h | 2 +- src/include/libpq/ifaddr.h | 2 +- src/include/libpq/libpq-be.h | 12 +- src/include/libpq/libpq-fs.h | 2 +- src/include/libpq/libpq.h | 2 +- src/include/libpq/pqcomm.h | 12 +- src/include/libpq/pqformat.h | 2 +- src/include/libpq/pqmq.h | 2 +- src/include/libpq/pqsignal.h | 4 +- src/include/libpq/scram.h | 2 +- src/include/mb/pg_wchar.h | 12 +- src/include/miscadmin.h | 4 +- src/include/nodes/bitmapset.h | 2 +- src/include/nodes/execnodes.h | 86 +++++------ src/include/nodes/extensible.h | 2 +- src/include/nodes/lockoptions.h | 2 +- src/include/nodes/makefuncs.h | 2 +- src/include/nodes/memnodes.h | 6 +- src/include/nodes/nodeFuncs.h | 16 +- src/include/nodes/nodes.h | 6 +- src/include/nodes/params.h | 4 +- src/include/nodes/parsenodes.h | 41 +++-- src/include/nodes/pg_list.h | 4 +- src/include/nodes/plannodes.h | 16 +- src/include/nodes/primnodes.h | 12 +- src/include/nodes/print.h | 2 +- src/include/nodes/readfuncs.h | 2 +- src/include/nodes/relation.h | 86 ++++++----- src/include/nodes/replnodes.h | 2 +- src/include/nodes/tidbitmap.h | 2 +- src/include/nodes/value.h | 2 +- src/include/optimizer/clauses.h | 2 +- src/include/optimizer/cost.h | 4 +- src/include/optimizer/geqo.h | 4 +- src/include/optimizer/geqo_copy.h | 2 +- src/include/optimizer/geqo_gene.h | 2 +- src/include/optimizer/geqo_misc.h | 4 +- src/include/optimizer/geqo_mutation.h | 2 +- src/include/optimizer/geqo_pool.h | 2 +- src/include/optimizer/geqo_random.h | 2 +- src/include/optimizer/geqo_recombination.h | 2 +- src/include/optimizer/geqo_selection.h | 2 +- src/include/optimizer/joininfo.h | 2 +- src/include/optimizer/orclauses.h | 2 +- src/include/optimizer/pathnode.h | 2 +- src/include/optimizer/paths.h | 2 +- src/include/optimizer/placeholder.h | 2 +- src/include/optimizer/plancat.h | 2 +- src/include/optimizer/planmain.h | 2 +- src/include/optimizer/planner.h | 2 +- src/include/optimizer/predtest.h | 2 +- src/include/optimizer/prep.h | 2 +- src/include/optimizer/restrictinfo.h | 2 +- src/include/optimizer/subselect.h | 2 +- src/include/optimizer/tlist.h | 2 +- src/include/optimizer/var.h | 10 +- src/include/parser/analyze.h | 2 +- src/include/parser/gramparse.h | 6 +- src/include/parser/parse_agg.h | 2 +- src/include/parser/parse_clause.h | 2 +- src/include/parser/parse_coerce.h | 2 +- src/include/parser/parse_collate.h | 2 +- src/include/parser/parse_cte.h | 2 +- src/include/parser/parse_enr.h | 2 +- src/include/parser/parse_expr.h | 2 +- src/include/parser/parse_func.h | 2 +- src/include/parser/parse_node.h | 29 ++-- src/include/parser/parse_oper.h | 2 +- src/include/parser/parse_param.h | 2 +- src/include/parser/parse_relation.h | 2 +- src/include/parser/parse_target.h | 2 +- src/include/parser/parse_type.h | 2 +- src/include/parser/parse_utilcmd.h | 2 +- src/include/parser/parser.h | 2 +- src/include/parser/parsetree.h | 2 +- src/include/parser/scanner.h | 2 +- src/include/parser/scansup.h | 2 +- src/include/pg_getopt.h | 4 +- src/include/pg_trace.h | 2 +- src/include/pgstat.h | 42 +++--- src/include/pgtime.h | 2 +- src/include/port.h | 10 +- src/include/port/atomics.h | 2 +- src/include/port/pg_bswap.h | 10 +- src/include/port/pg_crc32c.h | 2 +- src/include/port/win32.h | 2 +- src/include/port/win32/sys/socket.h | 2 +- src/include/portability/instr_time.h | 6 +- src/include/portability/mem.h | 2 +- src/include/postgres.h | 6 +- src/include/postgres_ext.h | 2 +- src/include/postgres_fe.h | 2 +- src/include/postmaster/autovacuum.h | 2 +- src/include/postmaster/bgworker.h | 4 +- src/include/postmaster/bgworker_internals.h | 2 +- src/include/postmaster/bgwriter.h | 2 +- src/include/postmaster/fork_process.h | 2 +- src/include/postmaster/pgarch.h | 2 +- src/include/postmaster/postmaster.h | 8 +- src/include/postmaster/startup.h | 2 +- src/include/postmaster/syslogger.h | 2 +- src/include/postmaster/walwriter.h | 2 +- src/include/regex/regex.h | 2 +- src/include/regex/regexport.h | 2 +- src/include/regex/regguts.h | 2 +- src/include/replication/basebackup.h | 2 +- src/include/replication/logicallauncher.h | 2 +- src/include/replication/logicalproto.h | 2 +- src/include/replication/logicalrelation.h | 4 +- src/include/replication/logicalworker.h | 2 +- src/include/replication/message.h | 2 +- src/include/replication/origin.h | 2 +- src/include/replication/output_plugin.h | 2 +- src/include/replication/pgoutput.h | 2 +- src/include/replication/slot.h | 2 +- src/include/replication/snapbuild.h | 2 +- src/include/replication/syncrep.h | 2 +- src/include/replication/walreceiver.h | 4 +- src/include/replication/walsender.h | 2 +- src/include/replication/walsender_private.h | 2 +- src/include/replication/worker_internal.h | 2 +- src/include/rewrite/prs2lock.h | 2 +- src/include/rewrite/rewriteDefine.h | 2 +- src/include/rewrite/rewriteHandler.h | 2 +- src/include/rewrite/rewriteManip.h | 4 +- src/include/rewrite/rewriteRemove.h | 2 +- src/include/rewrite/rewriteSupport.h | 2 +- src/include/rewrite/rowsecurity.h | 2 +- src/include/rusagestub.h | 2 +- src/include/snowball/header.h | 2 +- .../statistics/extended_stats_internal.h | 2 +- src/include/statistics/statistics.h | 10 +- src/include/storage/backendid.h | 4 +- src/include/storage/block.h | 2 +- src/include/storage/buf.h | 2 +- src/include/storage/buf_internals.h | 26 ++-- src/include/storage/buffile.h | 2 +- src/include/storage/bufmgr.h | 6 +- src/include/storage/bufpage.h | 13 +- src/include/storage/checksum.h | 2 +- src/include/storage/condition_variable.h | 2 +- src/include/storage/copydir.h | 2 +- src/include/storage/dsm.h | 2 +- src/include/storage/dsm_impl.h | 2 +- src/include/storage/fd.h | 2 +- src/include/storage/freespace.h | 2 +- src/include/storage/fsm_internals.h | 2 +- src/include/storage/indexfsm.h | 2 +- src/include/storage/ipc.h | 2 +- src/include/storage/item.h | 2 +- src/include/storage/itemid.h | 2 +- src/include/storage/itemptr.h | 2 +- src/include/storage/large_object.h | 2 +- src/include/storage/latch.h | 2 +- src/include/storage/lmgr.h | 2 +- src/include/storage/lock.h | 9 +- src/include/storage/lockdefs.h | 25 ++-- src/include/storage/lwlock.h | 2 +- src/include/storage/off.h | 4 +- src/include/storage/pg_sema.h | 2 +- src/include/storage/pg_shmem.h | 2 +- src/include/storage/pmsignal.h | 6 +- src/include/storage/predicate.h | 2 +- src/include/storage/predicate_internals.h | 49 +++--- src/include/storage/proc.h | 8 +- src/include/storage/procarray.h | 21 ++- src/include/storage/procsignal.h | 5 +- src/include/storage/reinit.h | 2 +- src/include/storage/relfilenode.h | 2 +- src/include/storage/shm_mq.h | 2 +- src/include/storage/shm_toc.h | 2 +- src/include/storage/shmem.h | 4 +- src/include/storage/sinval.h | 2 +- src/include/storage/sinvaladt.h | 2 +- src/include/storage/smgr.h | 6 +- src/include/storage/spin.h | 2 +- src/include/storage/standby.h | 4 +- src/include/storage/standbydefs.h | 4 +- src/include/tcop/deparse_utility.h | 2 +- src/include/tcop/dest.h | 4 +- src/include/tcop/fastpath.h | 2 +- src/include/tcop/pquery.h | 2 +- src/include/tcop/tcopprot.h | 2 +- src/include/tcop/utility.h | 2 +- src/include/tsearch/ts_cache.h | 2 +- src/include/tsearch/ts_locale.h | 4 +- src/include/tsearch/ts_public.h | 2 +- src/include/tsearch/ts_type.h | 2 +- src/include/tsearch/ts_utils.h | 7 +- src/include/utils/acl.h | 10 +- src/include/utils/aclchk_internal.h | 2 +- src/include/utils/array.h | 2 +- src/include/utils/arrayaccess.h | 2 +- src/include/utils/ascii.h | 2 +- src/include/utils/attoptcache.h | 2 +- src/include/utils/backend_random.h | 2 +- src/include/utils/builtins.h | 2 +- src/include/utils/bytea.h | 2 +- src/include/utils/cash.h | 2 +- src/include/utils/catcache.h | 8 +- src/include/utils/combocid.h | 2 +- src/include/utils/date.h | 2 +- src/include/utils/datetime.h | 4 +- src/include/utils/datum.h | 2 +- src/include/utils/dsa.h | 2 +- src/include/utils/dynahash.h | 2 +- src/include/utils/dynamic_loader.h | 2 +- src/include/utils/elog.h | 18 +-- src/include/utils/evtcache.h | 2 +- src/include/utils/expandeddatum.h | 2 +- src/include/utils/fmgrtab.h | 2 +- src/include/utils/freepage.h | 2 +- src/include/utils/geo_decls.h | 2 +- src/include/utils/guc.h | 6 +- src/include/utils/guc_tables.h | 4 +- src/include/utils/hsearch.h | 2 +- src/include/utils/index_selfuncs.h | 2 +- src/include/utils/inet.h | 2 +- src/include/utils/int8.h | 2 +- src/include/utils/inval.h | 2 +- src/include/utils/json.h | 2 +- src/include/utils/jsonapi.h | 2 +- src/include/utils/jsonb.h | 10 +- src/include/utils/logtape.h | 2 +- src/include/utils/lsyscache.h | 2 +- src/include/utils/memdebug.h | 8 +- src/include/utils/memutils.h | 4 +- src/include/utils/nabstime.h | 10 +- src/include/utils/numeric.h | 2 +- src/include/utils/palloc.h | 4 +- src/include/utils/pg_crc.h | 2 +- src/include/utils/pg_locale.h | 2 +- src/include/utils/pg_lsn.h | 2 +- src/include/utils/pg_rusage.h | 2 +- src/include/utils/plancache.h | 16 +- src/include/utils/portal.h | 8 +- src/include/utils/ps_status.h | 2 +- src/include/utils/queryenvironment.h | 2 +- src/include/utils/rangetypes.h | 2 +- src/include/utils/rel.h | 21 ++- src/include/utils/relcache.h | 2 +- src/include/utils/relfilenodemap.h | 2 +- src/include/utils/relmapper.h | 2 +- src/include/utils/relptr.h | 2 +- src/include/utils/reltrigger.h | 2 +- src/include/utils/resowner.h | 2 +- src/include/utils/resowner_private.h | 2 +- src/include/utils/rls.h | 2 +- src/include/utils/ruleutils.h | 2 +- src/include/utils/sampling.h | 6 +- src/include/utils/selfuncs.h | 8 +- src/include/utils/snapmgr.h | 2 +- src/include/utils/snapshot.h | 2 +- src/include/utils/sortsupport.h | 4 +- src/include/utils/spccache.h | 2 +- src/include/utils/syscache.h | 2 +- src/include/utils/timeout.h | 2 +- src/include/utils/timestamp.h | 2 +- src/include/utils/tqual.h | 4 +- src/include/utils/tuplesort.h | 2 +- src/include/utils/tuplestore.h | 2 +- src/include/utils/typcache.h | 8 +- src/include/utils/tzparser.h | 2 +- src/include/utils/uuid.h | 2 +- src/include/utils/xml.h | 4 +- src/include/windowapi.h | 2 +- src/interfaces/ecpg/ecpglib/data.c | 14 +- src/interfaces/ecpg/ecpglib/descriptor.c | 8 +- src/interfaces/ecpg/ecpglib/execute.c | 10 +- src/interfaces/ecpg/ecpglib/extern.h | 2 +- src/interfaces/ecpg/ecpglib/misc.c | 16 +- src/interfaces/ecpg/ecpglib/pg_type.h | 2 +- src/interfaces/ecpg/ecpglib/prepare.c | 8 +- src/interfaces/ecpg/ecpglib/typename.c | 10 +- src/interfaces/ecpg/include/datetime.h | 4 +- src/interfaces/ecpg/include/decimal.h | 4 +- .../ecpg/include/ecpg-pthread-win32.h | 6 +- src/interfaces/ecpg/include/ecpg_informix.h | 2 +- src/interfaces/ecpg/include/ecpgerrno.h | 2 +- src/interfaces/ecpg/include/ecpglib.h | 14 +- src/interfaces/ecpg/include/ecpgtype.h | 2 +- src/interfaces/ecpg/include/pgtypes_date.h | 2 +- .../ecpg/include/pgtypes_interval.h | 4 +- src/interfaces/ecpg/include/pgtypes_numeric.h | 4 +- .../ecpg/include/pgtypes_timestamp.h | 2 +- src/interfaces/ecpg/include/sql3types.h | 2 +- src/interfaces/ecpg/include/sqlca.h | 4 +- src/interfaces/ecpg/include/sqlda-compat.h | 4 +- src/interfaces/ecpg/include/sqlda-native.h | 2 +- src/interfaces/ecpg/include/sqlda.h | 2 +- src/interfaces/ecpg/include/sqltypes.h | 2 +- src/interfaces/ecpg/pgtypeslib/datetime.c | 4 +- src/interfaces/ecpg/pgtypeslib/dt.h | 2 +- src/interfaces/ecpg/pgtypeslib/dt_common.c | 38 ++--- src/interfaces/ecpg/pgtypeslib/extern.h | 17 +-- src/interfaces/ecpg/pgtypeslib/interval.c | 2 +- src/interfaces/ecpg/pgtypeslib/timestamp.c | 2 +- src/interfaces/ecpg/preproc/extern.h | 2 +- src/interfaces/ecpg/preproc/output.c | 4 +- src/interfaces/ecpg/preproc/type.c | 2 +- src/interfaces/ecpg/preproc/type.h | 9 +- .../test/expected/compat_informix-describe.c | 2 +- .../test/expected/compat_informix-sqlda.c | 4 +- .../expected/compat_informix-test_informix2.c | 4 +- .../ecpg/test/expected/preproc-init.c | 4 +- .../ecpg/test/expected/preproc-outofscope.c | 4 +- src/interfaces/ecpg/test/expected/sql-array.c | 4 +- .../ecpg/test/expected/sql-code100.c | 4 +- .../ecpg/test/expected/sql-copystdout.c | 4 +- .../ecpg/test/expected/sql-define.c | 4 +- .../ecpg/test/expected/sql-describe.c | 2 +- .../ecpg/test/expected/sql-dynalloc.c | 4 +- .../ecpg/test/expected/sql-dynalloc2.c | 4 +- .../ecpg/test/expected/sql-dyntest.c | 6 +- .../ecpg/test/expected/sql-indicators.c | 4 +- src/interfaces/ecpg/test/expected/sql-sqlda.c | 6 +- .../ecpg/test/expected/thread-alloc.c | 4 +- .../ecpg/test/expected/thread-descriptor.c | 4 +- .../ecpg/test/expected/thread-prep.c | 4 +- src/interfaces/libpq/fe-auth.c | 10 +- src/interfaces/libpq/fe-auth.h | 2 +- src/interfaces/libpq/fe-connect.c | 41 +++-- src/interfaces/libpq/fe-exec.c | 4 +- src/interfaces/libpq/fe-misc.c | 6 +- src/interfaces/libpq/fe-print.c | 10 +- src/interfaces/libpq/fe-protocol2.c | 4 +- src/interfaces/libpq/fe-protocol3.c | 10 +- src/interfaces/libpq/fe-secure-openssl.c | 12 +- src/interfaces/libpq/fe-secure.c | 12 +- src/interfaces/libpq/libpq-events.h | 2 +- src/interfaces/libpq/libpq-fe.h | 6 +- src/interfaces/libpq/libpq-int.h | 40 +++-- src/interfaces/libpq/pqexpbuffer.c | 2 +- src/interfaces/libpq/pqexpbuffer.h | 2 +- src/pl/plperl/plperl.c | 10 +- src/pl/plperl/plperl.h | 6 +- src/pl/plperl/plperl_helpers.h | 4 +- src/pl/plpgsql/src/pl_comp.c | 8 +- src/pl/plpgsql/src/pl_exec.c | 16 +- src/pl/plpgsql/src/plpgsql.h | 16 +- src/pl/plpython/plpy_cursorobject.h | 2 +- src/pl/plpython/plpy_elog.h | 2 +- src/pl/plpython/plpy_exec.c | 2 +- src/pl/plpython/plpy_exec.h | 2 +- src/pl/plpython/plpy_main.c | 6 +- src/pl/plpython/plpy_main.h | 2 +- src/pl/plpython/plpy_planobject.h | 2 +- src/pl/plpython/plpy_plpymodule.c | 2 +- src/pl/plpython/plpy_plpymodule.h | 2 +- src/pl/plpython/plpy_procedure.h | 4 +- src/pl/plpython/plpy_resultobject.h | 2 +- src/pl/plpython/plpy_spi.h | 2 +- src/pl/plpython/plpy_subxactobject.h | 2 +- src/pl/plpython/plpy_typeio.h | 2 +- src/pl/plpython/plpy_util.c | 2 +- src/pl/plpython/plpy_util.h | 2 +- src/pl/plpython/plpython.h | 6 +- src/pl/tcl/pltcl.c | 12 +- src/port/chklocale.c | 4 +- src/port/crypt.c | 20 +-- src/port/dirent.c | 6 +- src/port/dirmod.c | 6 +- src/port/getaddrinfo.c | 4 +- src/port/getopt.c | 2 +- src/port/getrusage.c | 2 +- src/port/mkdtemp.c | 8 +- src/port/pg_crc32c_sb8.c | 2 +- src/port/pg_crc32c_sse42.c | 2 +- src/port/pgsleep.c | 2 +- src/port/pqsignal.c | 4 +- src/port/snprintf.c | 2 +- src/test/isolation/isolationtester.h | 2 +- src/test/regress/pg_regress.c | 8 +- src/test/regress/regress.c | 9 +- src/test/thread/thread_test.c | 2 +- src/timezone/localtime.c | 8 +- src/timezone/pgtz.h | 2 +- src/timezone/private.h | 8 +- src/timezone/strftime.c | 2 +- src/timezone/tzfile.h | 8 +- src/timezone/zic.c | 16 +- src/tools/pgindent/pgindent | 5 - src/tutorial/funcs.c | 6 +- src/tutorial/funcs_new.c | 6 +- 1107 files changed, 3435 insertions(+), 3516 deletions(-) diff --git a/contrib/bloom/bloom.h b/contrib/bloom/bloom.h index 0cfe49aad8..6d1b3f12a3 100644 --- a/contrib/bloom/bloom.h +++ b/contrib/bloom/bloom.h @@ -75,7 +75,7 @@ typedef BloomPageOpaqueData *BloomPageOpaque; /* Preserved page numbers */ #define BLOOM_METAPAGE_BLKNO (0) -#define BLOOM_HEAD_BLKNO (1) /* first data page */ +#define BLOOM_HEAD_BLKNO (1) /* first data page */ /* * We store Bloom signatures as arrays of uint16 words. @@ -101,8 +101,8 @@ typedef struct BloomOptions { int32 vl_len_; /* varlena header (do not touch directly!) */ int bloomLength; /* length of signature in words (not bits!) */ - int bitSize[INDEX_MAX_KEYS]; /* # of bits generated for - * each index key */ + int bitSize[INDEX_MAX_KEYS]; /* # of bits generated for each + * index key */ } BloomOptions; /* diff --git a/contrib/btree_gist/btree_utils_num.h b/contrib/btree_gist/btree_utils_num.h index 8aab19396c..17561fa9e4 100644 --- a/contrib/btree_gist/btree_utils_num.h +++ b/contrib/btree_gist/btree_utils_num.h @@ -42,13 +42,13 @@ typedef struct /* Methods */ - bool (*f_gt) (const void *, const void *, FmgrInfo *); /* greater than */ - bool (*f_ge) (const void *, const void *, FmgrInfo *); /* greater or equal */ - bool (*f_eq) (const void *, const void *, FmgrInfo *); /* equal */ - bool (*f_le) (const void *, const void *, FmgrInfo *); /* less or equal */ - bool (*f_lt) (const void *, const void *, FmgrInfo *); /* less than */ - int (*f_cmp) (const void *, const void *, FmgrInfo *); /* key compare function */ - float8 (*f_dist) (const void *, const void *, FmgrInfo *); /* key distance function */ + bool (*f_gt) (const void *, const void *, FmgrInfo *); /* greater than */ + bool (*f_ge) (const void *, const void *, FmgrInfo *); /* greater or equal */ + bool (*f_eq) (const void *, const void *, FmgrInfo *); /* equal */ + bool (*f_le) (const void *, const void *, FmgrInfo *); /* less or equal */ + bool (*f_lt) (const void *, const void *, FmgrInfo *); /* less than */ + int (*f_cmp) (const void *, const void *, FmgrInfo *); /* key compare function */ + float8 (*f_dist) (const void *, const void *, FmgrInfo *); /* key distance function */ } gbtree_ninfo; diff --git a/contrib/btree_gist/btree_utils_var.c b/contrib/btree_gist/btree_utils_var.c index c531663f92..b2623a9583 100644 --- a/contrib/btree_gist/btree_utils_var.c +++ b/contrib/btree_gist/btree_utils_var.c @@ -488,7 +488,7 @@ gbt_var_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v, cur = (char *) DatumGetPointer(entryvec->vector[i].key); ro = gbt_var_key_readable((GBT_VARKEY *) cur); - if (ro.lower == ro.upper) /* leaf */ + if (ro.lower == ro.upper) /* leaf */ { sv[svcntr] = gbt_var_leaf2node((GBT_VARKEY *) cur, tinfo, flinfo); arr[i].t = sv[svcntr]; diff --git a/contrib/btree_gist/btree_utils_var.h b/contrib/btree_gist/btree_utils_var.h index 04a356276b..15d847c139 100644 --- a/contrib/btree_gist/btree_utils_var.h +++ b/contrib/btree_gist/btree_utils_var.h @@ -40,7 +40,7 @@ typedef struct bool (*f_le) (const void *, const void *, Oid, FmgrInfo *); /* less equal */ bool (*f_lt) (const void *, const void *, Oid, FmgrInfo *); /* less than */ int32 (*f_cmp) (const void *, const void *, Oid, FmgrInfo *); /* compare */ - GBT_VARKEY *(*f_l2n) (GBT_VARKEY *, FmgrInfo *flinfo); /* convert leaf to node */ + GBT_VARKEY *(*f_l2n) (GBT_VARKEY *, FmgrInfo *flinfo); /* convert leaf to node */ } gbtree_vinfo; diff --git a/contrib/btree_gist/btree_uuid.c b/contrib/btree_gist/btree_uuid.c index e67b8cc989..58a87decc6 100644 --- a/contrib/btree_gist/btree_uuid.c +++ b/contrib/btree_gist/btree_uuid.c @@ -171,7 +171,7 @@ static double uuid_2_double(const pg_uuid_t *u) { uint64 uu[2]; - const double two64 = 18446744073709551616.0; /* 2^64 */ + const double two64 = 18446744073709551616.0; /* 2^64 */ /* Source data may not be suitably aligned, so copy */ memcpy(uu, u->data, UUID_LEN); diff --git a/contrib/cube/cubedata.h b/contrib/cube/cubedata.h index af02464178..6e6ddfd3d7 100644 --- a/contrib/cube/cubedata.h +++ b/contrib/cube/cubedata.h @@ -54,10 +54,10 @@ typedef struct NDBOX #define PG_RETURN_NDBOX(x) PG_RETURN_POINTER(x) /* GiST operator strategy numbers */ -#define CubeKNNDistanceCoord 15 /* ~> */ -#define CubeKNNDistanceTaxicab 16 /* <#> */ -#define CubeKNNDistanceEuclid 17 /* <-> */ -#define CubeKNNDistanceChebyshev 18 /* <=> */ +#define CubeKNNDistanceCoord 15 /* ~> */ +#define CubeKNNDistanceTaxicab 16 /* <#> */ +#define CubeKNNDistanceEuclid 17 /* <-> */ +#define CubeKNNDistanceChebyshev 18 /* <=> */ /* in cubescan.l */ extern int cube_yylex(void); diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c index f2182bc3f4..5ec3e794a2 100644 --- a/contrib/dblink/dblink.c +++ b/contrib/dblink/dblink.c @@ -67,7 +67,7 @@ typedef struct remoteConn { PGconn *conn; /* Hold the remote connection */ int openCursorCount; /* The number of open cursors */ - bool newXactForCursor; /* Opened a transaction for a cursor */ + bool newXactForCursor; /* Opened a transaction for a cursor */ } remoteConn; typedef struct storeInfo @@ -1098,7 +1098,7 @@ storeQueryResult(volatile storeInfo *sinfo, PGconn *conn, const char *sql) if (!PQsendQuery(conn, sql)) elog(ERROR, "could not send query: %s", pchomp(PQerrorMessage(conn))); - if (!PQsetSingleRowMode(conn)) /* shouldn't fail */ + if (!PQsetSingleRowMode(conn)) /* shouldn't fail */ elog(ERROR, "failed to set single-row mode for dblink query"); for (;;) diff --git a/contrib/file_fdw/file_fdw.c b/contrib/file_fdw/file_fdw.c index 277639f6e9..692c7ce5f1 100644 --- a/contrib/file_fdw/file_fdw.c +++ b/contrib/file_fdw/file_fdw.c @@ -544,13 +544,13 @@ fileGetForeignPaths(PlannerInfo *root, */ add_path(baserel, (Path *) create_foreignscan_path(root, baserel, - NULL, /* default pathtarget */ + NULL, /* default pathtarget */ baserel->rows, startup_cost, total_cost, - NIL, /* no pathkeys */ - NULL, /* no outer rel either */ - NULL, /* no extra plan */ + NIL, /* no pathkeys */ + NULL, /* no outer rel either */ + NULL, /* no extra plan */ coptions)); /* diff --git a/contrib/fuzzystrmatch/dmetaphone.c b/contrib/fuzzystrmatch/dmetaphone.c index 4e89983afd..918ee0d90e 100644 --- a/contrib/fuzzystrmatch/dmetaphone.c +++ b/contrib/fuzzystrmatch/dmetaphone.c @@ -111,7 +111,7 @@ The remaining code is authored by Andrew Dunstan and #include #include -#endif /* DMETAPHONE_MAIN */ +#endif /* DMETAPHONE_MAIN */ #include #include @@ -197,7 +197,7 @@ dmetaphone_alt(PG_FUNCTION_ARGS) * in a case like this. */ -#define META_FREE(x) ((void)true) /* pfree((x)) */ +#define META_FREE(x) ((void)true) /* pfree((x)) */ #else /* not defined DMETAPHONE_MAIN */ /* use the standard malloc library when not running in PostgreSQL */ @@ -209,7 +209,7 @@ dmetaphone_alt(PG_FUNCTION_ARGS) (v = (t*)realloc((v),((n)*sizeof(t)))) #define META_FREE(x) free((x)) -#endif /* defined DMETAPHONE_MAIN */ +#endif /* defined DMETAPHONE_MAIN */ @@ -977,7 +977,7 @@ DoubleMetaphone(char *str, char **codes) } } - if (GetAt(original, current + 1) == 'J') /* it could happen! */ + if (GetAt(original, current + 1) == 'J') /* it could happen! */ current += 2; else current += 1; diff --git a/contrib/hstore/hstore.h b/contrib/hstore/hstore.h index 6bab08b7de..c4862a82e1 100644 --- a/contrib/hstore/hstore.h +++ b/contrib/hstore/hstore.h @@ -181,7 +181,7 @@ extern Pairs *hstoreArrayToPairs(ArrayType *a, int *npairs); #define HStoreExistsStrategyNumber 9 #define HStoreExistsAnyStrategyNumber 10 #define HStoreExistsAllStrategyNumber 11 -#define HStoreOldContainsStrategyNumber 13 /* backwards compatibility */ +#define HStoreOldContainsStrategyNumber 13 /* backwards compatibility */ /* * defining HSTORE_POLLUTE_NAMESPACE=0 will prevent use of old function names; @@ -202,4 +202,4 @@ extern Pairs *hstoreArrayToPairs(ArrayType *a, int *npairs); extern int no_such_variable #endif -#endif /* __HSTORE_H__ */ +#endif /* __HSTORE_H__ */ diff --git a/contrib/hstore/hstore_io.c b/contrib/hstore/hstore_io.c index 1cecf86004..1dd7c7c9ce 100644 --- a/contrib/hstore/hstore_io.c +++ b/contrib/hstore/hstore_io.c @@ -829,7 +829,7 @@ hstore_from_record(PG_FUNCTION_ARGS) my_extra->ncolumns = ncolumns; } - Assert(ncolumns <= MaxTupleAttributeNumber); /* thus, no overflow */ + Assert(ncolumns <= MaxTupleAttributeNumber); /* thus, no overflow */ pairs = palloc(ncolumns * sizeof(Pairs)); if (rec) diff --git a/contrib/intarray/_int.h b/contrib/intarray/_int.h index d524f0fed5..b689eb7ded 100644 --- a/contrib/intarray/_int.h +++ b/contrib/intarray/_int.h @@ -173,4 +173,4 @@ int compDESC(const void *a, const void *b); (direction) ? compASC : compDESC ); \ } while(0) -#endif /* ___INT_H__ */ +#endif /* ___INT_H__ */ diff --git a/contrib/intarray/_int_tool.c b/contrib/intarray/_int_tool.c index 3c52912bbf..2fdfd2ec63 100644 --- a/contrib/intarray/_int_tool.c +++ b/contrib/intarray/_int_tool.c @@ -282,7 +282,7 @@ internal_size(int *a, int len) for (i = 0; i < len; i += 2) { - if (!i || a[i] != a[i - 1]) /* do not count repeated range */ + if (!i || a[i] != a[i - 1]) /* do not count repeated range */ size += a[i + 1] - a[i] + 1; } diff --git a/contrib/isn/isn.c b/contrib/isn/isn.c index c3c10e14bc..d018ec6af5 100644 --- a/contrib/isn/isn.c +++ b/contrib/isn/isn.c @@ -131,7 +131,7 @@ invalidindex: elog(DEBUG1, "index %d is invalid", j); return false; } -#endif /* ISN_DEBUG */ +#endif /* ISN_DEBUG */ /*---------------------------------------------------------- * Formatting and conversion routines. @@ -699,11 +699,11 @@ string2ean(const char *str, bool errorOK, ean13 *result, /* recognize and validate the number: */ while (*aux2 && length <= 13) { - last = (*(aux2 + 1) == '!' || *(aux2 + 1) == '\0'); /* is the last character */ + last = (*(aux2 + 1) == '!' || *(aux2 + 1) == '\0'); /* is the last character */ digit = (isdigit((unsigned char) *aux2) != 0); /* is current character * a digit? */ - if (*aux2 == '?' && last) /* automagically calculate check digit - * if it's '?' */ + if (*aux2 == '?' && last) /* automagically calculate check digit if + * it's '?' */ magic = digit = true; if (length == 0 && (*aux2 == 'M' || *aux2 == 'm')) { @@ -832,8 +832,8 @@ string2ean(const char *str, bool errorOK, ean13 *result, goto eanwrongtype; break; case ISMN: - memcpy(buf, "9790", 4); /* this isn't for sure yet, for now - * ISMN it's only 9790 */ + memcpy(buf, "9790", 4); /* this isn't for sure yet, for now ISMN + * it's only 9790 */ valid = (valid && ((rcheck = checkdig(buf, 13)) == check || magic)); break; case ISBN: @@ -1123,7 +1123,7 @@ accept_weak_input(PG_FUNCTION_ARGS) g_weak = PG_GETARG_BOOL(0); #else /* function has no effect */ -#endif /* ISN_WEAK_MODE */ +#endif /* ISN_WEAK_MODE */ PG_RETURN_BOOL(g_weak); } diff --git a/contrib/isn/isn.h b/contrib/isn/isn.h index 09dc7c6575..e2c8a26234 100644 --- a/contrib/isn/isn.h +++ b/contrib/isn/isn.h @@ -32,4 +32,4 @@ typedef uint64 ean13; extern void initialize(void); -#endif /* ISN_H */ +#endif /* ISN_H */ diff --git a/contrib/lo/lo.c b/contrib/lo/lo.c index 6bd2430931..4585923ee2 100644 --- a/contrib/lo/lo.c +++ b/contrib/lo/lo.c @@ -32,11 +32,11 @@ lo_manage(PG_FUNCTION_ARGS) HeapTuple newtuple; /* The new value for tuple */ HeapTuple trigtuple; /* The original value of tuple */ - if (!CALLED_AS_TRIGGER(fcinfo)) /* internal error */ + if (!CALLED_AS_TRIGGER(fcinfo)) /* internal error */ elog(ERROR, "%s: not fired by trigger manager", trigdata->tg_trigger->tgname); - if (!TRIGGER_FIRED_FOR_ROW(trigdata->tg_event)) /* internal error */ + if (!TRIGGER_FIRED_FOR_ROW(trigdata->tg_event)) /* internal error */ elog(ERROR, "%s: must be fired for row", trigdata->tg_trigger->tgname); diff --git a/contrib/ltree/ltree.h b/contrib/ltree/ltree.h index c604357dbf..7a7a154097 100644 --- a/contrib/ltree/ltree.h +++ b/contrib/ltree/ltree.h @@ -125,7 +125,7 @@ typedef struct #define OPR 3 #define OPEN 4 #define CLOSE 5 -#define VALTRUE 6 /* for stop words */ +#define VALTRUE 6 /* for stop words */ #define VALFALSE 7 diff --git a/contrib/ltree/ltree_gist.c b/contrib/ltree/ltree_gist.c index 033a477c61..37ee3377ff 100644 --- a/contrib/ltree/ltree_gist.c +++ b/contrib/ltree/ltree_gist.c @@ -302,7 +302,7 @@ ltree_picksplit(PG_FUNCTION_ARGS) for (j = FirstOffsetNumber; j <= maxoff; j = OffsetNumberNext(j)) { array[j].index = j; - lu = GETENTRY(entryvec, j); /* use as tmp val */ + lu = GETENTRY(entryvec, j); /* use as tmp val */ array[j].r = LTG_GETLNODE(lu); } @@ -312,7 +312,7 @@ ltree_picksplit(PG_FUNCTION_ARGS) lu_l = lu_r = ru_l = ru_r = NULL; for (j = FirstOffsetNumber; j <= maxoff; j = OffsetNumberNext(j)) { - lu = GETENTRY(entryvec, array[j].index); /* use as tmp val */ + lu = GETENTRY(entryvec, array[j].index); /* use as tmp val */ if (j <= (maxoff - FirstOffsetNumber + 1) / 2) { v->spl_left[v->spl_nleft] = array[j].index; diff --git a/contrib/pageinspect/pageinspect.h b/contrib/pageinspect/pageinspect.h index 55ca68fab3..f49cf9e892 100644 --- a/contrib/pageinspect/pageinspect.h +++ b/contrib/pageinspect/pageinspect.h @@ -18,4 +18,4 @@ /* in rawpage.c */ extern Page get_page_from_raw(bytea *raw_page); -#endif /* _PAGEINSPECT_H_ */ +#endif /* _PAGEINSPECT_H_ */ diff --git a/contrib/pg_buffercache/pg_buffercache_pages.c b/contrib/pg_buffercache/pg_buffercache_pages.c index 8bebf2384d..b410aafa5a 100644 --- a/contrib/pg_buffercache/pg_buffercache_pages.c +++ b/contrib/pg_buffercache/pg_buffercache_pages.c @@ -66,7 +66,7 @@ pg_buffercache_pages(PG_FUNCTION_ARGS) FuncCallContext *funcctx; Datum result; MemoryContext oldcontext; - BufferCachePagesContext *fctx; /* User function context. */ + BufferCachePagesContext *fctx; /* User function context. */ TupleDesc tupledesc; TupleDesc expected_tupledesc; HeapTuple tuple; diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c index c37eaa395d..db40231089 100644 --- a/contrib/pg_standby/pg_standby.c +++ b/contrib/pg_standby/pg_standby.c @@ -44,8 +44,8 @@ int maxwaittime = 0; /* how long are we prepared to wait for? */ int keepfiles = 0; /* number of WAL files to keep, 0 keep all */ int maxretries = 3; /* number of retries on restore command */ bool debug = false; /* are we debugging? */ -bool need_cleanup = false; /* do we need to remove files from - * archive? */ +bool need_cleanup = false; /* do we need to remove files from + * archive? */ #ifndef WIN32 static volatile sig_atomic_t signaled = false; @@ -59,8 +59,8 @@ char *restartWALFileName; /* the file from which we can restart restore */ char *priorWALFileName; /* the file we need to get from archive */ char WALFilePath[MAXPGPATH * 2]; /* the file path including archive */ char restoreCommand[MAXPGPATH]; /* run this to restore */ -char exclusiveCleanupFileName[MAXFNAMELEN]; /* the file we need to - * get from archive */ +char exclusiveCleanupFileName[MAXFNAMELEN]; /* the file we need to get + * from archive */ /* * Two types of failover are supported (smart and fast failover). @@ -582,7 +582,7 @@ main(int argc, char **argv) * There's no way to trigger failover via signal on Windows. */ (void) pqsignal(SIGUSR1, sighandler); - (void) pqsignal(SIGINT, sighandler); /* deprecated, use SIGUSR1 */ + (void) pqsignal(SIGINT, sighandler); /* deprecated, use SIGUSR1 */ (void) pqsignal(SIGQUIT, sigquit_handler); #endif diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c index 1febdca16f..d1ed74b45e 100644 --- a/contrib/pg_stat_statements/pg_stat_statements.c +++ b/contrib/pg_stat_statements/pg_stat_statements.c @@ -107,7 +107,7 @@ static const uint32 PGSS_PG_MAJOR_VERSION = PG_VERSION_NUM / 100; #define ASSUMED_LENGTH_INIT 1024 /* initial assumed mean query length */ #define USAGE_DECREASE_FACTOR (0.99) /* decreased every entry_dealloc */ #define STICKY_DECREASE_FACTOR (0.50) /* factor for sticky entries */ -#define USAGE_DEALLOC_PERCENT 5 /* free this % of entries at once */ +#define USAGE_DEALLOC_PERCENT 5 /* free this % of entries at once */ #define JUMBLE_SIZE 1024 /* query serialization buffer size */ @@ -146,15 +146,15 @@ typedef struct Counters double sum_var_time; /* sum of variances in execution time in msec */ int64 rows; /* total # of retrieved or affected rows */ int64 shared_blks_hit; /* # of shared buffer hits */ - int64 shared_blks_read; /* # of shared disk blocks read */ + int64 shared_blks_read; /* # of shared disk blocks read */ int64 shared_blks_dirtied; /* # of shared disk blocks dirtied */ int64 shared_blks_written; /* # of shared disk blocks written */ int64 local_blks_hit; /* # of local buffer hits */ int64 local_blks_read; /* # of local disk blocks read */ - int64 local_blks_dirtied; /* # of local disk blocks dirtied */ - int64 local_blks_written; /* # of local disk blocks written */ + int64 local_blks_dirtied; /* # of local disk blocks dirtied */ + int64 local_blks_written; /* # of local disk blocks written */ int64 temp_blks_read; /* # of temp blocks read */ - int64 temp_blks_written; /* # of temp blocks written */ + int64 temp_blks_written; /* # of temp blocks written */ double blk_read_time; /* time spent reading, in msec */ double blk_write_time; /* time spent writing, in msec */ double usage; /* usage factor */ @@ -183,7 +183,7 @@ typedef struct pgssEntry typedef struct pgssSharedState { LWLock *lock; /* protects hashtable search/modification */ - double cur_median_usage; /* current median usage in hashtable */ + double cur_median_usage; /* current median usage in hashtable */ Size mean_query_len; /* current mean entry text length */ slock_t mutex; /* protects following fields only: */ Size extent; /* current extent of query file */ @@ -940,7 +940,7 @@ pgss_ExecutorEnd(QueryDesc *queryDesc) queryId, queryDesc->plannedstmt->stmt_location, queryDesc->plannedstmt->stmt_len, - queryDesc->totaltime->total * 1000.0, /* convert to msec */ + queryDesc->totaltime->total * 1000.0, /* convert to msec */ queryDesc->estate->es_processed, &queryDesc->totaltime->bufusage, NULL); @@ -1337,7 +1337,7 @@ pg_stat_statements_reset(PG_FUNCTION_ARGS) #define PG_STAT_STATEMENTS_COLS_V1_1 18 #define PG_STAT_STATEMENTS_COLS_V1_2 19 #define PG_STAT_STATEMENTS_COLS_V1_3 23 -#define PG_STAT_STATEMENTS_COLS 23 /* maximum of above */ +#define PG_STAT_STATEMENTS_COLS 23 /* maximum of above */ /* * Retrieve statement statistics. @@ -2967,12 +2967,12 @@ generate_normalized_query(pgssJumbleState *jstate, const char *query, char *norm_query; int query_len = *query_len_p; int i, - norm_query_buflen, /* Space allowed for norm_query */ + norm_query_buflen, /* Space allowed for norm_query */ len_to_wrt, /* Length (in bytes) to write */ quer_loc = 0, /* Source query byte location */ n_quer_loc = 0, /* Normalized query byte location */ last_off = 0, /* Offset from start for previous tok */ - last_tok_len = 0; /* Length (in bytes) of that tok */ + last_tok_len = 0; /* Length (in bytes) of that tok */ /* * Get constants' lengths (core system only gives us locations). Note diff --git a/contrib/pg_trgm/trgm.h b/contrib/pg_trgm/trgm.h index 8cd88e763c..45df91875a 100644 --- a/contrib/pg_trgm/trgm.h +++ b/contrib/pg_trgm/trgm.h @@ -132,4 +132,4 @@ extern TRGM *createTrgmNFA(text *text_re, Oid collation, TrgmPackedGraph **graph, MemoryContext rcontext); extern bool trigramsMatchGraph(TrgmPackedGraph *graph, bool *check); -#endif /* __TRGM_H__ */ +#endif /* __TRGM_H__ */ diff --git a/contrib/pg_trgm/trgm_regexp.c b/contrib/pg_trgm/trgm_regexp.c index 6ab2e49eb9..1d474e2aac 100644 --- a/contrib/pg_trgm/trgm_regexp.c +++ b/contrib/pg_trgm/trgm_regexp.c @@ -450,7 +450,7 @@ struct TrgmPackedGraph * by color trigram number. */ int colorTrigramsCount; - int *colorTrigramGroups; /* array of size colorTrigramsCount */ + int *colorTrigramGroups; /* array of size colorTrigramsCount */ /* * The states of the simplified NFA. State number 0 is always initial @@ -2350,4 +2350,4 @@ printTrgmPackedGraph(TrgmPackedGraph *packedGraph, TRGM *trigrams) pfree(buf.data); } -#endif /* TRGM_REGEXP_DEBUG */ +#endif /* TRGM_REGEXP_DEBUG */ diff --git a/contrib/pgcrypto/crypt-des.c b/contrib/pgcrypto/crypt-des.c index 44a5731dde..60bdbb0c91 100644 --- a/contrib/pgcrypto/crypt-des.c +++ b/contrib/pgcrypto/crypt-des.c @@ -734,7 +734,7 @@ px_crypt_des(const char *key, const char *setting) p = output + strlen(output); } else -#endif /* !DISABLE_XDES */ +#endif /* !DISABLE_XDES */ { /* * "old"-style: setting - 2 bytes of salt key - only up to the first 8 diff --git a/contrib/pgcrypto/imath.c b/contrib/pgcrypto/imath.c index 41021a7ffd..cd528bfd83 100644 --- a/contrib/pgcrypto/imath.c +++ b/contrib/pgcrypto/imath.c @@ -1975,7 +1975,7 @@ mp_int_string_len(mp_int z, mp_size radix) if (radix < MP_MIN_RADIX || radix > MP_MAX_RADIX) return MP_RANGE; - len = s_outlen(z, radix) + 1; /* for terminator */ + len = s_outlen(z, radix) + 1; /* for terminator */ /* Allow for sign marker on negatives */ if (MP_SIGN(z) == MP_NEG) @@ -2512,7 +2512,7 @@ s_usub(mp_digit *da, mp_digit *db, mp_digit *dc, /* Subtract corresponding digits and propagate borrow */ for (pos = 0; pos < size_b; ++pos, ++da, ++db, ++dc) { - w = ((mp_word) MP_DIGIT_MAX + 1 + /* MP_RADIX */ + w = ((mp_word) MP_DIGIT_MAX + 1 + /* MP_RADIX */ (mp_word) *da) - w - (mp_word) *db; *dc = LOWER_HALF(w); @@ -2522,7 +2522,7 @@ s_usub(mp_digit *da, mp_digit *db, mp_digit *dc, /* Finish the subtraction for remaining upper digits of da */ for ( /* */ ; pos < size_a; ++pos, ++da, ++dc) { - w = ((mp_word) MP_DIGIT_MAX + 1 + /* MP_RADIX */ + w = ((mp_word) MP_DIGIT_MAX + 1 + /* MP_RADIX */ (mp_word) *da) - w; *dc = LOWER_HALF(w); @@ -2594,10 +2594,10 @@ s_kmul(mp_digit *da, mp_digit *db, mp_digit *dc, * t1 and t2 are initially used as temporaries to compute the inner * product (a1 + a0)(b1 + b0) = a1b1 + a1b0 + a0b1 + a0b0 */ - carry = s_uadd(da, a_top, t1, bot_size, at_size); /* t1 = a1 + a0 */ + carry = s_uadd(da, a_top, t1, bot_size, at_size); /* t1 = a1 + a0 */ t1[bot_size] = carry; - carry = s_uadd(db, b_top, t2, bot_size, bt_size); /* t2 = b1 + b0 */ + carry = s_uadd(db, b_top, t2, bot_size, bt_size); /* t2 = b1 + b0 */ t2[bot_size] = carry; (void) s_kmul(t1, t2, t3, bot_size + 1, bot_size + 1); /* t3 = t1 * t2 */ @@ -2609,7 +2609,7 @@ s_kmul(mp_digit *da, mp_digit *db, mp_digit *dc, ZERO(t1, buf_size); ZERO(t2, buf_size); (void) s_kmul(da, db, t1, bot_size, bot_size); /* t1 = a0 * b0 */ - (void) s_kmul(a_top, b_top, t2, at_size, bt_size); /* t2 = a1 * b1 */ + (void) s_kmul(a_top, b_top, t2, at_size, bt_size); /* t2 = a1 * b1 */ /* Subtract out t1 and t2 to get the inner product */ s_usub(t3, t1, t3, buf_size + 2, buf_size); @@ -2692,10 +2692,10 @@ s_ksqr(mp_digit *da, mp_digit *dc, mp_size size_a) t3 = t2 + buf_size; ZERO(t1, 4 * buf_size); - (void) s_ksqr(da, t1, bot_size); /* t1 = a0 ^ 2 */ - (void) s_ksqr(a_top, t2, at_size); /* t2 = a1 ^ 2 */ + (void) s_ksqr(da, t1, bot_size); /* t1 = a0 ^ 2 */ + (void) s_ksqr(a_top, t2, at_size); /* t2 = a1 ^ 2 */ - (void) s_kmul(da, a_top, t3, bot_size, at_size); /* t3 = a0 * a1 */ + (void) s_kmul(da, a_top, t3, bot_size, at_size); /* t3 = a0 * a1 */ /* Quick multiply t3 by 2, shifting left (can't overflow) */ { @@ -2782,7 +2782,7 @@ s_usqr(mp_digit *da, mp_digit *dc, mp_size size_a) w = UPPER_HALF(w); if (ov) { - w += MP_DIGIT_MAX; /* MP_RADIX */ + w += MP_DIGIT_MAX; /* MP_RADIX */ ++w; } } diff --git a/contrib/pgcrypto/imath.h b/contrib/pgcrypto/imath.h index 8ba38d3acb..2d7a5268e5 100644 --- a/contrib/pgcrypto/imath.h +++ b/contrib/pgcrypto/imath.h @@ -106,9 +106,9 @@ void mp_int_free(mp_int z); mp_result mp_int_copy(mp_int a, mp_int c); /* c = a */ void mp_int_swap(mp_int a, mp_int c); /* swap a, c */ -void mp_int_zero(mp_int z); /* z = 0 */ -mp_result mp_int_abs(mp_int a, mp_int c); /* c = |a| */ -mp_result mp_int_neg(mp_int a, mp_int c); /* c = -a */ +void mp_int_zero(mp_int z); /* z = 0 */ +mp_result mp_int_abs(mp_int a, mp_int c); /* c = |a| */ +mp_result mp_int_neg(mp_int a, mp_int c); /* c = -a */ mp_result mp_int_add(mp_int a, mp_int b, mp_int c); /* c = a + b */ mp_result mp_int_add_value(mp_int a, int value, mp_int c); mp_result mp_int_sub(mp_int a, mp_int b, mp_int c); /* c = a - b */ @@ -116,23 +116,23 @@ mp_result mp_int_sub_value(mp_int a, int value, mp_int c); mp_result mp_int_mul(mp_int a, mp_int b, mp_int c); /* c = a * b */ mp_result mp_int_mul_value(mp_int a, int value, mp_int c); mp_result mp_int_mul_pow2(mp_int a, int p2, mp_int c); -mp_result mp_int_sqr(mp_int a, mp_int c); /* c = a * a */ +mp_result mp_int_sqr(mp_int a, mp_int c); /* c = a * a */ -mp_result mp_int_div(mp_int a, mp_int b, /* q = a / b */ +mp_result mp_int_div(mp_int a, mp_int b, /* q = a / b */ mp_int q, mp_int r); /* r = a % b */ -mp_result mp_int_div_value(mp_int a, int value, /* q = a / value */ - mp_int q, int *r); /* r = a % value */ +mp_result mp_int_div_value(mp_int a, int value, /* q = a / value */ + mp_int q, int *r); /* r = a % value */ mp_result mp_int_div_pow2(mp_int a, int p2, /* q = a / 2^p2 */ mp_int q, mp_int r); /* r = q % 2^p2 */ mp_result mp_int_mod(mp_int a, mp_int m, mp_int c); /* c = a % m */ #define mp_int_mod_value(A, V, R) mp_int_div_value((A), (V), 0, (R)) -mp_result mp_int_expt(mp_int a, int b, mp_int c); /* c = a^b */ +mp_result mp_int_expt(mp_int a, int b, mp_int c); /* c = a^b */ mp_result mp_int_expt_value(int a, int b, mp_int c); /* c = a^b */ int mp_int_compare(mp_int a, mp_int b); /* a <=> b */ -int mp_int_compare_unsigned(mp_int a, mp_int b); /* |a| <=> |b| */ -int mp_int_compare_zero(mp_int z); /* a <=> 0 */ +int mp_int_compare_unsigned(mp_int a, mp_int b); /* |a| <=> |b| */ +int mp_int_compare_zero(mp_int z); /* a <=> 0 */ int mp_int_compare_value(mp_int z, int value); /* a <=> v */ /* Returns true if v|a, false otherwise (including errors) */ @@ -144,15 +144,15 @@ int mp_int_is_pow2(mp_int z); mp_result mp_int_exptmod(mp_int a, mp_int b, mp_int m, mp_int c); /* c = a^b (mod m) */ mp_result mp_int_exptmod_evalue(mp_int a, int value, - mp_int m, mp_int c); /* c = a^v (mod m) */ + mp_int m, mp_int c); /* c = a^v (mod m) */ mp_result mp_int_exptmod_bvalue(int value, mp_int b, - mp_int m, mp_int c); /* c = v^b (mod m) */ + mp_int m, mp_int c); /* c = v^b (mod m) */ mp_result mp_int_exptmod_known(mp_int a, mp_int b, mp_int m, mp_int mu, mp_int c); /* c = a^b (mod m) */ mp_result mp_int_redux_const(mp_int m, mp_int c); -mp_result mp_int_invmod(mp_int a, mp_int m, mp_int c); /* c = 1/a (mod m) */ +mp_result mp_int_invmod(mp_int a, mp_int m, mp_int c); /* c = 1/a (mod m) */ mp_result mp_int_gcd(mp_int a, mp_int b, mp_int c); /* c = gcd(a, b) */ @@ -207,4 +207,4 @@ void s_print(char *tag, mp_int z); void s_print_buf(char *tag, mp_digit *buf, mp_size num); #endif -#endif /* end IMATH_H_ */ +#endif /* end IMATH_H_ */ diff --git a/contrib/pgcrypto/internal.c b/contrib/pgcrypto/internal.c index c2687cfdb2..16dfe725ea 100644 --- a/contrib/pgcrypto/internal.c +++ b/contrib/pgcrypto/internal.c @@ -42,11 +42,11 @@ /* * System reseeds should be separated at least this much. */ -#define SYSTEM_RESEED_MIN (20*60) /* 20 min */ +#define SYSTEM_RESEED_MIN (20*60) /* 20 min */ /* * How often to roll dice. */ -#define SYSTEM_RESEED_CHECK_TIME (10*60) /* 10 min */ +#define SYSTEM_RESEED_CHECK_TIME (10*60) /* 10 min */ /* * The chance is x/256 that the reseed happens. */ diff --git a/contrib/pgcrypto/mbuf.h b/contrib/pgcrypto/mbuf.h index d413eb5276..50a989f059 100644 --- a/contrib/pgcrypto/mbuf.h +++ b/contrib/pgcrypto/mbuf.h @@ -121,4 +121,4 @@ int pullf_create_mbuf_reader(PullFilter **pf_p, MBuf *mbuf); (dst) = __b; \ } while (0) -#endif /* __PX_MBUF_H */ +#endif /* __PX_MBUF_H */ diff --git a/contrib/pgcrypto/md5.h b/contrib/pgcrypto/md5.h index 07d08c134d..3e6e8da5e7 100644 --- a/contrib/pgcrypto/md5.h +++ b/contrib/pgcrypto/md5.h @@ -76,4 +76,4 @@ do { \ md5_result((x), (y)); \ } while (0) -#endif /* ! _NETINET6_MD5_H_ */ +#endif /* ! _NETINET6_MD5_H_ */ diff --git a/contrib/pgcrypto/pgp.h b/contrib/pgcrypto/pgp.h index 804a27018a..1b6ea4c9ea 100644 --- a/contrib/pgcrypto/pgp.h +++ b/contrib/pgcrypto/pgp.h @@ -155,8 +155,8 @@ struct PGP_Context */ int mdc_checked; int corrupt_prefix; /* prefix failed RFC 4880 "quick check" */ - int unsupported_compr; /* has bzip2 compression */ - int unexpected_binary; /* binary data seen in text_mode */ + int unsupported_compr; /* has bzip2 compression */ + int unexpected_binary; /* binary data seen in text_mode */ int in_mdc_pkt; int use_mdcbuf_filter; PX_MD *mdc_ctx; diff --git a/contrib/pgcrypto/px-crypt.h b/contrib/pgcrypto/px-crypt.h index 24daee743c..4ea72dcbc5 100644 --- a/contrib/pgcrypto/px-crypt.h +++ b/contrib/pgcrypto/px-crypt.h @@ -79,4 +79,4 @@ char *px_crypt_des(const char *key, const char *setting); char *px_crypt_md5(const char *pw, const char *salt, char *dst, unsigned dstlen); -#endif /* _PX_CRYPT_H */ +#endif /* _PX_CRYPT_H */ diff --git a/contrib/pgcrypto/px.h b/contrib/pgcrypto/px.h index e8068317d0..cef9c4b456 100644 --- a/contrib/pgcrypto/px.h +++ b/contrib/pgcrypto/px.h @@ -154,7 +154,7 @@ struct px_hmac struct px_cipher { unsigned (*block_size) (PX_Cipher *c); - unsigned (*key_size) (PX_Cipher *c); /* max key len */ + unsigned (*key_size) (PX_Cipher *c); /* max key len */ unsigned (*iv_size) (PX_Cipher *c); int (*init) (PX_Cipher *c, const uint8 *key, unsigned klen, const uint8 *iv); @@ -239,4 +239,4 @@ void px_debug(const char *fmt,...) pg_attribute_printf(1, 2); (c)->decrypt(c, data, dlen, res, rlen) #define px_combo_free(c) (c)->free(c) -#endif /* __PX_H */ +#endif /* __PX_H */ diff --git a/contrib/pgcrypto/rijndael.c b/contrib/pgcrypto/rijndael.c index 4adbcc1f91..4c074efbc0 100644 --- a/contrib/pgcrypto/rijndael.c +++ b/contrib/pgcrypto/rijndael.c @@ -97,7 +97,7 @@ static u4byte il_tab[4][256]; #endif static u4byte tab_gen = 0; -#endif /* !PRE_CALC_TABLES */ +#endif /* !PRE_CALC_TABLES */ #define ff_mult(a,b) ((a) && (b) ? pow_tab[(log_tab[a] + log_tab[b]) % 255] : 0) @@ -250,7 +250,7 @@ gen_tabs(void) } tab_gen = 1; -#endif /* !PRE_CALC_TABLES */ +#endif /* !PRE_CALC_TABLES */ } diff --git a/contrib/pgcrypto/rijndael.h b/contrib/pgcrypto/rijndael.h index 108ef68b76..bc9ddfaad3 100644 --- a/contrib/pgcrypto/rijndael.h +++ b/contrib/pgcrypto/rijndael.h @@ -56,4 +56,4 @@ void aes_ecb_decrypt(rijndael_ctx *ctx, uint8 *data, unsigned len); void aes_cbc_encrypt(rijndael_ctx *ctx, uint8 *iva, uint8 *data, unsigned len); void aes_cbc_decrypt(rijndael_ctx *ctx, uint8 *iva, uint8 *data, unsigned len); -#endif /* _RIJNDAEL_H_ */ +#endif /* _RIJNDAEL_H_ */ diff --git a/contrib/pgcrypto/sha1.h b/contrib/pgcrypto/sha1.h index 2f61e454ba..4300694a34 100644 --- a/contrib/pgcrypto/sha1.h +++ b/contrib/pgcrypto/sha1.h @@ -72,4 +72,4 @@ typedef struct sha1_ctxt SHA1_CTX; #define SHA1_RESULTLEN (160/8) -#endif /* _NETINET6_SHA1_H_ */ +#endif /* _NETINET6_SHA1_H_ */ diff --git a/contrib/pgstattuple/pgstatindex.c b/contrib/pgstattuple/pgstatindex.c index 03b387f6b6..c3a95208c1 100644 --- a/contrib/pgstattuple/pgstatindex.c +++ b/contrib/pgstattuple/pgstatindex.c @@ -333,7 +333,7 @@ pgstatindex_impl(Relation rel, FunctionCallInfo fcinfo) values[j++] = psprintf("%d", indexStat.version); values[j++] = psprintf("%d", indexStat.level); values[j++] = psprintf(INT64_FORMAT, - (1 + /* include the metapage in index_size */ + (1 + /* include the metapage in index_size */ indexStat.leaf_pages + indexStat.internal_pages + indexStat.deleted_pages + diff --git a/contrib/postgres_fdw/option.c b/contrib/postgres_fdw/option.c index e24db569ea..ca496b9df7 100644 --- a/contrib/postgres_fdw/option.c +++ b/contrib/postgres_fdw/option.c @@ -258,7 +258,7 @@ is_valid_option(const char *keyword, Oid context) { PgFdwOption *opt; - Assert(postgres_fdw_options); /* must be initialized already */ + Assert(postgres_fdw_options); /* must be initialized already */ for (opt = postgres_fdw_options; opt->keyword; opt++) { @@ -277,7 +277,7 @@ is_libpq_option(const char *keyword) { PgFdwOption *opt; - Assert(postgres_fdw_options); /* must be initialized already */ + Assert(postgres_fdw_options); /* must be initialized already */ for (opt = postgres_fdw_options; opt->keyword; opt++) { diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index 080cb0a074..3d18098461 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -899,14 +899,14 @@ postgresGetForeignPaths(PlannerInfo *root, * to estimate cost and size of this path. */ path = create_foreignscan_path(root, baserel, - NULL, /* default pathtarget */ + NULL, /* default pathtarget */ fpinfo->rows, fpinfo->startup_cost, fpinfo->total_cost, NIL, /* no pathkeys */ - NULL, /* no outer rel either */ - NULL, /* no extra plan */ - NIL); /* no fdw_private list */ + NULL, /* no outer rel either */ + NULL, /* no extra plan */ + NIL); /* no fdw_private list */ add_path(baserel, (Path *) path); /* Add paths with pathkeys */ @@ -1075,7 +1075,7 @@ postgresGetForeignPaths(PlannerInfo *root, rows, startup_cost, total_cost, - NIL, /* no pathkeys */ + NIL, /* no pathkeys */ param_info->ppi_req_outer, NULL, NIL); /* no fdw_private list */ @@ -1591,7 +1591,7 @@ postgresPlanForeignModify(PlannerInfo *root, /* bit numbers are offset by FirstLowInvalidHeapAttributeNumber */ AttrNumber attno = col + FirstLowInvalidHeapAttributeNumber; - if (attno <= InvalidAttrNumber) /* shouldn't happen */ + if (attno <= InvalidAttrNumber) /* shouldn't happen */ elog(ERROR, "system-column update is not supported"); targetAttrs = lappend_int(targetAttrs, attno); } @@ -2173,7 +2173,7 @@ postgresPlanDirectModify(PlannerInfo *root, AttrNumber attno = col + FirstLowInvalidHeapAttributeNumber; TargetEntry *tle; - if (attno <= InvalidAttrNumber) /* shouldn't happen */ + if (attno <= InvalidAttrNumber) /* shouldn't happen */ elog(ERROR, "system-column update is not supported"); tle = get_tle_by_resno(subplan->targetlist, attno); @@ -4305,7 +4305,7 @@ foreign_join_ok(PlannerInfo *root, RelOptInfo *joinrel, JoinType jointype, * Note that since this joinrel is at the end of the join_rel_list list * when we are called, we can get the position by list_length. */ - Assert(fpinfo->relation_index == 0); /* shouldn't be set yet */ + Assert(fpinfo->relation_index == 0); /* shouldn't be set yet */ fpinfo->relation_index = list_length(root->parse->rtable) + list_length(root->join_rel_list); @@ -4316,7 +4316,7 @@ static void add_paths_with_pathkeys_for_rel(PlannerInfo *root, RelOptInfo *rel, Path *epq_path) { - List *useful_pathkeys_list = NIL; /* List of all pathkeys */ + List *useful_pathkeys_list = NIL; /* List of all pathkeys */ ListCell *lc; useful_pathkeys_list = get_useful_pathkeys_for_relation(root, rel); @@ -4568,7 +4568,7 @@ postgresGetForeignJoinPaths(PlannerInfo *root, rows, startup_cost, total_cost, - NIL, /* no pathkeys */ + NIL, /* no pathkeys */ NULL, /* no required_outer */ epq_path, NIL); /* no fdw_private */ diff --git a/contrib/postgres_fdw/postgres_fdw.h b/contrib/postgres_fdw/postgres_fdw.h index 25c950dd76..f396dae7fb 100644 --- a/contrib/postgres_fdw/postgres_fdw.h +++ b/contrib/postgres_fdw/postgres_fdw.h @@ -182,4 +182,4 @@ extern bool is_builtin(Oid objectId); extern bool is_shippable(Oid objectId, Oid classId, PgFdwRelationInfo *fpinfo); extern const char *get_jointype_name(JoinType jointype); -#endif /* POSTGRES_FDW_H */ +#endif /* POSTGRES_FDW_H */ diff --git a/contrib/sepgsql/label.c b/contrib/sepgsql/label.c index 2f01c393cc..f55b9de1da 100644 --- a/contrib/sepgsql/label.c +++ b/contrib/sepgsql/label.c @@ -68,10 +68,10 @@ static fmgr_hook_type next_fmgr_hook = NULL; * labels were set during the (sub-)transactions. */ static char *client_label_peer = NULL; /* set by getpeercon(3) */ -static List *client_label_pending = NIL; /* pending list being set by - * sepgsql_setcon() */ -static char *client_label_committed = NULL; /* set by sepgsql_setcon(), - * and already committed */ +static List *client_label_pending = NIL; /* pending list being set by + * sepgsql_setcon() */ +static char *client_label_committed = NULL; /* set by sepgsql_setcon(), and + * already committed */ static char *client_label_func = NULL; /* set by trusted procedure */ typedef struct diff --git a/contrib/sepgsql/sepgsql.h b/contrib/sepgsql/sepgsql.h index fbe25e6602..d4bf0cd14a 100644 --- a/contrib/sepgsql/sepgsql.h +++ b/contrib/sepgsql/sepgsql.h @@ -324,4 +324,4 @@ extern void sepgsql_proc_relabel(Oid functionId, const char *seclabel); extern void sepgsql_proc_setattr(Oid functionId); extern void sepgsql_proc_execute(Oid functionId); -#endif /* SEPGSQL_H */ +#endif /* SEPGSQL_H */ diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c index 208ff6103d..692d99ca5b 100644 --- a/contrib/spi/refint.c +++ b/contrib/spi/refint.c @@ -248,7 +248,7 @@ check_foreign_key(PG_FUNCTION_ARGS) Datum *kvals; /* key values */ char *relname; /* referencing relation name */ Relation rel; /* triggered relation */ - HeapTuple trigtuple = NULL; /* tuple to being changed */ + HeapTuple trigtuple = NULL; /* tuple to being changed */ HeapTuple newtuple = NULL; /* tuple to return */ TupleDesc tupdesc; /* tuple description */ EPlan *plan; /* prepared plan(s) */ diff --git a/contrib/spi/timetravel.c b/contrib/spi/timetravel.c index c4b3e7d6fa..f7905e20db 100644 --- a/contrib/spi/timetravel.c +++ b/contrib/spi/timetravel.c @@ -85,7 +85,7 @@ timetravel(PG_FUNCTION_ARGS) Trigger *trigger; /* to get trigger name */ int argc; char **args; /* arguments */ - int attnum[MaxAttrNum]; /* fnumbers of start/stop columns */ + int attnum[MaxAttrNum]; /* fnumbers of start/stop columns */ Datum oldtimeon, oldtimeoff; Datum newtimeon, diff --git a/contrib/tablefunc/tablefunc.c b/contrib/tablefunc/tablefunc.c index 7434ca9373..b5e1ad29e2 100644 --- a/contrib/tablefunc/tablefunc.c +++ b/contrib/tablefunc/tablefunc.c @@ -1187,8 +1187,8 @@ connectby(char *relname, branch_delim, start_with, start_with, /* current_branch */ - 0, /* initial level is 0 */ - &serial, /* initial serial is 1 */ + 0, /* initial level is 0 */ + &serial, /* initial serial is 1 */ max_depth, show_branch, show_serial, diff --git a/contrib/tablefunc/tablefunc.h b/contrib/tablefunc/tablefunc.h index 87fa1e5dcb..e88a5720fa 100644 --- a/contrib/tablefunc/tablefunc.h +++ b/contrib/tablefunc/tablefunc.h @@ -36,4 +36,4 @@ #include "fmgr.h" -#endif /* TABLEFUNC_H */ +#endif /* TABLEFUNC_H */ diff --git a/contrib/tcn/tcn.c b/contrib/tcn/tcn.c index 124110830f..5106d424b4 100644 --- a/contrib/tcn/tcn.c +++ b/contrib/tcn/tcn.c @@ -132,7 +132,7 @@ triggered_change_notification(PG_FUNCTION_ARGS) Form_pg_index index; indexTuple = SearchSysCache1(INDEXRELID, ObjectIdGetDatum(indexoid)); - if (!HeapTupleIsValid(indexTuple)) /* should not happen */ + if (!HeapTupleIsValid(indexTuple)) /* should not happen */ elog(ERROR, "cache lookup failed for index %u", indexoid); index = (Form_pg_index) GETSTRUCT(indexTuple); /* we're only interested if it is the primary key and valid */ @@ -175,5 +175,5 @@ triggered_change_notification(PG_FUNCTION_ARGS) (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), errmsg("triggered_change_notification: must be called on a table with a primary key"))); - return PointerGetDatum(NULL); /* after trigger; value doesn't matter */ + return PointerGetDatum(NULL); /* after trigger; value doesn't matter */ } diff --git a/contrib/uuid-ossp/uuid-ossp.c b/contrib/uuid-ossp/uuid-ossp.c index f34398f54a..55bc609415 100644 --- a/contrib/uuid-ossp/uuid-ossp.c +++ b/contrib/uuid-ossp/uuid-ossp.c @@ -110,7 +110,7 @@ do { \ uu.clock_seq_hi_and_reserved |= 0x80; \ } while(0) -#endif /* !HAVE_UUID_OSSP */ +#endif /* !HAVE_UUID_OSSP */ PG_MODULE_MAGIC; @@ -398,7 +398,7 @@ uuid_generate_internal(int v, unsigned char *ns, char *ptr, int len) return DirectFunctionCall1(uuid_in, CStringGetDatum(strbuf)); } -#endif /* HAVE_UUID_OSSP */ +#endif /* HAVE_UUID_OSSP */ Datum diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c index acf1c4a1c1..a48818d944 100644 --- a/contrib/xml2/xpath.c +++ b/contrib/xml2/xpath.c @@ -95,7 +95,7 @@ PG_FUNCTION_INFO_V1(xml_is_well_formed); Datum xml_is_well_formed(PG_FUNCTION_ARGS) { - text *t = PG_GETARG_TEXT_PP(0); /* document buffer */ + text *t = PG_GETARG_TEXT_PP(0); /* document buffer */ bool result = false; int32 docsize = VARSIZE_ANY_EXHDR(t); xmlDocPtr doctree; @@ -249,7 +249,7 @@ Datum xpath_nodeset(PG_FUNCTION_ARGS) { text *document = PG_GETARG_TEXT_PP(0); - text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */ + text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */ xmlChar *toptag = pgxml_texttoxmlchar(PG_GETARG_TEXT_PP(2)); xmlChar *septag = pgxml_texttoxmlchar(PG_GETARG_TEXT_PP(3)); xmlChar *xpath; @@ -282,7 +282,7 @@ Datum xpath_list(PG_FUNCTION_ARGS) { text *document = PG_GETARG_TEXT_PP(0); - text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */ + text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */ xmlChar *plainsep = pgxml_texttoxmlchar(PG_GETARG_TEXT_PP(2)); xmlChar *xpath; text *xpres; @@ -311,7 +311,7 @@ Datum xpath_string(PG_FUNCTION_ARGS) { text *document = PG_GETARG_TEXT_PP(0); - text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */ + text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */ xmlChar *xpath; int32 pathsize; text *xpres; @@ -352,7 +352,7 @@ Datum xpath_number(PG_FUNCTION_ARGS) { text *document = PG_GETARG_TEXT_PP(0); - text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */ + text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */ xmlChar *xpath; float4 fRes; xmlXPathObjectPtr res; @@ -384,7 +384,7 @@ Datum xpath_bool(PG_FUNCTION_ARGS) { text *document = PG_GETARG_TEXT_PP(0); - text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */ + text *xpathsupp = PG_GETARG_TEXT_PP(1); /* XPath expression */ xmlChar *xpath; int bRes; xmlXPathObjectPtr res; diff --git a/contrib/xml2/xslt_proc.c b/contrib/xml2/xslt_proc.c index 391e6b593b..fb49b98f5a 100644 --- a/contrib/xml2/xslt_proc.c +++ b/contrib/xml2/xslt_proc.c @@ -29,7 +29,7 @@ #include #include #include -#endif /* USE_LIBXSLT */ +#endif /* USE_LIBXSLT */ #ifdef USE_LIBXSLT @@ -39,7 +39,7 @@ extern PgXmlErrorContext *pgxml_parser_init(PgXmlStrictness strictness); /* local defs */ static const char **parse_params(text *paramstr); -#endif /* USE_LIBXSLT */ +#endif /* USE_LIBXSLT */ PG_FUNCTION_INFO_V1(xslt_process); @@ -189,7 +189,7 @@ xslt_process(PG_FUNCTION_ARGS) (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("xslt_process() is not available without libxslt"))); PG_RETURN_NULL(); -#endif /* USE_LIBXSLT */ +#endif /* USE_LIBXSLT */ } #ifdef USE_LIBXSLT @@ -253,4 +253,4 @@ parse_params(text *paramstr) return params; } -#endif /* USE_LIBXSLT */ +#endif /* USE_LIBXSLT */ diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c index 3609c8ae7c..bd08f0e396 100644 --- a/src/backend/access/brin/brin_pageops.c +++ b/src/backend/access/brin/brin_pageops.c @@ -357,7 +357,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", itemsz, BrinMaxItemSize, RelationGetRelationName(idxrel)))); - return InvalidOffsetNumber; /* keep compiler quiet */ + return InvalidOffsetNumber; /* keep compiler quiet */ } /* Make sure the revmap is long enough to contain the entry we need */ @@ -823,7 +823,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), errmsg("index row size %zu exceeds maximum %zu for index \"%s\"", itemsz, freespace, RelationGetRelationName(irel)))); - return InvalidBuffer; /* keep compiler quiet */ + return InvalidBuffer; /* keep compiler quiet */ } if (newblk != oldblk) diff --git a/src/backend/access/brin/brin_revmap.c b/src/backend/access/brin/brin_revmap.c index e778cbcacd..c87bc03a9e 100644 --- a/src/backend/access/brin/brin_revmap.c +++ b/src/backend/access/brin/brin_revmap.c @@ -48,7 +48,7 @@ struct BrinRevmap { Relation rm_irel; BlockNumber rm_pagesPerRange; - BlockNumber rm_lastRevmapPage; /* cached from the metapage */ + BlockNumber rm_lastRevmapPage; /* cached from the metapage */ Buffer rm_metaBuf; Buffer rm_currBuf; }; diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c index c0086ded62..584a202ab5 100644 --- a/src/backend/access/common/heaptuple.c +++ b/src/backend/access/common/heaptuple.c @@ -356,7 +356,7 @@ nocachegetattr(HeapTuple tuple, HeapTupleHeader tup = tuple->t_data; Form_pg_attribute *att = tupleDesc->attrs; char *tp; /* ptr to data part of tuple */ - bits8 *bp = tup->t_bits; /* ptr to null bitmap in tuple */ + bits8 *bp = tup->t_bits; /* ptr to null bitmap in tuple */ bool slow = false; /* do we have to walk attrs? */ int off; /* current offset within data */ @@ -762,7 +762,7 @@ heap_form_tuple(TupleDesc tupleDescriptor, HeapTupleHeaderSetNatts(td, numberOfAttributes); td->t_hoff = hoff; - if (tupleDescriptor->tdhasoid) /* else leave infomask = 0 */ + if (tupleDescriptor->tdhasoid) /* else leave infomask = 0 */ td->t_infomask = HEAP_HASOID; heap_fill_tuple(tupleDescriptor, @@ -941,7 +941,7 @@ heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc, int attnum; char *tp; /* ptr to tuple data */ long off; /* offset in tuple data */ - bits8 *bp = tup->t_bits; /* ptr to null bitmap in tuple */ + bits8 *bp = tup->t_bits; /* ptr to null bitmap in tuple */ bool slow = false; /* can we use/set attcacheoff? */ natts = HeapTupleHeaderGetNatts(tup); @@ -1043,7 +1043,7 @@ slot_deform_tuple(TupleTableSlot *slot, int natts) int attnum; char *tp; /* ptr to tuple data */ long off; /* offset in tuple data */ - bits8 *bp = tup->t_bits; /* ptr to null bitmap in tuple */ + bits8 *bp = tup->t_bits; /* ptr to null bitmap in tuple */ bool slow; /* can we use/set attcacheoff? */ /* @@ -1151,7 +1151,7 @@ slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull) { if (tuple == NULL) /* internal error */ elog(ERROR, "cannot extract system attribute from virtual tuple"); - if (tuple == &(slot->tts_minhdr)) /* internal error */ + if (tuple == &(slot->tts_minhdr)) /* internal error */ elog(ERROR, "cannot extract system attribute from minimal tuple"); return heap_getsysattr(tuple, attnum, tupleDesc, isnull); } @@ -1337,7 +1337,7 @@ slot_attisnull(TupleTableSlot *slot, int attnum) { if (tuple == NULL) /* internal error */ elog(ERROR, "cannot extract system attribute from virtual tuple"); - if (tuple == &(slot->tts_minhdr)) /* internal error */ + if (tuple == &(slot->tts_minhdr)) /* internal error */ elog(ERROR, "cannot extract system attribute from minimal tuple"); return heap_attisnull(tuple, attnum); } @@ -1446,7 +1446,7 @@ heap_form_minimal_tuple(TupleDesc tupleDescriptor, HeapTupleHeaderSetNatts(tuple, numberOfAttributes); tuple->t_hoff = hoff + MINIMAL_TUPLE_OFFSET; - if (tupleDescriptor->tdhasoid) /* else leave infomask = 0 */ + if (tupleDescriptor->tdhasoid) /* else leave infomask = 0 */ tuple->t_infomask = HEAP_HASOID; heap_fill_tuple(tupleDescriptor, diff --git a/src/backend/access/common/printsimple.c b/src/backend/access/common/printsimple.c index 851c3bf4de..c863e859fe 100644 --- a/src/backend/access/common/printsimple.c +++ b/src/backend/access/common/printsimple.c @@ -103,7 +103,7 @@ printsimple(TupleTableSlot *slot, DestReceiver *self) case INT4OID: { int32 num = DatumGetInt32(value); - char str[12]; /* sign, 10 digits and '\0' */ + char str[12]; /* sign, 10 digits and '\0' */ pg_ltoa(num, str); pq_sendcountedtext(&buf, str, strlen(str), false); @@ -113,7 +113,7 @@ printsimple(TupleTableSlot *slot, DestReceiver *self) case INT8OID: { int64 num = DatumGetInt64(value); - char str[23]; /* sign, 21 digits and '\0' */ + char str[23]; /* sign, 21 digits and '\0' */ pg_lltoa(num, str); pq_sendcountedtext(&buf, str, strlen(str), false); diff --git a/src/backend/access/common/tupconvert.c b/src/backend/access/common/tupconvert.c index 392a49b522..57e44375ea 100644 --- a/src/backend/access/common/tupconvert.c +++ b/src/backend/access/common/tupconvert.c @@ -188,7 +188,7 @@ convert_tuples_by_position(TupleDesc indesc, n = indesc->natts + 1; /* +1 for NULL */ map->invalues = (Datum *) palloc(n * sizeof(Datum)); map->inisnull = (bool *) palloc(n * sizeof(bool)); - map->invalues[0] = (Datum) 0; /* set up the NULL entry */ + map->invalues[0] = (Datum) 0; /* set up the NULL entry */ map->inisnull[0] = true; return map; @@ -267,7 +267,7 @@ convert_tuples_by_name(TupleDesc indesc, n = indesc->natts + 1; /* +1 for NULL */ map->invalues = (Datum *) palloc(n * sizeof(Datum)); map->inisnull = (bool *) palloc(n * sizeof(bool)); - map->invalues[0] = (Datum) 0; /* set up the NULL entry */ + map->invalues[0] = (Datum) 0; /* set up the NULL entry */ map->inisnull[0] = true; return map; diff --git a/src/backend/access/gin/ginbulk.c b/src/backend/access/gin/ginbulk.c index f07c76b90b..4ff149e59a 100644 --- a/src/backend/access/gin/ginbulk.c +++ b/src/backend/access/gin/ginbulk.c @@ -116,7 +116,7 @@ ginInitBA(BuildAccumulator *accum) cmpEntryAccumulator, ginCombineData, ginAllocEntryAccumulator, - NULL, /* no freefunc needed */ + NULL, /* no freefunc needed */ (void *) accum); } diff --git a/src/backend/access/gin/ginfast.c b/src/backend/access/gin/ginfast.c index 0d5bb70cc9..03a54346aa 100644 --- a/src/backend/access/gin/ginfast.c +++ b/src/backend/access/gin/ginfast.c @@ -913,8 +913,8 @@ ginInsertCleanup(GinState *ginstate, bool full_clean, * Remember next page - it will become the new list head */ blkno = GinPageGetOpaque(page)->rightlink; - UnlockReleaseBuffer(buffer); /* shiftList will do exclusive - * locking */ + UnlockReleaseBuffer(buffer); /* shiftList will do exclusive + * locking */ /* * remove read pages from pending list, at this point all content diff --git a/src/backend/access/gin/ginscan.c b/src/backend/access/gin/ginscan.c index c83375d6b4..25758b9b5d 100644 --- a/src/backend/access/gin/ginscan.c +++ b/src/backend/access/gin/ginscan.c @@ -362,7 +362,7 @@ ginNewScanKey(IndexScanDesc scan) { if (nullFlags[j]) { - nullFlags[j] = true; /* not any other nonzero value */ + nullFlags[j] = true; /* not any other nonzero value */ hasNullQuery = true; } } diff --git a/src/backend/access/gin/ginvacuum.c b/src/backend/access/gin/ginvacuum.c index 27e502a360..31425e9963 100644 --- a/src/backend/access/gin/ginvacuum.c +++ b/src/backend/access/gin/ginvacuum.c @@ -650,7 +650,7 @@ ginbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats, vacuum_delay_point(); } - if (blkno == InvalidBlockNumber) /* rightmost page */ + if (blkno == InvalidBlockNumber) /* rightmost page */ break; buffer = ReadBufferExtended(index, MAIN_FORKNUM, blkno, diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index 6593771361..afef753ede 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -1442,7 +1442,7 @@ initGISTstate(Relation index) giststate = (GISTSTATE *) palloc(sizeof(GISTSTATE)); giststate->scanCxt = scanCxt; - giststate->tempCxt = scanCxt; /* caller must change this if needed */ + giststate->tempCxt = scanCxt; /* caller must change this if needed */ giststate->tupdesc = index->rd_att; for (i = 0; i < index->rd_att->natts; i++) diff --git a/src/backend/access/gist/gistbuild.c b/src/backend/access/gist/gistbuild.c index f1f08bb3d8..c24643df03 100644 --- a/src/backend/access/gist/gistbuild.c +++ b/src/backend/access/gist/gistbuild.c @@ -814,7 +814,7 @@ gistbufferinginserttuples(GISTBuildState *buildstate, Buffer buffer, int level, downlinks, ndownlinks, downlinkoffnum, InvalidBlockNumber, InvalidOffsetNumber); - list_free_deep(splitinfo); /* we don't need this anymore */ + list_free_deep(splitinfo); /* we don't need this anymore */ } else UnlockReleaseBuffer(buffer); diff --git a/src/backend/access/gist/gistbuildbuffers.c b/src/backend/access/gist/gistbuildbuffers.c index ca4c32b3fe..f558729fbf 100644 --- a/src/backend/access/gist/gistbuildbuffers.c +++ b/src/backend/access/gist/gistbuildbuffers.c @@ -709,7 +709,7 @@ gistRelocateBuildBuffersOnSplit(GISTBuildBuffers *gfbb, GISTSTATE *giststate, * page seen so far. Skip the remaining columns and move * on to the next page, if any. */ - zero_penalty = false; /* so outer loop won't exit */ + zero_penalty = false; /* so outer loop won't exit */ break; } } diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c index 5a4dea89ac..760ea0c997 100644 --- a/src/backend/access/gist/gistget.c +++ b/src/backend/access/gist/gistget.c @@ -147,7 +147,7 @@ gistindex_keytest(IndexScanDesc scan, { int i; - if (GistPageIsLeaf(page)) /* shouldn't happen */ + if (GistPageIsLeaf(page)) /* shouldn't happen */ elog(ERROR, "invalid GiST tuple found on leaf page"); for (i = 0; i < scan->numberOfOrderBys; i++) so->distances[i] = -get_float8_infinity(); diff --git a/src/backend/access/hash/hashfunc.c b/src/backend/access/hash/hashfunc.c index 289d766419..a127f3f8b1 100644 --- a/src/backend/access/hash/hashfunc.c +++ b/src/backend/access/hash/hashfunc.c @@ -412,7 +412,7 @@ hash_any(register const unsigned char *k, register int keylen) a += k[0]; /* case 0: nothing left to add */ } -#endif /* WORDS_BIGENDIAN */ +#endif /* WORDS_BIGENDIAN */ } else { @@ -429,7 +429,7 @@ hash_any(register const unsigned char *k, register int keylen) a += (k[0] + ((uint32) k[1] << 8) + ((uint32) k[2] << 16) + ((uint32) k[3] << 24)); b += (k[4] + ((uint32) k[5] << 8) + ((uint32) k[6] << 16) + ((uint32) k[7] << 24)); c += (k[8] + ((uint32) k[9] << 8) + ((uint32) k[10] << 16) + ((uint32) k[11] << 24)); -#endif /* WORDS_BIGENDIAN */ +#endif /* WORDS_BIGENDIAN */ mix(a, b, c); k += 12; len -= 12; @@ -492,7 +492,7 @@ hash_any(register const unsigned char *k, register int keylen) a += k[0]; /* case 0: nothing left to add */ } -#endif /* WORDS_BIGENDIAN */ +#endif /* WORDS_BIGENDIAN */ } final(a, b, c); diff --git a/src/backend/access/hash/hashsearch.c b/src/backend/access/hash/hashsearch.c index 2d9204903f..3e461ad7a0 100644 --- a/src/backend/access/hash/hashsearch.c +++ b/src/backend/access/hash/hashsearch.c @@ -462,7 +462,7 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir) } if (so->hashso_sk_hash == _hash_get_indextuple_hashkey(itup)) - break; /* yes, so exit for-loop */ + break; /* yes, so exit for-loop */ } /* Before leaving current page, deal with any killed items */ @@ -519,7 +519,7 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir) } if (so->hashso_sk_hash == _hash_get_indextuple_hashkey(itup)) - break; /* yes, so exit for-loop */ + break; /* yes, so exit for-loop */ } /* Before leaving current page, deal with any killed items */ diff --git a/src/backend/access/hash/hashutil.c b/src/backend/access/hash/hashutil.c index c513c3b842..62e37b6de5 100644 --- a/src/backend/access/hash/hashutil.c +++ b/src/backend/access/hash/hashutil.c @@ -207,7 +207,7 @@ _hash_get_totalbuckets(uint32 splitpoint_phase) /* account for buckets within splitpoint_group */ phases_within_splitpoint_group = (((splitpoint_phase - HASH_SPLITPOINT_GROUPS_WITH_ONE_PHASE) & - HASH_SPLITPOINT_PHASE_MASK) + 1); /* from 0-based to 1-based */ + HASH_SPLITPOINT_PHASE_MASK) + 1); /* from 0-based to 1-based */ total_buckets += (((1 << (splitpoint_group - 1)) >> HASH_SPLITPOINT_PHASE_BITS) * phases_within_splitpoint_group); diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index e890e08c9a..5357a77dc2 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -521,15 +521,15 @@ heapgettup(HeapScanDesc scan, } } else - page = scan->rs_startblock; /* first page */ + page = scan->rs_startblock; /* first page */ heapgetpage(scan, page); - lineoff = FirstOffsetNumber; /* first offnum */ + lineoff = FirstOffsetNumber; /* first offnum */ scan->rs_inited = true; } else { /* continue from previously returned page/tuple */ - page = scan->rs_cblock; /* current page */ + page = scan->rs_cblock; /* current page */ lineoff = /* next offnum */ OffsetNumberNext(ItemPointerGetOffsetNumber(&(tuple->t_self))); } @@ -577,7 +577,7 @@ heapgettup(HeapScanDesc scan, else { /* continue from previously returned page/tuple */ - page = scan->rs_cblock; /* current page */ + page = scan->rs_cblock; /* current page */ } LockBuffer(scan->rs_cbuf, BUFFER_LOCK_SHARE); @@ -823,7 +823,7 @@ heapgettup_pagemode(HeapScanDesc scan, } } else - page = scan->rs_startblock; /* first page */ + page = scan->rs_startblock; /* first page */ heapgetpage(scan, page); lineindex = 0; scan->rs_inited = true; @@ -831,7 +831,7 @@ heapgettup_pagemode(HeapScanDesc scan, else { /* continue from previously returned page/tuple */ - page = scan->rs_cblock; /* current page */ + page = scan->rs_cblock; /* current page */ lineindex = scan->rs_cindex + 1; } @@ -876,7 +876,7 @@ heapgettup_pagemode(HeapScanDesc scan, else { /* continue from previously returned page/tuple */ - page = scan->rs_cblock; /* current page */ + page = scan->rs_cblock; /* current page */ } dp = BufferGetPage(scan->rs_cbuf); @@ -1088,7 +1088,7 @@ fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, ) ); } -#endif /* defined(DISABLE_COMPLEX_MACRO) */ +#endif /* defined(DISABLE_COMPLEX_MACRO) */ /* ---------------------------------------------------------------- @@ -1787,7 +1787,7 @@ heap_update_snapshot(HeapScanDesc scan, Snapshot snapshot) #define HEAPDEBUG_1 #define HEAPDEBUG_2 #define HEAPDEBUG_3 -#endif /* !defined(HEAPDEBUGALL) */ +#endif /* !defined(HEAPDEBUGALL) */ HeapTuple @@ -2623,7 +2623,7 @@ heap_prepare_insert(Relation relation, HeapTuple tup, TransactionId xid, HeapTupleHeaderSetXminFrozen(tup->t_data); HeapTupleHeaderSetCmin(tup->t_data, cid); - HeapTupleHeaderSetXmax(tup->t_data, 0); /* for cleanliness */ + HeapTupleHeaderSetXmax(tup->t_data, 0); /* for cleanliness */ tup->t_tableOid = RelationGetRelid(relation); /* @@ -4214,7 +4214,7 @@ l2: HeapTupleClearHeapOnly(newtup); } - RelationPutHeapTuple(relation, newbuf, heaptup, false); /* insert new tuple */ + RelationPutHeapTuple(relation, newbuf, heaptup, false); /* insert new tuple */ /* Clear obsolete visibility flags, possibly set by ourselves above... */ @@ -6361,7 +6361,7 @@ FreezeMultiXactId(MultiXactId multi, uint16 t_infomask, { Assert(!TransactionIdDidCommit(xid)); *flags |= FRM_INVALIDATE_XMAX; - xid = InvalidTransactionId; /* not strictly necessary */ + xid = InvalidTransactionId; /* not strictly necessary */ } else { diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c index 6529fe3d6b..13e3bdca50 100644 --- a/src/backend/access/heap/hio.c +++ b/src/backend/access/heap/hio.c @@ -329,7 +329,7 @@ RelationGetBufferForTuple(Relation relation, Size len, if (otherBuffer != InvalidBuffer) otherBlock = BufferGetBlockNumber(otherBuffer); else - otherBlock = InvalidBlockNumber; /* just to keep compiler quiet */ + otherBlock = InvalidBlockNumber; /* just to keep compiler quiet */ /* * We first try to put the tuple on the same page we last inserted a tuple diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c index d69a266c36..5b7c57d568 100644 --- a/src/backend/access/heap/pruneheap.c +++ b/src/backend/access/heap/pruneheap.c @@ -31,8 +31,7 @@ typedef struct { TransactionId new_prune_xid; /* new prune hint value for page */ - TransactionId latestRemovedXid; /* latest xid to be removed by this - * prune */ + TransactionId latestRemovedXid; /* latest xid to be removed by this prune */ int nredirected; /* numbers of entries in arrays below */ int ndead; int nunused; @@ -149,8 +148,8 @@ heap_page_prune_opt(Relation relation, Buffer buffer) */ if (PageIsFull(page) || PageGetHeapFreeSpace(page) < minfree) { - TransactionId ignore = InvalidTransactionId; /* return value not - * needed */ + TransactionId ignore = InvalidTransactionId; /* return value not + * needed */ /* OK to prune */ (void) heap_page_prune(relation, buffer, OldestXmin, true, &ignore); diff --git a/src/backend/access/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c index e702af901e..bd560e47e1 100644 --- a/src/backend/access/heap/rewriteheap.c +++ b/src/backend/access/heap/rewriteheap.c @@ -146,22 +146,22 @@ typedef struct RewriteStateData BlockNumber rs_blockno; /* block where page will go */ bool rs_buffer_valid; /* T if any tuples in buffer */ bool rs_use_wal; /* must we WAL-log inserts? */ - bool rs_logical_rewrite; /* do we need to do logical rewriting */ - TransactionId rs_oldest_xmin; /* oldest xmin used by caller to - * determine tuple visibility */ + bool rs_logical_rewrite; /* do we need to do logical rewriting */ + TransactionId rs_oldest_xmin; /* oldest xmin used by caller to determine + * tuple visibility */ TransactionId rs_freeze_xid; /* Xid that will be used as freeze cutoff * point */ - TransactionId rs_logical_xmin; /* Xid that will be used as cutoff - * point for logical rewrites */ + TransactionId rs_logical_xmin; /* Xid that will be used as cutoff point + * for logical rewrites */ MultiXactId rs_cutoff_multi; /* MultiXactId that will be used as cutoff * point for multixacts */ MemoryContext rs_cxt; /* for hash tables and entries and tuples in * them */ XLogRecPtr rs_begin_lsn; /* XLogInsertLsn when starting the rewrite */ - HTAB *rs_unresolved_tups; /* unmatched A tuples */ - HTAB *rs_old_new_tid_map; /* unmatched B tuples */ + HTAB *rs_unresolved_tups; /* unmatched A tuples */ + HTAB *rs_old_new_tid_map; /* unmatched B tuples */ HTAB *rs_logical_mappings; /* logical remapping files */ - uint32 rs_num_rewrite_mappings; /* # in memory mappings */ + uint32 rs_num_rewrite_mappings; /* # in memory mappings */ } RewriteStateData; /* @@ -216,8 +216,8 @@ typedef struct RewriteMappingFile */ typedef struct RewriteMappingDataEntry { - LogicalRewriteMappingData map; /* map between old and new location of - * the tuple */ + LogicalRewriteMappingData map; /* map between old and new location of the + * tuple */ dlist_node node; } RewriteMappingDataEntry; @@ -655,7 +655,7 @@ raw_heap_insert(RewriteState state, HeapTuple tup) else heaptup = tup; - len = MAXALIGN(heaptup->t_len); /* be conservative */ + len = MAXALIGN(heaptup->t_len); /* be conservative */ /* * If we're gonna fail for oversize tuple, do it right away diff --git a/src/backend/access/heap/tuptoaster.c b/src/backend/access/heap/tuptoaster.c index a2b3700750..fa5e78a067 100644 --- a/src/backend/access/heap/tuptoaster.c +++ b/src/backend/access/heap/tuptoaster.c @@ -1523,7 +1523,7 @@ toast_save_datum(Relation rel, Datum value, { data_p = VARDATA_SHORT(dval); data_todo = VARSIZE_SHORT(dval) - VARHDRSZ_SHORT; - toast_pointer.va_rawsize = data_todo + VARHDRSZ; /* as if not short */ + toast_pointer.va_rawsize = data_todo + VARHDRSZ; /* as if not short */ toast_pointer.va_extsize = data_todo; } else if (VARATT_IS_COMPRESSED(dval)) diff --git a/src/backend/access/index/genam.c b/src/backend/access/index/genam.c index a91fda7bcd..05d7da001a 100644 --- a/src/backend/access/index/genam.c +++ b/src/backend/access/index/genam.c @@ -83,7 +83,7 @@ RelationGetIndexScan(Relation indexRelation, int nkeys, int norderbys) scan->heapRelation = NULL; /* may be set later */ scan->indexRelation = indexRelation; - scan->xs_snapshot = InvalidSnapshot; /* caller must initialize this */ + scan->xs_snapshot = InvalidSnapshot; /* caller must initialize this */ scan->numberOfKeys = nkeys; scan->numberOfOrderBys = norderbys; diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index cc5ac8b857..cacd74a978 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -326,7 +326,7 @@ index_rescan(IndexScanDesc scan, scan->xs_continue_hot = false; - scan->kill_prior_tuple = false; /* for safety */ + scan->kill_prior_tuple = false; /* for safety */ scan->indexRelation->rd_amroutine->amrescan(scan, keys, nkeys, orderbys, norderbys); @@ -401,7 +401,7 @@ index_restrpos(IndexScanDesc scan) scan->xs_continue_hot = false; - scan->kill_prior_tuple = false; /* for safety */ + scan->kill_prior_tuple = false; /* for safety */ scan->indexRelation->rd_amroutine->amrestrpos(scan); } diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index 6dca8109fd..df8f44ae80 100644 --- a/src/backend/access/nbtree/nbtinsert.c +++ b/src/backend/access/nbtree/nbtinsert.c @@ -36,7 +36,7 @@ typedef struct OffsetNumber newitemoff; /* where the new item is to be inserted */ int leftspace; /* space available for items on left page */ int rightspace; /* space available for items on right page */ - int olddataitemstotal; /* space taken by old items */ + int olddataitemstotal; /* space taken by old items */ bool have_split; /* found a valid split? */ diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c index 5d7504040d..3dbafdd6fc 100644 --- a/src/backend/access/nbtree/nbtree.c +++ b/src/backend/access/nbtree/nbtree.c @@ -59,7 +59,7 @@ typedef struct IndexBulkDeleteCallback callback; void *callback_state; BTCycleId cycleid; - BlockNumber lastBlockVacuumed; /* highest blkno actually vacuumed */ + BlockNumber lastBlockVacuumed; /* highest blkno actually vacuumed */ BlockNumber lastBlockLocked; /* highest blkno we've cleanup-locked */ BlockNumber totFreePages; /* true total # of free pages */ MemoryContext pagedelcontext; @@ -95,9 +95,8 @@ typedef struct BTParallelScanDescData BTPS_State btps_pageStatus; /* indicates whether next page is * available for scan. see above for * possible states of parallel scan. */ - int btps_arrayKeyCount; /* count indicating number of array - * scan keys processed by parallel - * scan */ + int btps_arrayKeyCount; /* count indicating number of array scan + * keys processed by parallel scan */ slock_t btps_mutex; /* protects above variables */ ConditionVariable btps_cv; /* used to synchronize parallel scan */ } BTParallelScanDescData; @@ -187,7 +186,7 @@ btbuild(Relation heap, Relation index, IndexInfo *indexInfo) #ifdef BTREE_BUILD_STATS if (log_btree_build_stats) ResetUsage(); -#endif /* BTREE_BUILD_STATS */ +#endif /* BTREE_BUILD_STATS */ /* * We expect to be called exactly once for any index relation. If that's @@ -234,7 +233,7 @@ btbuild(Relation heap, Relation index, IndexInfo *indexInfo) ShowUsage("BTREE BUILD STATS"); ResetUsage(); } -#endif /* BTREE_BUILD_STATS */ +#endif /* BTREE_BUILD_STATS */ /* * Return statistics diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c index 2f32b2e78d..2de1625a12 100644 --- a/src/backend/access/nbtree/nbtsearch.c +++ b/src/backend/access/nbtree/nbtsearch.c @@ -466,7 +466,7 @@ _bt_compare(Relation rel, datum = index_getattr(itup, scankey->sk_attno, itupdesc, &isNull); /* see comments about NULLs handling in btbuild */ - if (scankey->sk_flags & SK_ISNULL) /* key is NULL */ + if (scankey->sk_flags & SK_ISNULL) /* key is NULL */ { if (isNull) result = 0; /* NULL "=" NULL */ diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c index 3d041c47c0..168756cc78 100644 --- a/src/backend/access/nbtree/nbtsort.c +++ b/src/backend/access/nbtree/nbtsort.c @@ -111,7 +111,7 @@ typedef struct BTPageState OffsetNumber btps_lastoff; /* last item offset loaded */ uint32 btps_level; /* tree level (0 = leaf) */ Size btps_full; /* "full" if less than this much free space */ - struct BTPageState *btps_next; /* link to parent level, if any */ + struct BTPageState *btps_next; /* link to parent level, if any */ } BTPageState; /* @@ -122,8 +122,8 @@ typedef struct BTWriteState Relation heap; Relation index; bool btws_use_wal; /* dump pages to WAL? */ - BlockNumber btws_pages_alloced; /* # pages allocated */ - BlockNumber btws_pages_written; /* # pages written out */ + BlockNumber btws_pages_alloced; /* # pages allocated */ + BlockNumber btws_pages_written; /* # pages written out */ Page btws_zeropage; /* workspace for filling zeroes */ } BTWriteState; @@ -208,7 +208,7 @@ _bt_leafbuild(BTSpool *btspool, BTSpool *btspool2) ShowUsage("BTREE BUILD (Spool) STATISTICS"); ResetUsage(); } -#endif /* BTREE_BUILD_STATS */ +#endif /* BTREE_BUILD_STATS */ tuplesort_performsort(btspool->sortstate); if (btspool2) @@ -566,7 +566,7 @@ _bt_buildadd(BTWriteState *wstate, BTPageState *state, IndexTuple itup) oopaque->btpo_next = nblkno; nopaque->btpo_prev = oblkno; - nopaque->btpo_next = P_NONE; /* redundant */ + nopaque->btpo_next = P_NONE; /* redundant */ } /* diff --git a/src/backend/access/rmgrdesc/xlogdesc.c b/src/backend/access/rmgrdesc/xlogdesc.c index 5f07eb1499..2bf6de3332 100644 --- a/src/backend/access/rmgrdesc/xlogdesc.c +++ b/src/backend/access/rmgrdesc/xlogdesc.c @@ -26,7 +26,7 @@ const struct config_enum_entry wal_level_options[] = { {"minimal", WAL_LEVEL_MINIMAL, false}, {"replica", WAL_LEVEL_REPLICA, false}, - {"archive", WAL_LEVEL_REPLICA, true}, /* deprecated */ + {"archive", WAL_LEVEL_REPLICA, true}, /* deprecated */ {"hot_standby", WAL_LEVEL_REPLICA, true}, /* deprecated */ {"logical", WAL_LEVEL_LOGICAL, false}, {NULL, 0, false} diff --git a/src/backend/access/spgist/spgdoinsert.c b/src/backend/access/spgist/spgdoinsert.c index 57d2612c47..8c420633f4 100644 --- a/src/backend/access/spgist/spgdoinsert.c +++ b/src/backend/access/spgist/spgdoinsert.c @@ -1004,7 +1004,7 @@ doPickSplit(Relation index, SpGistState *state, insertedNew = true; } for (i = 0; i < nToInsert; i++) - leafPageSelect[i] = 0; /* signifies current page */ + leafPageSelect[i] = 0; /* signifies current page */ } else if (in.nTuples == 1 && totalLeafSizes > SPGIST_PAGE_CAPACITY) { @@ -1076,12 +1076,12 @@ doPickSplit(Relation index, SpGistState *state, { if (leafSizes[i] <= curspace) { - nodePageSelect[i] = 0; /* signifies current page */ + nodePageSelect[i] = 0; /* signifies current page */ curspace -= leafSizes[i]; } else { - nodePageSelect[i] = 1; /* signifies new leaf page */ + nodePageSelect[i] = 1; /* signifies new leaf page */ newspace -= leafSizes[i]; } } diff --git a/src/backend/access/spgist/spgscan.c b/src/backend/access/spgist/spgscan.c index 9281050646..e1f9d87278 100644 --- a/src/backend/access/spgist/spgscan.c +++ b/src/backend/access/spgist/spgscan.c @@ -29,7 +29,7 @@ typedef void (*storeRes_func) (SpGistScanOpaque so, ItemPointer heapPtr, typedef struct ScanStackEntry { - Datum reconstructedValue; /* value reconstructed from parent */ + Datum reconstructedValue; /* value reconstructed from parent */ void *traversalValue; /* opclass-specific traverse value */ int level; /* level of items on this page */ ItemPointerData ptr; /* block and offset to scan from */ diff --git a/src/backend/access/spgist/spgvacuum.c b/src/backend/access/spgist/spgvacuum.c index cce9b3f618..508d3e083f 100644 --- a/src/backend/access/spgist/spgvacuum.c +++ b/src/backend/access/spgist/spgvacuum.c @@ -34,7 +34,7 @@ typedef struct spgVacPendingItem { ItemPointerData tid; /* redirection target to visit */ bool done; /* have we dealt with this? */ - struct spgVacPendingItem *next; /* list link */ + struct spgVacPendingItem *next; /* list link */ } spgVacPendingItem; /* Local state for vacuum operations */ @@ -48,7 +48,7 @@ typedef struct spgBulkDeleteState /* Additional working state */ SpGistState spgstate; /* for SPGiST operations that need one */ - spgVacPendingItem *pendingList; /* TIDs we need to (re)visit */ + spgVacPendingItem *pendingList; /* TIDs we need to (re)visit */ TransactionId myXmin; /* for detecting newly-added redirects */ BlockNumber lastFilledBlock; /* last non-deletable block */ } spgBulkDeleteState; diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c index bece57589e..ed1b1d8ce4 100644 --- a/src/backend/access/transam/clog.c +++ b/src/backend/access/transam/clog.c @@ -149,7 +149,7 @@ void TransactionIdSetTreeStatus(TransactionId xid, int nsubxids, TransactionId *subxids, XidStatus status, XLogRecPtr lsn) { - int pageno = TransactionIdToPage(xid); /* get page of parent */ + int pageno = TransactionIdToPage(xid); /* get page of parent */ int i; Assert(status == TRANSACTION_STATUS_COMMITTED || diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c index 92966d3b10..aba45b0a85 100644 --- a/src/backend/access/transam/slru.c +++ b/src/backend/access/transam/slru.c @@ -76,7 +76,7 @@ typedef struct SlruFlushData { int num_files; /* # files actually open */ int fd[MAX_FLUSH_BUFFERS]; /* their FD's */ - int segno[MAX_FLUSH_BUFFERS]; /* their log seg#s */ + int segno[MAX_FLUSH_BUFFERS]; /* their log seg#s */ } SlruFlushData; typedef struct SlruFlushData *SlruFlush; @@ -150,10 +150,10 @@ SimpleLruShmemSize(int nslots, int nlsns) sz = MAXALIGN(sizeof(SlruSharedData)); sz += MAXALIGN(nslots * sizeof(char *)); /* page_buffer[] */ sz += MAXALIGN(nslots * sizeof(SlruPageStatus)); /* page_status[] */ - sz += MAXALIGN(nslots * sizeof(bool)); /* page_dirty[] */ - sz += MAXALIGN(nslots * sizeof(int)); /* page_number[] */ - sz += MAXALIGN(nslots * sizeof(int)); /* page_lru_count[] */ - sz += MAXALIGN(nslots * sizeof(LWLockPadded)); /* buffer_locks[] */ + sz += MAXALIGN(nslots * sizeof(bool)); /* page_dirty[] */ + sz += MAXALIGN(nslots * sizeof(int)); /* page_number[] */ + sz += MAXALIGN(nslots * sizeof(int)); /* page_lru_count[] */ + sz += MAXALIGN(nslots * sizeof(LWLockPadded)); /* buffer_locks[] */ if (nlsns > 0) sz += MAXALIGN(nslots * nlsns * sizeof(XLogRecPtr)); /* group_lsn[] */ @@ -972,9 +972,9 @@ SlruSelectLRUPage(SlruCtl ctl, int pageno) int bestvalidslot = 0; /* keep compiler quiet */ int best_valid_delta = -1; int best_valid_page_number = 0; /* keep compiler quiet */ - int bestinvalidslot = 0; /* keep compiler quiet */ + int bestinvalidslot = 0; /* keep compiler quiet */ int best_invalid_delta = -1; - int best_invalid_page_number = 0; /* keep compiler quiet */ + int best_invalid_page_number = 0; /* keep compiler quiet */ /* See if page already has a buffer assigned */ for (slotno = 0; slotno < shared->num_slots; slotno++) diff --git a/src/backend/access/transam/timeline.c b/src/backend/access/transam/timeline.c index 8cab8b9aa9..188008b4ca 100644 --- a/src/backend/access/transam/timeline.c +++ b/src/backend/access/transam/timeline.c @@ -261,7 +261,7 @@ findNewestTimeLine(TimeLineID startTLI) { if (existsTimeLineHistory(probeTLI)) { - newestTLI = probeTLI; /* probeTLI exists */ + newestTLI = probeTLI; /* probeTLI exists */ } else { diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index 957457c979..9e6933e9e8 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -164,7 +164,7 @@ typedef struct GlobalTransactionData * track of the end LSN because that is the LSN we need to wait for prior * to commit. */ - XLogRecPtr prepare_start_lsn; /* XLOG offset of prepare record start */ + XLogRecPtr prepare_start_lsn; /* XLOG offset of prepare record start */ XLogRecPtr prepare_end_lsn; /* XLOG offset of prepare record end */ TransactionId xid; /* The GXACT id */ @@ -898,7 +898,7 @@ TwoPhaseGetDummyProc(TransactionId xid) /* * Header for a 2PC state file */ -#define TWOPHASE_MAGIC 0x57F94533 /* format identifier */ +#define TWOPHASE_MAGIC 0x57F94533 /* format identifier */ typedef struct TwoPhaseFileHeader { @@ -1024,7 +1024,7 @@ StartPrepare(GlobalTransaction gxact) hdr.nabortrels = smgrGetPendingDeletes(false, &abortrels); hdr.ninvalmsgs = xactGetCommittedInvalidationMessages(&invalmsgs, &hdr.initfileinval); - hdr.gidlen = strlen(gxact->gid) + 1; /* Include '\0' */ + hdr.gidlen = strlen(gxact->gid) + 1; /* Include '\0' */ save_state_data(&hdr, sizeof(TwoPhaseFileHeader)); save_state_data(gxact->gid, hdr.gidlen); diff --git a/src/backend/access/transam/twophase_rmgr.c b/src/backend/access/transam/twophase_rmgr.c index cdcc382f34..1cd03482d9 100644 --- a/src/backend/access/transam/twophase_rmgr.c +++ b/src/backend/access/transam/twophase_rmgr.c @@ -27,7 +27,7 @@ const TwoPhaseCallback twophase_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] = lock_twophase_recover, /* Lock */ NULL, /* pgstat */ multixact_twophase_recover, /* MultiXact */ - predicatelock_twophase_recover /* PredicateLock */ + predicatelock_twophase_recover /* PredicateLock */ }; const TwoPhaseCallback twophase_postcommit_callbacks[TWOPHASE_RM_MAX_ID + 1] = @@ -35,7 +35,7 @@ const TwoPhaseCallback twophase_postcommit_callbacks[TWOPHASE_RM_MAX_ID + 1] = NULL, /* END ID */ lock_twophase_postcommit, /* Lock */ pgstat_twophase_postcommit, /* pgstat */ - multixact_twophase_postcommit, /* MultiXact */ + multixact_twophase_postcommit, /* MultiXact */ NULL /* PredicateLock */ }; @@ -44,14 +44,14 @@ const TwoPhaseCallback twophase_postabort_callbacks[TWOPHASE_RM_MAX_ID + 1] = NULL, /* END ID */ lock_twophase_postabort, /* Lock */ pgstat_twophase_postabort, /* pgstat */ - multixact_twophase_postabort, /* MultiXact */ + multixact_twophase_postabort, /* MultiXact */ NULL /* PredicateLock */ }; const TwoPhaseCallback twophase_standby_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] = { NULL, /* END ID */ - lock_twophase_standby_recover, /* Lock */ + lock_twophase_standby_recover, /* Lock */ NULL, /* pgstat */ NULL, /* MultiXact */ NULL /* PredicateLock */ diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index e09696c37f..e14be6b314 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -177,18 +177,18 @@ typedef struct TransactionStateData TBlockState blockState; /* high-level state */ int nestingLevel; /* transaction nesting depth */ int gucNestLevel; /* GUC context nesting depth */ - MemoryContext curTransactionContext; /* my xact-lifetime context */ + MemoryContext curTransactionContext; /* my xact-lifetime context */ ResourceOwner curTransactionOwner; /* my query resources */ TransactionId *childXids; /* subcommitted child XIDs, in XID order */ int nChildXids; /* # of subcommitted child XIDs */ int maxChildXids; /* allocated size of childXids[] */ Oid prevUser; /* previous CurrentUserId setting */ int prevSecContext; /* previous SecurityRestrictionContext */ - bool prevXactReadOnly; /* entry-time xact r/o state */ - bool startedInRecovery; /* did we start in recovery? */ + bool prevXactReadOnly; /* entry-time xact r/o state */ + bool startedInRecovery; /* did we start in recovery? */ bool didLogXid; /* has xid been included in WAL record? */ - int parallelModeLevel; /* Enter/ExitParallelMode counter */ - struct TransactionStateData *parent; /* back link to parent */ + int parallelModeLevel; /* Enter/ExitParallelMode counter */ + struct TransactionStateData *parent; /* back link to parent */ } TransactionStateData; typedef TransactionStateData *TransactionState; @@ -2641,8 +2641,7 @@ CleanupTransaction(void) * do abort cleanup processing */ AtCleanup_Portals(); /* now safe to release portal memory */ - AtEOXact_Snapshot(false, true); /* and release the transaction's - * snapshots */ + AtEOXact_Snapshot(false, true); /* and release the transaction's snapshots */ CurrentResourceOwner = NULL; /* and resource owner */ if (TopTransactionResourceOwner) @@ -3769,7 +3768,7 @@ DefineSavepoint(char *name) case TBLOCK_SUBINPROGRESS: /* Normal subtransaction start */ PushTransaction(); - s = CurrentTransactionState; /* changed by push */ + s = CurrentTransactionState; /* changed by push */ /* * Savepoint names, like the TransactionState block itself, live @@ -4080,7 +4079,7 @@ BeginInternalSubTransaction(char *name) case TBLOCK_SUBINPROGRESS: /* Normal subtransaction start */ PushTransaction(); - s = CurrentTransactionState; /* changed by push */ + s = CurrentTransactionState; /* changed by push */ /* * Savepoint names, like the TransactionState block itself, live diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index e386df7315..106210a883 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -86,8 +86,8 @@ extern uint32 bootstrap_data_checksum_version; /* User-settable parameters */ -int max_wal_size_mb = 1024; /* 1 GB */ -int min_wal_size_mb = 80; /* 80 MB */ +int max_wal_size_mb = 1024; /* 1 GB */ +int min_wal_size_mb = 80; /* 80 MB */ int wal_keep_segments = 0; int XLOGbuffers = -1; int XLogArchiveTimeout = 0; @@ -582,8 +582,7 @@ typedef struct XLogCtlData XLogRecPtr asyncXactLSN; /* LSN of newest async commit/abort */ XLogRecPtr replicationSlotMinLSN; /* oldest LSN needed by any slot */ - XLogSegNo lastRemovedSegNo; /* latest removed/recycled XLOG - * segment */ + XLogSegNo lastRemovedSegNo; /* latest removed/recycled XLOG segment */ /* Fake LSN counter, for unlogged relations. Protected by ulsn_lck. */ XLogRecPtr unloggedLSN; @@ -784,7 +783,7 @@ static int readFile = -1; static XLogSegNo readSegNo = 0; static uint32 readOff = 0; static uint32 readLen = 0; -static XLogSource readSource = 0; /* XLOG_FROM_* code */ +static XLogSource readSource = 0; /* XLOG_FROM_* code */ /* * Keeps track of which source we're currently reading from. This is @@ -812,14 +811,14 @@ typedef struct XLogPageReadPrivate * XLogReceiptSource tracks where we last successfully read some WAL.) */ static TimestampTz XLogReceiptTime = 0; -static XLogSource XLogReceiptSource = 0; /* XLOG_FROM_* code */ +static XLogSource XLogReceiptSource = 0; /* XLOG_FROM_* code */ /* State information for XLOG reading */ static XLogRecPtr ReadRecPtr; /* start of last record read */ static XLogRecPtr EndRecPtr; /* end+1 of last record read */ -static XLogRecPtr minRecoveryPoint; /* local copy of - * ControlFile->minRecoveryPoint */ +static XLogRecPtr minRecoveryPoint; /* local copy of + * ControlFile->minRecoveryPoint */ static TimeLineID minRecoveryPointTLI; static bool updateMinRecoveryPoint = true; @@ -2020,7 +2019,7 @@ XLogRecPtrToBytePos(XLogRecPtr ptr) { result = fullsegs * UsableBytesInSegment + (XLOG_BLCKSZ - SizeOfXLogLongPHD) + /* account for first page */ - (fullpages - 1) * UsableBytesInPage; /* full pages */ + (fullpages - 1) * UsableBytesInPage; /* full pages */ if (offset > 0) { Assert(offset >= SizeOfXLogShortPHD); @@ -2508,7 +2507,7 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible) /* signal that we need to wakeup walsenders later */ WalSndWakeupRequest(); - LogwrtResult.Flush = LogwrtResult.Write; /* end of page */ + LogwrtResult.Flush = LogwrtResult.Write; /* end of page */ if (XLogArchivingActive()) XLogArchiveNotifySeg(openLogSegNo); @@ -4377,7 +4376,7 @@ static void WriteControlFile(void) { int fd; - char buffer[PG_CONTROL_SIZE]; /* need not be aligned */ + char buffer[PG_CONTROL_SIZE]; /* need not be aligned */ /* * Initialize version and compatibility-check fields @@ -6531,7 +6530,7 @@ StartupXLOG(void) ereport(LOG, (errmsg("using previous checkpoint record at %X/%X", (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc))); - InRecovery = true; /* force recovery even if SHUTDOWNED */ + InRecovery = true; /* force recovery even if SHUTDOWNED */ } else ereport(PANIC, @@ -8835,7 +8834,7 @@ CreateCheckPoint(int flags) if (shutdown) { if (flags & CHECKPOINT_END_OF_RECOVERY) - LocalXLogInsertAllowed = -1; /* return to "check" state */ + LocalXLogInsertAllowed = -1; /* return to "check" state */ else LocalXLogInsertAllowed = 0; /* never again write WAL */ } @@ -9965,7 +9964,7 @@ xlog_outrec(StringInfo buf, XLogReaderState *record) appendStringInfoString(buf, " FPW"); } } -#endif /* WAL_DEBUG */ +#endif /* WAL_DEBUG */ /* * Returns a string describing an XLogRecord, consisting of its identity diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c index 6a02738479..c9cc6636d3 100644 --- a/src/backend/access/transam/xloginsert.c +++ b/src/backend/access/transam/xloginsert.c @@ -61,9 +61,9 @@ typedef struct } registered_buffer; static registered_buffer *registered_buffers; -static int max_registered_buffers; /* allocated size */ -static int max_registered_block_id = 0; /* highest block_id + 1 - * currently registered */ +static int max_registered_buffers; /* allocated size */ +static int max_registered_block_id = 0; /* highest block_id + 1 currently + * registered */ /* * A chain of XLogRecDatas to hold the "main data" of a WAL record, registered @@ -438,7 +438,7 @@ XLogInsert(RmgrId rmid, uint8 info) if (IsBootstrapProcessingMode() && rmid != RM_XLOG_ID) { XLogResetInsertion(); - EndPos = SizeOfXLogLongPHD; /* start of 1st chkpt record */ + EndPos = SizeOfXLogLongPHD; /* start of 1st chkpt record */ return EndPos; } diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c index c3b1371764..d6b857f109 100644 --- a/src/backend/access/transam/xlogreader.c +++ b/src/backend/access/transam/xlogreader.c @@ -974,7 +974,7 @@ out: return found; } -#endif /* FRONTEND */ +#endif /* FRONTEND */ /* ---------------------------------------- diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index d2708cb33e..b9573973d2 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -46,7 +46,7 @@ #include "utils/relmapper.h" #include "utils/tqual.h" -uint32 bootstrap_data_checksum_version = 0; /* No checksum */ +uint32 bootstrap_data_checksum_version = 0; /* No checksum */ #define ALLOC(t, c) \ @@ -163,7 +163,7 @@ static struct typmap *Ap = NULL; static Datum values[MAXATTR]; /* current row's attribute values */ static bool Nulls[MAXATTR]; -static MemoryContext nogc = NULL; /* special no-gc mem context */ +static MemoryContext nogc = NULL; /* special no-gc mem context */ /* * At bootstrap time, we first declare all the indices to be built, and @@ -680,7 +680,7 @@ DefineAttr(char *name, char *type, int attnum, int nullness) namestrcpy(&attrtypes[attnum]->attname, name); elog(DEBUG4, "column %s %s", NameStr(attrtypes[attnum]->attname), type); - attrtypes[attnum]->attnum = attnum + 1; /* fillatt */ + attrtypes[attnum]->attnum = attnum + 1; /* fillatt */ typeoid = gettype(type); diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c index 304e3c4bc3..de0a1ba833 100644 --- a/src/backend/catalog/aclchk.c +++ b/src/backend/catalog/aclchk.c @@ -157,7 +157,7 @@ dumpacl(Acl *acl) DatumGetCString(DirectFunctionCall1(aclitemout, PointerGetDatum(aip + i)))); } -#endif /* ACLDEBUG */ +#endif /* ACLDEBUG */ /* diff --git a/src/backend/catalog/dependency.c b/src/backend/catalog/dependency.c index cd82cb9f29..b12b36ed34 100644 --- a/src/backend/catalog/dependency.c +++ b/src/backend/catalog/dependency.c @@ -97,12 +97,12 @@ typedef struct } ObjectAddressExtra; /* ObjectAddressExtra flag bits */ -#define DEPFLAG_ORIGINAL 0x0001 /* an original deletion target */ -#define DEPFLAG_NORMAL 0x0002 /* reached via normal dependency */ -#define DEPFLAG_AUTO 0x0004 /* reached via auto dependency */ -#define DEPFLAG_INTERNAL 0x0008 /* reached via internal dependency */ -#define DEPFLAG_EXTENSION 0x0010 /* reached via extension dependency */ -#define DEPFLAG_REVERSE 0x0020 /* reverse internal/extension link */ +#define DEPFLAG_ORIGINAL 0x0001 /* an original deletion target */ +#define DEPFLAG_NORMAL 0x0002 /* reached via normal dependency */ +#define DEPFLAG_AUTO 0x0004 /* reached via auto dependency */ +#define DEPFLAG_INTERNAL 0x0008 /* reached via internal dependency */ +#define DEPFLAG_EXTENSION 0x0010 /* reached via extension dependency */ +#define DEPFLAG_REVERSE 0x0020 /* reverse internal/extension link */ /* expansible list of ObjectAddresses */ @@ -150,7 +150,7 @@ static const Oid object_classes[] = { OperatorClassRelationId, /* OCLASS_OPCLASS */ OperatorFamilyRelationId, /* OCLASS_OPFAMILY */ AccessMethodRelationId, /* OCLASS_AM */ - AccessMethodOperatorRelationId, /* OCLASS_AMOP */ + AccessMethodOperatorRelationId, /* OCLASS_AMOP */ AccessMethodProcedureRelationId, /* OCLASS_AMPROC */ RewriteRelationId, /* OCLASS_REWRITE */ TriggerRelationId, /* OCLASS_TRIGGER */ @@ -163,7 +163,7 @@ static const Oid object_classes[] = { AuthIdRelationId, /* OCLASS_ROLE */ DatabaseRelationId, /* OCLASS_DATABASE */ TableSpaceRelationId, /* OCLASS_TBLSPACE */ - ForeignDataWrapperRelationId, /* OCLASS_FDW */ + ForeignDataWrapperRelationId, /* OCLASS_FDW */ ForeignServerRelationId, /* OCLASS_FOREIGN_SERVER */ UserMappingRelationId, /* OCLASS_USER_MAPPING */ DefaultAclRelationId, /* OCLASS_DEFACL */ @@ -399,7 +399,7 @@ performMultipleDeletions(const ObjectAddresses *objects, findDependentObjects(thisobj, DEPFLAG_ORIGINAL, flags, - NULL, /* empty stack */ + NULL, /* empty stack */ targetObjects, objects, &depRel); @@ -1405,7 +1405,7 @@ recordDependencyOnSingleRelExpr(const ObjectAddress *depender, rte.type = T_RangeTblEntry; rte.rtekind = RTE_RELATION; rte.relid = relId; - rte.relkind = RELKIND_RELATION; /* no need for exactness here */ + rte.relkind = RELKIND_RELATION; /* no need for exactness here */ context.rtables = list_make1(list_make1(&rte)); @@ -1871,7 +1871,7 @@ find_expr_references_walker(Node *node, TargetEntry *tle = (TargetEntry *) lfirst(lc); if (tle->resjunk) - continue; /* ignore junk tlist items */ + continue; /* ignore junk tlist items */ add_object_address(OCLASS_CLASS, rte->relid, tle->resno, context->addrs); } diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 4e5b79ef94..8052dcc288 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -950,25 +950,25 @@ AddNewRelationType(const char *typeName, return TypeCreate(new_row_type, /* optional predetermined OID */ typeName, /* type name */ - typeNamespace, /* type namespace */ + typeNamespace, /* type namespace */ new_rel_oid, /* relation oid */ new_rel_kind, /* relation kind */ ownerid, /* owner's ID */ -1, /* internal size (varlena) */ TYPTYPE_COMPOSITE, /* type-type (composite) */ - TYPCATEGORY_COMPOSITE, /* type-category (ditto) */ + TYPCATEGORY_COMPOSITE, /* type-category (ditto) */ false, /* composite types are never preferred */ DEFAULT_TYPDELIM, /* default array delimiter */ F_RECORD_IN, /* input procedure */ F_RECORD_OUT, /* output procedure */ - F_RECORD_RECV, /* receive procedure */ - F_RECORD_SEND, /* send procedure */ + F_RECORD_RECV, /* receive procedure */ + F_RECORD_SEND, /* send procedure */ InvalidOid, /* typmodin procedure - none */ InvalidOid, /* typmodout procedure - none */ InvalidOid, /* analyze procedure - default */ InvalidOid, /* array element type - irrelevant */ false, /* this is not an array type */ - new_array_type, /* array type if any */ + new_array_type, /* array type if any */ InvalidOid, /* domain base type - irrelevant */ NULL, /* default value - none */ NULL, /* default binary representation */ @@ -1218,7 +1218,7 @@ heap_create_with_catalog(const char *relname, relarrayname = makeArrayTypeName(relname, relnamespace); - TypeCreate(new_array_oid, /* force the type's OID to this */ + TypeCreate(new_array_oid, /* force the type's OID to this */ relarrayname, /* Array type name */ relnamespace, /* Same namespace as parent */ InvalidOid, /* Not composite, no relationOid */ @@ -1560,7 +1560,7 @@ RemoveAttributeById(Oid relid, AttrNumber attnum) tuple = SearchSysCacheCopy2(ATTNUM, ObjectIdGetDatum(relid), Int16GetDatum(attnum)); - if (!HeapTupleIsValid(tuple)) /* shouldn't happen */ + if (!HeapTupleIsValid(tuple)) /* shouldn't happen */ elog(ERROR, "cache lookup failed for attribute %d of relation %u", attnum, relid); attStruct = (Form_pg_attribute) GETSTRUCT(tuple); @@ -1725,7 +1725,7 @@ RemoveAttrDefaultById(Oid attrdefId) tuple = SearchSysCacheCopy2(ATTNUM, ObjectIdGetDatum(myrelid), Int16GetDatum(myattnum)); - if (!HeapTupleIsValid(tuple)) /* shouldn't happen */ + if (!HeapTupleIsValid(tuple)) /* shouldn't happen */ elog(ERROR, "cache lookup failed for attribute %d of relation %u", myattnum, myrelid); @@ -2083,7 +2083,7 @@ StoreRelCheck(Relation rel, char *ccname, Node *expr, */ constrOid = CreateConstraintEntry(ccname, /* Constraint Name */ - RelationGetNamespace(rel), /* namespace */ + RelationGetNamespace(rel), /* namespace */ CONSTRAINT_CHECK, /* Constraint Type */ false, /* Is Deferrable */ false, /* Is Deferred */ @@ -2091,9 +2091,9 @@ StoreRelCheck(Relation rel, char *ccname, Node *expr, RelationGetRelid(rel), /* relation */ attNos, /* attrs in the constraint */ keycount, /* # attrs in the constraint */ - InvalidOid, /* not a domain constraint */ - InvalidOid, /* no associated index */ - InvalidOid, /* Foreign key fields */ + InvalidOid, /* not a domain constraint */ + InvalidOid, /* no associated index */ + InvalidOid, /* Foreign key fields */ NULL, NULL, NULL, @@ -2102,14 +2102,14 @@ StoreRelCheck(Relation rel, char *ccname, Node *expr, ' ', ' ', ' ', - NULL, /* not an exclusion constraint */ - expr, /* Tree form of check constraint */ + NULL, /* not an exclusion constraint */ + expr, /* Tree form of check constraint */ ccbin, /* Binary form of check constraint */ ccsrc, /* Source form of check constraint */ is_local, /* conislocal */ inhcount, /* coninhcount */ is_no_inherit, /* connoinherit */ - is_internal); /* internally constructed? */ + is_internal); /* internally constructed? */ pfree(ccbin); pfree(ccsrc); diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index 8a77444000..549a2d19c6 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -158,7 +158,7 @@ relationHasPrimaryKey(Relation rel) HeapTuple indexTuple; indexTuple = SearchSysCache1(INDEXRELID, ObjectIdGetDatum(indexoid)); - if (!HeapTupleIsValid(indexTuple)) /* should not happen */ + if (!HeapTupleIsValid(indexTuple)) /* should not happen */ elog(ERROR, "cache lookup failed for index %u", indexoid); result = ((Form_pg_index) GETSTRUCT(indexTuple))->indisprimary; ReleaseSysCache(indexTuple); @@ -332,7 +332,7 @@ ConstructTupleDescriptor(Relation heapRelation, /* * here we are indexing on a normal attribute (1...n) */ - if (atnum > natts) /* safety check */ + if (atnum > natts) /* safety check */ elog(ERROR, "invalid column number %d", atnum); from = heapTupDesc->attrs[AttrNumberGetAttrOffset(atnum)]; } @@ -420,7 +420,7 @@ ConstructTupleDescriptor(Relation heapRelation, /* * Set the attribute name as specified by caller. */ - if (colnames_item == NULL) /* shouldn't happen */ + if (colnames_item == NULL) /* shouldn't happen */ elog(ERROR, "too few entries in colnames list"); namestrcpy(&to->attname, (const char *) lfirst(colnames_item)); colnames_item = lnext(colnames_item); @@ -954,7 +954,7 @@ index_create(Relation heapRelation, else { elog(ERROR, "constraint must be PRIMARY, UNIQUE or EXCLUDE"); - constraintType = 0; /* keep compiler quiet */ + constraintType = 0; /* keep compiler quiet */ } index_constraint_create(heapRelation, @@ -964,9 +964,9 @@ index_create(Relation heapRelation, constraintType, deferrable, initdeferred, - false, /* already marked primary */ - false, /* pg_index entry is OK */ - false, /* no old dependencies */ + false, /* already marked primary */ + false, /* pg_index entry is OK */ + false, /* no old dependencies */ allow_system_table_mods, is_internal); } @@ -1205,7 +1205,7 @@ index_constraint_create(Relation heapRelation, indexInfo->ii_KeyAttrNumbers, indexInfo->ii_NumIndexAttrs, InvalidOid, /* no domain */ - indexRelationId, /* index OID */ + indexRelationId, /* index OID */ InvalidOid, /* no foreign key */ NULL, NULL, @@ -1216,12 +1216,12 @@ index_constraint_create(Relation heapRelation, ' ', ' ', indexInfo->ii_ExclusionOps, - NULL, /* no check constraint */ + NULL, /* no check constraint */ NULL, NULL, - true, /* islocal */ + true, /* islocal */ 0, /* inhcount */ - true, /* noinherit */ + true, /* noinherit */ is_internal); /* @@ -2259,7 +2259,7 @@ IndexBuildHeapRangeScan(Relation heapRelation, if (IsBootstrapProcessingMode() || indexInfo->ii_Concurrent) { snapshot = RegisterSnapshot(GetTransactionSnapshot()); - OldestXmin = InvalidTransactionId; /* not used */ + OldestXmin = InvalidTransactionId; /* not used */ /* "any visible" mode is not compatible with this */ Assert(!anyvisible); @@ -2272,8 +2272,8 @@ IndexBuildHeapRangeScan(Relation heapRelation, } scan = heap_beginscan_strat(heapRelation, /* relation */ - snapshot, /* snapshot */ - 0, /* number of keys */ + snapshot, /* snapshot */ + 0, /* number of keys */ NULL, /* scan key */ true, /* buffer access strategy OK */ allow_sync); /* syncscan OK? */ @@ -2524,7 +2524,7 @@ IndexBuildHeapRangeScan(Relation heapRelation, break; default: elog(ERROR, "unexpected HeapTupleSatisfiesVacuum result"); - indexIt = tupleIsAlive = false; /* keep compiler quiet */ + indexIt = tupleIsAlive = false; /* keep compiler quiet */ break; } @@ -2677,8 +2677,8 @@ IndexCheckExclusion(Relation heapRelation, */ snapshot = RegisterSnapshot(GetLatestSnapshot()); scan = heap_beginscan_strat(heapRelation, /* relation */ - snapshot, /* snapshot */ - 0, /* number of keys */ + snapshot, /* snapshot */ + 0, /* number of keys */ NULL, /* scan key */ true, /* buffer access strategy OK */ true); /* syncscan OK */ @@ -2997,8 +2997,8 @@ validate_index_heapscan(Relation heapRelation, * match the sorted TIDs. */ scan = heap_beginscan_strat(heapRelation, /* relation */ - snapshot, /* snapshot */ - 0, /* number of keys */ + snapshot, /* snapshot */ + 0, /* number of keys */ NULL, /* scan key */ true, /* buffer access strategy OK */ false); /* syncscan not OK */ diff --git a/src/backend/catalog/indexing.c b/src/backend/catalog/indexing.c index abc344ad69..e5b6bafaff 100644 --- a/src/backend/catalog/indexing.c +++ b/src/backend/catalog/indexing.c @@ -42,7 +42,7 @@ CatalogOpenIndexes(Relation heapRel) ResultRelInfo *resultRelInfo; resultRelInfo = makeNode(ResultRelInfo); - resultRelInfo->ri_RangeTableIndex = 1; /* dummy */ + resultRelInfo->ri_RangeTableIndex = 1; /* dummy */ resultRelInfo->ri_RelationDesc = heapRel; resultRelInfo->ri_TrigDesc = NULL; /* we don't fire triggers */ @@ -136,7 +136,7 @@ CatalogIndexInsert(CatalogIndexState indstate, HeapTuple heapTuple) index_insert(relationDescs[i], /* index relation */ values, /* array of index Datums */ isnull, /* is-null flags */ - &(heapTuple->t_self), /* tid of heap tuple */ + &(heapTuple->t_self), /* tid of heap tuple */ heapRelation, relationDescs[i]->rd_index->indisunique ? UNIQUE_CHECK_YES : UNIQUE_CHECK_NO, diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c index 94755d687b..2938501917 100644 --- a/src/backend/catalog/namespace.c +++ b/src/backend/catalog/namespace.c @@ -157,7 +157,7 @@ static bool baseSearchPathValid = true; typedef struct { List *searchPath; /* the desired search path */ - Oid creationNamespace; /* the desired creation namespace */ + Oid creationNamespace; /* the desired creation namespace */ int nestLevel; /* subtransaction nesting level */ } OverrideStackEntry; @@ -273,7 +273,7 @@ RangeVarGetRelidExtended(const RangeVar *relation, LOCKMODE lockmode, if (relation->relpersistence == RELPERSISTENCE_TEMP) { if (!OidIsValid(myTempNamespace)) - relId = InvalidOid; /* this probably can't happen? */ + relId = InvalidOid; /* this probably can't happen? */ else { if (relation->schemaname) @@ -1665,7 +1665,7 @@ OpernameGetCandidates(List *names, char oprkind, bool missing_schema_ok) /* We have a match with a previous result */ Assert(pathpos != prevResult->pathpos); if (pathpos > prevResult->pathpos) - continue; /* keep previous result */ + continue; /* keep previous result */ /* replace previous result */ prevResult->pathpos = pathpos; prevResult->oid = HeapTupleGetOid(opertup); @@ -3428,7 +3428,7 @@ PopOverrideSearchPath(void) entry = (OverrideStackEntry *) linitial(overrideStack); activeSearchPath = entry->searchPath; activeCreationNamespace = entry->creationNamespace; - activeTempCreationPending = false; /* XXX is this OK? */ + activeTempCreationPending = false; /* XXX is this OK? */ } else { @@ -3876,7 +3876,7 @@ AtEOXact_Namespace(bool isCommit, bool parallel) { myTempNamespace = InvalidOid; myTempToastNamespace = InvalidOid; - baseSearchPathValid = false; /* need to rebuild list */ + baseSearchPathValid = false; /* need to rebuild list */ } myTempNamespaceSubID = InvalidSubTransactionId; } @@ -3928,7 +3928,7 @@ AtEOSubXact_Namespace(bool isCommit, SubTransactionId mySubid, /* TEMP namespace creation failed, so reset state */ myTempNamespace = InvalidOid; myTempToastNamespace = InvalidOid; - baseSearchPathValid = false; /* need to rebuild list */ + baseSearchPathValid = false; /* need to rebuild list */ } } @@ -3953,7 +3953,7 @@ AtEOSubXact_Namespace(bool isCommit, SubTransactionId mySubid, entry = (OverrideStackEntry *) linitial(overrideStack); activeSearchPath = entry->searchPath; activeCreationNamespace = entry->creationNamespace; - activeTempCreationPending = false; /* XXX is this OK? */ + activeTempCreationPending = false; /* XXX is this OK? */ } else { diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c index 791322a803..b882d5f0e1 100644 --- a/src/backend/catalog/objectaddress.c +++ b/src/backend/catalog/objectaddress.c @@ -97,19 +97,18 @@ typedef struct Oid class_oid; /* oid of catalog */ Oid oid_index_oid; /* oid of index on system oid column */ int oid_catcache_id; /* id of catcache on system oid column */ - int name_catcache_id; /* id of catcache on (name,namespace), - * or (name) if the object does not - * live in a namespace */ + int name_catcache_id; /* id of catcache on (name,namespace), or + * (name) if the object does not live in a + * namespace */ AttrNumber attnum_name; /* attnum of name field */ - AttrNumber attnum_namespace; /* attnum of namespace field */ + AttrNumber attnum_namespace; /* attnum of namespace field */ AttrNumber attnum_owner; /* attnum of owner field */ AttrNumber attnum_acl; /* attnum of acl field */ AclObjectKind acl_kind; /* ACL_KIND_* of this object type */ - bool is_nsp_name_unique; /* can the nsp/name combination (or - * name alone, if there's no - * namespace) be considered a unique - * identifier for an object of this - * class? */ + bool is_nsp_name_unique; /* can the nsp/name combination (or name + * alone, if there's no namespace) be + * considered a unique identifier for an + * object of this class? */ } ObjectPropertyType; static const ObjectPropertyType ObjectProperty[] = diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c index b9cca29ea3..e563b8548b 100644 --- a/src/backend/catalog/partition.c +++ b/src/backend/catalog/partition.c @@ -1553,7 +1553,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec) */ i = 0; partexprs_item = list_head(key->partexprs); - partexprs_item_saved = partexprs_item; /* placate compiler */ + partexprs_item_saved = partexprs_item; /* placate compiler */ forboth(cell1, spec->lowerdatums, cell2, spec->upperdatums) { EState *estate; diff --git a/src/backend/catalog/pg_aggregate.c b/src/backend/catalog/pg_aggregate.c index 65c2e88e93..aa45c141a4 100644 --- a/src/backend/catalog/pg_aggregate.c +++ b/src/backend/catalog/pg_aggregate.c @@ -83,9 +83,9 @@ AggregateCreate(const char *aggName, Oid finalfn = InvalidOid; /* can be omitted */ Oid combinefn = InvalidOid; /* can be omitted */ Oid serialfn = InvalidOid; /* can be omitted */ - Oid deserialfn = InvalidOid; /* can be omitted */ + Oid deserialfn = InvalidOid; /* can be omitted */ Oid mtransfn = InvalidOid; /* can be omitted */ - Oid minvtransfn = InvalidOid; /* can be omitted */ + Oid minvtransfn = InvalidOid; /* can be omitted */ Oid mfinalfn = InvalidOid; /* can be omitted */ Oid sortop = InvalidOid; /* can be omitted */ Oid *aggArgTypes = parameterTypes->values; @@ -605,30 +605,30 @@ AggregateCreate(const char *aggName, myself = ProcedureCreate(aggName, aggNamespace, - false, /* no replacement */ - false, /* doesn't return a set */ + false, /* no replacement */ + false, /* doesn't return a set */ finaltype, /* returnType */ - GetUserId(), /* proowner */ - INTERNALlanguageId, /* languageObjectId */ - InvalidOid, /* no validator */ + GetUserId(), /* proowner */ + INTERNALlanguageId, /* languageObjectId */ + InvalidOid, /* no validator */ "aggregate_dummy", /* placeholder proc */ - NULL, /* probin */ - true, /* isAgg */ - false, /* isWindowFunc */ - false, /* security invoker (currently not - * definable for agg) */ - false, /* isLeakProof */ - false, /* isStrict (not needed for agg) */ - PROVOLATILE_IMMUTABLE, /* volatility (not - * needed for agg) */ + NULL, /* probin */ + true, /* isAgg */ + false, /* isWindowFunc */ + false, /* security invoker (currently not + * definable for agg) */ + false, /* isLeakProof */ + false, /* isStrict (not needed for agg) */ + PROVOLATILE_IMMUTABLE, /* volatility (not needed + * for agg) */ proparallel, parameterTypes, /* paramTypes */ allParameterTypes, /* allParamTypes */ parameterModes, /* parameterModes */ parameterNames, /* parameterNames */ parameterDefaults, /* parameterDefaults */ - PointerGetDatum(NULL), /* trftypes */ - PointerGetDatum(NULL), /* proconfig */ + PointerGetDatum(NULL), /* trftypes */ + PointerGetDatum(NULL), /* proconfig */ 1, /* procost */ 0); /* prorows */ procOid = myself.objectId; diff --git a/src/backend/catalog/pg_constraint.c b/src/backend/catalog/pg_constraint.c index e5ae3d9292..60ccaa08b0 100644 --- a/src/backend/catalog/pg_constraint.c +++ b/src/backend/catalog/pg_constraint.c @@ -576,7 +576,7 @@ RemoveConstraintById(Oid conId) con->conrelid); classForm = (Form_pg_class) GETSTRUCT(relTup); - if (classForm->relchecks == 0) /* should not happen */ + if (classForm->relchecks == 0) /* should not happen */ elog(ERROR, "relation \"%s\" has relchecks = 0", RelationGetRelationName(rel)); classForm->relchecks--; @@ -928,7 +928,7 @@ get_primary_key_attnos(Oid relid, bool deferrableOk, Oid *constraintOid) if (isNull) elog(ERROR, "null conkey for constraint %u", HeapTupleGetOid(tuple)); - arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */ + arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */ numkeys = ARR_DIMS(arr)[0]; if (ARR_NDIM(arr) != 1 || numkeys < 0 || diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c index b5cbc04889..370683823f 100644 --- a/src/backend/catalog/pg_operator.c +++ b/src/backend/catalog/pg_operator.c @@ -225,7 +225,7 @@ OperatorShellMake(const char *operatorName, for (i = 0; i < Natts_pg_operator; ++i) { nulls[i] = false; - values[i] = (Datum) NULL; /* redundant, but safe */ + values[i] = (Datum) NULL; /* redundant, but safe */ } /* diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c index 6b0e4f4729..6172973343 100644 --- a/src/backend/catalog/pg_type.c +++ b/src/backend/catalog/pg_type.c @@ -79,7 +79,7 @@ TypeShellMake(const char *typeName, Oid typeNamespace, Oid ownerId) for (i = 0; i < Natts_pg_type; ++i) { nulls[i] = false; - values[i] = (Datum) NULL; /* redundant, but safe */ + values[i] = (Datum) NULL; /* redundant, but safe */ } /* @@ -214,7 +214,7 @@ TypeCreate(Oid newTypeOid, bool isImplicitArray, Oid arrayType, Oid baseType, - const char *defaultTypeValue, /* human readable rep */ + const char *defaultTypeValue, /* human readable rep */ char *defaultTypeBin, /* cooked rep */ bool passedByValue, char alignment, @@ -511,8 +511,8 @@ TypeCreate(Oid newTypeOid, void GenerateTypeDependencies(Oid typeNamespace, Oid typeObjectId, - Oid relationOid, /* only for relation rowtypes */ - char relationKind, /* ditto */ + Oid relationOid, /* only for relation rowtypes */ + char relationKind, /* ditto */ Oid owner, Oid inputProcedure, Oid outputProcedure, diff --git a/src/backend/catalog/storage.c b/src/backend/catalog/storage.c index f677916d03..9a5fde00ca 100644 --- a/src/backend/catalog/storage.c +++ b/src/backend/catalog/storage.c @@ -58,7 +58,7 @@ typedef struct PendingRelDelete BackendId backend; /* InvalidBackendId if not a temp rel */ bool atCommit; /* T=delete at commit; F=delete at abort */ int nestLevel; /* xact nesting level of request */ - struct PendingRelDelete *next; /* linked-list link */ + struct PendingRelDelete *next; /* linked-list link */ } PendingRelDelete; static PendingRelDelete *pendingDeletes = NULL; /* head of linked list */ diff --git a/src/backend/commands/aggregatecmds.c b/src/backend/commands/aggregatecmds.c index a84c61493f..b204b19c72 100644 --- a/src/backend/commands/aggregatecmds.c +++ b/src/backend/commands/aggregatecmds.c @@ -416,8 +416,8 @@ DefineAggregate(ParseState *pstate, List *name, List *args, bool oldstyle, List /* * Most of the argument-checking is done inside of AggregateCreate */ - return AggregateCreate(aggName, /* aggregate name */ - aggNamespace, /* namespace */ + return AggregateCreate(aggName, /* aggregate name */ + aggNamespace, /* namespace */ aggKind, numArgs, numDirectArgs, @@ -427,22 +427,22 @@ DefineAggregate(ParseState *pstate, List *name, List *args, bool oldstyle, List PointerGetDatum(parameterNames), parameterDefaults, variadicArgType, - transfuncName, /* step function name */ - finalfuncName, /* final function name */ - combinefuncName, /* combine function name */ - serialfuncName, /* serial function name */ + transfuncName, /* step function name */ + finalfuncName, /* final function name */ + combinefuncName, /* combine function name */ + serialfuncName, /* serial function name */ deserialfuncName, /* deserial function name */ - mtransfuncName, /* fwd trans function name */ + mtransfuncName, /* fwd trans function name */ minvtransfuncName, /* inv trans function name */ - mfinalfuncName, /* final function name */ + mfinalfuncName, /* final function name */ finalfuncExtraArgs, mfinalfuncExtraArgs, sortoperatorName, /* sort operator name */ transTypeId, /* transition data type */ transSpace, /* transition space */ - mtransTypeId, /* transition data type */ + mtransTypeId, /* transition data type */ mtransSpace, /* transition space */ - initval, /* initial condition */ + initval, /* initial condition */ minitval, /* initial condition */ - proparallel); /* parallel safe? */ + proparallel); /* parallel safe? */ } diff --git a/src/backend/commands/alter.c b/src/backend/commands/alter.c index 4d3fe8c745..e5f0b75a86 100644 --- a/src/backend/commands/alter.c +++ b/src/backend/commands/alter.c @@ -408,7 +408,7 @@ ExecRenameStmt(RenameStmt *stmt) default: elog(ERROR, "unrecognized rename stmt type: %d", (int) stmt->renameType); - return InvalidObjectAddress; /* keep compiler happy */ + return InvalidObjectAddress; /* keep compiler happy */ } } @@ -525,7 +525,7 @@ ExecAlterObjectSchemaStmt(AlterObjectSchemaStmt *stmt, default: elog(ERROR, "unrecognized AlterObjectSchemaStmt type: %d", (int) stmt->objectType); - return InvalidObjectAddress; /* keep compiler happy */ + return InvalidObjectAddress; /* keep compiler happy */ } if (oldSchemaAddr) @@ -880,7 +880,7 @@ ExecAlterOwnerStmt(AlterOwnerStmt *stmt) default: elog(ERROR, "unrecognized AlterOwnerStmt type: %d", (int) stmt->objectType); - return InvalidObjectAddress; /* keep compiler happy */ + return InvalidObjectAddress; /* keep compiler happy */ } } diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index ecdd8950ee..a19c6c25e6 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -452,7 +452,7 @@ do_analyze_rel(Relation onerel, int options, VacuumParams *params, /* Found an index expression */ Node *indexkey; - if (indexpr_item == NULL) /* shouldn't happen */ + if (indexpr_item == NULL) /* shouldn't happen */ elog(ERROR, "too few entries in indexprs list"); indexkey = (Node *) lfirst(indexpr_item); indexpr_item = lnext(indexpr_item); @@ -1545,7 +1545,7 @@ update_attstats(Oid relid, bool inh, int natts, VacAttrStats **vacattrstats) i = Anum_pg_statistic_stakind1 - 1; for (k = 0; k < STATISTIC_NUM_SLOTS; k++) { - values[i++] = Int16GetDatum(stats->stakind[k]); /* stakindN */ + values[i++] = Int16GetDatum(stats->stakind[k]); /* stakindN */ } i = Anum_pg_statistic_staop1 - 1; for (k = 0; k < STATISTIC_NUM_SLOTS; k++) @@ -1860,7 +1860,7 @@ compute_trivial_stats(VacAttrStatsP stats, stats->stawidth = total_width / (double) nonnull_cnt; else stats->stawidth = stats->attrtype->typlen; - stats->stadistinct = 0.0; /* "unknown" */ + stats->stadistinct = 0.0; /* "unknown" */ } else if (null_cnt > 0) { @@ -1871,7 +1871,7 @@ compute_trivial_stats(VacAttrStatsP stats, stats->stawidth = 0; /* "unknown" */ else stats->stawidth = stats->attrtype->typlen; - stats->stadistinct = 0.0; /* "unknown" */ + stats->stadistinct = 0.0; /* "unknown" */ } } @@ -2224,7 +2224,7 @@ compute_distinct_stats(VacAttrStatsP stats, stats->stawidth = 0; /* "unknown" */ else stats->stawidth = stats->attrtype->typlen; - stats->stadistinct = 0.0; /* "unknown" */ + stats->stadistinct = 0.0; /* "unknown" */ } /* We don't need to bother cleaning up any of our temporary palloc's */ @@ -2774,7 +2774,7 @@ compute_scalar_stats(VacAttrStatsP stats, stats->stawidth = 0; /* "unknown" */ else stats->stawidth = stats->attrtype->typlen; - stats->stadistinct = 0.0; /* "unknown" */ + stats->stadistinct = 0.0; /* "unknown" */ } /* We don't need to bother cleaning up any of our temporary palloc's */ diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c index 87b215d8d3..9befe0492a 100644 --- a/src/backend/commands/async.c +++ b/src/backend/commands/async.c @@ -245,7 +245,7 @@ typedef struct AsyncQueueControl QueuePosition head; /* head points to the next free location */ QueuePosition tail; /* the global tail is equivalent to the pos of * the "slowest" backend */ - TimestampTz lastQueueFillWarn; /* time of last queue-full msg */ + TimestampTz lastQueueFillWarn; /* time of last queue-full msg */ QueueBackendStatus backend[FLEXIBLE_ARRAY_MEMBER]; /* backend[0] is not used; used entries are from [1] to [MaxBackends] */ } AsyncQueueControl; @@ -265,7 +265,7 @@ static SlruCtlData AsyncCtlData; #define AsyncCtl (&AsyncCtlData) #define QUEUE_PAGESIZE BLCKSZ -#define QUEUE_FULL_WARN_INTERVAL 5000 /* warn at most once every 5s */ +#define QUEUE_FULL_WARN_INTERVAL 5000 /* warn at most once every 5s */ /* * slru.c currently assumes that all filenames are four characters of hex @@ -291,7 +291,7 @@ static SlruCtlData AsyncCtlData; * (ie, have committed a LISTEN on). It is a simple list of channel names, * allocated in TopMemoryContext. */ -static List *listenChannels = NIL; /* list of C strings */ +static List *listenChannels = NIL; /* list of C strings */ /* * State for pending LISTEN/UNLISTEN actions consists of an ordered list of @@ -316,7 +316,7 @@ typedef struct char channel[FLEXIBLE_ARRAY_MEMBER]; /* nul-terminated string */ } ListenAction; -static List *pendingActions = NIL; /* list of ListenAction */ +static List *pendingActions = NIL; /* list of ListenAction */ static List *upperPendingActions = NIL; /* list of upper-xact lists */ @@ -342,9 +342,9 @@ typedef struct Notification char *payload; /* payload string (can be empty) */ } Notification; -static List *pendingNotifies = NIL; /* list of Notifications */ +static List *pendingNotifies = NIL; /* list of Notifications */ -static List *upperPendingNotifies = NIL; /* list of upper-xact lists */ +static List *upperPendingNotifies = NIL; /* list of upper-xact lists */ /* * Inbound notifications are initially processed by HandleNotifyInterrupt(), @@ -1184,7 +1184,7 @@ asyncQueueUnregister(void) { bool advanceTail; - Assert(listenChannels == NIL); /* else caller error */ + Assert(listenChannels == NIL); /* else caller error */ if (!amRegisteredListener) /* nothing to do */ return; @@ -1825,7 +1825,7 @@ asyncQueueReadAllNotifications(void) /* we only want to read as far as head */ copysize = QUEUE_POS_OFFSET(head) - curoffset; if (copysize < 0) - copysize = 0; /* just for safety */ + copysize = 0; /* just for safety */ } else { diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index ef1abf34ab..1cc5309426 100644 --- a/src/backend/commands/cluster.c +++ b/src/backend/commands/cluster.c @@ -325,7 +325,7 @@ cluster_rel(Oid tableOid, Oid indexOid, bool recheck, bool verbose) * Check that the index is still the one with indisclustered set. */ tuple = SearchSysCache1(INDEXRELID, ObjectIdGetDatum(indexOid)); - if (!HeapTupleIsValid(tuple)) /* probably can't happen */ + if (!HeapTupleIsValid(tuple)) /* probably can't happen */ { relation_close(OldHeap, AccessExclusiveLock); return; diff --git a/src/backend/commands/collationcmds.c b/src/backend/commands/collationcmds.c index 91b65b174d..e805b7cfc4 100644 --- a/src/backend/commands/collationcmds.c +++ b/src/backend/commands/collationcmds.c @@ -417,7 +417,7 @@ get_icu_locale_comment(const char *localename) return result; } -#endif /* USE_ICU */ +#endif /* USE_ICU */ Datum @@ -552,7 +552,7 @@ pg_import_system_collations(PG_FUNCTION_ARGS) if (count == 0) ereport(WARNING, (errmsg("no usable system locales were found"))); -#endif /* not HAVE_LOCALE_T && not WIN32 */ +#endif /* not HAVE_LOCALE_T && not WIN32 */ #ifdef USE_ICU if (!is_encoding_supported_by_icu(GetDatabaseEncoding())) diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index ff32d04189..ec6011cdb8 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -102,7 +102,7 @@ typedef struct CopyStateData bool fe_eof; /* true if detected end of copy data */ EolType eol_type; /* EOL type of input */ int file_encoding; /* file or remote side's character encoding */ - bool need_transcoding; /* file encoding diff from server? */ + bool need_transcoding; /* file encoding diff from server? */ bool encoding_embeds_ascii; /* ASCII can be non-first byte? */ /* parameters from the COPY command */ @@ -119,17 +119,17 @@ typedef struct CopyStateData bool header_line; /* CSV header line? */ char *null_print; /* NULL marker string (server encoding!) */ int null_print_len; /* length of same */ - char *null_print_client; /* same converted to file encoding */ + char *null_print_client; /* same converted to file encoding */ char *delim; /* column delimiter (must be 1 byte) */ char *quote; /* CSV quote char (must be 1 byte) */ char *escape; /* CSV escape char (must be 1 byte) */ List *force_quote; /* list of column names */ bool force_quote_all; /* FORCE_QUOTE *? */ - bool *force_quote_flags; /* per-column CSV FQ flags */ + bool *force_quote_flags; /* per-column CSV FQ flags */ List *force_notnull; /* list of column names */ bool *force_notnull_flags; /* per-column CSV FNN flags */ List *force_null; /* list of column names */ - bool *force_null_flags; /* per-column CSV FN flags */ + bool *force_null_flags; /* per-column CSV FN flags */ bool convert_selectively; /* do selective binary conversion? */ List *convert_select; /* list of column names (can be NIL) */ bool *convert_select_flags; /* per-column CSV/TEXT CS flags */ @@ -162,7 +162,7 @@ typedef struct CopyStateData Oid *typioparams; /* array of element types for in_functions */ int *defmap; /* array of default att numbers */ ExprState **defexprs; /* array of default att expressions */ - bool volatile_defexprs; /* is any of defexprs volatile? */ + bool volatile_defexprs; /* is any of defexprs volatile? */ List *range_table; PartitionDispatch *partition_dispatch_info; @@ -195,7 +195,7 @@ typedef struct CopyStateData * can display it in error messages if appropriate. */ StringInfoData line_buf; - bool line_buf_converted; /* converted to server encoding? */ + bool line_buf_converted; /* converted to server encoding? */ bool line_buf_valid; /* contains the row being processed? */ /* @@ -355,10 +355,10 @@ SendCopyBegin(CopyState cstate) int i; pq_beginmessage(&buf, 'H'); - pq_sendbyte(&buf, format); /* overall format */ + pq_sendbyte(&buf, format); /* overall format */ pq_sendint(&buf, natts, 2); for (i = 0; i < natts; i++) - pq_sendint(&buf, format, 2); /* per-column formats */ + pq_sendint(&buf, format, 2); /* per-column formats */ pq_endmessage(&buf); cstate->copy_dest = COPY_NEW_FE; } @@ -388,10 +388,10 @@ ReceiveCopyBegin(CopyState cstate) int i; pq_beginmessage(&buf, 'G'); - pq_sendbyte(&buf, format); /* overall format */ + pq_sendbyte(&buf, format); /* overall format */ pq_sendint(&buf, natts, 2); for (i = 0; i < natts; i++) - pq_sendint(&buf, format, 2); /* per-column formats */ + pq_sendint(&buf, format, 2); /* per-column formats */ pq_endmessage(&buf); cstate->copy_dest = COPY_NEW_FE; cstate->fe_msgbuf = makeStringInfo(); @@ -609,20 +609,20 @@ CopyGetData(CopyState cstate, void *databuf, int minread, int maxread) RESUME_CANCEL_INTERRUPTS(); switch (mtype) { - case 'd': /* CopyData */ + case 'd': /* CopyData */ break; - case 'c': /* CopyDone */ + case 'c': /* CopyDone */ /* COPY IN correctly terminated by frontend */ cstate->fe_eof = true; return bytesread; - case 'f': /* CopyFail */ + case 'f': /* CopyFail */ ereport(ERROR, (errcode(ERRCODE_QUERY_CANCELED), errmsg("COPY from stdin failed: %s", pq_getmsgstring(cstate->fe_msgbuf)))); break; - case 'H': /* Flush */ - case 'S': /* Sync */ + case 'H': /* Flush */ + case 'S': /* Sync */ /* * Ignore Flush/Sync for the convenience of client @@ -1697,7 +1697,7 @@ BeginCopy(ParseState *pstate, /* See Multibyte encoding comment above */ cstate->encoding_embeds_ascii = PG_ENCODING_IS_CLIENT_ONLY(cstate->file_encoding); - cstate->copy_dest = COPY_FILE; /* default */ + cstate->copy_dest = COPY_FILE; /* default */ MemoryContextSwitchTo(oldcontext); @@ -1951,7 +1951,7 @@ CopyTo(CopyState cstate) tupDesc = cstate->queryDesc->tupDesc; attr = tupDesc->attrs; num_phys_attrs = tupDesc->natts; - cstate->null_print_client = cstate->null_print; /* default */ + cstate->null_print_client = cstate->null_print; /* default */ /* We use fe_msgbuf as a per-row buffer regardless of copy_dest */ cstate->fe_msgbuf = makeStringInfo(); @@ -3707,8 +3707,8 @@ CopyReadLineText(CopyState cstate) if (c == '\n') { - raw_buf_ptr++; /* eat newline */ - cstate->eol_type = EOL_CRNL; /* in case not set yet */ + raw_buf_ptr++; /* eat newline */ + cstate->eol_type = EOL_CRNL; /* in case not set yet */ } else { @@ -4458,7 +4458,7 @@ CopyAttributeOutText(CopyState cstate, char *string) break; /* All ASCII control chars are length 1 */ ptr++; - continue; /* fall to end of loop */ + continue; /* fall to end of loop */ } /* if we get here, we need to convert the control char */ DUMPSOFAR(); @@ -4518,7 +4518,7 @@ CopyAttributeOutText(CopyState cstate, char *string) break; /* All ASCII control chars are length 1 */ ptr++; - continue; /* fall to end of loop */ + continue; /* fall to end of loop */ } /* if we get here, we need to convert the control char */ DUMPSOFAR(); diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 11038f6764..96ab6f23cd 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -322,7 +322,7 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt) * won't change underneath us. */ if (!dbtemplate) - dbtemplate = "template1"; /* Default template database name */ + dbtemplate = "template1"; /* Default template database name */ if (!get_db_info(dbtemplate, ShareLock, &src_dboid, &src_owner, &src_encoding, @@ -1284,7 +1284,7 @@ movedb(const char *dbname, const char *tblspcname) sysscan = systable_beginscan(pgdbrel, DatabaseNameIndexId, true, NULL, 1, &scankey); oldtuple = systable_getnext(sysscan); - if (!HeapTupleIsValid(oldtuple)) /* shouldn't happen... */ + if (!HeapTupleIsValid(oldtuple)) /* shouldn't happen... */ ereport(ERROR, (errcode(ERRCODE_UNDEFINED_DATABASE), errmsg("database \"%s\" does not exist", dbname))); diff --git a/src/backend/commands/event_trigger.c b/src/backend/commands/event_trigger.c index 4cfab418a6..48a6375559 100644 --- a/src/backend/commands/event_trigger.c +++ b/src/backend/commands/event_trigger.c @@ -57,8 +57,8 @@ typedef struct EventTriggerQueryState bool in_sql_drop; /* table_rewrite */ - Oid table_rewrite_oid; /* InvalidOid, or set for - * table_rewrite event */ + Oid table_rewrite_oid; /* InvalidOid, or set for table_rewrite + * event */ int table_rewrite_reason; /* AT_REWRITE reason */ /* Support for command collection */ diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c index 91f9cac786..a40b5ec4de 100644 --- a/src/backend/commands/extension.c +++ b/src/backend/commands/extension.c @@ -96,7 +96,7 @@ typedef struct ExtensionVersionInfo /* working state for Dijkstra's algorithm: */ bool distance_known; /* is distance from start known yet? */ int distance; /* current worst-case distance estimate */ - struct ExtensionVersionInfo *previous; /* current best predecessor */ + struct ExtensionVersionInfo *previous; /* current best predecessor */ } ExtensionVersionInfo; /* Local functions */ @@ -2387,7 +2387,7 @@ pg_extension_config_dump(PG_FUNCTION_ARGS) extTup = systable_getnext(extScan); - if (!HeapTupleIsValid(extTup)) /* should not happen */ + if (!HeapTupleIsValid(extTup)) /* should not happen */ elog(ERROR, "could not find tuple for extension %u", CurrentExtensionObject); @@ -2433,7 +2433,7 @@ pg_extension_config_dump(PG_FUNCTION_ARGS) { if (arrayData[i] == tableoid) { - arrayIndex = i + 1; /* replace this element instead */ + arrayIndex = i + 1; /* replace this element instead */ break; } } @@ -2535,7 +2535,7 @@ extension_config_remove(Oid extensionoid, Oid tableoid) extTup = systable_getnext(extScan); - if (!HeapTupleIsValid(extTup)) /* should not happen */ + if (!HeapTupleIsValid(extTup)) /* should not happen */ elog(ERROR, "could not find tuple for extension %u", extensionoid); @@ -2736,7 +2736,7 @@ AlterExtensionNamespace(const char *extensionName, const char *newschema, Oid *o extTup = systable_getnext(extScan); - if (!HeapTupleIsValid(extTup)) /* should not happen */ + if (!HeapTupleIsValid(extTup)) /* should not happen */ elog(ERROR, "could not find tuple for extension %u", extensionOid); @@ -2801,7 +2801,7 @@ AlterExtensionNamespace(const char *extensionName, const char *newschema, Oid *o dep.objectId = pg_depend->objid; dep.objectSubId = pg_depend->objsubid; - if (dep.objectSubId != 0) /* should not happen */ + if (dep.objectSubId != 0) /* should not happen */ elog(ERROR, "extension should not have a sub-object dependency"); /* Relocate the object */ diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index 2e26090bf9..1a165d5b0c 100644 --- a/src/backend/commands/functioncmds.c +++ b/src/backend/commands/functioncmds.c @@ -201,7 +201,7 @@ interpret_function_parameter_list(ParseState *pstate, ListCell *x; int i; - *variadicArgType = InvalidOid; /* default result */ + *variadicArgType = InvalidOid; /* default result */ *requiredResultType = InvalidOid; /* default result */ inTypes = (Oid *) palloc(parameterCount * sizeof(Oid)); @@ -562,7 +562,7 @@ interpret_func_parallel(DefElem *defel) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("parameter \"parallel\" must be SAFE, RESTRICTED, or UNSAFE"))); - return PROPARALLEL_UNSAFE; /* keep compiler quiet */ + return PROPARALLEL_UNSAFE; /* keep compiler quiet */ } } @@ -1090,7 +1090,7 @@ CreateFunction(ParseState *pstate, CreateFunctionStmt *stmt) languageValidator, prosrc_str, /* converted to text later */ probin_str, /* converted to text later */ - false, /* not an aggregate */ + false, /* not an aggregate */ isWindowFunc, security, isLeakProof, @@ -1146,7 +1146,7 @@ RemoveFunctionById(Oid funcOid) relation = heap_open(AggregateRelationId, RowExclusiveLock); tup = SearchSysCache1(AGGFNOID, ObjectIdGetDatum(funcOid)); - if (!HeapTupleIsValid(tup)) /* should not happen */ + if (!HeapTupleIsValid(tup)) /* should not happen */ elog(ERROR, "cache lookup failed for pg_aggregate tuple for function %u", funcOid); CatalogTupleDelete(relation, &tup->t_self); @@ -1326,7 +1326,7 @@ SetFunctionReturnType(Oid funcOid, Oid newRetType) elog(ERROR, "cache lookup failed for function %u", funcOid); procForm = (Form_pg_proc) GETSTRUCT(tup); - if (procForm->prorettype != OPAQUEOID) /* caller messed up */ + if (procForm->prorettype != OPAQUEOID) /* caller messed up */ elog(ERROR, "function %u doesn't return OPAQUE", funcOid); /* okay to overwrite copied tuple */ diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index c0902794e9..e3f2dcfa8c 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -645,7 +645,7 @@ DefineIndex(Oid relationId, else { elog(ERROR, "unknown constraint type"); - constraint_type = NULL; /* keep compiler quiet */ + constraint_type = NULL; /* keep compiler quiet */ } ereport(DEBUG1, @@ -909,7 +909,7 @@ DefineIndex(Oid relationId, newer_snapshots[k])) break; } - if (k >= n_newer_snapshots) /* not there anymore */ + if (k >= n_newer_snapshots) /* not there anymore */ SetInvalidVirtualTransactionId(old_snapshots[j]); } pfree(newer_snapshots); @@ -1704,9 +1704,9 @@ ChooseIndexColumnNames(List *indexElems) /* Get the preliminary name from the IndexElem */ if (ielem->indexcolname) - origname = ielem->indexcolname; /* caller-specified name */ + origname = ielem->indexcolname; /* caller-specified name */ else if (ielem->name) - origname = ielem->name; /* simple column reference */ + origname = ielem->name; /* simple column reference */ else origname = "expr"; /* default name for expression */ diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c index ab51d1a417..512014438b 100644 --- a/src/backend/commands/opclasscmds.c +++ b/src/backend/commands/opclasscmds.c @@ -856,7 +856,7 @@ AlterOpFamilyAdd(AlterOpFamilyStmt *stmt, Oid amoid, Oid opfamilyoid, ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("operator argument types must be specified in ALTER OPERATOR FAMILY"))); - operOid = InvalidOid; /* keep compiler quiet */ + operOid = InvalidOid; /* keep compiler quiet */ } if (item->order_family) diff --git a/src/backend/commands/operatorcmds.c b/src/backend/commands/operatorcmds.c index 739d5875eb..c7e7676611 100644 --- a/src/backend/commands/operatorcmds.c +++ b/src/backend/commands/operatorcmds.c @@ -70,16 +70,16 @@ DefineOperator(List *names, List *parameters) char *oprName; Oid oprNamespace; AclResult aclresult; - bool canMerge = false; /* operator merges */ + bool canMerge = false; /* operator merges */ bool canHash = false; /* operator hashes */ - List *functionName = NIL; /* function for operator */ - TypeName *typeName1 = NULL; /* first type name */ - TypeName *typeName2 = NULL; /* second type name */ + List *functionName = NIL; /* function for operator */ + TypeName *typeName1 = NULL; /* first type name */ + TypeName *typeName2 = NULL; /* second type name */ Oid typeId1 = InvalidOid; /* types converted to OID */ Oid typeId2 = InvalidOid; Oid rettype; List *commutatorName = NIL; /* optional commutator operator name */ - List *negatorName = NIL; /* optional negator operator name */ + List *negatorName = NIL; /* optional negator operator name */ List *restrictionName = NIL; /* optional restrict. sel. procedure */ List *joinName = NIL; /* optional join sel. procedure */ Oid functionOid; /* functions converted to OID */ @@ -243,9 +243,9 @@ DefineOperator(List *names, List *parameters) oprNamespace, /* namespace */ typeId1, /* left type id */ typeId2, /* right type id */ - functionOid, /* function for operator */ + functionOid, /* function for operator */ commutatorName, /* optional commutator operator name */ - negatorName, /* optional negator operator name */ + negatorName, /* optional negator operator name */ restrictionOid, /* optional restrict. sel. procedure */ joinOid, /* optional join sel. procedure name */ canMerge, /* operator merges */ diff --git a/src/backend/commands/portalcmds.c b/src/backend/commands/portalcmds.c index 167910fcb5..46369cf3db 100644 --- a/src/backend/commands/portalcmds.c +++ b/src/backend/commands/portalcmds.c @@ -403,7 +403,7 @@ PersistHoldablePortal(Portal portal) /* * Now shut down the inner executor. */ - portal->queryDesc = NULL; /* prevent double shutdown */ + portal->queryDesc = NULL; /* prevent double shutdown */ ExecutorFinish(queryDesc); ExecutorEnd(queryDesc); FreeQueryDesc(queryDesc); diff --git a/src/backend/commands/proclang.c b/src/backend/commands/proclang.c index a4fbc05a12..4d555f1f5c 100644 --- a/src/backend/commands/proclang.c +++ b/src/backend/commands/proclang.c @@ -161,18 +161,18 @@ CreateProceduralLanguage(CreatePLangStmt *stmt) { tmpAddr = ProcedureCreate(pltemplate->tmplinline, PG_CATALOG_NAMESPACE, - false, /* replace */ - false, /* returnsSet */ + false, /* replace */ + false, /* returnsSet */ VOIDOID, BOOTSTRAP_SUPERUSERID, ClanguageId, F_FMGR_C_VALIDATOR, pltemplate->tmplinline, pltemplate->tmpllibrary, - false, /* isAgg */ - false, /* isWindowFunc */ - false, /* security_definer */ - false, /* isLeakProof */ + false, /* isAgg */ + false, /* isWindowFunc */ + false, /* security_definer */ + false, /* isLeakProof */ true, /* isStrict */ PROVOLATILE_VOLATILE, PROPARALLEL_UNSAFE, @@ -204,18 +204,18 @@ CreateProceduralLanguage(CreatePLangStmt *stmt) { tmpAddr = ProcedureCreate(pltemplate->tmplvalidator, PG_CATALOG_NAMESPACE, - false, /* replace */ - false, /* returnsSet */ + false, /* replace */ + false, /* returnsSet */ VOIDOID, BOOTSTRAP_SUPERUSERID, ClanguageId, F_FMGR_C_VALIDATOR, pltemplate->tmplvalidator, pltemplate->tmpllibrary, - false, /* isAgg */ - false, /* isWindowFunc */ - false, /* security_definer */ - false, /* isLeakProof */ + false, /* isAgg */ + false, /* isWindowFunc */ + false, /* security_definer */ + false, /* isLeakProof */ true, /* isStrict */ PROVOLATILE_VOLATILE, PROPARALLEL_UNSAFE, @@ -533,7 +533,7 @@ DropProceduralLanguageById(Oid langOid) rel = heap_open(LanguageRelationId, RowExclusiveLock); langTup = SearchSysCache1(LANGOID, ObjectIdGetDatum(langOid)); - if (!HeapTupleIsValid(langTup)) /* should not happen */ + if (!HeapTupleIsValid(langTup)) /* should not happen */ elog(ERROR, "cache lookup failed for language %u", langOid); CatalogTupleDelete(rel, &langTup->t_self); diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index 031bbc874d..58bda55837 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -611,7 +611,7 @@ nextval_internal(Oid relid, bool check_permissions) */ PreventCommandIfParallelMode("nextval()"); - if (elm->last != elm->cached) /* some numbers were cached */ + if (elm->last != elm->cached) /* some numbers were cached */ { Assert(elm->last_valid); Assert(elm->increment != 0); @@ -1455,7 +1455,7 @@ init_params(ParseState *pstate, List *options, bool for_identity, seqform->seqmax = PG_INT64_MAX; } else - seqform->seqmax = -1; /* descending seq */ + seqform->seqmax = -1; /* descending seq */ seqdataform->log_cnt = 0; } @@ -1532,9 +1532,9 @@ init_params(ParseState *pstate, List *options, bool for_identity, else if (isInit) { if (seqform->seqincrement > 0) - seqform->seqstart = seqform->seqmin; /* ascending seq */ + seqform->seqstart = seqform->seqmin; /* ascending seq */ else - seqform->seqstart = seqform->seqmax; /* descending seq */ + seqform->seqstart = seqform->seqmax; /* descending seq */ } /* crosscheck START */ diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 758c876ef3..207241cb92 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -138,17 +138,17 @@ static List *on_commits = NIL; * a pass determined by subcommand type. */ -#define AT_PASS_UNSET -1 /* UNSET will cause ERROR */ -#define AT_PASS_DROP 0 /* DROP (all flavors) */ -#define AT_PASS_ALTER_TYPE 1 /* ALTER COLUMN TYPE */ -#define AT_PASS_OLD_INDEX 2 /* re-add existing indexes */ -#define AT_PASS_OLD_CONSTR 3 /* re-add existing constraints */ -#define AT_PASS_COL_ATTRS 4 /* set other column attributes */ +#define AT_PASS_UNSET -1 /* UNSET will cause ERROR */ +#define AT_PASS_DROP 0 /* DROP (all flavors) */ +#define AT_PASS_ALTER_TYPE 1 /* ALTER COLUMN TYPE */ +#define AT_PASS_OLD_INDEX 2 /* re-add existing indexes */ +#define AT_PASS_OLD_CONSTR 3 /* re-add existing constraints */ +#define AT_PASS_COL_ATTRS 4 /* set other column attributes */ /* We could support a RENAME COLUMN pass here, but not currently used */ -#define AT_PASS_ADD_COL 5 /* ADD COLUMN */ -#define AT_PASS_ADD_INDEX 6 /* ADD indexes */ -#define AT_PASS_ADD_CONSTR 7 /* ADD constraints, defaults */ -#define AT_PASS_MISC 8 /* other stuff */ +#define AT_PASS_ADD_COL 5 /* ADD COLUMN */ +#define AT_PASS_ADD_INDEX 6 /* ADD indexes */ +#define AT_PASS_ADD_CONSTR 7 /* ADD constraints, defaults */ +#define AT_PASS_MISC 8 /* other stuff */ #define AT_NUM_PASSES 9 typedef struct AlteredTableInfo @@ -166,13 +166,13 @@ typedef struct AlteredTableInfo int rewrite; /* Reason for forced rewrite, if any */ Oid newTableSpace; /* new tablespace; 0 means no change */ bool chgPersistence; /* T if SET LOGGED/UNLOGGED is used */ - char newrelpersistence; /* if above is true */ + char newrelpersistence; /* if above is true */ Expr *partition_constraint; /* for attach partition validation */ /* Objects to rebuild after completing ALTER TYPE operations */ List *changedConstraintOids; /* OIDs of constraints to rebuild */ List *changedConstraintDefs; /* string definitions of same */ - List *changedIndexOids; /* OIDs of indexes to rebuild */ - List *changedIndexDefs; /* string definitions of same */ + List *changedIndexOids; /* OIDs of indexes to rebuild */ + List *changedIndexDefs; /* string definitions of same */ } AlteredTableInfo; /* Struct describing one new constraint to check in Phase 3 scan */ @@ -701,13 +701,13 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId, cooked = (CookedConstraint *) palloc(sizeof(CookedConstraint)); cooked->contype = CONSTR_DEFAULT; - cooked->conoid = InvalidOid; /* until created */ + cooked->conoid = InvalidOid; /* until created */ cooked->name = NULL; cooked->attnum = attnum; cooked->expr = colDef->cooked_default; cooked->skip_validation = false; cooked->is_local = true; /* not used for defaults */ - cooked->inhcount = 0; /* ditto */ + cooked->inhcount = 0; /* ditto */ cooked->is_no_inherit = false; cookedDefaults = lappend(cookedDefaults, cooked); descriptor->attrs[attnum - 1]->atthasdef = true; @@ -917,7 +917,7 @@ DropErrorMsgNonExistent(RangeVar *rel, char rightkind, bool missing_ok) } } - Assert(rentry->kind != '\0'); /* Should be impossible */ + Assert(rentry->kind != '\0'); /* Should be impossible */ } /* @@ -1629,7 +1629,7 @@ MergeAttributes(List *schema, List *supers, char relpersistence, int parentsWithOids = 0; bool have_bogus_defaults = false; int child_attno; - static Node bogus_marker = {0}; /* marks conflicting defaults */ + static Node bogus_marker = {0}; /* marks conflicting defaults */ List *saved_schema = NIL; /* @@ -1688,8 +1688,8 @@ MergeAttributes(List *schema, List *supers, char relpersistence, while (rest != NULL) { ColumnDef *restdef = lfirst(rest); - ListCell *next = lnext(rest); /* need to save it in case we - * delete it */ + ListCell *next = lnext(rest); /* need to save it in case we + * delete it */ if (strcmp(coldef->colname, restdef->colname) == 0) { @@ -2012,7 +2012,7 @@ MergeAttributes(List *schema, List *supers, char relpersistence, cooked = (CookedConstraint *) palloc(sizeof(CookedConstraint)); cooked->contype = CONSTR_CHECK; - cooked->conoid = InvalidOid; /* until created */ + cooked->conoid = InvalidOid; /* until created */ cooked->name = pstrdup(name); cooked->attnum = 0; /* not used for constraints */ cooked->expr = expr; @@ -2650,7 +2650,7 @@ renameatt_internal(Oid myrelid, heap_close(attrelation, RowExclusiveLock); - relation_close(targetrelation, NoLock); /* close rel but keep lock */ + relation_close(targetrelation, NoLock); /* close rel but keep lock */ return attnum; } @@ -2701,10 +2701,10 @@ renameatt(RenameStmt *stmt) attnum = renameatt_internal(relid, - stmt->subname, /* old att name */ - stmt->newname, /* new att name */ + stmt->subname, /* old att name */ + stmt->newname, /* new att name */ stmt->relation->inh, /* recursive? */ - false, /* recursing? */ + false, /* recursing? */ 0, /* expected inhcount */ stmt->behavior); @@ -2856,8 +2856,8 @@ RenameConstraint(RenameStmt *stmt) stmt->subname, stmt->newname, (stmt->relation && - stmt->relation->inh), /* recursive? */ - false, /* recursing? */ + stmt->relation->inh), /* recursive? */ + false, /* recursing? */ 0 /* expected inhcount */ ); } @@ -2933,7 +2933,7 @@ RenameRelationInternal(Oid myrelid, const char *newrelname, bool is_internal) relrelation = heap_open(RelationRelationId, RowExclusiveLock); reltup = SearchSysCacheCopy1(RELOID, ObjectIdGetDatum(myrelid)); - if (!HeapTupleIsValid(reltup)) /* shouldn't happen */ + if (!HeapTupleIsValid(reltup)) /* shouldn't happen */ elog(ERROR, "cache lookup failed for relation %u", myrelid); relform = (Form_pg_class) GETSTRUCT(reltup); @@ -3175,7 +3175,7 @@ AlterTableGetLockLevel(List *cmds) */ case AT_AddColumn: /* may rewrite heap, in some cases and visible * to SELECT */ - case AT_SetTableSpace: /* must rewrite heap */ + case AT_SetTableSpace: /* must rewrite heap */ case AT_AlterColumnType: /* must rewrite heap */ case AT_AddOids: /* must rewrite heap */ cmd_lockmode = AccessExclusiveLock; @@ -3196,7 +3196,7 @@ AlterTableGetLockLevel(List *cmds) * Removing constraints can affect SELECTs that have been * optimised assuming the constraint holds true. */ - case AT_DropConstraint: /* as DROP INDEX */ + case AT_DropConstraint: /* as DROP INDEX */ case AT_DropNotNull: /* may change some SQL plans */ cmd_lockmode = AccessExclusiveLock; break; @@ -3264,8 +3264,8 @@ AlterTableGetLockLevel(List *cmds) break; case AT_AddConstraint: - case AT_ProcessedConstraint: /* becomes AT_AddConstraint */ - case AT_AddConstraintRecurse: /* becomes AT_AddConstraint */ + case AT_ProcessedConstraint: /* becomes AT_AddConstraint */ + case AT_AddConstraintRecurse: /* becomes AT_AddConstraint */ case AT_ReAddConstraint: /* becomes AT_AddConstraint */ if (IsA(cmd->def, Constraint)) { @@ -3345,11 +3345,11 @@ AlterTableGetLockLevel(List *cmds) * applies: we don't currently allow concurrent catalog * updates. */ - case AT_SetStatistics: /* Uses MVCC in getTableAttrs() */ + case AT_SetStatistics: /* Uses MVCC in getTableAttrs() */ case AT_ClusterOn: /* Uses MVCC in getIndexes() */ case AT_DropCluster: /* Uses MVCC in getIndexes() */ case AT_SetOptions: /* Uses MVCC in getTableAttrs() */ - case AT_ResetOptions: /* Uses MVCC in getTableAttrs() */ + case AT_ResetOptions: /* Uses MVCC in getTableAttrs() */ cmd_lockmode = ShareUpdateExclusiveLock; break; @@ -3368,8 +3368,8 @@ AlterTableGetLockLevel(List *cmds) * reasons these can all be used with ALTER TABLE, so we can't * decide between them using the basic grammar. */ - case AT_SetRelOptions: /* Uses MVCC in getIndexes() and - * getTables() */ + case AT_SetRelOptions: /* Uses MVCC in getIndexes() and + * getTables() */ case AT_ResetRelOptions: /* Uses MVCC in getIndexes() and * getTables() */ cmd_lockmode = AlterTableGetRelOptionsLockLevel((List *) cmd->def); @@ -3553,7 +3553,7 @@ ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd, cmd->subtype = AT_AddConstraintRecurse; pass = AT_PASS_ADD_CONSTR; break; - case AT_AddIndexConstraint: /* ADD CONSTRAINT USING INDEX */ + case AT_AddIndexConstraint: /* ADD CONSTRAINT USING INDEX */ ATSimplePermissions(rel, ATT_TABLE); /* This command never recurses */ /* No command-specific prep needed */ @@ -3643,7 +3643,7 @@ ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd, break; case AT_SetRelOptions: /* SET (...) */ case AT_ResetRelOptions: /* RESET (...) */ - case AT_ReplaceRelOptions: /* reset them all, then set just these */ + case AT_ReplaceRelOptions: /* reset them all, then set just these */ ATSimplePermissions(rel, ATT_TABLE | ATT_VIEW | ATT_MATVIEW | ATT_INDEX); /* This command never recurses */ /* No command-specific prep needed */ @@ -3665,7 +3665,7 @@ ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd, ATSimplePermissions(rel, ATT_TABLE); pass = AT_PASS_MISC; break; - case AT_ValidateConstraint: /* VALIDATE CONSTRAINT */ + case AT_ValidateConstraint: /* VALIDATE CONSTRAINT */ ATSimplePermissions(rel, ATT_TABLE | ATT_FOREIGN_TABLE); /* Recursion occurs during execution phase */ /* No command-specific prep needed except saving recurse flag */ @@ -3719,7 +3719,7 @@ ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd, default: /* oops */ elog(ERROR, "unrecognized alter table type: %d", (int) cmd->subtype); - pass = AT_PASS_UNSET; /* keep compiler quiet */ + pass = AT_PASS_UNSET; /* keep compiler quiet */ break; } Assert(pass > AT_PASS_UNSET); @@ -3856,7 +3856,7 @@ ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel, cmd->behavior, false, false, cmd->missing_ok, lockmode); break; - case AT_DropColumnRecurse: /* DROP COLUMN with recursion */ + case AT_DropColumnRecurse: /* DROP COLUMN with recursion */ address = ATExecDropColumn(wqueue, rel, cmd->name, cmd->behavior, true, false, cmd->missing_ok, lockmode); @@ -3887,19 +3887,19 @@ ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel, case AT_ReAddComment: /* Re-add existing comment */ address = CommentObject((CommentStmt *) cmd->def); break; - case AT_AddIndexConstraint: /* ADD CONSTRAINT USING INDEX */ + case AT_AddIndexConstraint: /* ADD CONSTRAINT USING INDEX */ address = ATExecAddIndexConstraint(tab, rel, (IndexStmt *) cmd->def, lockmode); break; case AT_AlterConstraint: /* ALTER CONSTRAINT */ address = ATExecAlterConstraint(rel, cmd, false, false, lockmode); break; - case AT_ValidateConstraint: /* VALIDATE CONSTRAINT */ + case AT_ValidateConstraint: /* VALIDATE CONSTRAINT */ address = ATExecValidateConstraint(rel, cmd->name, false, false, lockmode); break; - case AT_ValidateConstraintRecurse: /* VALIDATE CONSTRAINT with - * recursion */ + case AT_ValidateConstraintRecurse: /* VALIDATE CONSTRAINT with + * recursion */ address = ATExecValidateConstraint(rel, cmd->name, true, false, lockmode); break; @@ -3916,7 +3916,7 @@ ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel, case AT_AlterColumnType: /* ALTER COLUMN TYPE */ address = ATExecAlterColumnType(tab, rel, cmd, lockmode); break; - case AT_AlterColumnGenericOptions: /* ALTER COLUMN OPTIONS */ + case AT_AlterColumnGenericOptions: /* ALTER COLUMN OPTIONS */ address = ATExecAlterColumnGenericOptions(rel, cmd->name, (List *) cmd->def, lockmode); @@ -3966,18 +3966,18 @@ ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel, break; case AT_SetRelOptions: /* SET (...) */ case AT_ResetRelOptions: /* RESET (...) */ - case AT_ReplaceRelOptions: /* replace entire option list */ + case AT_ReplaceRelOptions: /* replace entire option list */ ATExecSetRelOptions(rel, (List *) cmd->def, cmd->subtype, lockmode); break; case AT_EnableTrig: /* ENABLE TRIGGER name */ ATExecEnableDisableTrigger(rel, cmd->name, TRIGGER_FIRES_ON_ORIGIN, false, lockmode); break; - case AT_EnableAlwaysTrig: /* ENABLE ALWAYS TRIGGER name */ + case AT_EnableAlwaysTrig: /* ENABLE ALWAYS TRIGGER name */ ATExecEnableDisableTrigger(rel, cmd->name, TRIGGER_FIRES_ALWAYS, false, lockmode); break; - case AT_EnableReplicaTrig: /* ENABLE REPLICA TRIGGER name */ + case AT_EnableReplicaTrig: /* ENABLE REPLICA TRIGGER name */ ATExecEnableDisableTrigger(rel, cmd->name, TRIGGER_FIRES_ON_REPLICA, false, lockmode); break; @@ -4006,11 +4006,11 @@ ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel, ATExecEnableDisableRule(rel, cmd->name, RULE_FIRES_ON_ORIGIN, lockmode); break; - case AT_EnableAlwaysRule: /* ENABLE ALWAYS RULE name */ + case AT_EnableAlwaysRule: /* ENABLE ALWAYS RULE name */ ATExecEnableDisableRule(rel, cmd->name, RULE_FIRES_ALWAYS, lockmode); break; - case AT_EnableReplicaRule: /* ENABLE REPLICA RULE name */ + case AT_EnableReplicaRule: /* ENABLE REPLICA RULE name */ ATExecEnableDisableRule(rel, cmd->name, RULE_FIRES_ON_REPLICA, lockmode); break; @@ -4330,7 +4330,7 @@ ATRewriteTable(AlteredTableInfo *tab, Oid OIDNewHeap, LOCKMODE lockmode) */ oldrel = heap_open(tab->relid, NoLock); oldTupDesc = tab->oldDesc; - newTupDesc = RelationGetDescr(oldrel); /* includes all mods */ + newTupDesc = RelationGetDescr(oldrel); /* includes all mods */ if (OidIsValid(OIDNewHeap)) newrel = heap_open(OIDNewHeap, lockmode); @@ -6540,12 +6540,12 @@ ATExecDropColumn(List **wqueue, Relation rel, const char *colName, CheckTableNotInUse(childrel, "ALTER TABLE"); tuple = SearchSysCacheCopyAttName(childrelid, colName); - if (!HeapTupleIsValid(tuple)) /* shouldn't happen */ + if (!HeapTupleIsValid(tuple)) /* shouldn't happen */ elog(ERROR, "cache lookup failed for attribute \"%s\" of relation %u", colName, childrelid); childatt = (Form_pg_attribute) GETSTRUCT(tuple); - if (childatt->attinhcount <= 0) /* shouldn't happen */ + if (childatt->attinhcount <= 0) /* shouldn't happen */ elog(ERROR, "relation %u has non-inherited attribute \"%s\"", childrelid, colName); @@ -6767,8 +6767,8 @@ ATExecAddIndexConstraint(AlteredTableInfo *tab, Relation rel, stmt->deferrable, stmt->initdeferred, stmt->primary, - true, /* update pg_index */ - true, /* remove old dependencies */ + true, /* update pg_index */ + true, /* remove old dependencies */ allowSystemTableMods, false); /* is_internal */ @@ -6889,8 +6889,8 @@ ATAddCheckConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel, newcons = AddRelationNewConstraints(rel, NIL, list_make1(copyObject(constr)), recursing | is_readd, /* allow_merge */ - !recursing, /* is_local */ - is_readd); /* is_internal */ + !recursing, /* is_local */ + is_readd); /* is_internal */ /* we don't expect more than one constraint here */ Assert(list_length(newcons) <= 1); @@ -7337,8 +7337,7 @@ ATAddForeignKeyConstraint(AlteredTableInfo *tab, Relation rel, RelationGetRelid(rel), fkattnum, numfks, - InvalidOid, /* not a domain - * constraint */ + InvalidOid, /* not a domain constraint */ indexOid, RelationGetRelid(pkrel), pkattnum, @@ -7349,13 +7348,13 @@ ATAddForeignKeyConstraint(AlteredTableInfo *tab, Relation rel, fkconstraint->fk_upd_action, fkconstraint->fk_del_action, fkconstraint->fk_matchtype, - NULL, /* no exclusion constraint */ - NULL, /* no check constraint */ + NULL, /* no exclusion constraint */ + NULL, /* no check constraint */ NULL, NULL, - true, /* islocal */ - 0, /* inhcount */ - true, /* isnoinherit */ + true, /* islocal */ + 0, /* inhcount */ + true, /* isnoinherit */ false); /* is_internal */ ObjectAddressSet(address, ConstraintRelationId, constrOid); @@ -8607,7 +8606,7 @@ ATExecDropConstraint(Relation rel, const char *constrName, con = (Form_pg_constraint) GETSTRUCT(copy_tuple); - if (con->coninhcount <= 0) /* shouldn't happen */ + if (con->coninhcount <= 0) /* shouldn't happen */ elog(ERROR, "relation %u has non-inherited constraint \"%s\"", childrelid, constrName); @@ -8965,7 +8964,7 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel, /* Look up the target column */ heapTup = SearchSysCacheCopyAttName(RelationGetRelid(rel), colName); - if (!HeapTupleIsValid(heapTup)) /* shouldn't happen */ + if (!HeapTupleIsValid(heapTup)) /* shouldn't happen */ ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), errmsg("column \"%s\" of relation \"%s\" does not exist", @@ -9005,7 +9004,7 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel, defaultexpr = build_column_default(rel, attnum); Assert(defaultexpr); defaultexpr = strip_implicit_coercions(defaultexpr); - defaultexpr = coerce_to_target_type(NULL, /* no UNKNOWN params */ + defaultexpr = coerce_to_target_type(NULL, /* no UNKNOWN params */ defaultexpr, exprType(defaultexpr), targettype, targettypmod, COERCION_ASSIGNMENT, @@ -9500,7 +9499,7 @@ ATPostAlterTypeCleanup(List **wqueue, AlteredTableInfo *tab, LOCKMODE lockmode) bool conislocal; tup = SearchSysCache1(CONSTROID, ObjectIdGetDatum(oldId)); - if (!HeapTupleIsValid(tup)) /* should not happen */ + if (!HeapTupleIsValid(tup)) /* should not happen */ elog(ERROR, "cache lookup failed for constraint %u", oldId); con = (Form_pg_constraint) GETSTRUCT(tup); relid = con->conrelid; @@ -11647,7 +11646,7 @@ RemoveInheritance(Relation child_rel, Relation parent_rel) HeapTuple copyTuple = heap_copytuple(constraintTuple); Form_pg_constraint copy_con = (Form_pg_constraint) GETSTRUCT(copyTuple); - if (copy_con->coninhcount <= 0) /* shouldn't happen */ + if (copy_con->coninhcount <= 0) /* shouldn't happen */ elog(ERROR, "relation %u has non-inherited constraint \"%s\"", RelationGetRelid(child_rel), NameStr(copy_con->conname)); @@ -12836,7 +12835,7 @@ PreCommit_on_commit_actions(void) if (oids_to_truncate != NIL) { heap_truncate(oids_to_truncate); - CommandCounterIncrement(); /* XXX needed? */ + CommandCounterIncrement(); /* XXX needed? */ } } @@ -12979,7 +12978,7 @@ RangeVarCallbackOwnsRelation(const RangeVar *relation, return; tuple = SearchSysCache1(RELOID, ObjectIdGetDatum(relId)); - if (!HeapTupleIsValid(tuple)) /* should not happen */ + if (!HeapTupleIsValid(tuple)) /* should not happen */ elog(ERROR, "cache lookup failed for relation %u", relId); if (!pg_class_ownercheck(relId, GetUserId())) diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c index f9c26201d9..03bf06012a 100644 --- a/src/backend/commands/tablespace.c +++ b/src/backend/commands/tablespace.c @@ -388,7 +388,7 @@ CreateTableSpace(CreateTableSpaceStmt *stmt) (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("tablespaces are not supported on this platform"))); return InvalidOid; /* keep compiler quiet */ -#endif /* HAVE_SYMLINK */ +#endif /* HAVE_SYMLINK */ } /* @@ -549,7 +549,7 @@ DropTableSpace(DropTableSpaceStmt *stmt) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("tablespaces are not supported on this platform"))); -#endif /* HAVE_SYMLINK */ +#endif /* HAVE_SYMLINK */ } diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index d7ed71f767..191f27651c 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -593,11 +593,11 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, stmt->initdeferred, true, RelationGetRelid(rel), - NULL, /* no conkey */ + NULL, /* no conkey */ 0, - InvalidOid, /* no domain */ - InvalidOid, /* no index */ - InvalidOid, /* no foreign key */ + InvalidOid, /* no domain */ + InvalidOid, /* no index */ + InvalidOid, /* no foreign key */ NULL, NULL, NULL, @@ -606,14 +606,14 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString, ' ', ' ', ' ', - NULL, /* no exclusion */ - NULL, /* no check constraint */ + NULL, /* no exclusion */ + NULL, /* no check constraint */ NULL, NULL, - true, /* islocal */ - 0, /* inhcount */ - true, /* isnoinherit */ - isInternal); /* is_internal */ + true, /* islocal */ + 0, /* inhcount */ + true, /* isnoinherit */ + isInternal); /* is_internal */ } /* @@ -2026,7 +2026,7 @@ equalTriggerDescs(TriggerDesc *trigdesc1, TriggerDesc *trigdesc2) return false; return true; } -#endif /* NOT_USED */ +#endif /* NOT_USED */ /* * Call a trigger function. @@ -3255,8 +3255,7 @@ typedef SetConstraintStateData *SetConstraintState; */ typedef uint32 TriggerFlags; -#define AFTER_TRIGGER_OFFSET 0x0FFFFFFF /* must be low-order - * bits */ +#define AFTER_TRIGGER_OFFSET 0x0FFFFFFF /* must be low-order bits */ #define AFTER_TRIGGER_DONE 0x10000000 #define AFTER_TRIGGER_IN_PROGRESS 0x20000000 /* bits describing the size and tuple sources of this event */ @@ -3317,7 +3316,7 @@ typedef struct AfterTriggerEventDataZeroCtids */ typedef struct AfterTriggerEventChunk { - struct AfterTriggerEventChunk *next; /* list link */ + struct AfterTriggerEventChunk *next; /* list link */ char *freeptr; /* start of free space in chunk */ char *endfree; /* end of free space in chunk */ char *endptr; /* end of chunk */ @@ -3409,7 +3408,7 @@ typedef struct AfterTriggersData { CommandId firing_counter; /* next firing ID to assign */ SetConstraintState state; /* the active S C state */ - AfterTriggerEventList events; /* deferred-event list */ + AfterTriggerEventList events; /* deferred-event list */ int query_depth; /* current query list index */ AfterTriggerEventList *query_stack; /* events pending from each query */ Tuplestorestate **fdw_tuplestores; /* foreign tuples for one row from @@ -3422,7 +3421,7 @@ typedef struct AfterTriggersData /* these fields are just for resetting at subtrans abort: */ SetConstraintState *state_stack; /* stacked S C states */ - AfterTriggerEventList *events_stack; /* stacked list pointers */ + AfterTriggerEventList *events_stack; /* stacked list pointers */ int *depth_stack; /* stacked query_depths */ CommandId *firing_stack; /* stacked firing_counters */ int maxtransdepth; /* allocated len of above arrays */ @@ -4058,7 +4057,7 @@ afterTriggerInvokeEvents(AfterTriggerEventList *events, slot1 = MakeSingleTupleTableSlot(rel->rd_att); slot2 = MakeSingleTupleTableSlot(rel->rd_att); } - if (trigdesc == NULL) /* should not happen */ + if (trigdesc == NULL) /* should not happen */ elog(ERROR, "relation %u has no triggers", evtshared->ats_relid); } @@ -4132,7 +4131,7 @@ AfterTriggerBeginXact(void) /* * Initialize after-trigger state structure to empty */ - afterTriggers.firing_counter = (CommandId) 1; /* mustn't be 0 */ + afterTriggers.firing_counter = (CommandId) 1; /* mustn't be 0 */ afterTriggers.query_depth = -1; /* diff --git a/src/backend/commands/tsearchcmds.c b/src/backend/commands/tsearchcmds.c index dfb95a1ed3..cb212fdf68 100644 --- a/src/backend/commands/tsearchcmds.c +++ b/src/backend/commands/tsearchcmds.c @@ -1561,7 +1561,7 @@ serialize_deflist(List *deflist) List * deserialize_deflist(Datum txt) { - text *in = DatumGetTextPP(txt); /* in case it's toasted */ + text *in = DatumGetTextPP(txt); /* in case it's toasted */ List *result = NIL; int len = VARSIZE_ANY_EXHDR(in); char *ptr, @@ -1582,7 +1582,7 @@ deserialize_deflist(Datum txt) } ds_state; ds_state state = CS_WAITKEY; - workspace = (char *) palloc(len + 1); /* certainly enough room */ + workspace = (char *) palloc(len + 1); /* certainly enough room */ ptr = VARDATA_ANY(in); endptr = ptr + len; for (; ptr < endptr; ptr++) diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index e7ecc4ed7e..4e083eb345 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -606,11 +606,11 @@ DefineType(ParseState *pstate, List *names, List *parameters) address = TypeCreate(InvalidOid, /* no predetermined type OID */ typeName, /* type name */ - typeNamespace, /* namespace */ + typeNamespace, /* namespace */ InvalidOid, /* relation oid (n/a here) */ 0, /* relation kind (ditto) */ GetUserId(), /* owner's ID */ - internalLength, /* internal size */ + internalLength, /* internal size */ TYPTYPE_BASE, /* type-type (base type) */ category, /* type-category */ preferred, /* is it a preferred type? */ @@ -653,7 +653,7 @@ DefineType(ParseState *pstate, List *names, List *parameters) GetUserId(), /* owner's ID */ -1, /* internal size (always varlena) */ TYPTYPE_BASE, /* type-type (base type) */ - TYPCATEGORY_ARRAY, /* type-category (array) */ + TYPCATEGORY_ARRAY, /* type-category (array) */ false, /* array types are never preferred */ delimiter, /* array element delimiter */ F_ARRAY_IN, /* input procedure */ @@ -662,7 +662,7 @@ DefineType(ParseState *pstate, List *names, List *parameters) F_ARRAY_SEND, /* send procedure */ typmodinOid, /* typmodin procedure */ typmodoutOid, /* typmodout procedure */ - F_ARRAY_TYPANALYZE, /* analyze procedure */ + F_ARRAY_TYPANALYZE, /* analyze procedure */ typoid, /* element type ID */ true, /* yes this is an array type */ InvalidOid, /* no further array type */ @@ -1033,19 +1033,19 @@ DefineDomain(CreateDomainStmt *stmt) address = TypeCreate(InvalidOid, /* no predetermined type OID */ domainName, /* type name */ - domainNamespace, /* namespace */ + domainNamespace, /* namespace */ InvalidOid, /* relation oid (n/a here) */ 0, /* relation kind (ditto) */ GetUserId(), /* owner's ID */ - internalLength, /* internal size */ - TYPTYPE_DOMAIN, /* type-type (domain type) */ + internalLength, /* internal size */ + TYPTYPE_DOMAIN, /* type-type (domain type) */ category, /* type-category */ false, /* domain types are never preferred */ delimiter, /* array element delimiter */ - inputProcedure, /* input procedure */ - outputProcedure, /* output procedure */ + inputProcedure, /* input procedure */ + outputProcedure, /* output procedure */ receiveProcedure, /* receive procedure */ - sendProcedure, /* send procedure */ + sendProcedure, /* send procedure */ InvalidOid, /* typmodin procedure - none */ InvalidOid, /* typmodout procedure - none */ analyzeProcedure, /* analyze procedure */ @@ -1054,7 +1054,7 @@ DefineDomain(CreateDomainStmt *stmt) InvalidOid, /* no arrays for domains (yet) */ basetypeoid, /* base type ID */ defaultValue, /* default type value (text) */ - defaultValueBin, /* default type value (binary) */ + defaultValueBin, /* default type value (binary) */ byValue, /* passed by value */ alignment, /* required alignment */ storage, /* TOAST strategy */ @@ -1145,7 +1145,7 @@ DefineEnum(CreateEnumStmt *stmt) enumTypeAddr = TypeCreate(InvalidOid, /* no predetermined type OID */ enumName, /* type name */ - enumNamespace, /* namespace */ + enumNamespace, /* namespace */ InvalidOid, /* relation oid (n/a here) */ 0, /* relation kind (ditto) */ GetUserId(), /* owner's ID */ @@ -1191,7 +1191,7 @@ DefineEnum(CreateEnumStmt *stmt) GetUserId(), /* owner's ID */ -1, /* internal size (always varlena) */ TYPTYPE_BASE, /* type-type (base type) */ - TYPCATEGORY_ARRAY, /* type-category (array) */ + TYPCATEGORY_ARRAY, /* type-category (array) */ false, /* array types are never preferred */ DEFAULT_TYPDELIM, /* array element delimiter */ F_ARRAY_IN, /* input procedure */ @@ -1200,7 +1200,7 @@ DefineEnum(CreateEnumStmt *stmt) F_ARRAY_SEND, /* send procedure */ InvalidOid, /* typmodin procedure - none */ InvalidOid, /* typmodout procedure - none */ - F_ARRAY_TYPANALYZE, /* analyze procedure */ + F_ARRAY_TYPANALYZE, /* analyze procedure */ enumTypeAddr.objectId, /* element type ID */ true, /* yes this is an array type */ InvalidOid, /* no further array type */ @@ -1473,12 +1473,12 @@ DefineRange(CreateRangeStmt *stmt) address = TypeCreate(InvalidOid, /* no predetermined type OID */ typeName, /* type name */ - typeNamespace, /* namespace */ + typeNamespace, /* namespace */ InvalidOid, /* relation oid (n/a here) */ 0, /* relation kind (ditto) */ GetUserId(), /* owner's ID */ -1, /* internal size (always varlena) */ - TYPTYPE_RANGE, /* type-type (range type) */ + TYPTYPE_RANGE, /* type-type (range type) */ TYPCATEGORY_RANGE, /* type-category (range type) */ false, /* range types are never preferred */ DEFAULT_TYPDELIM, /* array element delimiter */ @@ -1491,7 +1491,7 @@ DefineRange(CreateRangeStmt *stmt) F_RANGE_TYPANALYZE, /* analyze procedure */ InvalidOid, /* element type ID - none */ false, /* this is not an array type */ - rangeArrayOid, /* array type we are about to create */ + rangeArrayOid, /* array type we are about to create */ InvalidOid, /* base type ID (only for domains) */ NULL, /* never a default type value */ NULL, /* no binary form available either */ @@ -1521,7 +1521,7 @@ DefineRange(CreateRangeStmt *stmt) GetUserId(), /* owner's ID */ -1, /* internal size (always varlena) */ TYPTYPE_BASE, /* type-type (base type) */ - TYPCATEGORY_ARRAY, /* type-category (array) */ + TYPCATEGORY_ARRAY, /* type-category (array) */ false, /* array types are never preferred */ DEFAULT_TYPDELIM, /* array element delimiter */ F_ARRAY_IN, /* input procedure */ @@ -1530,7 +1530,7 @@ DefineRange(CreateRangeStmt *stmt) F_ARRAY_SEND, /* send procedure */ InvalidOid, /* typmodin procedure - none */ InvalidOid, /* typmodout procedure - none */ - F_ARRAY_TYPANALYZE, /* analyze procedure */ + F_ARRAY_TYPANALYZE, /* analyze procedure */ typoid, /* element type ID */ true, /* yes this is an array type */ InvalidOid, /* no further array type */ @@ -1591,14 +1591,14 @@ makeRangeConstructors(const char *name, Oid namespace, pronargs[i]); myself = ProcedureCreate(name, /* name: same as range type */ - namespace, /* namespace */ + namespace, /* namespace */ false, /* replace */ false, /* returns set */ - rangeOid, /* return type */ + rangeOid, /* return type */ BOOTSTRAP_SUPERUSERID, /* proowner */ INTERNALlanguageId, /* language */ - F_FMGR_INTERNAL_VALIDATOR, /* language validator */ - prosrc[i], /* prosrc */ + F_FMGR_INTERNAL_VALIDATOR, /* language validator */ + prosrc[i], /* prosrc */ NULL, /* probin */ false, /* isAgg */ false, /* isWindowFunc */ @@ -1606,8 +1606,8 @@ makeRangeConstructors(const char *name, Oid namespace, false, /* leakproof */ false, /* isStrict */ PROVOLATILE_IMMUTABLE, /* volatility */ - PROPARALLEL_SAFE, /* parallel safety */ - constructorArgTypesVector, /* parameterTypes */ + PROPARALLEL_SAFE, /* parallel safety */ + constructorArgTypesVector, /* parameterTypes */ PointerGetDatum(NULL), /* allParameterTypes */ PointerGetDatum(NULL), /* parameterModes */ PointerGetDatum(NULL), /* parameterNames */ @@ -2131,7 +2131,7 @@ AlterDomainDefault(List *names, Node *defaultRaw) ParseState *pstate; Relation rel; char *defaultValue; - Node *defaultExpr = NULL; /* NULL if no default specified */ + Node *defaultExpr = NULL; /* NULL if no default specified */ Datum new_record[Natts_pg_type]; bool new_record_nulls[Natts_pg_type]; bool new_record_repl[Natts_pg_type]; @@ -2226,7 +2226,7 @@ AlterDomainDefault(List *names, Node *defaultRaw) /* Rebuild dependencies */ GenerateTypeDependencies(typTup->typnamespace, domainoid, - InvalidOid, /* typrelid is n/a */ + InvalidOid, /* typrelid is n/a */ 0, /* relation kind is n/a */ typTup->typowner, typTup->typinput, @@ -2237,11 +2237,11 @@ AlterDomainDefault(List *names, Node *defaultRaw) typTup->typmodout, typTup->typanalyze, InvalidOid, - false, /* a domain isn't an implicit array */ + false, /* a domain isn't an implicit array */ typTup->typbasetype, typTup->typcollation, defaultExpr, - true); /* Rebuild is true */ + true); /* Rebuild is true */ InvokeObjectPostAlterHook(TypeRelationId, domainoid, 0); @@ -3065,12 +3065,12 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid, false, /* Is Deferrable */ false, /* Is Deferred */ !constr->skip_validation, /* Is Validated */ - InvalidOid, /* not a relation constraint */ + InvalidOid, /* not a relation constraint */ NULL, 0, - domainOid, /* domain constraint */ - InvalidOid, /* no associated index */ - InvalidOid, /* Foreign key fields */ + domainOid, /* domain constraint */ + InvalidOid, /* no associated index */ + InvalidOid, /* Foreign key fields */ NULL, NULL, NULL, @@ -3079,11 +3079,11 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid, ' ', ' ', ' ', - NULL, /* not an exclusion constraint */ - expr, /* Tree form of check constraint */ + NULL, /* not an exclusion constraint */ + expr, /* Tree form of check constraint */ ccbin, /* Binary form of check constraint */ ccsrc, /* Source form of check constraint */ - true, /* is local */ + true, /* is local */ 0, /* inhcount */ false, /* connoinherit */ false); /* is_internal */ diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 10d6ba9e04..24608c27c3 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -82,18 +82,17 @@ CreateRole(ParseState *pstate, CreateRoleStmt *stmt) char *password = NULL; /* user password */ bool issuper = false; /* Make the user a superuser? */ bool inherit = true; /* Auto inherit privileges? */ - bool createrole = false; /* Can this user create roles? */ - bool createdb = false; /* Can the user create databases? */ - bool canlogin = false; /* Can this user login? */ + bool createrole = false; /* Can this user create roles? */ + bool createdb = false; /* Can the user create databases? */ + bool canlogin = false; /* Can this user login? */ bool isreplication = false; /* Is this a replication role? */ - bool bypassrls = false; /* Is this a row security enabled - * role? */ + bool bypassrls = false; /* Is this a row security enabled role? */ int connlimit = -1; /* maximum connections allowed */ List *addroleto = NIL; /* roles to make this a member of */ - List *rolemembers = NIL; /* roles to be members of this role */ - List *adminmembers = NIL; /* roles to be admins of this role */ - char *validUntil = NULL; /* time the login is valid until */ - Datum validUntil_datum; /* same, as timestamptz Datum */ + List *rolemembers = NIL; /* roles to be members of this role */ + List *adminmembers = NIL; /* roles to be admins of this role */ + char *validUntil = NULL; /* time the login is valid until */ + Datum validUntil_datum; /* same, as timestamptz Datum */ bool validUntil_null; DefElem *dpassword = NULL; DefElem *dissuper = NULL; @@ -497,11 +496,11 @@ AlterRole(AlterRoleStmt *stmt) int createrole = -1; /* Can this user create roles? */ int createdb = -1; /* Can the user create databases? */ int canlogin = -1; /* Can this user login? */ - int isreplication = -1; /* Is this a replication role? */ + int isreplication = -1; /* Is this a replication role? */ int connlimit = -1; /* maximum connections allowed */ - List *rolemembers = NIL; /* roles to be added/removed */ - char *validUntil = NULL; /* time the login is valid until */ - Datum validUntil_datum; /* same, as timestamptz Datum */ + List *rolemembers = NIL; /* roles to be added/removed */ + char *validUntil = NULL; /* time the login is valid until */ + Datum validUntil_datum; /* same, as timestamptz Datum */ bool validUntil_null; int bypassrls = -1; DefElem *dpassword = NULL; diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 153a360861..7978c062d7 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -81,8 +81,8 @@ * that the potential for improvement was great enough to merit the cost of * supporting them. */ -#define VACUUM_TRUNCATE_LOCK_CHECK_INTERVAL 20 /* ms */ -#define VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL 50 /* ms */ +#define VACUUM_TRUNCATE_LOCK_CHECK_INTERVAL 20 /* ms */ +#define VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL 50 /* ms */ #define VACUUM_TRUNCATE_LOCK_TIMEOUT 5000 /* ms */ /* @@ -112,7 +112,7 @@ typedef struct LVRelStats BlockNumber old_rel_pages; /* previous value of pg_class.relpages */ BlockNumber rel_pages; /* total number of pages */ BlockNumber scanned_pages; /* number of pages we examined */ - BlockNumber pinskipped_pages; /* # of pages we skipped due to a pin */ + BlockNumber pinskipped_pages; /* # of pages we skipped due to a pin */ BlockNumber frozenskipped_pages; /* # of frozen pages we skipped */ BlockNumber tupcount_pages; /* pages whose tuples we counted */ double scanned_tuples; /* counts only tuples on tupcount_pages */ diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c index a5d6574eaf..e83e4f455f 100644 --- a/src/backend/commands/view.c +++ b/src/backend/commands/view.c @@ -546,7 +546,7 @@ DefineView(ViewStmt *stmt, const char *queryString, * long as the CREATE command is consistent with that --- no explicit * schema name. */ - view = copyObject(stmt->view); /* don't corrupt original command */ + view = copyObject(stmt->view); /* don't corrupt original command */ if (view->relpersistence == RELPERSISTENCE_PERMANENT && isQueryUsingTempRelation(viewParse)) { diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c index fe12326336..61c90a1600 100644 --- a/src/backend/executor/execExpr.c +++ b/src/backend/executor/execExpr.c @@ -344,7 +344,7 @@ ExecBuildProjectionInfo(List *targetList, attnum = variable->varattno; if (inputDesc == NULL) - isSafeVar = true; /* can't check, just assume OK */ + isSafeVar = true; /* can't check, just assume OK */ else if (attnum <= inputDesc->natts) { Form_pg_attribute attr = inputDesc->attrs[attnum - 1]; @@ -1362,7 +1362,7 @@ ExecInitExprRec(Expr *node, PlanState *parent, ExprState *state, /* If WHEN result isn't true, jump to next CASE arm */ scratch.opcode = EEOP_JUMP_IF_NOT_TRUE; - scratch.d.jump.jumpdone = -1; /* computed later */ + scratch.d.jump.jumpdone = -1; /* computed later */ ExprEvalPushStep(state, &scratch); whenstep = state->steps_len - 1; @@ -1374,7 +1374,7 @@ ExecInitExprRec(Expr *node, PlanState *parent, ExprState *state, /* Emit JUMP step to jump to end of CASE's code */ scratch.opcode = EEOP_JUMP; - scratch.d.jump.jumpdone = -1; /* computed later */ + scratch.d.jump.jumpdone = -1; /* computed later */ ExprEvalPushStep(state, &scratch); /* @@ -1720,7 +1720,7 @@ ExecInitExprRec(Expr *node, PlanState *parent, ExprState *state, /* if it's not null, skip to end of COALESCE expr */ scratch.opcode = EEOP_JUMP_IF_NOT_NULL; - scratch.d.jump.jumpdone = -1; /* adjust later */ + scratch.d.jump.jumpdone = -1; /* adjust later */ ExprEvalPushStep(state, &scratch); adjust_jumps = lappend_int(adjust_jumps, diff --git a/src/backend/executor/execExprInterp.c b/src/backend/executor/execExprInterp.c index fed0052fc6..146d1a0bec 100644 --- a/src/backend/executor/execExprInterp.c +++ b/src/backend/executor/execExprInterp.c @@ -83,7 +83,7 @@ */ #ifdef HAVE_COMPUTED_GOTO #define EEO_USE_COMPUTED_GOTO -#endif /* HAVE_COMPUTED_GOTO */ +#endif /* HAVE_COMPUTED_GOTO */ /* * Macros for opcode dispatch. @@ -112,7 +112,7 @@ static const void **dispatch_table = NULL; #define EEO_DISPATCH() goto starteval #define EEO_OPCODE(opcode) (opcode) -#endif /* EEO_USE_COMPUTED_GOTO */ +#endif /* EEO_USE_COMPUTED_GOTO */ #define EEO_NEXT() \ do { \ @@ -256,7 +256,7 @@ ExecReadyInterpretedExpr(ExprState *state) state->flags |= EEO_FLAG_DIRECT_THREADED; } -#endif /* EEO_USE_COMPUTED_GOTO */ +#endif /* EEO_USE_COMPUTED_GOTO */ state->evalfunc = ExecInterpExpr; } @@ -373,7 +373,7 @@ ExecInterpExpr(ExprState *state, ExprContext *econtext, bool *isnull) return PointerGetDatum(dispatch_table); #else Assert(state != NULL); -#endif /* EEO_USE_COMPUTED_GOTO */ +#endif /* EEO_USE_COMPUTED_GOTO */ /* setup state */ op = state->steps; @@ -1559,7 +1559,7 @@ CheckVarSlotCompatibility(TupleTableSlot *slot, int attnum, Oid vartype) TupleDesc slot_tupdesc = slot->tts_tupleDescriptor; Form_pg_attribute attr; - if (attnum > slot_tupdesc->natts) /* should never happen */ + if (attnum > slot_tupdesc->natts) /* should never happen */ elog(ERROR, "attribute number %d exceeds number of columns %d", attnum, slot_tupdesc->natts); @@ -2475,7 +2475,7 @@ ExecEvalFieldSelect(ExprState *state, ExprEvalStep *op, ExprContext *econtext) if (fieldnum <= 0) /* should never happen */ elog(ERROR, "unsupported reference to system column %d in FieldSelect", fieldnum); - if (fieldnum > tupDesc->natts) /* should never happen */ + if (fieldnum > tupDesc->natts) /* should never happen */ elog(ERROR, "attribute number %d exceeds number of columns %d", fieldnum, tupDesc->natts); attr = tupDesc->attrs[fieldnum - 1]; diff --git a/src/backend/executor/execIndexing.c b/src/backend/executor/execIndexing.c index 108060ac0f..4d81830996 100644 --- a/src/backend/executor/execIndexing.c +++ b/src/backend/executor/execIndexing.c @@ -387,7 +387,7 @@ ExecInsertIndexTuples(TupleTableSlot *slot, index_insert(indexRelation, /* index relation */ values, /* array of index Datums */ isnull, /* null flags */ - tupleid, /* tid of heap tuple */ + tupleid, /* tid of heap tuple */ heapRelation, /* heap relation */ checkUnique, /* type of uniqueness check to do */ indexInfo); /* index AM may need this */ diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 9dbe17565b..2e3717d4dd 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -2570,7 +2570,7 @@ EvalPlanQualFetch(EState *estate, Relation relation, int lockmode, break; case LockWaitSkip: if (!ConditionalXactLockTableWait(SnapshotDirty.xmax)) - return NULL; /* skip instead of waiting */ + return NULL; /* skip instead of waiting */ break; case LockWaitError: if (!ConditionalXactLockTableWait(SnapshotDirty.xmax)) diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index c4a955332f..9abf0aa15d 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -244,8 +244,8 @@ ExecDropSingleTupleTableSlot(TupleTableSlot *slot) * -------------------------------- */ void -ExecSetSlotDescriptor(TupleTableSlot *slot, /* slot to change */ - TupleDesc tupdesc) /* new tuple descriptor */ +ExecSetSlotDescriptor(TupleTableSlot *slot, /* slot to change */ + TupleDesc tupdesc) /* new tuple descriptor */ { /* For safety, make sure slot is empty before changing it */ ExecClearTuple(slot); diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index cb2596cb31..25772fc603 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -102,7 +102,7 @@ CreateExecutorState(void) * Initialize all fields of the Executor State structure */ estate->es_direction = ForwardScanDirection; - estate->es_snapshot = InvalidSnapshot; /* caller must initialize this */ + estate->es_snapshot = InvalidSnapshot; /* caller must initialize this */ estate->es_crosscheck_snapshot = InvalidSnapshot; /* no crosscheck */ estate->es_range_table = NIL; estate->es_plannedstmt = NULL; diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index f15ff64a3b..7199ff6fd7 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -93,7 +93,7 @@ typedef struct char *fname; /* function name (for error msgs) */ char *src; /* function body text (for error msgs) */ - SQLFunctionParseInfoPtr pinfo; /* data for parser callback hooks */ + SQLFunctionParseInfoPtr pinfo; /* data for parser callback hooks */ Oid rettype; /* actual return type */ int16 typlen; /* length of the return type */ @@ -245,13 +245,13 @@ prepare_sql_fn_parse_info(HeapTuple procedureTuple, Anum_pg_proc_proargnames, &isNull); if (isNull) - proargnames = PointerGetDatum(NULL); /* just to be sure */ + proargnames = PointerGetDatum(NULL); /* just to be sure */ proargmodes = SysCacheGetAttr(PROCNAMEARGSNSP, procedureTuple, Anum_pg_proc_proargmodes, &isNull); if (isNull) - proargmodes = PointerGetDatum(NULL); /* just to be sure */ + proargmodes = PointerGetDatum(NULL); /* just to be sure */ n_arg_names = get_func_input_arg_names(proargnames, proargmodes, &pinfo->argnames); @@ -648,7 +648,7 @@ init_sql_fcache(FmgrInfo *finfo, Oid collation, bool lazyEvalOK) if (IsPolymorphicType(rettype)) { rettype = get_fn_expr_rettype(finfo); - if (rettype == InvalidOid) /* this probably should not happen */ + if (rettype == InvalidOid) /* this probably should not happen */ ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("could not determine actual result type for function declared to return type %s", @@ -1544,7 +1544,7 @@ check_sql_fn_retval(Oid func_id, Oid rettype, List *queryTreeList, AssertArg(!IsPolymorphicType(rettype)); if (modifyTargetList) - *modifyTargetList = false; /* initialize for no change */ + *modifyTargetList = false; /* initialize for no change */ if (junkFilter) *junkFilter = NULL; /* initialize in case of VOID result */ @@ -1770,7 +1770,7 @@ check_sql_fn_retval(Oid func_id, Oid rettype, List *queryTreeList, InvalidOid, sizeof(int32), (Datum) 0, - true, /* isnull */ + true, /* isnull */ true /* byval */ ); newtlist = lappend(newtlist, makeTargetEntry(null_expr, diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 96cdfb7ad2..b0f9520e53 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -511,9 +511,9 @@ typedef struct AggStatePerHashData FmgrInfo *eqfunctions; /* per-grouping-field equality fns */ int numCols; /* number of hash key columns */ int numhashGrpCols; /* number of columns in hash table */ - int largestGrpColIdx; /* largest col required for hashing */ - AttrNumber *hashGrpColIdxInput; /* hash col indices in input slot */ - AttrNumber *hashGrpColIdxHash; /* indices in hashtbl tuples */ + int largestGrpColIdx; /* largest col required for hashing */ + AttrNumber *hashGrpColIdxInput; /* hash col indices in input slot */ + AttrNumber *hashGrpColIdxHash; /* indices in hashtbl tuples */ Agg *aggnode; /* original Agg node, for numGroups etc. */ } AggStatePerHashData; @@ -2373,8 +2373,7 @@ agg_retrieve_direct(AggState *aggstate) firstSlot, InvalidBuffer, true); - aggstate->grp_firstTuple = NULL; /* don't keep two - * pointers */ + aggstate->grp_firstTuple = NULL; /* don't keep two pointers */ /* set up for first advance_aggregates call */ tmpcontext->ecxt_outertuple = firstSlot; diff --git a/src/backend/executor/nodeBitmapHeapscan.c b/src/backend/executor/nodeBitmapHeapscan.c index 77f65db0ca..7e0ba030b7 100644 --- a/src/backend/executor/nodeBitmapHeapscan.c +++ b/src/backend/executor/nodeBitmapHeapscan.c @@ -129,7 +129,7 @@ BitmapHeapNext(BitmapHeapScanState *node) node->prefetch_pages = 0; node->prefetch_target = -1; } -#endif /* USE_PREFETCH */ +#endif /* USE_PREFETCH */ } else { @@ -182,7 +182,7 @@ BitmapHeapNext(BitmapHeapScanState *node) node->shared_prefetch_iterator = tbm_attach_shared_iterate(dsa, pstate->prefetch_iterator); } -#endif /* USE_PREFETCH */ +#endif /* USE_PREFETCH */ } node->initialized = true; } @@ -265,7 +265,7 @@ BitmapHeapNext(BitmapHeapScanState *node) pstate->prefetch_target++; SpinLockRelease(&pstate->mutex); } -#endif /* USE_PREFETCH */ +#endif /* USE_PREFETCH */ } /* @@ -514,7 +514,7 @@ BitmapAdjustPrefetchIterator(BitmapHeapScanState *node, tbm_shared_iterate(prefetch_iterator); } } -#endif /* USE_PREFETCH */ +#endif /* USE_PREFETCH */ } /* @@ -558,7 +558,7 @@ BitmapAdjustPrefetchTarget(BitmapHeapScanState *node) pstate->prefetch_target++; SpinLockRelease(&pstate->mutex); } -#endif /* USE_PREFETCH */ +#endif /* USE_PREFETCH */ } /* @@ -634,7 +634,7 @@ BitmapPrefetch(BitmapHeapScanState *node, HeapScanDesc scan) } } } -#endif /* USE_PREFETCH */ +#endif /* USE_PREFETCH */ } /* diff --git a/src/backend/executor/nodeBitmapIndexscan.c b/src/backend/executor/nodeBitmapIndexscan.c index ce2f3210a4..c9f8b7c7fb 100644 --- a/src/backend/executor/nodeBitmapIndexscan.c +++ b/src/backend/executor/nodeBitmapIndexscan.c @@ -73,7 +73,7 @@ MultiExecBitmapIndexScan(BitmapIndexScanState *node) if (node->biss_result) { tbm = node->biss_result; - node->biss_result = NULL; /* reset for next time */ + node->biss_result = NULL; /* reset for next time */ } else { diff --git a/src/backend/executor/nodeBitmapOr.c b/src/backend/executor/nodeBitmapOr.c index c0f261407b..4f0ddc6dff 100644 --- a/src/backend/executor/nodeBitmapOr.c +++ b/src/backend/executor/nodeBitmapOr.c @@ -150,7 +150,7 @@ MultiExecBitmapOr(BitmapOrState *node) elog(ERROR, "unrecognized result from subplan"); if (result == NULL) - result = subresult; /* first subplan */ + result = subresult; /* first subplan */ else { tbm_union(result, subresult); diff --git a/src/backend/executor/nodeGather.c b/src/backend/executor/nodeGather.c index c1db2e263b..f83cd584d7 100644 --- a/src/backend/executor/nodeGather.c +++ b/src/backend/executor/nodeGather.c @@ -258,7 +258,7 @@ gather_getnext(GatherState *gatherstate) if (HeapTupleIsValid(tup)) { - ExecStoreTuple(tup, /* tuple to store */ + ExecStoreTuple(tup, /* tuple to store */ fslot, /* slot in which to store the tuple */ InvalidBuffer, /* buffer associated with this * tuple */ diff --git a/src/backend/executor/nodeGatherMerge.c b/src/backend/executor/nodeGatherMerge.c index e066574836..b1965f5e1c 100644 --- a/src/backend/executor/nodeGatherMerge.c +++ b/src/backend/executor/nodeGatherMerge.c @@ -597,7 +597,7 @@ gather_merge_readnext(GatherMergeState *gm_state, int reader, bool nowait) ExecStoreTuple(tup, /* tuple to store */ gm_state->gm_slots[reader], /* slot in which to store the * tuple */ - InvalidBuffer, /* buffer associated with this tuple */ + InvalidBuffer, /* buffer associated with this tuple */ true); /* pfree this pointer if not from heap */ return true; diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c index d9789d0719..6c84ad9989 100644 --- a/src/backend/executor/nodeHash.c +++ b/src/backend/executor/nodeHash.c @@ -1176,7 +1176,7 @@ ExecScanHashTableForUnmatched(HashJoinState *hjstate, ExprContext *econtext) /* insert hashtable's tuple into exec slot */ inntuple = ExecStoreMinimalTuple(HJTUPLE_MINTUPLE(hashTuple), hjstate->hj_HashTupleSlot, - false); /* do not pfree */ + false); /* do not pfree */ econtext->ecxt_innertuple = inntuple; /* diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c index 907090395c..8d2325398b 100644 --- a/src/backend/executor/nodeHashjoin.c +++ b/src/backend/executor/nodeHashjoin.c @@ -618,7 +618,7 @@ ExecHashJoinOuterGetTuple(PlanState *outerNode, econtext->ecxt_outertuple = slot; if (ExecHashGetHashValue(hashtable, econtext, hjstate->hj_OuterHashKeys, - true, /* outer tuple */ + true, /* outer tuple */ HJ_FILL_OUTER(hjstate), hashvalue)) { diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index 0fb3fb5e7e..7e123758b4 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -138,7 +138,7 @@ IndexNext(IndexScanState *node) */ ExecStoreTuple(tuple, /* tuple to store */ slot, /* slot to store in */ - scandesc->xs_cbuf, /* buffer containing tuple */ + scandesc->xs_cbuf, /* buffer containing tuple */ false); /* don't pfree */ /* @@ -284,7 +284,7 @@ next_indextuple: */ ExecStoreTuple(tuple, /* tuple to store */ slot, /* slot to store in */ - scandesc->xs_cbuf, /* buffer containing tuple */ + scandesc->xs_cbuf, /* buffer containing tuple */ false); /* don't pfree */ /* @@ -1296,7 +1296,7 @@ ExecIndexBuildScanKeys(PlanState *planstate, Relation index, flags, varattno, /* attribute number to scan */ op_strategy, /* op's strategy */ - op_righttype, /* strategy subtype */ + op_righttype, /* strategy subtype */ ((OpExpr *) clause)->inputcollid, /* collation */ opfuncid, /* reg proc to use */ scanvalue); /* constant */ @@ -1421,12 +1421,12 @@ ExecIndexBuildScanKeys(PlanState *planstate, Relation index, */ ScanKeyEntryInitialize(this_sub_key, flags, - varattno, /* attribute number */ - op_strategy, /* op's strategy */ + varattno, /* attribute number */ + op_strategy, /* op's strategy */ op_righttype, /* strategy subtype */ inputcollation, /* collation */ - opfuncid, /* reg proc to use */ - scanvalue); /* constant */ + opfuncid, /* reg proc to use */ + scanvalue); /* constant */ n_sub_key++; } @@ -1558,7 +1558,7 @@ ExecIndexBuildScanKeys(PlanState *planstate, Relation index, flags, varattno, /* attribute number to scan */ op_strategy, /* op's strategy */ - op_righttype, /* strategy subtype */ + op_righttype, /* strategy subtype */ saop->inputcollid, /* collation */ opfuncid, /* reg proc to use */ scanvalue); /* constant */ @@ -1608,7 +1608,7 @@ ExecIndexBuildScanKeys(PlanState *planstate, Relation index, ScanKeyEntryInitialize(this_scan_key, flags, varattno, /* attribute number to scan */ - InvalidStrategy, /* no strategy */ + InvalidStrategy, /* no strategy */ InvalidOid, /* no strategy subtype */ InvalidOid, /* no collation */ InvalidOid, /* no reg proc for this */ diff --git a/src/backend/executor/nodeLockRows.c b/src/backend/executor/nodeLockRows.c index 5630eae53d..f519794cf3 100644 --- a/src/backend/executor/nodeLockRows.c +++ b/src/backend/executor/nodeLockRows.c @@ -172,7 +172,7 @@ lnext: break; default: elog(ERROR, "unsupported rowmark type"); - lockmode = LockTupleNoKeyExclusive; /* keep compiler quiet */ + lockmode = LockTupleNoKeyExclusive; /* keep compiler quiet */ break; } diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c index 336270f02a..94a5e98e3e 100644 --- a/src/backend/executor/nodeMergejoin.c +++ b/src/backend/executor/nodeMergejoin.c @@ -225,7 +225,7 @@ MJExamineQuals(List *mergeclauses, &op_strategy, &op_lefttype, &op_righttype); - if (op_strategy != BTEqualStrategyNumber) /* should not happen */ + if (op_strategy != BTEqualStrategyNumber) /* should not happen */ elog(ERROR, "cannot merge using non-equality operator %u", qual->opno); @@ -849,7 +849,7 @@ ExecMergeJoin(MergeJoinState *node) */ TupleTableSlot *result; - node->mj_MatchedInner = true; /* do it only once */ + node->mj_MatchedInner = true; /* do it only once */ result = MJFillInner(node); if (result) @@ -951,7 +951,7 @@ ExecMergeJoin(MergeJoinState *node) */ TupleTableSlot *result; - node->mj_MatchedOuter = true; /* do it only once */ + node->mj_MatchedOuter = true; /* do it only once */ result = MJFillOuter(node); if (result) @@ -1212,7 +1212,7 @@ ExecMergeJoin(MergeJoinState *node) */ TupleTableSlot *result; - node->mj_MatchedOuter = true; /* do it only once */ + node->mj_MatchedOuter = true; /* do it only once */ result = MJFillOuter(node); if (result) @@ -1274,7 +1274,7 @@ ExecMergeJoin(MergeJoinState *node) */ TupleTableSlot *result; - node->mj_MatchedInner = true; /* do it only once */ + node->mj_MatchedInner = true; /* do it only once */ result = MJFillInner(node); if (result) @@ -1344,7 +1344,7 @@ ExecMergeJoin(MergeJoinState *node) */ TupleTableSlot *result; - node->mj_MatchedInner = true; /* do it only once */ + node->mj_MatchedInner = true; /* do it only once */ result = MJFillInner(node); if (result) @@ -1390,7 +1390,7 @@ ExecMergeJoin(MergeJoinState *node) */ TupleTableSlot *result; - node->mj_MatchedOuter = true; /* do it only once */ + node->mj_MatchedOuter = true; /* do it only once */ result = MJFillOuter(node); if (result) diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index ff5ad98a91..11594b58b5 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -1561,8 +1561,7 @@ ExecModifyTable(ModifyTableState *node) elog(ERROR, "ctid is NULL"); tupleid = (ItemPointer) DatumGetPointer(datum); - tuple_ctid = *tupleid; /* be sure we don't free - * ctid!! */ + tuple_ctid = *tupleid; /* be sure we don't free ctid!! */ tupleid = &tuple_ctid; } @@ -1775,7 +1774,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags) root_rti = linitial_int(node->partitioned_rels); root_oid = getrelid(root_rti, estate->es_range_table); - rel = heap_open(root_oid, NoLock); /* locked by InitPlan */ + rel = heap_open(root_oid, NoLock); /* locked by InitPlan */ } else rel = mtstate->resultRelInfo->ri_RelationDesc; diff --git a/src/backend/executor/nodeSamplescan.c b/src/backend/executor/nodeSamplescan.c index 0247bd2347..428fd98665 100644 --- a/src/backend/executor/nodeSamplescan.c +++ b/src/backend/executor/nodeSamplescan.c @@ -415,7 +415,7 @@ tablesample_getnext(SampleScanState *scanstate) else { /* continue from previously returned page/tuple */ - blockno = scan->rs_cblock; /* current page */ + blockno = scan->rs_cblock; /* current page */ } /* diff --git a/src/backend/executor/nodeSeqscan.c b/src/backend/executor/nodeSeqscan.c index c0e37dcd83..822c6bf20a 100644 --- a/src/backend/executor/nodeSeqscan.c +++ b/src/backend/executor/nodeSeqscan.c @@ -90,8 +90,8 @@ SeqNext(SeqScanState *node) if (tuple) ExecStoreTuple(tuple, /* tuple to store */ slot, /* slot to store in */ - scandesc->rs_cbuf, /* buffer associated with this - * tuple */ + scandesc->rs_cbuf, /* buffer associated with this + * tuple */ false); /* don't pfree this pointer */ else ExecClearTuple(slot); diff --git a/src/backend/executor/nodeSetOp.c b/src/backend/executor/nodeSetOp.c index 0fb5615da3..9c7812e519 100644 --- a/src/backend/executor/nodeSetOp.c +++ b/src/backend/executor/nodeSetOp.c @@ -263,7 +263,7 @@ setop_retrieve_direct(SetOpState *setopstate) resultTupleSlot, InvalidBuffer, true); - setopstate->grp_firstTuple = NULL; /* don't keep two pointers */ + setopstate->grp_firstTuple = NULL; /* don't keep two pointers */ /* Initialize working state for a new input tuple group */ initialize_counts(pergroup); diff --git a/src/backend/executor/nodeTidscan.c b/src/backend/executor/nodeTidscan.c index 4860ec0f4d..64be613693 100644 --- a/src/backend/executor/nodeTidscan.c +++ b/src/backend/executor/nodeTidscan.c @@ -382,10 +382,10 @@ TidNext(TidScanState *node) * pointers onto disk pages and were not created with palloc() and * so should not be pfree()'d. */ - ExecStoreTuple(tuple, /* tuple to store */ + ExecStoreTuple(tuple, /* tuple to store */ slot, /* slot to store in */ - buffer, /* buffer associated with tuple */ - false); /* don't pfree */ + buffer, /* buffer associated with tuple */ + false); /* don't pfree */ /* * At this point we have an extra pin on the buffer, because @@ -551,7 +551,7 @@ ExecInitTidScan(TidScan *node, EState *estate, int eflags) currentRelation = ExecOpenScanRelation(estate, node->scan.scanrelid, eflags); tidstate->ss.ss_currentRelation = currentRelation; - tidstate->ss.ss_currentScanDesc = NULL; /* no heap scan here */ + tidstate->ss.ss_currentScanDesc = NULL; /* no heap scan here */ /* * get the scan type from the relation descriptor. diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c index 433d97c8b4..1f2cbdde36 100644 --- a/src/backend/executor/nodeWindowAgg.c +++ b/src/backend/executor/nodeWindowAgg.c @@ -1895,7 +1895,7 @@ ExecInitWindowAgg(WindowAgg *node, EState *estate, int eflags) AclResult aclresult; int i; - if (wfunc->winref != node->winref) /* planner screwed up? */ + if (wfunc->winref != node->winref) /* planner screwed up? */ elog(ERROR, "WindowFunc with winref %u assigned to WindowAgg with winref %u", wfunc->winref, node->winref); @@ -2209,7 +2209,7 @@ initialize_peragg(WindowAggState *winstate, WindowFunc *wfunc, /* build expression trees using actual argument & result types */ build_aggregate_transfn_expr(inputTypes, numArguments, - 0, /* no ordered-set window functions yet */ + 0, /* no ordered-set window functions yet */ false, /* no variadic window functions yet */ aggtranstype, wfunc->inputcollid, diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index 97c3925874..9db41813d5 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -43,7 +43,7 @@ int SPI_result; static _SPI_connection *_SPI_stack = NULL; static _SPI_connection *_SPI_current = NULL; -static int _SPI_stack_depth = 0; /* allocated size of _SPI_stack */ +static int _SPI_stack_depth = 0; /* allocated size of _SPI_stack */ static int _SPI_connected = -1; /* current stack index */ static Portal SPI_cursor_open_internal(const char *name, SPIPlanPtr plan, @@ -119,7 +119,7 @@ SPI_connect(void) _SPI_current->lastoid = InvalidOid; _SPI_current->tuptable = NULL; slist_init(&_SPI_current->tuptables); - _SPI_current->procCxt = NULL; /* in case we fail to create 'em */ + _SPI_current->procCxt = NULL; /* in case we fail to create 'em */ _SPI_current->execCxt = NULL; _SPI_current->connectSubid = GetCurrentSubTransactionId(); _SPI_current->queryEnv = NULL; @@ -149,7 +149,7 @@ SPI_finish(void) { int res; - res = _SPI_begin_call(false); /* live in procedure memory */ + res = _SPI_begin_call(false); /* live in procedure memory */ if (res < 0) return res; @@ -594,7 +594,7 @@ SPI_saveplan(SPIPlanPtr plan) return NULL; } - SPI_result = _SPI_begin_call(false); /* don't change context */ + SPI_result = _SPI_begin_call(false); /* don't change context */ if (SPI_result < 0) return NULL; @@ -1813,7 +1813,7 @@ _SPI_prepare_plan(const char *src, SPIPlanPtr plan) plan->parserSetup, plan->parserSetupArg, plan->cursor_options, - false); /* not fixed result */ + false); /* not fixed result */ plancache_list = lappend(plancache_list, plansource); } @@ -2668,7 +2668,7 @@ SPI_register_relation(EphemeralNamedRelation enr) if (enr == NULL || enr->md.name == NULL) return SPI_ERROR_ARGUMENT; - res = _SPI_begin_call(false); /* keep current memory context */ + res = _SPI_begin_call(false); /* keep current memory context */ if (res < 0) return res; @@ -2702,7 +2702,7 @@ SPI_unregister_relation(const char *name) if (name == NULL) return SPI_ERROR_ARGUMENT; - res = _SPI_begin_call(false); /* keep current memory context */ + res = _SPI_begin_call(false); /* keep current memory context */ if (res < 0) return res; diff --git a/src/backend/executor/tqueue.c b/src/backend/executor/tqueue.c index 8d7e711b3b..c086b5b682 100644 --- a/src/backend/executor/tqueue.c +++ b/src/backend/executor/tqueue.c @@ -95,7 +95,7 @@ typedef struct ArrayRemapInfo int16 typlen; /* array element type's storage properties */ bool typbyval; char typalign; - TupleRemapInfo *element_remap; /* array element type's remap info */ + TupleRemapInfo *element_remap; /* array element type's remap info */ } ArrayRemapInfo; typedef struct RangeRemapInfo @@ -113,7 +113,7 @@ typedef struct RecordRemapInfo int32 localtypmod; /* If no fields of the record require remapping, these are NULL: */ TupleDesc tupledesc; /* copy of record's tupdesc */ - TupleRemapInfo **field_remap; /* each field's remap info */ + TupleRemapInfo **field_remap; /* each field's remap info */ } RecordRemapInfo; struct TupleRemapInfo diff --git a/src/backend/lib/ilist.c b/src/backend/lib/ilist.c index a108cd150b..af8d656d3e 100644 --- a/src/backend/lib/ilist.c +++ b/src/backend/lib/ilist.c @@ -108,4 +108,4 @@ slist_check(slist_head *head) ; } -#endif /* ILIST_DEBUG */ +#endif /* ILIST_DEBUG */ diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index 28893d3519..b348bce3e2 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -103,7 +103,7 @@ static struct pam_conv pam_passw_conv = { static char *pam_passwd = NULL; /* Workaround for Solaris 2.6 brokenness */ static Port *pam_port_cludge; /* Workaround for passing "Port *port" into * pam_passwd_conv_proc */ -#endif /* USE_PAM */ +#endif /* USE_PAM */ /*---------------------------------------------------------------- @@ -114,7 +114,7 @@ static Port *pam_port_cludge; /* Workaround for passing "Port *port" into #include static int CheckBSDAuth(Port *port, char *user); -#endif /* USE_BSD_AUTH */ +#endif /* USE_BSD_AUTH */ /*---------------------------------------------------------------- @@ -141,7 +141,7 @@ ULONG (*__ldap_start_tls_sA) ( #endif static int CheckLDAPAuth(Port *port); -#endif /* USE_LDAP */ +#endif /* USE_LDAP */ /*---------------------------------------------------------------- * Cert authentication @@ -172,7 +172,7 @@ bool pg_krb_caseins_users; #endif static int pg_GSS_recvauth(Port *port); -#endif /* ENABLE_GSS */ +#endif /* ENABLE_GSS */ /*---------------------------------------------------------------- @@ -558,7 +558,7 @@ ClientAuthentication(Port *port) status = CheckPAMAuth(port, port->user_name, ""); #else Assert(false); -#endif /* USE_PAM */ +#endif /* USE_PAM */ break; case uaBSD: @@ -566,7 +566,7 @@ ClientAuthentication(Port *port) status = CheckBSDAuth(port, port->user_name); #else Assert(false); -#endif /* USE_BSD_AUTH */ +#endif /* USE_BSD_AUTH */ break; case uaLDAP: @@ -671,7 +671,7 @@ recv_password_packet(Port *port) } initStringInfo(&buf); - if (pq_getmessage(&buf, 1000)) /* receive password */ + if (pq_getmessage(&buf, 1000)) /* receive password */ { /* EOF - pq_getmessage already logged a suitable message */ pfree(buf.data); @@ -1287,7 +1287,7 @@ pg_GSS_recvauth(Port *port) return ret; } -#endif /* ENABLE_GSS */ +#endif /* ENABLE_GSS */ /*---------------------------------------------------------------- @@ -1696,7 +1696,7 @@ pg_SSPI_make_upn(char *accountname, pfree(upname); return STATUS_OK; } -#endif /* ENABLE_SSPI */ +#endif /* ENABLE_SSPI */ @@ -1715,7 +1715,7 @@ static bool interpret_ident_response(const char *ident_response, char *ident_user) { - const char *cursor = ident_response; /* Cursor into *ident_response */ + const char *cursor = ident_response; /* Cursor into *ident_response */ /* * Ident's response, in the telnet tradition, should end in crlf (\r\n). @@ -1769,7 +1769,7 @@ interpret_ident_response(const char *ident_response, { int i; /* Index into *ident_user */ - cursor++; /* Go over colon */ + cursor++; /* Go over colon */ while (pg_isblank(*cursor)) cursor++; /* skip blanks */ /* Rest of line is user name. Copy it over. */ @@ -1805,7 +1805,7 @@ ident_inet(hbaPort *port) const SockAddr remote_addr = port->raddr; const SockAddr local_addr = port->laddr; char ident_user[IDENT_USERNAME_MAX + 1]; - pgsocket sock_fd = PGINVALID_SOCKET; /* for talking to Ident server */ + pgsocket sock_fd = PGINVALID_SOCKET; /* for talking to Ident server */ int rc; /* Return code from a locally called function */ bool ident_return; char remote_addr_s[NI_MAXHOST]; @@ -2010,7 +2010,7 @@ auth_peer(hbaPort *port) return check_usermap(port->hba->usermap, port->user_name, ident_user, false); } -#endif /* HAVE_UNIX_SOCKETS */ +#endif /* HAVE_UNIX_SOCKETS */ /*---------------------------------------------------------------- @@ -2161,8 +2161,8 @@ CheckPAMAuth(Port *port, char *user, char *password) * later used inside the PAM conversation to pass the password to the * authentication module. */ - pam_passw_conv.appdata_ptr = (char *) password; /* from password above, - * not allocated */ + pam_passw_conv.appdata_ptr = (char *) password; /* from password above, + * not allocated */ /* Optionally, one can set the service name in pg_hba.conf */ if (port->hba->pamservice && port->hba->pamservice[0] != '\0') @@ -2249,7 +2249,7 @@ CheckPAMAuth(Port *port, char *user, char *password) return (retval == PAM_SUCCESS ? STATUS_OK : STATUS_ERROR); } -#endif /* USE_PAM */ +#endif /* USE_PAM */ /*---------------------------------------------------------------- @@ -2282,7 +2282,7 @@ CheckBSDAuth(Port *port, char *user) return STATUS_OK; } -#endif /* USE_BSD_AUTH */ +#endif /* USE_BSD_AUTH */ /*---------------------------------------------------------------- @@ -2581,7 +2581,7 @@ CheckLDAPAuth(Port *port) return STATUS_OK; } -#endif /* USE_LDAP */ +#endif /* USE_LDAP */ /*---------------------------------------------------------------- @@ -3071,8 +3071,8 @@ PerformRadiusTransaction(char *server, char *secret, char *portstr, char *identi memcpy(cryptvector + 4, packet->vector, RADIUS_VECTOR_LENGTH); /* request * authenticator, from * original packet */ - if (packetlength > RADIUS_HEADER_LENGTH) /* there may be no - * attributes at all */ + if (packetlength > RADIUS_HEADER_LENGTH) /* there may be no + * attributes at all */ memcpy(cryptvector + RADIUS_HEADER_LENGTH, receive_buffer + RADIUS_HEADER_LENGTH, packetlength - RADIUS_HEADER_LENGTH); memcpy(cryptvector + packetlength, secret, strlen(secret)); diff --git a/src/backend/libpq/be-fsstubs.c b/src/backend/libpq/be-fsstubs.c index 9033dd4da8..3a0bb4ca0a 100644 --- a/src/backend/libpq/be-fsstubs.c +++ b/src/backend/libpq/be-fsstubs.c @@ -796,7 +796,7 @@ lo_get_fragment_internal(Oid loOid, int64 offset, int32 nbytes) if (loSize > offset) { if (nbytes >= 0 && nbytes <= loSize - offset) - result_length = nbytes; /* request is wholly inside LO */ + result_length = nbytes; /* request is wholly inside LO */ else result_length = loSize - offset; /* adjust to end of LO */ } diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 4532434140..a1d77969cc 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -664,7 +664,7 @@ ipv6eq(struct sockaddr_in6 *a, struct sockaddr_in6 *b) return true; } -#endif /* HAVE_IPV6 */ +#endif /* HAVE_IPV6 */ /* * Check whether host name matches pattern. @@ -1022,7 +1022,7 @@ parse_hba_line(TokenizedLine *tok_line, int elevel) *err_msg = "hostssl record cannot match because SSL is not supported by this build"; #endif } - else if (token->string[4] == 'n') /* "hostnossl" */ + else if (token->string[4] == 'n') /* "hostnossl" */ { parsedline->conntype = ctHostNoSSL; } @@ -1726,7 +1726,7 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline, hbaline->ldapbasedn = pstrdup(urldata->lud_dn); if (urldata->lud_attrs) - hbaline->ldapsearchattribute = pstrdup(urldata->lud_attrs[0]); /* only use first one */ + hbaline->ldapsearchattribute = pstrdup(urldata->lud_attrs[0]); /* only use first one */ hbaline->ldapscope = urldata->lud_scope; if (urldata->lud_filter) { @@ -1743,7 +1743,7 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("LDAP URLs not supported on this platform"))); *err_msg = "LDAP URLs not supported on this platform"; -#endif /* not OpenLDAP */ +#endif /* not OpenLDAP */ } else if (strcmp(name, "ldaptls") == 0) { diff --git a/src/backend/libpq/ifaddr.c b/src/backend/libpq/ifaddr.c index b5f3243410..53bf6bcd80 100644 --- a/src/backend/libpq/ifaddr.c +++ b/src/backend/libpq/ifaddr.c @@ -99,7 +99,7 @@ range_sockaddr_AF_INET6(const struct sockaddr_in6 *addr, return 1; } -#endif /* HAVE_IPV6 */ +#endif /* HAVE_IPV6 */ /* * pg_sockaddr_cidr_mask - make a network mask of the appropriate family @@ -471,7 +471,7 @@ pg_foreach_ifaddr(PgIfAddrCallback callback, void *cb_data) #define _SIZEOF_ADDR_IFREQ(ifr) \ sizeof (struct ifreq) #endif -#endif /* !_SIZEOF_ADDR_IFREQ */ +#endif /* !_SIZEOF_ADDR_IFREQ */ /* * Enumerate the system's network interface addresses and call the callback @@ -589,6 +589,6 @@ pg_foreach_ifaddr(PgIfAddrCallback callback, void *cb_data) return 0; } -#endif /* !defined(SIOCGIFCONF) */ +#endif /* !defined(SIOCGIFCONF) */ -#endif /* !HAVE_GETIFADDRS */ +#endif /* !HAVE_GETIFADDRS */ diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index 1dffa98c44..98e408100d 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -149,7 +149,7 @@ static int internal_flush(void); #ifdef HAVE_UNIX_SOCKETS static int Lock_AF_UNIX(char *unixSocketDir, char *unixSocketPath); static int Setup_AF_UNIX(char *sock_path); -#endif /* HAVE_UNIX_SOCKETS */ +#endif /* HAVE_UNIX_SOCKETS */ static PQcommMethods PqCommSocketMethods = { socket_comm_reset, @@ -253,7 +253,7 @@ socket_close(int code, Datum arg) if (MyProcPort->gss->cred != GSS_C_NO_CREDENTIAL) gss_release_cred(&min_s, &MyProcPort->gss->cred); -#endif /* ENABLE_GSS */ +#endif /* ENABLE_GSS */ /* * GSS and SSPI share the port->gss struct. Since nowhere else does a @@ -261,7 +261,7 @@ socket_close(int code, Datum arg) * BackendInitialize(). */ free(MyProcPort->gss); -#endif /* ENABLE_GSS || ENABLE_SSPI */ +#endif /* ENABLE_GSS || ENABLE_SSPI */ /* * Cleanly shut down SSL layer. Nowhere else does a postmaster child @@ -362,7 +362,7 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, service = unixSocketPath; } else -#endif /* HAVE_UNIX_SOCKETS */ +#endif /* HAVE_UNIX_SOCKETS */ { snprintf(portNumberStr, sizeof(portNumberStr), "%d", portNumber); service = portNumberStr; @@ -680,7 +680,7 @@ Setup_AF_UNIX(char *sock_path) } return STATUS_OK; } -#endif /* HAVE_UNIX_SOCKETS */ +#endif /* HAVE_UNIX_SOCKETS */ /* @@ -858,8 +858,8 @@ TouchSocketFiles(void) #else /* !HAVE_UTIME */ #ifdef HAVE_UTIMES utimes(sock_path, NULL); -#endif /* HAVE_UTIMES */ -#endif /* HAVE_UTIME */ +#endif /* HAVE_UTIMES */ +#endif /* HAVE_UTIME */ } } @@ -1704,11 +1704,11 @@ pq_getkeepalivesidle(Port *port) elog(LOG, "getsockopt(TCP_KEEPALIVE) failed: %m"); port->default_keepalives_idle = -1; /* don't know */ } -#endif /* TCP_KEEPIDLE */ +#endif /* TCP_KEEPIDLE */ #else /* WIN32 */ /* We can't get the defaults on Windows, so return "don't know" */ port->default_keepalives_idle = -1; -#endif /* WIN32 */ +#endif /* WIN32 */ } return port->default_keepalives_idle; @@ -1733,7 +1733,7 @@ pq_setkeepalivesidle(int idle, Port *port) if (pq_getkeepalivesidle(port) < 0) { if (idle == 0) - return STATUS_OK; /* default is set but unknown */ + return STATUS_OK; /* default is set but unknown */ else return STATUS_ERROR; } @@ -1792,12 +1792,12 @@ pq_getkeepalivesinterval(Port *port) &size) < 0) { elog(LOG, "getsockopt(TCP_KEEPINTVL) failed: %m"); - port->default_keepalives_interval = -1; /* don't know */ + port->default_keepalives_interval = -1; /* don't know */ } #else /* We can't get the defaults on Windows, so return "don't know" */ port->default_keepalives_interval = -1; -#endif /* WIN32 */ +#endif /* WIN32 */ } return port->default_keepalives_interval; @@ -1822,7 +1822,7 @@ pq_setkeepalivesinterval(int interval, Port *port) if (pq_getkeepalivesinterval(port) < 0) { if (interval == 0) - return STATUS_OK; /* default is set but unknown */ + return STATUS_OK; /* default is set but unknown */ else return STATUS_ERROR; } @@ -1872,7 +1872,7 @@ pq_getkeepalivescount(Port *port) &size) < 0) { elog(LOG, "getsockopt(TCP_KEEPCNT) failed: %m"); - port->default_keepalives_count = -1; /* don't know */ + port->default_keepalives_count = -1; /* don't know */ } } @@ -1897,7 +1897,7 @@ pq_setkeepalivescount(int count, Port *port) if (pq_getkeepalivescount(port) < 0) { if (count == 0) - return STATUS_OK; /* default is set but unknown */ + return STATUS_OK; /* default is set but unknown */ else return STATUS_ERROR; } diff --git a/src/backend/main/main.c b/src/backend/main/main.c index 8846865ba3..7c7cddbdb1 100644 --- a/src/backend/main/main.c +++ b/src/backend/main/main.c @@ -217,7 +217,7 @@ main(int argc, char *argv[]) #endif if (argc > 1 && strcmp(argv[1], "--boot") == 0) - AuxiliaryProcessMain(argc, argv); /* does not return */ + AuxiliaryProcessMain(argc, argv); /* does not return */ else if (argc > 1 && strcmp(argv[1], "--describe-config") == 0) GucInfoMain(); /* does not return */ else if (argc > 1 && strcmp(argv[1], "--single") == 0) @@ -225,7 +225,7 @@ main(int argc, char *argv[]) NULL, /* no dbname */ strdup(get_user_name_or_exit(progname))); /* does not return */ else - PostmasterMain(argc, argv); /* does not return */ + PostmasterMain(argc, argv); /* does not return */ abort(); /* should not get here */ } @@ -283,10 +283,10 @@ startup_hacks(const char *progname) { _set_FMA3_enable(0); } -#endif /* defined(_M_AMD64) && _MSC_VER == 1800 */ +#endif /* defined(_M_AMD64) && _MSC_VER == 1800 */ } -#endif /* WIN32 */ +#endif /* WIN32 */ /* * Initialize dummy_spinlock, in case we are on a platform where we have @@ -419,5 +419,5 @@ check_root(const char *progname) "more information on how to properly start the server.\n"); exit(1); } -#endif /* WIN32 */ +#endif /* WIN32 */ } diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index ed51e1f6e0..91d64b7331 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -2311,7 +2311,7 @@ _equalParamRef(const ParamRef *a, const ParamRef *b) static bool _equalAConst(const A_Const *a, const A_Const *b) { - if (!equal(&a->val, &b->val)) /* hack for in-line Value field */ + if (!equal(&a->val, &b->val)) /* hack for in-line Value field */ return false; COMPARE_LOCATION_FIELD(location); diff --git a/src/backend/nodes/list.c b/src/backend/nodes/list.c index f09aa248d8..acaf4b5315 100644 --- a/src/backend/nodes/list.c +++ b/src/backend/nodes/list.c @@ -52,7 +52,7 @@ check_list_invariants(const List *list) } #else #define check_list_invariants(l) -#endif /* USE_ASSERT_CHECKING */ +#endif /* USE_ASSERT_CHECKING */ /* * Return a freshly allocated List. Since empty non-NIL lists are diff --git a/src/backend/nodes/makefuncs.c b/src/backend/nodes/makefuncs.c index f5fde1533f..0755039da9 100644 --- a/src/backend/nodes/makefuncs.c +++ b/src/backend/nodes/makefuncs.c @@ -522,8 +522,8 @@ makeFuncExpr(Oid funcid, Oid rettype, List *args, funcexpr = makeNode(FuncExpr); funcexpr->funcid = funcid; funcexpr->funcresulttype = rettype; - funcexpr->funcretset = false; /* only allowed case here */ - funcexpr->funcvariadic = false; /* only allowed case here */ + funcexpr->funcretset = false; /* only allowed case here */ + funcexpr->funcvariadic = false; /* only allowed case here */ funcexpr->funcformat = fformat; funcexpr->funccollid = funccollid; funcexpr->inputcollid = inputcollid; diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c index 2cceb99fd9..c87fb300d6 100644 --- a/src/backend/nodes/nodeFuncs.c +++ b/src/backend/nodes/nodeFuncs.c @@ -1007,10 +1007,10 @@ exprSetCollation(Node *expr, Oid collation) ((NullIfExpr *) expr)->opcollid = collation; break; case T_ScalarArrayOpExpr: - Assert(!OidIsValid(collation)); /* result is always boolean */ + Assert(!OidIsValid(collation)); /* result is always boolean */ break; case T_BoolExpr: - Assert(!OidIsValid(collation)); /* result is always boolean */ + Assert(!OidIsValid(collation)); /* result is always boolean */ break; case T_SubLink: #ifdef USE_ASSERT_CHECKING @@ -1036,13 +1036,13 @@ exprSetCollation(Node *expr, Oid collation) Assert(!OidIsValid(collation)); } } -#endif /* USE_ASSERT_CHECKING */ +#endif /* USE_ASSERT_CHECKING */ break; case T_FieldSelect: ((FieldSelect *) expr)->resultcollid = collation; break; case T_FieldStore: - Assert(!OidIsValid(collation)); /* result is always composite */ + Assert(!OidIsValid(collation)); /* result is always composite */ break; case T_RelabelType: ((RelabelType *) expr)->resultcollid = collation; @@ -1054,7 +1054,7 @@ exprSetCollation(Node *expr, Oid collation) ((ArrayCoerceExpr *) expr)->resultcollid = collation; break; case T_ConvertRowtypeExpr: - Assert(!OidIsValid(collation)); /* result is always composite */ + Assert(!OidIsValid(collation)); /* result is always composite */ break; case T_CaseExpr: ((CaseExpr *) expr)->casecollid = collation; @@ -1063,10 +1063,10 @@ exprSetCollation(Node *expr, Oid collation) ((ArrayExpr *) expr)->array_collid = collation; break; case T_RowExpr: - Assert(!OidIsValid(collation)); /* result is always composite */ + Assert(!OidIsValid(collation)); /* result is always composite */ break; case T_RowCompareExpr: - Assert(!OidIsValid(collation)); /* result is always boolean */ + Assert(!OidIsValid(collation)); /* result is always boolean */ break; case T_CoalesceExpr: ((CoalesceExpr *) expr)->coalescecollid = collation; @@ -1075,7 +1075,7 @@ exprSetCollation(Node *expr, Oid collation) ((MinMaxExpr *) expr)->minmaxcollid = collation; break; case T_SQLValueFunction: - Assert(!OidIsValid(collation)); /* no collatable results */ + Assert(!OidIsValid(collation)); /* no collatable results */ break; case T_XmlExpr: Assert((((XmlExpr *) expr)->op == IS_XMLSERIALIZE) ? @@ -1083,10 +1083,10 @@ exprSetCollation(Node *expr, Oid collation) (collation == InvalidOid)); break; case T_NullTest: - Assert(!OidIsValid(collation)); /* result is always boolean */ + Assert(!OidIsValid(collation)); /* result is always boolean */ break; case T_BooleanTest: - Assert(!OidIsValid(collation)); /* result is always boolean */ + Assert(!OidIsValid(collation)); /* result is always boolean */ break; case T_CoerceToDomain: ((CoerceToDomain *) expr)->resultcollid = collation; @@ -1098,11 +1098,11 @@ exprSetCollation(Node *expr, Oid collation) ((SetToDefault *) expr)->collation = collation; break; case T_CurrentOfExpr: - Assert(!OidIsValid(collation)); /* result is always boolean */ + Assert(!OidIsValid(collation)); /* result is always boolean */ break; case T_NextValueExpr: - Assert(!OidIsValid(collation)); /* result is always an integer - * type */ + Assert(!OidIsValid(collation)); /* result is always an integer + * type */ break; default: elog(ERROR, "unrecognized node type: %d", (int) nodeTag(expr)); diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c index 0fb08b94db..ac0cb3bc22 100644 --- a/src/backend/nodes/params.c +++ b/src/backend/nodes/params.c @@ -120,7 +120,7 @@ EstimateParamListSpace(ParamListInfo paramLI) } sz = add_size(sz, sizeof(Oid)); /* space for type OID */ - sz = add_size(sz, sizeof(uint16)); /* space for pflags */ + sz = add_size(sz, sizeof(uint16)); /* space for pflags */ /* space for datum/isnull */ if (OidIsValid(typeOid)) diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index 84147f9754..2988e8bd16 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -446,8 +446,7 @@ _readRangeVar(void) { READ_LOCALS(RangeVar); - local_node->catalogname = NULL; /* not currently saved in output - * format */ + local_node->catalogname = NULL; /* not currently saved in output format */ READ_STRING_FIELD(schemaname); READ_STRING_FIELD(relname); @@ -539,7 +538,7 @@ _readConst(void) token = pg_strtok(&length); /* skip :constvalue */ if (local_node->constisnull) - token = pg_strtok(&length); /* skip "<>" */ + token = pg_strtok(&length); /* skip "<>" */ else local_node->constvalue = readDatum(local_node->constbyval); diff --git a/src/backend/nodes/tidbitmap.c b/src/backend/nodes/tidbitmap.c index bbd39a2ed9..06f20a2148 100644 --- a/src/backend/nodes/tidbitmap.c +++ b/src/backend/nodes/tidbitmap.c @@ -216,7 +216,7 @@ typedef struct PTIterationArray */ struct TBMSharedIterator { - TBMSharedIteratorState *state; /* shared state */ + TBMSharedIteratorState *state; /* shared state */ PTEntryArray *ptbase; /* pagetable element array */ PTIterationArray *ptpages; /* sorted exact page index list */ PTIterationArray *ptchunks; /* sorted lossy page index list */ @@ -297,8 +297,8 @@ tbm_create(long maxbytes, dsa_area *dsa) */ nbuckets = maxbytes / (sizeof(PagetableEntry) + sizeof(Pointer) + sizeof(Pointer)); - nbuckets = Min(nbuckets, INT_MAX - 1); /* safety limit */ - nbuckets = Max(nbuckets, 16); /* sanity limit */ + nbuckets = Min(nbuckets, INT_MAX - 1); /* safety limit */ + nbuckets = Max(nbuckets, 16); /* sanity limit */ tbm->maxentries = (int) nbuckets; tbm->lossify_start = 0; tbm->dsa = dsa; diff --git a/src/backend/optimizer/geqo/geqo_cx.c b/src/backend/optimizer/geqo/geqo_cx.c index c72081e81a..d05327d8ab 100644 --- a/src/backend/optimizer/geqo/geqo_cx.c +++ b/src/backend/optimizer/geqo/geqo_cx.c @@ -121,4 +121,4 @@ cx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, return num_diffs; } -#endif /* defined(CX) */ +#endif /* defined(CX) */ diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c index 173be44409..fbabe2e25a 100644 --- a/src/backend/optimizer/geqo/geqo_erx.c +++ b/src/backend/optimizer/geqo/geqo_erx.c @@ -468,4 +468,4 @@ edge_failure(PlannerInfo *root, Gene *gene, int index, Edge *edge_table, int num return 0; /* to keep the compiler quiet */ } -#endif /* defined(ERX) */ +#endif /* defined(ERX) */ diff --git a/src/backend/optimizer/geqo/geqo_misc.c b/src/backend/optimizer/geqo/geqo_misc.c index 503a19f6d6..937cb5fe0f 100644 --- a/src/backend/optimizer/geqo/geqo_misc.c +++ b/src/backend/optimizer/geqo/geqo_misc.c @@ -129,4 +129,4 @@ print_edge_table(FILE *fp, Edge *edge_table, int num_gene) fflush(fp); } -#endif /* GEQO_DEBUG */ +#endif /* GEQO_DEBUG */ diff --git a/src/backend/optimizer/geqo/geqo_mutation.c b/src/backend/optimizer/geqo/geqo_mutation.c index c6af00a2a7..2af0295d69 100644 --- a/src/backend/optimizer/geqo/geqo_mutation.c +++ b/src/backend/optimizer/geqo/geqo_mutation.c @@ -63,4 +63,4 @@ geqo_mutation(PlannerInfo *root, Gene *tour, int num_gene) } } -#endif /* defined(CX) */ +#endif /* defined(CX) */ diff --git a/src/backend/optimizer/geqo/geqo_ox1.c b/src/backend/optimizer/geqo/geqo_ox1.c index 891cfa2403..53dacb811f 100644 --- a/src/backend/optimizer/geqo/geqo_ox1.c +++ b/src/backend/optimizer/geqo/geqo_ox1.c @@ -92,4 +92,4 @@ ox1(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, } -#endif /* defined(OX1) */ +#endif /* defined(OX1) */ diff --git a/src/backend/optimizer/geqo/geqo_ox2.c b/src/backend/optimizer/geqo/geqo_ox2.c index b43455d3eb..8d5baa9826 100644 --- a/src/backend/optimizer/geqo/geqo_ox2.c +++ b/src/backend/optimizer/geqo/geqo_ox2.c @@ -109,4 +109,4 @@ ox2(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, } -#endif /* defined(OX2) */ +#endif /* defined(OX2) */ diff --git a/src/backend/optimizer/geqo/geqo_pmx.c b/src/backend/optimizer/geqo/geqo_pmx.c index e9485cc8b5..ddbc78172c 100644 --- a/src/backend/optimizer/geqo/geqo_pmx.c +++ b/src/backend/optimizer/geqo/geqo_pmx.c @@ -221,4 +221,4 @@ pmx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene) pfree(check_list); } -#endif /* defined(PMX) */ +#endif /* defined(PMX) */ diff --git a/src/backend/optimizer/geqo/geqo_pool.c b/src/backend/optimizer/geqo/geqo_pool.c index 0f7a26c9a1..596a2cda20 100644 --- a/src/backend/optimizer/geqo/geqo_pool.c +++ b/src/backend/optimizer/geqo/geqo_pool.c @@ -54,7 +54,7 @@ alloc_pool(PlannerInfo *root, int pool_size, int string_length) new_pool->data = (Chromosome *) palloc(pool_size * sizeof(Chromosome)); /* all gene */ - chromo = (Chromosome *) new_pool->data; /* vector of all chromos */ + chromo = (Chromosome *) new_pool->data; /* vector of all chromos */ for (i = 0; i < pool_size; i++) chromo[i].string = palloc((string_length + 1) * sizeof(Gene)); diff --git a/src/backend/optimizer/geqo/geqo_px.c b/src/backend/optimizer/geqo/geqo_px.c index f7f615462c..2e7748c5aa 100644 --- a/src/backend/optimizer/geqo/geqo_px.c +++ b/src/backend/optimizer/geqo/geqo_px.c @@ -107,4 +107,4 @@ px(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, } -#endif /* defined(PX) */ +#endif /* defined(PX) */ diff --git a/src/backend/optimizer/geqo/geqo_recombination.c b/src/backend/optimizer/geqo/geqo_recombination.c index a61547c16d..eb6ab42808 100644 --- a/src/backend/optimizer/geqo/geqo_recombination.c +++ b/src/backend/optimizer/geqo/geqo_recombination.c @@ -89,4 +89,4 @@ free_city_table(PlannerInfo *root, City *city_table) pfree(city_table); } -#endif /* CX || PX || OX1 || OX2 */ +#endif /* CX || PX || OX1 || OX2 */ diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 78ca55bbd6..23b524fce5 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -159,7 +159,7 @@ make_one_rel(PlannerInfo *root, List *joinlist) if (brel == NULL) continue; - Assert(brel->relid == rti); /* sanity check on array */ + Assert(brel->relid == rti); /* sanity check on array */ /* ignore RTEs that are "other rels" */ if (brel->reloptkind != RELOPT_BASEREL) @@ -258,7 +258,7 @@ set_base_rel_sizes(PlannerInfo *root) if (rel == NULL) continue; - Assert(rel->relid == rti); /* sanity check on array */ + Assert(rel->relid == rti); /* sanity check on array */ /* ignore RTEs that are "other rels" */ if (rel->reloptkind != RELOPT_BASEREL) @@ -300,7 +300,7 @@ set_base_rel_pathlists(PlannerInfo *root) if (rel == NULL) continue; - Assert(rel->relid == rti); /* sanity check on array */ + Assert(rel->relid == rti); /* sanity check on array */ /* ignore RTEs that are "other rels" */ if (rel->reloptkind != RELOPT_BASEREL) @@ -3442,4 +3442,4 @@ debug_print_rel(PlannerInfo *root, RelOptInfo *rel) fflush(stdout); } -#endif /* OPTIMIZER_DEBUG */ +#endif /* OPTIMIZER_DEBUG */ diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c index 758ddea4a5..8d09f0b32b 100644 --- a/src/backend/optimizer/path/clausesel.c +++ b/src/backend/optimizer/path/clausesel.c @@ -31,7 +31,7 @@ */ typedef struct RangeQueryClause { - struct RangeQueryClause *next; /* next in linked list */ + struct RangeQueryClause *next; /* next in linked list */ Node *var; /* The common variable of the clauses */ bool have_lobound; /* found a low-bound clause yet? */ bool have_hibound; /* found a high-bound clause yet? */ @@ -848,7 +848,7 @@ clause_selectivity(PlannerInfo *root, #ifdef SELECTIVITY_DEBUG elog(DEBUG4, "clause_selectivity: s1 %f", s1); -#endif /* SELECTIVITY_DEBUG */ +#endif /* SELECTIVITY_DEBUG */ return s1; } diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c index 6ed3c634b8..c5c4580bc0 100644 --- a/src/backend/optimizer/path/costsize.c +++ b/src/backend/optimizer/path/costsize.c @@ -2963,7 +2963,7 @@ initial_cost_hashjoin(PlannerInfo *root, JoinCostWorkspace *workspace, */ ExecChooseHashTableSize(inner_path_rows, inner_path->pathtarget->width, - true, /* useskew */ + true, /* useskew */ &numbuckets, &numbatches, &num_skew_mcvs); @@ -4047,7 +4047,7 @@ get_parameterized_baserel_size(PlannerInfo *root, RelOptInfo *rel, nrows = rel->tuples * clauselist_selectivity(root, allclauses, - rel->relid, /* do not use 0! */ + rel->relid, /* do not use 0! */ JOIN_INNER, NULL); nrows = clamp_row_est(nrows); diff --git a/src/backend/optimizer/path/equivclass.c b/src/backend/optimizer/path/equivclass.c index 67bd760fb4..b65bf818b5 100644 --- a/src/backend/optimizer/path/equivclass.c +++ b/src/backend/optimizer/path/equivclass.c @@ -244,7 +244,7 @@ process_equivalence(PlannerInfo *root, RestrictInfo *restrictinfo, { EquivalenceMember *cur_em = (EquivalenceMember *) lfirst(lc2); - Assert(!cur_em->em_is_child); /* no children yet */ + Assert(!cur_em->em_is_child); /* no children yet */ /* * If below an outer join, don't match constants: they're not as @@ -1704,7 +1704,7 @@ reconsider_outer_join_clause(PlannerInfo *root, RestrictInfo *rinfo, { EquivalenceMember *cur_em = (EquivalenceMember *) lfirst(lc2); - Assert(!cur_em->em_is_child); /* no children yet */ + Assert(!cur_em->em_is_child); /* no children yet */ if (equal(outervar, cur_em->em_expr)) { match = true; @@ -1834,7 +1834,7 @@ reconsider_full_join_clause(PlannerInfo *root, RestrictInfo *rinfo) foreach(lc2, cur_ec->ec_members) { coal_em = (EquivalenceMember *) lfirst(lc2); - Assert(!coal_em->em_is_child); /* no children yet */ + Assert(!coal_em->em_is_child); /* no children yet */ if (IsA(coal_em->em_expr, CoalesceExpr)) { CoalesceExpr *cexpr = (CoalesceExpr *) coal_em->em_expr; @@ -1997,7 +1997,7 @@ match_eclasses_to_foreign_key_col(PlannerInfo *root, Index var2varno = fkinfo->ref_relid; AttrNumber var2attno = fkinfo->confkey[colno]; Oid eqop = fkinfo->conpfeqop[colno]; - List *opfamilies = NIL; /* compute only if needed */ + List *opfamilies = NIL; /* compute only if needed */ ListCell *lc1; foreach(lc1, root->eq_classes) diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 07ab33902b..97611211f0 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -1170,7 +1170,7 @@ build_paths_for_OR(PlannerInfo *root, RelOptInfo *rel, List *clauses, List *other_clauses) { List *result = NIL; - List *all_clauses = NIL; /* not computed till needed */ + List *all_clauses = NIL; /* not computed till needed */ ListCell *lc; foreach(lc, rel->indexlist) @@ -1383,7 +1383,7 @@ choose_bitmap_and(PlannerInfo *root, RelOptInfo *rel, List *paths) Assert(npaths > 0); /* else caller error */ if (npaths == 1) - return (Path *) linitial(paths); /* easy case */ + return (Path *) linitial(paths); /* easy case */ /* * In theory we should consider every nonempty subset of the given paths. @@ -1650,7 +1650,7 @@ bitmap_and_cost_est(PlannerInfo *root, RelOptInfo *rel, List *paths) apath.path.pathtype = T_BitmapAnd; apath.path.parent = rel; apath.path.pathtarget = rel->reltarget; - apath.path.param_info = NULL; /* not used in bitmap trees */ + apath.path.param_info = NULL; /* not used in bitmap trees */ apath.path.pathkeys = NIL; apath.bitmapquals = paths; cost_bitmap_and_node(&apath, root); @@ -1982,7 +1982,7 @@ get_loop_count(PlannerInfo *root, Index cur_relid, Relids outer_relids) outer_rel = root->simple_rel_array[outer_relid]; if (outer_rel == NULL) continue; - Assert(outer_rel->relid == outer_relid); /* sanity check on array */ + Assert(outer_rel->relid == outer_relid); /* sanity check on array */ /* Other relation could be proven empty, if so ignore */ if (IS_DUMMY_REL(outer_rel)) @@ -2632,7 +2632,7 @@ match_pathkeys_to_index(IndexOptInfo *index, List *pathkeys, return; } - *orderby_clauses_p = orderby_clauses; /* success! */ + *orderby_clauses_p = orderby_clauses; /* success! */ *clause_columns_p = clause_columns; } @@ -3062,7 +3062,7 @@ relation_has_unique_index_for(PlannerInfo *root, RelOptInfo *rel, if (match_index_to_operand(rexpr, c, ind)) { - matched = true; /* column is unique */ + matched = true; /* column is unique */ break; } } @@ -3983,7 +3983,7 @@ adjust_rowcompare_for_index(RowCompareExpr *clause, if (!var_on_left) { expr_op = get_commutator(expr_op); - if (!OidIsValid(expr_op)) /* should not happen */ + if (!OidIsValid(expr_op)) /* should not happen */ elog(ERROR, "could not find commutator of member %d(%u,%u) of opfamily %u", op_strategy, lefttype, righttype, opfam); } diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index c130d2f17f..23aa735296 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -1104,7 +1104,7 @@ generate_mergejoin_paths(PlannerInfo *root, } num_sortkeys = list_length(innersortkeys); if (num_sortkeys > 1 && !useallclauses) - trialsortkeys = list_copy(innersortkeys); /* need modifiable copy */ + trialsortkeys = list_copy(innersortkeys); /* need modifiable copy */ else trialsortkeys = innersortkeys; /* won't really truncate */ @@ -1732,7 +1732,7 @@ hash_inner_and_outer(PlannerInfo *root, if (outerpath == cheapest_startup_outer && innerpath == cheapest_total_inner) - continue; /* already tried it */ + continue; /* already tried it */ try_hashjoin_path(root, joinrel, diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c index 2c269062ec..6933e73018 100644 --- a/src/backend/optimizer/path/pathkeys.c +++ b/src/backend/optimizer/path/pathkeys.c @@ -196,7 +196,7 @@ make_pathkey_from_sortinfo(PlannerInfo *root, opcintype, opcintype, BTEqualStrategyNumber); - if (!OidIsValid(equality_op)) /* shouldn't happen */ + if (!OidIsValid(equality_op)) /* shouldn't happen */ elog(ERROR, "could not find equality operator for opfamily %u", opfamily); opfamilies = get_mergejoin_opfamilies(equality_op); diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 19aa4575a9..b510faa3e1 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -63,9 +63,9 @@ * ressortgroupref labels. This is passed down by parent nodes such as Sort * and Group, which need these values to be available in their inputs. */ -#define CP_EXACT_TLIST 0x0001 /* Plan must return specified tlist */ -#define CP_SMALL_TLIST 0x0002 /* Prefer narrower tlists */ -#define CP_LABEL_TLIST 0x0004 /* tlist must contain sortgrouprefs */ +#define CP_EXACT_TLIST 0x0001 /* Plan must return specified tlist */ +#define CP_SMALL_TLIST 0x0002 /* Prefer narrower tlists */ +#define CP_LABEL_TLIST 0x0004 /* tlist must contain sortgrouprefs */ static Plan *create_plan_recurse(PlannerInfo *root, Path *best_path, @@ -1418,7 +1418,7 @@ create_unique_plan(PlannerInfo *root, UniquePath *best_path, int flags) * for the IN clause operators' RHS datatype. */ eqop = get_equality_op_for_ordering_op(sortop, NULL); - if (!OidIsValid(eqop)) /* shouldn't happen */ + if (!OidIsValid(eqop)) /* shouldn't happen */ elog(ERROR, "could not find equality operator for ordering operator %u", sortop); @@ -2908,7 +2908,7 @@ create_bitmap_subplan(PlannerInfo *root, Path *bitmapqual, plan->total_cost = opath->path.total_cost; plan->plan_rows = clamp_row_est(opath->bitmapselectivity * opath->path.parent->tuples); - plan->plan_width = 0; /* meaningless */ + plan->plan_width = 0; /* meaningless */ plan->parallel_aware = false; plan->parallel_safe = opath->path.parallel_safe; } @@ -3394,7 +3394,7 @@ create_worktablescan_plan(PlannerInfo *root, Path *best_path, if (!cteroot) /* shouldn't happen */ elog(ERROR, "bad levelsup for CTE \"%s\"", rte->ctename); } - if (cteroot->wt_param_id < 0) /* shouldn't happen */ + if (cteroot->wt_param_id < 0) /* shouldn't happen */ elog(ERROR, "could not find param ID for CTE \"%s\"", rte->ctename); /* Sort clauses into best execution order */ @@ -5726,7 +5726,7 @@ prepare_sort_from_pathkeys(Plan *lefttree, List *pathkeys, NULL, true); tlist = lappend(tlist, tle); - lefttree->targetlist = tlist; /* just in case NIL before */ + lefttree->targetlist = tlist; /* just in case NIL before */ } /* @@ -6426,7 +6426,7 @@ make_modifytable(PlannerInfo *root, node->partitioned_rels = partitioned_rels; node->resultRelations = resultRelations; node->resultRelIndex = -1; /* will be set correctly in setrefs.c */ - node->rootResultRelIndex = -1; /* will be set correctly in setrefs.c */ + node->rootResultRelIndex = -1; /* will be set correctly in setrefs.c */ node->plans = subplans; if (!onconflict) { diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c index ebd442ad4d..63cb055ef0 100644 --- a/src/backend/optimizer/plan/initsplan.c +++ b/src/backend/optimizer/plan/initsplan.c @@ -287,7 +287,7 @@ find_lateral_references(PlannerInfo *root) if (brel == NULL) continue; - Assert(brel->relid == rti); /* sanity check on array */ + Assert(brel->relid == rti); /* sanity check on array */ /* * This bit is less obvious than it might look. We ignore appendrel @@ -436,7 +436,7 @@ create_lateral_join_info(PlannerInfo *root) if (brel == NULL) continue; - Assert(brel->relid == rti); /* sanity check on array */ + Assert(brel->relid == rti); /* sanity check on array */ /* ignore RTEs that are "other rels" */ if (brel->reloptkind != RELOPT_BASEREL) @@ -945,7 +945,7 @@ deconstruct_recurse(PlannerInfo *root, Node *jtnode, bool below_outer_join, /* JOIN_RIGHT was eliminated during reduce_outer_joins() */ elog(ERROR, "unrecognized join type: %d", (int) j->jointype); - nonnullable_rels = NULL; /* keep compiler quiet */ + nonnullable_rels = NULL; /* keep compiler quiet */ nullable_rels = NULL; leftjoinlist = rightjoinlist = NIL; break; @@ -1214,7 +1214,7 @@ make_outerjoininfo(PlannerInfo *root, { sjinfo->min_lefthand = bms_copy(left_rels); sjinfo->min_righthand = bms_copy(right_rels); - sjinfo->lhs_strict = false; /* don't care about this */ + sjinfo->lhs_strict = false; /* don't care about this */ return sjinfo; } @@ -2047,7 +2047,7 @@ distribute_qual_to_rels(PlannerInfo *root, Node *clause, static bool check_outerjoin_delay(PlannerInfo *root, Relids *relids_p, /* in/out parameter */ - Relids *nullable_relids_p, /* output parameter */ + Relids *nullable_relids_p, /* output parameter */ bool is_pushed_down) { Relids relids; @@ -2304,8 +2304,8 @@ process_implied_equality(PlannerInfo *root, * original (this is necessary in case there are subselects in there...) */ clause = make_opclause(opno, - BOOLOID, /* opresulttype */ - false, /* opretset */ + BOOLOID, /* opresulttype */ + false, /* opretset */ copyObject(item1), copyObject(item2), InvalidOid, @@ -2367,8 +2367,8 @@ build_implied_join_equality(Oid opno, * original (this is necessary in case there are subselects in there...) */ clause = make_opclause(opno, - BOOLOID, /* opresulttype */ - false, /* opretset */ + BOOLOID, /* opresulttype */ + false, /* opretset */ copyObject(item1), copyObject(item2), InvalidOid, @@ -2378,12 +2378,12 @@ build_implied_join_equality(Oid opno, * Build the RestrictInfo node itself. */ restrictinfo = make_restrictinfo(clause, - true, /* is_pushed_down */ - false, /* outerjoin_delayed */ - false, /* pseudoconstant */ + true, /* is_pushed_down */ + false, /* outerjoin_delayed */ + false, /* pseudoconstant */ security_level, /* security_level */ qualscope, /* required_relids */ - NULL, /* outer_relids */ + NULL, /* outer_relids */ nullable_relids); /* nullable_relids */ /* Set mergejoinability/hashjoinability flags */ diff --git a/src/backend/optimizer/plan/planagg.c b/src/backend/optimizer/plan/planagg.c index 55657360fc..6d5969cd44 100644 --- a/src/backend/optimizer/plan/planagg.c +++ b/src/backend/optimizer/plan/planagg.c @@ -89,8 +89,8 @@ preprocess_minmax_aggregates(PlannerInfo *root, List *tlist) if (!parse->hasAggs) return; - Assert(!parse->setOperations); /* shouldn't get here if a setop */ - Assert(parse->rowMarks == NIL); /* nor if FOR UPDATE */ + Assert(!parse->setOperations); /* shouldn't get here if a setop */ + Assert(parse->rowMarks == NIL); /* nor if FOR UPDATE */ /* * Reject unoptimizable cases. diff --git a/src/backend/optimizer/plan/planmain.c b/src/backend/optimizer/plan/planmain.c index 74de3b818f..f4e0a6ea3d 100644 --- a/src/backend/optimizer/plan/planmain.c +++ b/src/backend/optimizer/plan/planmain.c @@ -246,7 +246,7 @@ query_planner(PlannerInfo *root, List *tlist, if (brel == NULL) continue; - Assert(brel->relid == rti); /* sanity check on array */ + Assert(brel->relid == rti); /* sanity check on array */ if (IS_SIMPLE_REL(brel)) total_pages += (double) brel->pages; diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index 40cb79d4cd..4b32f59128 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -2412,7 +2412,7 @@ preprocess_rowmarks(PlannerInfo *root) newrc->markType = select_rowmark_type(rte, LCS_NONE); newrc->allMarkTypes = (1 << newrc->markType); newrc->strength = LCS_NONE; - newrc->waitPolicy = LockWaitBlock; /* doesn't matter */ + newrc->waitPolicy = LockWaitBlock; /* doesn't matter */ newrc->isParent = false; prowmarks = lappend(prowmarks, newrc); @@ -2469,7 +2469,7 @@ select_rowmark_type(RangeTblEntry *rte, LockClauseStrength strength) break; } elog(ERROR, "unrecognized LockClauseStrength %d", (int) strength); - return ROW_MARK_EXCLUSIVE; /* keep compiler quiet */ + return ROW_MARK_EXCLUSIVE; /* keep compiler quiet */ } } @@ -2519,7 +2519,7 @@ preprocess_limit(PlannerInfo *root, double tuple_fraction, { *count_est = DatumGetInt64(((Const *) est)->constvalue); if (*count_est <= 0) - *count_est = 1; /* force to at least 1 */ + *count_est = 1; /* force to at least 1 */ } } else @@ -2653,7 +2653,7 @@ preprocess_limit(PlannerInfo *root, double tuple_fraction, /* both fractional, so add them together */ tuple_fraction += limit_fraction; if (tuple_fraction >= 1.0) - tuple_fraction = 0.0; /* assume fetch all */ + tuple_fraction = 0.0; /* assume fetch all */ } } } @@ -3514,7 +3514,7 @@ create_grouping_paths(PlannerInfo *root, RelOptInfo *grouped_rel; PathTarget *partial_grouping_target = NULL; AggClauseCosts agg_partial_costs; /* parallel only */ - AggClauseCosts agg_final_costs; /* parallel only */ + AggClauseCosts agg_final_costs; /* parallel only */ Size hashaggtablesize; double dNumGroups; double dNumPartialGroups = 0; @@ -5626,7 +5626,7 @@ make_sort_input_target(PlannerInfo *root, /* Shouldn't get here unless query has ORDER BY */ Assert(parse->sortClause); - *have_postponed_srfs = false; /* default result */ + *have_postponed_srfs = false; /* default result */ /* Inspect tlist and collect per-column information */ ncols = list_length(final_target->exprs); diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index 5cac171cb6..01b06848af 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -297,7 +297,7 @@ add_rtes_to_flat_rtable(PlannerInfo *root, bool recursing) if (rel != NULL) { - Assert(rel->relid == rti); /* sanity check on array */ + Assert(rel->relid == rti); /* sanity check on array */ /* * The subquery might never have been planned at all, if it @@ -1908,7 +1908,7 @@ set_dummy_tlist_references(Plan *plan, int rtoffset) } else { - newvar->varnoold = 0; /* wasn't ever a plain Var */ + newvar->varnoold = 0; /* wasn't ever a plain Var */ newvar->varoattno = 0; } @@ -2137,7 +2137,7 @@ search_indexed_tlist_for_sortgroupref(Expr *node, Var *newvar; newvar = makeVarFromTargetEntry(newvarno, tle); - newvar->varnoold = 0; /* wasn't ever a plain Var */ + newvar->varnoold = 0; /* wasn't ever a plain Var */ newvar->varoattno = 0; return newvar; } diff --git a/src/backend/optimizer/prep/prepjointree.c b/src/backend/optimizer/prep/prepjointree.c index cfdd770f6a..08033183e7 100644 --- a/src/backend/optimizer/prep/prepjointree.c +++ b/src/backend/optimizer/prep/prepjointree.c @@ -44,7 +44,7 @@ typedef struct pullup_replace_vars_context RangeTblEntry *target_rte; /* RTE of subquery */ Relids relids; /* relids within subquery, as numbered after * pullup (set only if target_rte->lateral) */ - bool *outer_hasSubLinks; /* -> outer query's hasSubLinks */ + bool *outer_hasSubLinks; /* -> outer query's hasSubLinks */ int varno; /* varno of subquery */ bool need_phvs; /* do we need PlaceHolderVars? */ bool wrap_non_vars; /* do we need 'em on *all* non-Vars? */ @@ -772,7 +772,7 @@ pull_up_subqueries_recurse(PlannerInfo *root, Node *jtnode, if (deletion_ok && !have_undeleted_child) { /* OK to delete this FromExpr entirely */ - root->hasDeletedRTEs = true; /* probably is set already */ + root->hasDeletedRTEs = true; /* probably is set already */ return NULL; } } @@ -2088,7 +2088,7 @@ pullup_replace_vars_callback(Var *var, &colnames, &fields); /* Adjust the generated per-field Vars, but don't insert PHVs */ rcon->need_phvs = false; - context->sublevels_up = 0; /* to match the expandRTE output */ + context->sublevels_up = 0; /* to match the expandRTE output */ fields = (List *) replace_rte_variables_mutator((Node *) fields, context); rcon->need_phvs = save_need_phvs; @@ -2784,7 +2784,7 @@ reduce_outer_joins_pass2(Node *jtnode, if (right_state->contains_outer) { - if (jointype != JOIN_FULL) /* ie, INNER/LEFT/SEMI/ANTI */ + if (jointype != JOIN_FULL) /* ie, INNER/LEFT/SEMI/ANTI */ { /* pass appropriate constraints, per comment above */ pass_nonnullable_rels = local_nonnullable_rels; diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c index de47153bac..afc733f183 100644 --- a/src/backend/optimizer/prep/preptlist.c +++ b/src/backend/optimizer/prep/preptlist.c @@ -301,7 +301,7 @@ expand_targetlist(List *tlist, int command_type, attcollation, att_tup->attlen, (Datum) 0, - true, /* isnull */ + true, /* isnull */ att_tup->attbyval); new_expr = coerce_to_domain(new_expr, InvalidOid, -1, @@ -319,7 +319,7 @@ expand_targetlist(List *tlist, int command_type, InvalidOid, sizeof(int32), (Datum) 0, - true, /* isnull */ + true, /* isnull */ true /* byval */ ); } break; @@ -341,7 +341,7 @@ expand_targetlist(List *tlist, int command_type, InvalidOid, sizeof(int32), (Datum) 0, - true, /* isnull */ + true, /* isnull */ true /* byval */ ); } break; diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index a1dafc8e0f..b9e5dc25eb 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -1399,7 +1399,7 @@ contain_context_dependent_node(Node *clause) return contain_context_dependent_node_walker(clause, &flags); } -#define CCDN_IN_CASEEXPR 0x0001 /* CaseTestExpr okay here? */ +#define CCDN_IN_CASEEXPR 0x0001 /* CaseTestExpr okay here? */ static bool contain_context_dependent_node_walker(Node *node, int *flags) @@ -2434,7 +2434,7 @@ estimate_expression_value(PlannerInfo *root, Node *node) { eval_const_expressions_context context; - context.boundParams = root->glob->boundParams; /* bound Params */ + context.boundParams = root->glob->boundParams; /* bound Params */ /* we do not need to mark the plan as depending on inlined functions */ context.root = NULL; context.active_fns = NIL; /* nothing being recursively simplified */ @@ -2712,8 +2712,8 @@ eval_const_expressions_mutator(Node *node, * Need to get OID of underlying function. Okay to * scribble on input to this extent. */ - set_opfuncid((OpExpr *) expr); /* rely on struct - * equivalence */ + set_opfuncid((OpExpr *) expr); /* rely on struct + * equivalence */ /* * Code for op/func reduction is pretty bulky, so split it @@ -3114,7 +3114,7 @@ eval_const_expressions_mutator(Node *node, if (newarg && IsA(newarg, Const)) { context->case_val = newarg; - newarg = NULL; /* not needed anymore, see above */ + newarg = NULL; /* not needed anymore, see above */ } else context->case_val = NULL; @@ -3463,7 +3463,7 @@ eval_const_expressions_mutator(Node *node, default: elog(ERROR, "unrecognized nulltesttype: %d", (int) ntest->nulltesttype); - result = false; /* keep compiler quiet */ + result = false; /* keep compiler quiet */ break; } @@ -3517,7 +3517,7 @@ eval_const_expressions_mutator(Node *node, default: elog(ERROR, "unrecognized booltesttype: %d", (int) btest->booltesttype); - result = false; /* keep compiler quiet */ + result = false; /* keep compiler quiet */ break; } @@ -4263,7 +4263,7 @@ evaluate_function(Oid funcid, Oid result_type, int32 result_typmod, newexpr->funcretset = false; newexpr->funcvariadic = funcvariadic; newexpr->funcformat = COERCE_EXPLICIT_CALL; /* doesn't matter */ - newexpr->funccollid = result_collid; /* doesn't matter */ + newexpr->funccollid = result_collid; /* doesn't matter */ newexpr->inputcollid = input_collid; newexpr->args = args; newexpr->location = -1; diff --git a/src/backend/optimizer/util/orclauses.c b/src/backend/optimizer/util/orclauses.c index b6867e3001..dd7cfc94b8 100644 --- a/src/backend/optimizer/util/orclauses.c +++ b/src/backend/optimizer/util/orclauses.c @@ -84,7 +84,7 @@ extract_restriction_or_clauses(PlannerInfo *root) if (rel == NULL) continue; - Assert(rel->relid == rti); /* sanity check on array */ + Assert(rel->relid == rti); /* sanity check on array */ /* ignore RTEs that are "other rels" */ if (rel->reloptkind != RELOPT_BASEREL) diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index ec4a093d9f..63afc04b62 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -411,7 +411,7 @@ set_cheapest(RelOptInfo *parent_rel) void add_path(RelOptInfo *parent_rel, Path *new_path) { - bool accept_new = true; /* unless we find a superior old path */ + bool accept_new = true; /* unless we find a superior old path */ ListCell *insert_after = NULL; /* where to insert new item */ List *new_path_pathkeys; ListCell *p1; @@ -484,7 +484,7 @@ add_path(RelOptInfo *parent_rel, Path *new_path) outercmp == BMS_SUBSET1) && new_path->rows <= old_path->rows && new_path->parallel_safe >= old_path->parallel_safe) - remove_old = true; /* new dominates old */ + remove_old = true; /* new dominates old */ } else if (keyscmp == PATHKEYS_BETTER2) { @@ -492,7 +492,7 @@ add_path(RelOptInfo *parent_rel, Path *new_path) outercmp == BMS_SUBSET2) && new_path->rows >= old_path->rows && new_path->parallel_safe <= old_path->parallel_safe) - accept_new = false; /* old dominates new */ + accept_new = false; /* old dominates new */ } else /* keyscmp == PATHKEYS_EQUAL */ { @@ -534,11 +534,11 @@ add_path(RelOptInfo *parent_rel, Path *new_path) else if (outercmp == BMS_SUBSET1 && new_path->rows <= old_path->rows && new_path->parallel_safe >= old_path->parallel_safe) - remove_old = true; /* new dominates old */ + remove_old = true; /* new dominates old */ else if (outercmp == BMS_SUBSET2 && new_path->rows >= old_path->rows && new_path->parallel_safe <= old_path->parallel_safe) - accept_new = false; /* old dominates new */ + accept_new = false; /* old dominates new */ /* else different parameterizations, keep both */ } break; @@ -551,7 +551,7 @@ add_path(RelOptInfo *parent_rel, Path *new_path) outercmp == BMS_SUBSET1) && new_path->rows <= old_path->rows && new_path->parallel_safe >= old_path->parallel_safe) - remove_old = true; /* new dominates old */ + remove_old = true; /* new dominates old */ } break; case COSTS_BETTER2: @@ -563,7 +563,7 @@ add_path(RelOptInfo *parent_rel, Path *new_path) outercmp == BMS_SUBSET2) && new_path->rows >= old_path->rows && new_path->parallel_safe <= old_path->parallel_safe) - accept_new = false; /* old dominates new */ + accept_new = false; /* old dominates new */ } break; case COSTS_DIFFERENT: @@ -751,7 +751,7 @@ add_path_precheck(RelOptInfo *parent_rel, void add_partial_path(RelOptInfo *parent_rel, Path *new_path) { - bool accept_new = true; /* unless we find a superior old path */ + bool accept_new = true; /* unless we find a superior old path */ ListCell *insert_after = NULL; /* where to insert new item */ ListCell *p1; ListCell *p1_prev; @@ -1081,7 +1081,7 @@ create_bitmap_heap_path(PlannerInfo *root, pathnode->path.parallel_aware = parallel_degree > 0 ? true : false; pathnode->path.parallel_safe = rel->consider_parallel; pathnode->path.parallel_workers = parallel_degree; - pathnode->path.pathkeys = NIL; /* always unordered */ + pathnode->path.pathkeys = NIL; /* always unordered */ pathnode->bitmapqual = bitmapqual; @@ -1118,7 +1118,7 @@ create_bitmap_and_path(PlannerInfo *root, pathnode->path.parallel_safe = rel->consider_parallel; pathnode->path.parallel_workers = 0; - pathnode->path.pathkeys = NIL; /* always unordered */ + pathnode->path.pathkeys = NIL; /* always unordered */ pathnode->bitmapquals = bitmapquals; @@ -1154,7 +1154,7 @@ create_bitmap_or_path(PlannerInfo *root, pathnode->path.parallel_safe = rel->consider_parallel; pathnode->path.parallel_workers = 0; - pathnode->path.pathkeys = NIL; /* always unordered */ + pathnode->path.pathkeys = NIL; /* always unordered */ pathnode->bitmapquals = bitmapquals; @@ -1182,7 +1182,7 @@ create_tidscan_path(PlannerInfo *root, RelOptInfo *rel, List *tidquals, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel; pathnode->path.parallel_workers = 0; - pathnode->path.pathkeys = NIL; /* always unordered */ + pathnode->path.pathkeys = NIL; /* always unordered */ pathnode->tidquals = tidquals; @@ -1214,8 +1214,7 @@ create_append_path(RelOptInfo *rel, List *subpaths, Relids required_outer, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = rel->consider_parallel; pathnode->path.parallel_workers = parallel_workers; - pathnode->path.pathkeys = NIL; /* result is always considered - * unsorted */ + pathnode->path.pathkeys = NIL; /* result is always considered unsorted */ pathnode->partitioned_rels = list_copy(partitioned_rels); pathnode->subpaths = subpaths; @@ -1311,7 +1310,7 @@ create_merge_append_path(PlannerInfo *root, else { /* We'll need to insert a Sort node, so include cost for that */ - Path sort_path; /* dummy for result of cost_sort */ + Path sort_path; /* dummy for result of cost_sort */ cost_sort(&sort_path, root, @@ -1743,7 +1742,7 @@ create_gather_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath, pathnode->path.parallel_aware = false; pathnode->path.parallel_safe = false; pathnode->path.parallel_workers = 0; - pathnode->path.pathkeys = NIL; /* Gather has unordered result */ + pathnode->path.pathkeys = NIL; /* Gather has unordered result */ pathnode->subpath = subpath; pathnode->num_workers = subpath->parallel_workers; @@ -2818,8 +2817,8 @@ create_groupingsets_path(PlannerInfo *root, } else { - Path sort_path; /* dummy for result of cost_sort */ - Path agg_path; /* dummy for result of cost_agg */ + Path sort_path; /* dummy for result of cost_sort */ + Path agg_path; /* dummy for result of cost_agg */ if (rollup->is_hashed || is_first_sort) { diff --git a/src/backend/optimizer/util/placeholder.c b/src/backend/optimizer/util/placeholder.c index 698a387ac2..970542dde5 100644 --- a/src/backend/optimizer/util/placeholder.c +++ b/src/backend/optimizer/util/placeholder.c @@ -101,7 +101,7 @@ find_placeholder_info(PlannerInfo *root, PlaceHolderVar *phv, rels_used = pull_varnos((Node *) phv->phexpr); phinfo->ph_lateral = bms_difference(rels_used, phv->phrels); if (bms_is_empty(phinfo->ph_lateral)) - phinfo->ph_lateral = NULL; /* make it exactly NULL if empty */ + phinfo->ph_lateral = NULL; /* make it exactly NULL if empty */ phinfo->ph_eval_at = bms_int_members(rels_used, phv->phrels); /* If no contained vars, force evaluation at syntactic location */ if (bms_is_empty(phinfo->ph_eval_at)) diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index 939045dc41..9dc35c1aef 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -354,8 +354,8 @@ get_relation_info(PlannerInfo *root, Oid relationObjectId, bool inhparent, /* Build targetlist using the completed indexprs data */ info->indextlist = build_index_tlist(root, info, relation); - info->indrestrictinfo = NIL; /* set later, in indxpath.c */ - info->predOK = false; /* set later, in indxpath.c */ + info->indrestrictinfo = NIL; /* set later, in indxpath.c */ + info->predOK = false; /* set later, in indxpath.c */ info->unique = index->indisunique; info->immediate = index->indimmediate; info->hypothetical = false; @@ -827,7 +827,7 @@ infer_collation_opclass_match(InferenceElem *elem, Relation idxRel, List *idxExprs) { AttrNumber natt; - Oid inferopfamily = InvalidOid; /* OID of opclass opfamily */ + Oid inferopfamily = InvalidOid; /* OID of opclass opfamily */ Oid inferopcinputtype = InvalidOid; /* OID of opclass input type */ int nplain = 0; /* # plain attrs observed */ diff --git a/src/backend/optimizer/util/predtest.c b/src/backend/optimizer/util/predtest.c index 72d70d52d1..536d24b698 100644 --- a/src/backend/optimizer/util/predtest.c +++ b/src/backend/optimizer/util/predtest.c @@ -382,7 +382,7 @@ predicate_implied_by_recurse(Node *clause, Node *predicate, iterate_end(pred_info); if (!presult) { - result = false; /* doesn't imply any of B's */ + result = false; /* doesn't imply any of B's */ break; } } @@ -650,7 +650,7 @@ predicate_refuted_by_recurse(Node *clause, Node *predicate, iterate_end(pred_info); if (!presult) { - result = false; /* citem refutes nothing */ + result = false; /* citem refutes nothing */ break; } } @@ -1360,12 +1360,12 @@ static const bool BT_implies_table[6][6] = { * The predicate operator: * LT LE EQ GE GT NE */ - {TRUE, TRUE, none, none, none, TRUE}, /* LT */ - {none, TRUE, none, none, none, none}, /* LE */ - {none, TRUE, TRUE, TRUE, none, none}, /* EQ */ - {none, none, none, TRUE, none, none}, /* GE */ - {none, none, none, TRUE, TRUE, TRUE}, /* GT */ - {none, none, none, none, none, TRUE} /* NE */ + {TRUE, TRUE, none, none, none, TRUE}, /* LT */ + {none, TRUE, none, none, none, none}, /* LE */ + {none, TRUE, TRUE, TRUE, none, none}, /* EQ */ + {none, none, none, TRUE, none, none}, /* GE */ + {none, none, none, TRUE, TRUE, TRUE}, /* GT */ + {none, none, none, none, none, TRUE} /* NE */ }; static const bool BT_refutes_table[6][6] = { @@ -1373,12 +1373,12 @@ static const bool BT_refutes_table[6][6] = { * The predicate operator: * LT LE EQ GE GT NE */ - {none, none, TRUE, TRUE, TRUE, none}, /* LT */ - {none, none, none, none, TRUE, none}, /* LE */ - {TRUE, none, none, none, TRUE, TRUE}, /* EQ */ - {TRUE, none, none, none, none, none}, /* GE */ - {TRUE, TRUE, TRUE, none, none, none}, /* GT */ - {none, none, TRUE, none, none, none} /* NE */ + {none, none, TRUE, TRUE, TRUE, none}, /* LT */ + {none, none, none, none, TRUE, none}, /* LE */ + {TRUE, none, none, none, TRUE, TRUE}, /* EQ */ + {TRUE, none, none, none, none, none}, /* GE */ + {TRUE, TRUE, TRUE, none, none, none}, /* GT */ + {none, none, TRUE, none, none, none} /* NE */ }; static const StrategyNumber BT_implic_table[6][6] = { @@ -1386,12 +1386,12 @@ static const StrategyNumber BT_implic_table[6][6] = { * The predicate operator: * LT LE EQ GE GT NE */ - {BTGE, BTGE, none, none, none, BTGE}, /* LT */ - {BTGT, BTGE, none, none, none, BTGT}, /* LE */ - {BTGT, BTGE, BTEQ, BTLE, BTLT, BTNE}, /* EQ */ - {none, none, none, BTLE, BTLT, BTLT}, /* GE */ - {none, none, none, BTLE, BTLE, BTLE}, /* GT */ - {none, none, none, none, none, BTEQ} /* NE */ + {BTGE, BTGE, none, none, none, BTGE}, /* LT */ + {BTGT, BTGE, none, none, none, BTGT}, /* LE */ + {BTGT, BTGE, BTEQ, BTLE, BTLT, BTNE}, /* EQ */ + {none, none, none, BTLE, BTLT, BTLT}, /* GE */ + {none, none, none, BTLE, BTLE, BTLE}, /* GT */ + {none, none, none, none, none, BTEQ} /* NE */ }; static const StrategyNumber BT_refute_table[6][6] = { @@ -1399,12 +1399,12 @@ static const StrategyNumber BT_refute_table[6][6] = { * The predicate operator: * LT LE EQ GE GT NE */ - {none, none, BTGE, BTGE, BTGE, none}, /* LT */ - {none, none, BTGT, BTGT, BTGE, none}, /* LE */ - {BTLE, BTLT, BTNE, BTGT, BTGE, BTEQ}, /* EQ */ - {BTLE, BTLT, BTLT, none, none, none}, /* GE */ - {BTLE, BTLE, BTLE, none, none, none}, /* GT */ - {none, none, BTEQ, none, none, none} /* NE */ + {none, none, BTGE, BTGE, BTGE, none}, /* LT */ + {none, none, BTGT, BTGT, BTGE, none}, /* LE */ + {BTLE, BTLT, BTNE, BTGT, BTGE, BTEQ}, /* EQ */ + {BTLE, BTLT, BTLT, none, none, none}, /* GE */ + {BTLE, BTLE, BTLE, none, none, none}, /* GT */ + {none, none, BTEQ, none, none, none} /* NE */ }; diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c index 76a3868fa0..22f5ddac58 100644 --- a/src/backend/optimizer/util/relnode.c +++ b/src/backend/optimizer/util/relnode.c @@ -108,8 +108,8 @@ build_simple_rel(PlannerInfo *root, int relid, RelOptInfo *parent) rel->rows = 0; /* cheap startup cost is interesting iff not all tuples to be retrieved */ rel->consider_startup = (root->tuple_fraction > 0); - rel->consider_param_startup = false; /* might get changed later */ - rel->consider_parallel = false; /* might get changed later */ + rel->consider_param_startup = false; /* might get changed later */ + rel->consider_parallel = false; /* might get changed later */ rel->reltarget = create_empty_pathtarget(); rel->pathlist = NIL; rel->ppilist = NIL; @@ -132,7 +132,7 @@ build_simple_rel(PlannerInfo *root, int relid, RelOptInfo *parent) rel->allvisfrac = 0; rel->subroot = NULL; rel->subplan_params = NIL; - rel->rel_parallel_workers = -1; /* set up in get_relation_info */ + rel->rel_parallel_workers = -1; /* set up in get_relation_info */ rel->serverid = InvalidOid; rel->userid = rte->checkAsUser; rel->useridiscurrent = false; @@ -944,7 +944,7 @@ fetch_upper_rel(PlannerInfo *root, UpperRelationKind kind, Relids relids) /* cheap startup cost is interesting iff not all tuples to be retrieved */ upperrel->consider_startup = (root->tuple_fraction > 0); upperrel->consider_param_startup = false; - upperrel->consider_parallel = false; /* might get changed later */ + upperrel->consider_parallel = false; /* might get changed later */ upperrel->reltarget = create_empty_pathtarget(); upperrel->pathlist = NIL; upperrel->cheapest_startup_path = NULL; diff --git a/src/backend/optimizer/util/restrictinfo.c b/src/backend/optimizer/util/restrictinfo.c index e946290af5..ebae0cd8ce 100644 --- a/src/backend/optimizer/util/restrictinfo.c +++ b/src/backend/optimizer/util/restrictinfo.c @@ -114,7 +114,7 @@ make_restrictinfo_internal(Expr *clause, restrictinfo->is_pushed_down = is_pushed_down; restrictinfo->outerjoin_delayed = outerjoin_delayed; restrictinfo->pseudoconstant = pseudoconstant; - restrictinfo->can_join = false; /* may get set below */ + restrictinfo->can_join = false; /* may get set below */ restrictinfo->security_level = security_level; restrictinfo->outer_relids = outer_relids; restrictinfo->nullable_relids = nullable_relids; @@ -127,7 +127,7 @@ make_restrictinfo_internal(Expr *clause, if (security_level > 0) restrictinfo->leakproof = !contain_leaked_vars((Node *) clause); else - restrictinfo->leakproof = false; /* really, "don't know" */ + restrictinfo->leakproof = false; /* really, "don't know" */ /* * If it's a binary opclause, set up left/right relids info. In any case diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c index 09523853d0..9345891380 100644 --- a/src/backend/optimizer/util/tlist.c +++ b/src/backend/optimizer/util/tlist.c @@ -28,12 +28,12 @@ /* Workspace for split_pathtarget_walker */ typedef struct { - List *input_target_exprs; /* exprs available from input */ + List *input_target_exprs; /* exprs available from input */ List *level_srfs; /* list of lists of SRF exprs */ - List *level_input_vars; /* vars needed by SRFs of each level */ - List *level_input_srfs; /* SRFs needed by SRFs of each level */ - List *current_input_vars; /* vars needed in current subexpr */ - List *current_input_srfs; /* SRFs needed in current subexpr */ + List *level_input_vars; /* vars needed by SRFs of each level */ + List *level_input_srfs; /* SRFs needed by SRFs of each level */ + List *current_input_vars; /* vars needed in current subexpr */ + List *current_input_srfs; /* SRFs needed in current subexpr */ int current_depth; /* max SRF depth in current subexpr */ } split_pathtarget_context; @@ -145,7 +145,7 @@ add_to_flat_tlist(List *tlist, List *exprs) { TargetEntry *tle; - tle = makeTargetEntry(copyObject(expr), /* copy needed?? */ + tle = makeTargetEntry(copyObject(expr), /* copy needed?? */ next_resno++, NULL, false); diff --git a/src/backend/optimizer/util/var.c b/src/backend/optimizer/util/var.c index cf326ae003..45fa22f918 100644 --- a/src/backend/optimizer/util/var.c +++ b/src/backend/optimizer/util/var.c @@ -62,8 +62,8 @@ typedef struct { PlannerInfo *root; int sublevels_up; - bool possible_sublink; /* could aliases include a SubLink? */ - bool inserted_sublink; /* have we inserted a SubLink? */ + bool possible_sublink; /* could aliases include a SubLink? */ + bool inserted_sublink; /* have we inserted a SubLink? */ } flatten_join_alias_vars_context; static bool pull_varnos_walker(Node *node, diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 86482eba26..3e2f64866d 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -268,7 +268,7 @@ transformStmt(ParseState *pstate, Node *parseTree) default: break; } -#endif /* RAW_EXPRESSION_COVERAGE_TEST */ +#endif /* RAW_EXPRESSION_COVERAGE_TEST */ switch (nodeTag(parseTree)) { @@ -2103,7 +2103,7 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt, grpcl->tleSortGroupRef = 0; grpcl->eqop = eqop; grpcl->sortop = sortop; - grpcl->nulls_first = false; /* OK with or without sortop */ + grpcl->nulls_first = false; /* OK with or without sortop */ grpcl->hashable = hashable; op->groupClauses = lappend(op->groupClauses, grpcl); @@ -2124,7 +2124,7 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt, rescolnode->collation = rescolcoll; rescolnode->location = bestlocation; restle = makeTargetEntry((Expr *) rescolnode, - 0, /* no need to set resno */ + 0, /* no need to set resno */ NULL, false); *targetlist = lappend(*targetlist, restle); @@ -2605,7 +2605,7 @@ LCS_asString(LockClauseStrength strength) void CheckSelectLocking(Query *qry, LockClauseStrength strength) { - Assert(strength != LCS_NONE); /* else caller error */ + Assert(strength != LCS_NONE); /* else caller error */ if (qry->setOperations) ereport(ERROR, @@ -2844,7 +2844,7 @@ applyLockingClause(Query *qry, Index rtindex, { RowMarkClause *rc; - Assert(strength != LCS_NONE); /* else caller error */ + Assert(strength != LCS_NONE); /* else caller error */ /* If it's an explicit clause, make sure hasForUpdate gets set */ if (!pushedDown) @@ -2907,4 +2907,4 @@ test_raw_expression_coverage(Node *node, void *context) context); } -#endif /* RAW_EXPRESSION_COVERAGE_TEST */ +#endif /* RAW_EXPRESSION_COVERAGE_TEST */ diff --git a/src/backend/parser/parse_agg.c b/src/backend/parser/parse_agg.c index 6218ee94fa..9f721f80a8 100644 --- a/src/backend/parser/parse_agg.c +++ b/src/backend/parser/parse_agg.c @@ -1310,7 +1310,7 @@ check_ungrouped_columns_walker(Node *node, gvar->varno == var->varno && gvar->varattno == var->varattno && gvar->varlevelsup == 0) - return false; /* acceptable, we're okay */ + return false; /* acceptable, we're okay */ } } diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index 3d5b20836f..ad76108ba6 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -1323,7 +1323,7 @@ transformFromClauseItem(ParseState *pstate, Node *n, ListCell *lx, *rx; - Assert(j->usingClause == NIL); /* shouldn't have USING() too */ + Assert(j->usingClause == NIL); /* shouldn't have USING() too */ foreach(lx, l_colnames) { @@ -3389,7 +3389,7 @@ addTargetToGroupList(ParseState *pstate, TargetEntry *tle, grpcl->tleSortGroupRef = assignSortGroupRef(tle, targetlist); grpcl->eqop = eqop; grpcl->sortop = sortop; - grpcl->nulls_first = false; /* OK with or without sortop */ + grpcl->nulls_first = false; /* OK with or without sortop */ grpcl->hashable = hashable; grouplist = lappend(grouplist, grpcl); diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c index 2c3f3cd9ce..aa6a16185f 100644 --- a/src/backend/parser/parse_coerce.c +++ b/src/backend/parser/parse_coerce.c @@ -549,7 +549,7 @@ can_coerce_type(int nargs, Oid *input_typeids, Oid *target_typeids, /* accept if target is polymorphic, for now */ if (IsPolymorphicType(targetTypeId)) { - have_generics = true; /* do more checking later */ + have_generics = true; /* do more checking later */ continue; } @@ -1443,7 +1443,7 @@ check_generic_type_consistency(Oid *actual_arg_types, { if (actual_type == UNKNOWNOID) continue; - actual_type = getBaseType(actual_type); /* flatten domains */ + actual_type = getBaseType(actual_type); /* flatten domains */ if (OidIsValid(array_typeid) && actual_type != array_typeid) return false; array_typeid = actual_type; @@ -1452,7 +1452,7 @@ check_generic_type_consistency(Oid *actual_arg_types, { if (actual_type == UNKNOWNOID) continue; - actual_type = getBaseType(actual_type); /* flatten domains */ + actual_type = getBaseType(actual_type); /* flatten domains */ if (OidIsValid(range_typeid) && actual_type != range_typeid) return false; range_typeid = actual_type; @@ -1662,7 +1662,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, } if (allow_poly && decl_type == actual_type) continue; /* no new information here */ - actual_type = getBaseType(actual_type); /* flatten domains */ + actual_type = getBaseType(actual_type); /* flatten domains */ if (OidIsValid(array_typeid) && actual_type != array_typeid) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), @@ -1682,7 +1682,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, } if (allow_poly && decl_type == actual_type) continue; /* no new information here */ - actual_type = getBaseType(actual_type); /* flatten domains */ + actual_type = getBaseType(actual_type); /* flatten domains */ if (OidIsValid(range_typeid) && actual_type != range_typeid) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), diff --git a/src/backend/parser/parse_collate.c b/src/backend/parser/parse_collate.c index aa443f23ad..d99e4cc0f4 100644 --- a/src/backend/parser/parse_collate.c +++ b/src/backend/parser/parse_collate.c @@ -332,7 +332,7 @@ assign_collations_walker(Node *node, assign_collations_context *context) /* Node's result type isn't collatable. */ collation = InvalidOid; strength = COLLATE_NONE; - location = -1; /* won't be used */ + location = -1; /* won't be used */ } } break; @@ -428,7 +428,7 @@ assign_collations_walker(Node *node, assign_collations_context *context) /* Node's result type isn't collatable. */ collation = InvalidOid; strength = COLLATE_NONE; - location = -1; /* won't be used */ + location = -1; /* won't be used */ } /* @@ -711,7 +711,7 @@ assign_collations_walker(Node *node, assign_collations_context *context) /* Node's result type isn't collatable. */ collation = InvalidOid; strength = COLLATE_NONE; - location = -1; /* won't be used */ + location = -1; /* won't be used */ } /* diff --git a/src/backend/parser/parse_cte.c b/src/backend/parser/parse_cte.c index dfbcaa2cdc..dbe4cc2393 100644 --- a/src/backend/parser/parse_cte.c +++ b/src/backend/parser/parse_cte.c @@ -331,7 +331,7 @@ analyzeCTE(ParseState *pstate, CommonTableExpr *cte) lctypmod = lnext(lctypmod); lccoll = lnext(lccoll); } - if (lctyp != NULL || lctypmod != NULL || lccoll != NULL) /* shouldn't happen */ + if (lctyp != NULL || lctypmod != NULL || lccoll != NULL) /* shouldn't happen */ elog(ERROR, "wrong number of output columns in WITH"); } } @@ -637,7 +637,7 @@ checkWellFormedRecursion(CteState *cstate) CommonTableExpr *cte = cstate->items[i].cte; SelectStmt *stmt = (SelectStmt *) cte->ctequery; - Assert(!IsA(stmt, Query)); /* not analyzed yet */ + Assert(!IsA(stmt, Query)); /* not analyzed yet */ /* Ignore items that weren't found to be recursive */ if (!cte->cterecursive) diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index e46aa60097..3a9cdb4208 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -48,20 +48,20 @@ bool Transform_null_equals = false; * Node-type groups for operator precedence warnings * We use zero for everything not otherwise classified */ -#define PREC_GROUP_POSTFIX_IS 1 /* postfix IS tests (NullTest, etc) */ -#define PREC_GROUP_INFIX_IS 2 /* infix IS (IS DISTINCT FROM, etc) */ -#define PREC_GROUP_LESS 3 /* < > */ -#define PREC_GROUP_EQUAL 4 /* = */ -#define PREC_GROUP_LESS_EQUAL 5 /* <= >= <> */ -#define PREC_GROUP_LIKE 6 /* LIKE ILIKE SIMILAR */ -#define PREC_GROUP_BETWEEN 7 /* BETWEEN */ -#define PREC_GROUP_IN 8 /* IN */ -#define PREC_GROUP_NOT_LIKE 9 /* NOT LIKE/ILIKE/SIMILAR */ -#define PREC_GROUP_NOT_BETWEEN 10 /* NOT BETWEEN */ -#define PREC_GROUP_NOT_IN 11 /* NOT IN */ -#define PREC_GROUP_POSTFIX_OP 12 /* generic postfix operators */ -#define PREC_GROUP_INFIX_OP 13 /* generic infix operators */ -#define PREC_GROUP_PREFIX_OP 14 /* generic prefix operators */ +#define PREC_GROUP_POSTFIX_IS 1 /* postfix IS tests (NullTest, etc) */ +#define PREC_GROUP_INFIX_IS 2 /* infix IS (IS DISTINCT FROM, etc) */ +#define PREC_GROUP_LESS 3 /* < > */ +#define PREC_GROUP_EQUAL 4 /* = */ +#define PREC_GROUP_LESS_EQUAL 5 /* <= >= <> */ +#define PREC_GROUP_LIKE 6 /* LIKE ILIKE SIMILAR */ +#define PREC_GROUP_BETWEEN 7 /* BETWEEN */ +#define PREC_GROUP_IN 8 /* IN */ +#define PREC_GROUP_NOT_LIKE 9 /* NOT LIKE/ILIKE/SIMILAR */ +#define PREC_GROUP_NOT_BETWEEN 10 /* NOT BETWEEN */ +#define PREC_GROUP_NOT_IN 11 /* NOT IN */ +#define PREC_GROUP_POSTFIX_OP 12 /* generic postfix operators */ +#define PREC_GROUP_INFIX_OP 13 /* generic infix operators */ +#define PREC_GROUP_PREFIX_OP 14 /* generic prefix operators */ /* * Map precedence groupings to old precedence ordering @@ -741,7 +741,7 @@ transformColumnRef(ParseState *pstate, ColumnRef *cref) break; } default: - crerr = CRERR_TOO_MANY; /* too many dotted names */ + crerr = CRERR_TOO_MANY; /* too many dotted names */ break; } @@ -2574,7 +2574,7 @@ transformCurrentOfExpr(ParseState *pstate, CurrentOfExpr *cexpr) * If so, replace the raw name reference with a parameter reference. (This * is a hack for the convenience of plpgsql.) */ - if (cexpr->cursor_name != NULL) /* in case already transformed */ + if (cexpr->cursor_name != NULL) /* in case already transformed */ { ColumnRef *cref = makeNode(ColumnRef); Node *node = NULL; diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c index eb1706a4a6..38a73ba122 100644 --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@ -317,7 +317,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, int catDirectArgs; tup = SearchSysCache1(AGGFNOID, ObjectIdGetDatum(funcid)); - if (!HeapTupleIsValid(tup)) /* should not happen */ + if (!HeapTupleIsValid(tup)) /* should not happen */ elog(ERROR, "cache lookup failed for aggregate %u", funcid); classForm = (Form_pg_aggregate) GETSTRUCT(tup); aggkind = classForm->aggkind; @@ -658,7 +658,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, aggref->aggfnoid = funcid; aggref->aggtype = rettype; /* aggcollid and inputcollid will be set by parse_collate.c */ - aggref->aggtranstype = InvalidOid; /* will be set by planner */ + aggref->aggtranstype = InvalidOid; /* will be set by planner */ /* aggargtypes will be set by transformAggregateCall */ /* aggdirectargs and args will be set by transformAggregateCall */ /* aggorder and aggdistinct will be set by transformAggregateCall */ @@ -667,7 +667,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, aggref->aggvariadic = func_variadic; aggref->aggkind = aggkind; /* agglevelsup will be set by transformAggregateCall */ - aggref->aggsplit = AGGSPLIT_SIMPLE; /* planner might change this */ + aggref->aggsplit = AGGSPLIT_SIMPLE; /* planner might change this */ aggref->location = location; /* @@ -713,7 +713,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, WindowFunc *wfunc = makeNode(WindowFunc); Assert(over); /* lack of this was checked above */ - Assert(!agg_within_group); /* also checked above */ + Assert(!agg_within_group); /* also checked above */ wfunc->winfnoid = funcid; wfunc->wintype = rettype; @@ -811,7 +811,7 @@ int func_match_argtypes(int nargs, Oid *input_typeids, FuncCandidateList raw_candidates, - FuncCandidateList *candidates) /* return value */ + FuncCandidateList *candidates) /* return value */ { FuncCandidateList current_candidate; FuncCandidateList next_candidate; @@ -1077,7 +1077,7 @@ func_select_candidate(int nargs, if (input_base_typeids[i] != UNKNOWNOID) continue; - resolved_unknowns = true; /* assume we can do it */ + resolved_unknowns = true; /* assume we can do it */ slot_category[i] = TYPCATEGORY_INVALID; slot_has_preferred_type[i] = false; have_conflict = false; @@ -1205,7 +1205,7 @@ func_select_candidate(int nargs, { if (input_base_typeids[i] == UNKNOWNOID) continue; - if (known_type == UNKNOWNOID) /* first known arg? */ + if (known_type == UNKNOWNOID) /* first known arg? */ known_type = input_base_typeids[i]; else if (known_type != input_base_typeids[i]) { @@ -1292,8 +1292,8 @@ func_get_detail(List *funcname, bool *retset, /* return value */ int *nvargs, /* return value */ Oid *vatype, /* return value */ - Oid **true_typeids, /* return value */ - List **argdefaults) /* optional return value */ + Oid **true_typeids, /* return value */ + List **argdefaults) /* optional return value */ { FuncCandidateList raw_candidates; FuncCandidateList best_candidate; diff --git a/src/backend/parser/parse_node.c b/src/backend/parser/parse_node.c index fb3d117a7d..f3edc6396a 100644 --- a/src/backend/parser/parse_node.c +++ b/src/backend/parser/parse_node.c @@ -367,7 +367,7 @@ transformArraySubscripts(ParseState *pstate, sizeof(int32), Int32GetDatum(1), false, - true); /* pass by value */ + true); /* pass by value */ } else { @@ -511,7 +511,7 @@ make_const(ParseState *pstate, Value *value, int location) typeid = INT8OID; typelen = sizeof(int64); - typebyval = FLOAT8PASSBYVAL; /* int8 and float8 alike */ + typebyval = FLOAT8PASSBYVAL; /* int8 and float8 alike */ } } else diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c index 4b1db76e19..529d2bf3af 100644 --- a/src/backend/parser/parse_oper.c +++ b/src/backend/parser/parse_oper.c @@ -319,7 +319,7 @@ static FuncDetailCode oper_select_candidate(int nargs, Oid *input_typeids, FuncCandidateList candidates, - Oid *operOid) /* output argument */ + Oid *operOid) /* output argument */ { int ncandidates; diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index e412d0f9d3..84a1d79c6e 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -1249,7 +1249,7 @@ addRangeTableEntry(ParseState *pstate, rte->inFromCl = inFromCl; rte->requiredPerms = ACL_SELECT; - rte->checkAsUser = InvalidOid; /* not set-uid by default, either */ + rte->checkAsUser = InvalidOid; /* not set-uid by default, either */ rte->selectedCols = NULL; rte->insertedCols = NULL; rte->updatedCols = NULL; @@ -1304,7 +1304,7 @@ addRangeTableEntryForRelation(ParseState *pstate, rte->inFromCl = inFromCl; rte->requiredPerms = ACL_SELECT; - rte->checkAsUser = InvalidOid; /* not set-uid by default, either */ + rte->checkAsUser = InvalidOid; /* not set-uid by default, either */ rte->selectedCols = NULL; rte->insertedCols = NULL; rte->updatedCols = NULL; @@ -1471,7 +1471,7 @@ addRangeTableEntryForFunction(ParseState *pstate, rtfunc->funccoltypes = NIL; rtfunc->funccoltypmods = NIL; rtfunc->funccolcollations = NIL; - rtfunc->funcparams = NULL; /* not set until planning */ + rtfunc->funcparams = NULL; /* not set until planning */ /* * Now determine if the function returns a simple or composite type. @@ -2615,7 +2615,7 @@ expandRelAttrs(ParseState *pstate, RangeTblEntry *rte, markVarForSelectPriv(pstate, varnode, rte); } - Assert(name == NULL && var == NULL); /* lists not the same length? */ + Assert(name == NULL && var == NULL); /* lists not the same length? */ return te_list; } @@ -2684,7 +2684,7 @@ get_rte_attribute_type(RangeTblEntry *rte, AttrNumber attnum, tp = SearchSysCache2(ATTNUM, ObjectIdGetDatum(rte->relid), Int16GetDatum(attnum)); - if (!HeapTupleIsValid(tp)) /* shouldn't happen */ + if (!HeapTupleIsValid(tp)) /* shouldn't happen */ elog(ERROR, "cache lookup failed for attribute %d of relation %u", attnum, rte->relid); att_tup = (Form_pg_attribute) GETSTRUCT(tp); @@ -2868,7 +2868,7 @@ get_rte_attribute_is_dropped(RangeTblEntry *rte, AttrNumber attnum) tp = SearchSysCache2(ATTNUM, ObjectIdGetDatum(rte->relid), Int16GetDatum(attnum)); - if (!HeapTupleIsValid(tp)) /* shouldn't happen */ + if (!HeapTupleIsValid(tp)) /* shouldn't happen */ elog(ERROR, "cache lookup failed for attribute %d of relation %u", attnum, rte->relid); att_tup = (Form_pg_attribute) GETSTRUCT(tp); diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 6bc9c531c7..30e7caeb62 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -91,7 +91,7 @@ typedef struct * the table */ IndexStmt *pkey; /* PRIMARY KEY index, if any */ bool ispartitioned; /* true if table is partitioned */ - PartitionBoundSpec *partbound; /* transformed FOR VALUES */ + PartitionBoundSpec *partbound; /* transformed FOR VALUES */ } CreateStmtContext; /* State shared by transformCreateSchemaStmt and its subroutines */ @@ -1213,7 +1213,7 @@ transformOfType(CreateStmtContext *cxt, TypeName *ofTypename) tuple = typenameType(NULL, ofTypename, NULL); check_of_type(tuple); ofTypeId = HeapTupleGetOid(tuple); - ofTypename->typeOid = ofTypeId; /* cached for later */ + ofTypename->typeOid = ofTypeId; /* cached for later */ tupdesc = lookup_rowtype_tupdesc(ofTypeId, -1); for (i = 0; i < tupdesc->natts; i++) @@ -2403,7 +2403,7 @@ transformRuleStmt(RuleStmt *stmt, const char *queryString, assign_expr_collations(pstate, *whereClause); /* this is probably dead code without add_missing_from: */ - if (list_length(pstate->p_rtable) != 2) /* naughty, naughty... */ + if (list_length(pstate->p_rtable) != 2) /* naughty, naughty... */ ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), errmsg("rule WHERE condition cannot contain references to other relations"))); @@ -2420,7 +2420,7 @@ transformRuleStmt(RuleStmt *stmt, const char *queryString, nothing_qry->commandType = CMD_NOTHING; nothing_qry->rtable = pstate->p_rtable; - nothing_qry->jointree = makeFromExpr(NIL, NULL); /* no join wanted */ + nothing_qry->jointree = makeFromExpr(NIL, NULL); /* no join wanted */ *actions = list_make1(nothing_qry); } diff --git a/src/backend/port/atomics.c b/src/backend/port/atomics.c index 231d847de7..c0c2b31270 100644 --- a/src/backend/port/atomics.c +++ b/src/backend/port/atomics.c @@ -82,7 +82,7 @@ pg_atomic_clear_flag_impl(volatile pg_atomic_flag *ptr) S_UNLOCK((slock_t *) &ptr->sema); } -#endif /* PG_HAVE_ATOMIC_FLAG_SIMULATION */ +#endif /* PG_HAVE_ATOMIC_FLAG_SIMULATION */ #ifdef PG_HAVE_ATOMIC_U32_SIMULATION void @@ -156,7 +156,7 @@ pg_atomic_fetch_add_u32_impl(volatile pg_atomic_uint32 *ptr, int32 add_) return oldval; } -#endif /* PG_HAVE_ATOMIC_U32_SIMULATION */ +#endif /* PG_HAVE_ATOMIC_U32_SIMULATION */ #ifdef PG_HAVE_ATOMIC_U64_SIMULATION @@ -219,4 +219,4 @@ pg_atomic_fetch_add_u64_impl(volatile pg_atomic_uint64 *ptr, int64 add_) return oldval; } -#endif /* PG_HAVE_ATOMIC_U64_SIMULATION */ +#endif /* PG_HAVE_ATOMIC_U64_SIMULATION */ diff --git a/src/backend/port/dynloader/aix.h b/src/backend/port/dynloader/aix.h index 321597dae2..4b1bad6e45 100644 --- a/src/backend/port/dynloader/aix.h +++ b/src/backend/port/dynloader/aix.h @@ -16,7 +16,7 @@ #define PORT_PROTOS_H #include -#include "utils/dynamic_loader.h" /* pgrminclude ignore */ +#include "utils/dynamic_loader.h" /* pgrminclude ignore */ /* * In some older systems, the RTLD_NOW flag isn't defined and the mode @@ -36,4 +36,4 @@ #define pg_dlclose(h) dlclose(h) #define pg_dlerror() dlerror() -#endif /* PORT_PROTOS_H */ +#endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/dynloader/cygwin.h b/src/backend/port/dynloader/cygwin.h index bb3d7a322a..5d819cfd7b 100644 --- a/src/backend/port/dynloader/cygwin.h +++ b/src/backend/port/dynloader/cygwin.h @@ -13,7 +13,7 @@ #define PORT_PROTOS_H #include -#include "utils/dynamic_loader.h" /* pgrminclude ignore */ +#include "utils/dynamic_loader.h" /* pgrminclude ignore */ /* * In some older systems, the RTLD_NOW flag isn't defined and the mode @@ -33,4 +33,4 @@ #define pg_dlclose dlclose #define pg_dlerror dlerror -#endif /* PORT_PROTOS_H */ +#endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/dynloader/darwin.c b/src/backend/port/dynloader/darwin.c index 7b6b48d14a..f8fdeaf122 100644 --- a/src/backend/port/dynloader/darwin.c +++ b/src/backend/port/dynloader/darwin.c @@ -135,4 +135,4 @@ pg_dlerror(void) return (char *) errorString; } -#endif /* HAVE_DLOPEN */ +#endif /* HAVE_DLOPEN */ diff --git a/src/backend/port/dynloader/freebsd.c b/src/backend/port/dynloader/freebsd.c index e61b1c241a..23547b06bb 100644 --- a/src/backend/port/dynloader/freebsd.c +++ b/src/backend/port/dynloader/freebsd.c @@ -32,7 +32,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91"; -#endif /* LIBC_SCCS and not lint */ +#endif /* LIBC_SCCS and not lint */ #include "postgres.h" @@ -89,7 +89,7 @@ BSD44_derived_dlsym(void *handle, const char *name) snprintf(buf, sizeof(buf), "_%s", name); name = buf; } -#endif /* !__ELF__ */ +#endif /* !__ELF__ */ if ((vp = dlsym(handle, (char *) name)) == NULL) snprintf(error_message, sizeof(error_message), "dlsym (%s) failed", name); diff --git a/src/backend/port/dynloader/freebsd.h b/src/backend/port/dynloader/freebsd.h index 6116d3f83f..6faf07f962 100644 --- a/src/backend/port/dynloader/freebsd.h +++ b/src/backend/port/dynloader/freebsd.h @@ -17,7 +17,7 @@ #include #include -#include "utils/dynamic_loader.h" /* pgrminclude ignore */ +#include "utils/dynamic_loader.h" /* pgrminclude ignore */ /* * Dynamic Loader on NetBSD 1.0. @@ -55,4 +55,4 @@ void *BSD44_derived_dlopen(const char *filename, int num); void *BSD44_derived_dlsym(void *handle, const char *name); void BSD44_derived_dlclose(void *handle); -#endif /* PORT_PROTOS_H */ +#endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/dynloader/linux.c b/src/backend/port/dynloader/linux.c index 368bf0006f..38e19f7484 100644 --- a/src/backend/port/dynloader/linux.c +++ b/src/backend/port/dynloader/linux.c @@ -130,4 +130,4 @@ pg_dlerror(void) #endif } -#endif /* !HAVE_DLOPEN */ +#endif /* !HAVE_DLOPEN */ diff --git a/src/backend/port/dynloader/linux.h b/src/backend/port/dynloader/linux.h index 9d804ad955..d2c25df033 100644 --- a/src/backend/port/dynloader/linux.h +++ b/src/backend/port/dynloader/linux.h @@ -14,7 +14,7 @@ #ifndef PORT_PROTOS_H #define PORT_PROTOS_H -#include "utils/dynamic_loader.h" /* pgrminclude ignore */ +#include "utils/dynamic_loader.h" /* pgrminclude ignore */ #ifdef HAVE_DLOPEN #include #endif @@ -39,6 +39,6 @@ #define pg_dlsym dlsym #define pg_dlclose dlclose #define pg_dlerror dlerror -#endif /* HAVE_DLOPEN */ +#endif /* HAVE_DLOPEN */ -#endif /* PORT_PROTOS_H */ +#endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/dynloader/netbsd.c b/src/backend/port/dynloader/netbsd.c index 01a96013cb..475d746514 100644 --- a/src/backend/port/dynloader/netbsd.c +++ b/src/backend/port/dynloader/netbsd.c @@ -32,7 +32,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91"; -#endif /* LIBC_SCCS and not lint */ +#endif /* LIBC_SCCS and not lint */ #include "postgres.h" @@ -89,7 +89,7 @@ BSD44_derived_dlsym(void *handle, const char *name) snprintf(buf, sizeof(buf), "_%s", name); name = buf; } -#endif /* !__ELF__ */ +#endif /* !__ELF__ */ if ((vp = dlsym(handle, (char *) name)) == NULL) snprintf(error_message, sizeof(error_message), "dlsym (%s) failed", name); diff --git a/src/backend/port/dynloader/netbsd.h b/src/backend/port/dynloader/netbsd.h index 0bd406850d..2ca332256b 100644 --- a/src/backend/port/dynloader/netbsd.h +++ b/src/backend/port/dynloader/netbsd.h @@ -18,7 +18,7 @@ #include #include -#include "utils/dynamic_loader.h" /* pgrminclude ignore */ +#include "utils/dynamic_loader.h" /* pgrminclude ignore */ /* * Dynamic Loader on NetBSD 1.0. @@ -56,4 +56,4 @@ void *BSD44_derived_dlopen(const char *filename, int num); void *BSD44_derived_dlsym(void *handle, const char *name); void BSD44_derived_dlclose(void *handle); -#endif /* PORT_PROTOS_H */ +#endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/dynloader/openbsd.c b/src/backend/port/dynloader/openbsd.c index fcd336acbe..7b481b90d1 100644 --- a/src/backend/port/dynloader/openbsd.c +++ b/src/backend/port/dynloader/openbsd.c @@ -32,7 +32,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91"; -#endif /* LIBC_SCCS and not lint */ +#endif /* LIBC_SCCS and not lint */ #include "postgres.h" @@ -89,7 +89,7 @@ BSD44_derived_dlsym(void *handle, const char *name) snprintf(buf, sizeof(buf), "_%s", name); name = buf; } -#endif /* !__ELF__ */ +#endif /* !__ELF__ */ if ((vp = dlsym(handle, (char *) name)) == NULL) snprintf(error_message, sizeof(error_message), "dlsym (%s) failed", name); diff --git a/src/backend/port/dynloader/openbsd.h b/src/backend/port/dynloader/openbsd.h index 25d5439633..1130f39b41 100644 --- a/src/backend/port/dynloader/openbsd.h +++ b/src/backend/port/dynloader/openbsd.h @@ -17,7 +17,7 @@ #include #include -#include "utils/dynamic_loader.h" /* pgrminclude ignore */ +#include "utils/dynamic_loader.h" /* pgrminclude ignore */ /* * Dynamic Loader on NetBSD 1.0. @@ -55,4 +55,4 @@ void *BSD44_derived_dlopen(const char *filename, int num); void *BSD44_derived_dlsym(void *handle, const char *name); void BSD44_derived_dlclose(void *handle); -#endif /* PORT_PROTOS_H */ +#endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/dynloader/solaris.h b/src/backend/port/dynloader/solaris.h index f50ba524dc..e7638ff0fc 100644 --- a/src/backend/port/dynloader/solaris.h +++ b/src/backend/port/dynloader/solaris.h @@ -15,7 +15,7 @@ #define PORT_PROTOS_H #include -#include "utils/dynamic_loader.h" /* pgrminclude ignore */ +#include "utils/dynamic_loader.h" /* pgrminclude ignore */ /* * In some older systems, the RTLD_NOW flag isn't defined and the mode @@ -35,4 +35,4 @@ #define pg_dlclose dlclose #define pg_dlerror dlerror -#endif /* PORT_PROTOS_H */ +#endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/dynloader/win32.h b/src/backend/port/dynloader/win32.h index f689dc8ff9..ddbf866520 100644 --- a/src/backend/port/dynloader/win32.h +++ b/src/backend/port/dynloader/win32.h @@ -4,7 +4,7 @@ #ifndef PORT_PROTOS_H #define PORT_PROTOS_H -#include "utils/dynamic_loader.h" /* pgrminclude ignore */ +#include "utils/dynamic_loader.h" /* pgrminclude ignore */ #define pg_dlopen(f) dlopen((f), 1) #define pg_dlsym dlsym @@ -16,4 +16,4 @@ int dlclose(void *handle); void *dlsym(void *handle, const char *symbol); void *dlopen(const char *path, int mode); -#endif /* PORT_PROTOS_H */ +#endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/posix_sema.c b/src/backend/port/posix_sema.c index f251ac6788..5719caf9b5 100644 --- a/src/backend/port/posix_sema.c +++ b/src/backend/port/posix_sema.c @@ -130,7 +130,7 @@ PosixSemaphoreCreate(sem_t *sem) if (sem_init(sem, 1, 1) < 0) elog(FATAL, "sem_init failed: %m"); } -#endif /* USE_NAMED_POSIX_SEMAPHORES */ +#endif /* USE_NAMED_POSIX_SEMAPHORES */ /* diff --git a/src/backend/port/sysv_sema.c b/src/backend/port/sysv_sema.c index 4fbcc5e2b4..a68b1f4aea 100644 --- a/src/backend/port/sysv_sema.c +++ b/src/backend/port/sysv_sema.c @@ -64,10 +64,10 @@ typedef int IpcSemaphoreId; /* semaphore ID returned by semget(2) */ static PGSemaphore sharedSemas; /* array of PGSemaphoreData in shared memory */ static int numSharedSemas; /* number of PGSemaphoreDatas used so far */ static int maxSharedSemas; /* allocated size of PGSemaphoreData array */ -static IpcSemaphoreId *mySemaSets; /* IDs of sema sets acquired so far */ +static IpcSemaphoreId *mySemaSets; /* IDs of sema sets acquired so far */ static int numSemaSets; /* number of sema sets acquired so far */ static int maxSemaSets; /* allocated size of mySemaSets array */ -static IpcSemaphoreKey nextSemaKey; /* next key to try using */ +static IpcSemaphoreKey nextSemaKey; /* next key to try using */ static int nextSemaNumber; /* next free sem num in last sema set */ @@ -333,7 +333,7 @@ PGReserveSemaphores(int maxSemas, int port) elog(PANIC, "out of memory"); numSemaSets = 0; nextSemaKey = port * 1000; - nextSemaNumber = SEMAS_PER_SET; /* force sema set alloc on 1st call */ + nextSemaNumber = SEMAS_PER_SET; /* force sema set alloc on 1st call */ on_shmem_exit(ReleaseSemaphores, 0); } diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c index 124b2148de..042635afbd 100644 --- a/src/backend/port/sysv_shmem.c +++ b/src/backend/port/sysv_shmem.c @@ -440,10 +440,10 @@ GetHugePageSize(Size *hugepagesize, int *mmap_flags) FreeFile(fp); } } -#endif /* __linux__ */ +#endif /* __linux__ */ } -#endif /* MAP_HUGETLB */ +#endif /* MAP_HUGETLB */ /* * Creates an anonymous mmap()ed shared memory segment. @@ -533,7 +533,7 @@ AnonymousShmemDetach(int status, Datum arg) } } -#endif /* USE_ANONYMOUS_SHMEM */ +#endif /* USE_ANONYMOUS_SHMEM */ /* * PGSharedMemoryCreate @@ -771,7 +771,7 @@ PGSharedMemoryNoReAttach(void) UsedShmemSegID = 0; } -#endif /* EXEC_BACKEND */ +#endif /* EXEC_BACKEND */ /* * PGSharedMemoryDetach diff --git a/src/backend/port/win32_shmem.c b/src/backend/port/win32_shmem.c index 31489fcdb0..01f51f3158 100644 --- a/src/backend/port/win32_shmem.c +++ b/src/backend/port/win32_shmem.c @@ -49,7 +49,7 @@ GetSharedMemName(void) elog(FATAL, "could not get size for full pathname of datadir %s: error code %lu", DataDir, GetLastError()); - retptr = malloc(bufsize + 18); /* 18 for Global\PostgreSQL: */ + retptr = malloc(bufsize + 18); /* 18 for Global\PostgreSQL: */ if (retptr == NULL) elog(FATAL, "could not allocate memory for shared memory name"); @@ -163,9 +163,9 @@ PGSharedMemoryCreate(Size size, bool makePrivate, int port, hmap = CreateFileMapping(INVALID_HANDLE_VALUE, /* Use the pagefile */ NULL, /* Default security attrs */ - PAGE_READWRITE, /* Memory is Read/Write */ - size_high, /* Size Upper 32 Bits */ - size_low, /* Size Lower 32 bits */ + PAGE_READWRITE, /* Memory is Read/Write */ + size_high, /* Size Upper 32 Bits */ + size_low, /* Size Lower 32 bits */ szShareMem); if (!hmap) diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index 5baa6db321..e62c6ad2ed 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -129,8 +129,8 @@ int Log_autovacuum_min_duration = -1; #define STATS_READ_DELAY 1000 /* the minimum allowed time between two awakenings of the launcher */ -#define MIN_AUTOVAC_SLEEPTIME 100.0 /* milliseconds */ -#define MAX_AUTOVAC_SLEEPTIME 300 /* seconds */ +#define MIN_AUTOVAC_SLEEPTIME 100.0 /* milliseconds */ +#define MAX_AUTOVAC_SLEEPTIME 300 /* seconds */ /* Flags to tell if we are in an autovacuum process */ static bool am_autovacuum_launcher = false; @@ -516,7 +516,7 @@ AutoVacLauncherMain(int argc, char *argv[]) /* Forget any pending QueryCancel or timeout request */ disable_all_timeouts(false); - QueryCancelPending = false; /* second to avoid race condition */ + QueryCancelPending = false; /* second to avoid race condition */ /* Report the error to the server log */ EmitErrorReport(); diff --git a/src/backend/postmaster/bgworker.c b/src/backend/postmaster/bgworker.c index 09b7fb4092..227e66b4ba 100644 --- a/src/backend/postmaster/bgworker.c +++ b/src/backend/postmaster/bgworker.c @@ -636,7 +636,7 @@ SanityCheckBackgroundWorker(BackgroundWorker *worker, int elevel) static void bgworker_quickdie(SIGNAL_ARGS) { - sigaddset(&BlockSig, SIGQUIT); /* prevent nested calls */ + sigaddset(&BlockSig, SIGQUIT); /* prevent nested calls */ PG_SETMASK(&BlockSig); /* @@ -986,7 +986,7 @@ RegisterDynamicBackgroundWorker(BackgroundWorker *worker, if (!slot->in_use) { memcpy(&slot->worker, worker, sizeof(BackgroundWorker)); - slot->pid = InvalidPid; /* indicates not started yet */ + slot->pid = InvalidPid; /* indicates not started yet */ slot->generation++; slot->terminate = false; generation = slot->generation; diff --git a/src/backend/postmaster/bgwriter.c b/src/backend/postmaster/bgwriter.c index 2674bb49ba..9ad74ee977 100644 --- a/src/backend/postmaster/bgwriter.c +++ b/src/backend/postmaster/bgwriter.c @@ -122,8 +122,8 @@ BackgroundWriterMain(void) */ pqsignal(SIGHUP, BgSigHupHandler); /* set flag to read config file */ pqsignal(SIGINT, SIG_IGN); - pqsignal(SIGTERM, ReqShutdownHandler); /* shutdown */ - pqsignal(SIGQUIT, bg_quickdie); /* hard crash time */ + pqsignal(SIGTERM, ReqShutdownHandler); /* shutdown */ + pqsignal(SIGQUIT, bg_quickdie); /* hard crash time */ pqsignal(SIGALRM, SIG_IGN); pqsignal(SIGPIPE, SIG_IGN); pqsignal(SIGUSR1, bgwriter_sigusr1_handler); diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c index a55071900d..f37f5d5c44 100644 --- a/src/backend/postmaster/checkpointer.c +++ b/src/backend/postmaster/checkpointer.c @@ -116,7 +116,7 @@ typedef struct typedef struct { - pid_t checkpointer_pid; /* PID (0 if not started) */ + pid_t checkpointer_pid; /* PID (0 if not started) */ slock_t ckpt_lck; /* protects all the ckpt_* fields */ @@ -126,8 +126,8 @@ typedef struct int ckpt_flags; /* checkpoint flags, as defined in xlog.h */ - uint32 num_backend_writes; /* counts user backend buffer writes */ - uint32 num_backend_fsync; /* counts user backend fsync calls */ + uint32 num_backend_writes; /* counts user backend buffer writes */ + uint32 num_backend_fsync; /* counts user backend fsync calls */ int num_requests; /* current # of requests */ int max_requests; /* allocated array size */ @@ -205,15 +205,14 @@ CheckpointerMain(void) * want to wait for the backends to exit, whereupon the postmaster will * tell us it's okay to shut down (via SIGUSR2). */ - pqsignal(SIGHUP, ChkptSigHupHandler); /* set flag to read config - * file */ - pqsignal(SIGINT, ReqCheckpointHandler); /* request checkpoint */ + pqsignal(SIGHUP, ChkptSigHupHandler); /* set flag to read config file */ + pqsignal(SIGINT, ReqCheckpointHandler); /* request checkpoint */ pqsignal(SIGTERM, SIG_IGN); /* ignore SIGTERM */ pqsignal(SIGQUIT, chkpt_quickdie); /* hard crash time */ pqsignal(SIGALRM, SIG_IGN); pqsignal(SIGPIPE, SIG_IGN); pqsignal(SIGUSR1, chkpt_sigusr1_handler); - pqsignal(SIGUSR2, ReqShutdownHandler); /* request shutdown */ + pqsignal(SIGUSR2, ReqShutdownHandler); /* request shutdown */ /* * Reset some signals that are accepted by postmaster but not here diff --git a/src/backend/postmaster/fork_process.c b/src/backend/postmaster/fork_process.c index 0bb15d8487..65145b1205 100644 --- a/src/backend/postmaster/fork_process.c +++ b/src/backend/postmaster/fork_process.c @@ -118,4 +118,4 @@ fork_process(void) return result; } -#endif /* ! WIN32 */ +#endif /* ! WIN32 */ diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index 2dce39fdef..00afce4104 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -54,11 +54,10 @@ * Timer definitions. * ---------- */ -#define PGARCH_AUTOWAKE_INTERVAL 60 /* How often to force a poll of the - * archive status directory; in - * seconds. */ -#define PGARCH_RESTART_INTERVAL 10 /* How often to attempt to restart a - * failed archiver; in seconds. */ +#define PGARCH_AUTOWAKE_INTERVAL 60 /* How often to force a poll of the + * archive status directory; in seconds. */ +#define PGARCH_RESTART_INTERVAL 10 /* How often to attempt to restart a + * failed archiver; in seconds. */ #define NUM_ARCHIVE_RETRIES 3 @@ -203,7 +202,7 @@ pgarch_forkexec(void) return postmaster_forkexec(ac, av); } -#endif /* EXEC_BACKEND */ +#endif /* EXEC_BACKEND */ /* diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 5cf9582246..68c1ee2463 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -74,21 +74,21 @@ * Timer definitions. * ---------- */ -#define PGSTAT_STAT_INTERVAL 500 /* Minimum time between stats file - * updates; in milliseconds. */ +#define PGSTAT_STAT_INTERVAL 500 /* Minimum time between stats file + * updates; in milliseconds. */ -#define PGSTAT_RETRY_DELAY 10 /* How long to wait between checks for - * a new file; in milliseconds. */ +#define PGSTAT_RETRY_DELAY 10 /* How long to wait between checks for a + * new file; in milliseconds. */ #define PGSTAT_MAX_WAIT_TIME 10000 /* Maximum time to wait for a stats * file update; in milliseconds. */ -#define PGSTAT_INQ_INTERVAL 640 /* How often to ping the collector for - * a new file; in milliseconds. */ +#define PGSTAT_INQ_INTERVAL 640 /* How often to ping the collector for a + * new file; in milliseconds. */ -#define PGSTAT_RESTART_INTERVAL 60 /* How often to attempt to restart a - * failed statistics collector; in - * seconds. */ +#define PGSTAT_RESTART_INTERVAL 60 /* How often to attempt to restart a + * failed statistics collector; in + * seconds. */ #define PGSTAT_POLL_LOOP_COUNT (PGSTAT_MAX_WAIT_TIME / PGSTAT_RETRY_DELAY) #define PGSTAT_INQ_LOOP_COUNT (PGSTAT_INQ_INTERVAL / PGSTAT_RETRY_DELAY) @@ -213,7 +213,7 @@ typedef struct PgStat_SubXactStatus { int nest_level; /* subtransaction nest level */ struct PgStat_SubXactStatus *prev; /* higher-level subxact if any */ - PgStat_TableXactStatus *first; /* head of list for this subxact */ + PgStat_TableXactStatus *first; /* head of list for this subxact */ } PgStat_SubXactStatus; static PgStat_SubXactStatus *pgStatXactStack = NULL; @@ -226,9 +226,9 @@ PgStat_Counter pgStatBlockWriteTime = 0; /* Record that's written to 2PC state file when pgstat state is persisted */ typedef struct TwoPhasePgStatRecord { - PgStat_Counter tuples_inserted; /* tuples inserted in xact */ - PgStat_Counter tuples_updated; /* tuples updated in xact */ - PgStat_Counter tuples_deleted; /* tuples deleted in xact */ + PgStat_Counter tuples_inserted; /* tuples inserted in xact */ + PgStat_Counter tuples_updated; /* tuples updated in xact */ + PgStat_Counter tuples_deleted; /* tuples deleted in xact */ PgStat_Counter inserted_pre_trunc; /* tuples inserted prior to truncate */ PgStat_Counter updated_pre_trunc; /* tuples updated prior to truncate */ PgStat_Counter deleted_pre_trunc; /* tuples deleted prior to truncate */ @@ -710,7 +710,7 @@ pgstat_forkexec(void) return postmaster_forkexec(ac, av); } -#endif /* EXEC_BACKEND */ +#endif /* EXEC_BACKEND */ /* @@ -1290,7 +1290,7 @@ pgstat_drop_relation(Oid relid) msg.m_databaseid = MyDatabaseId; pgstat_send(&msg, len); } -#endif /* NOT_USED */ +#endif /* NOT_USED */ /* ---------- diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index a5d3575b20..3c5eee0fbc 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -344,10 +344,10 @@ static time_t AbortStartTime = 0; /* Length of said timeout */ #define SIGKILL_CHILDREN_AFTER_SECS 5 -static bool ReachedNormalRunning = false; /* T if we've reached PM_RUN */ +static bool ReachedNormalRunning = false; /* T if we've reached PM_RUN */ -bool ClientAuthInProgress = false; /* T during new-client - * authentication */ +bool ClientAuthInProgress = false; /* T during new-client + * authentication */ bool redirection_done = false; /* stderr redirected for syslogger? */ @@ -455,7 +455,7 @@ typedef struct HANDLE procHandle; DWORD procId; } win32_deadchild_waitinfo; -#endif /* WIN32 */ +#endif /* WIN32 */ static pid_t backend_forkexec(Port *port); static pid_t internal_forkexec(int argc, char *argv[], Port *port); @@ -537,7 +537,7 @@ static bool save_backend_variables(BackendParameters *param, Port *port, static void ShmemBackendArrayAdd(Backend *bn); static void ShmemBackendArrayRemove(Backend *bn); -#endif /* EXEC_BACKEND */ +#endif /* EXEC_BACKEND */ #define StartupDataBase() StartChildProcess(StartupProcess) #define StartBackgroundWriter() StartChildProcess(BgWriterProcess) @@ -631,20 +631,18 @@ PostmasterMain(int argc, char *argv[]) pqinitmask(); PG_SETMASK(&BlockSig); - pqsignal_no_restart(SIGHUP, SIGHUP_handler); /* reread config file - * and have children do - * same */ + pqsignal_no_restart(SIGHUP, SIGHUP_handler); /* reread config file and + * have children do same */ pqsignal_no_restart(SIGINT, pmdie); /* send SIGTERM and shut down */ - pqsignal_no_restart(SIGQUIT, pmdie); /* send SIGQUIT and die */ - pqsignal_no_restart(SIGTERM, pmdie); /* wait for children and shut - * down */ + pqsignal_no_restart(SIGQUIT, pmdie); /* send SIGQUIT and die */ + pqsignal_no_restart(SIGTERM, pmdie); /* wait for children and shut down */ pqsignal(SIGALRM, SIG_IGN); /* ignored */ pqsignal(SIGPIPE, SIG_IGN); /* ignored */ - pqsignal_no_restart(SIGUSR1, sigusr1_handler); /* message from child - * process */ - pqsignal_no_restart(SIGUSR2, dummy_handler); /* unused, reserve for - * children */ - pqsignal_no_restart(SIGCHLD, reaper); /* handle child termination */ + pqsignal_no_restart(SIGUSR1, sigusr1_handler); /* message from child + * process */ + pqsignal_no_restart(SIGUSR2, dummy_handler); /* unused, reserve for + * children */ + pqsignal_no_restart(SIGCHLD, reaper); /* handle child termination */ pqsignal(SIGTTIN, SIG_IGN); /* ignored */ pqsignal(SIGTTOU, SIG_IGN); /* ignored */ /* ignore SIGXFSZ, so that ulimit violations work like disk full */ @@ -3148,7 +3146,7 @@ CleanupBackgroundWorker(int pid, rw->rw_backend = NULL; rw->rw_pid = 0; rw->rw_child_slot = 0; - ReportBackgroundWorkerExit(&iter); /* report child death */ + ReportBackgroundWorkerExit(&iter); /* report child death */ LogChildExit(EXIT_STATUS_0(exitstatus) ? DEBUG1 : LOG, namebuf, pid, exitstatus); @@ -4003,7 +4001,7 @@ BackendStartup(Port *port) /* And run the backend */ BackendRun(port); } -#endif /* EXEC_BACKEND */ +#endif /* EXEC_BACKEND */ if (pid < 0) { @@ -4030,7 +4028,7 @@ BackendStartup(Port *port) * of backends. */ bn->pid = pid; - bn->bkend_type = BACKEND_TYPE_NORMAL; /* Can change later to WALSND */ + bn->bkend_type = BACKEND_TYPE_NORMAL; /* Can change later to WALSND */ dlist_push_head(&BackendList, &bn->elem); #ifdef EXEC_BACKEND @@ -4120,7 +4118,7 @@ BackendInitialize(Port *port) * Must do this now because authentication uses libpq to send messages. */ pq_init(); /* initialize libpq to talk to client */ - whereToSendOutput = DestRemote; /* now safe to ereport to client */ + whereToSendOutput = DestRemote; /* now safe to ereport to client */ /* * We arrange for a simple exit(1) if we receive SIGTERM or SIGQUIT or @@ -4668,7 +4666,7 @@ internal_forkexec(int argc, char *argv[], Port *port) return pi.dwProcessId; } -#endif /* WIN32 */ +#endif /* WIN32 */ /* @@ -4842,7 +4840,7 @@ SubPostmasterMain(int argc, char *argv[]) /* Attach process to shared data structures */ CreateSharedMemoryAndSemaphores(false, 0); - AuxiliaryProcessMain(argc - 2, argv + 2); /* does not return */ + AuxiliaryProcessMain(argc - 2, argv + 2); /* does not return */ } if (strcmp(argv[1], "--forkavlauncher") == 0) { @@ -4855,7 +4853,7 @@ SubPostmasterMain(int argc, char *argv[]) /* Attach process to shared data structures */ CreateSharedMemoryAndSemaphores(false, 0); - AutoVacLauncherMain(argc - 2, argv + 2); /* does not return */ + AutoVacLauncherMain(argc - 2, argv + 2); /* does not return */ } if (strcmp(argv[1], "--forkavworker") == 0) { @@ -4896,24 +4894,24 @@ SubPostmasterMain(int argc, char *argv[]) { /* Do not want to attach to shared memory */ - PgArchiverMain(argc, argv); /* does not return */ + PgArchiverMain(argc, argv); /* does not return */ } if (strcmp(argv[1], "--forkcol") == 0) { /* Do not want to attach to shared memory */ - PgstatCollectorMain(argc, argv); /* does not return */ + PgstatCollectorMain(argc, argv); /* does not return */ } if (strcmp(argv[1], "--forklog") == 0) { /* Do not want to attach to shared memory */ - SysLoggerMain(argc, argv); /* does not return */ + SysLoggerMain(argc, argv); /* does not return */ } abort(); /* shouldn't get here */ } -#endif /* EXEC_BACKEND */ +#endif /* EXEC_BACKEND */ /* @@ -5272,7 +5270,7 @@ StartChildProcess(AuxProcType type) AuxiliaryProcessMain(ac, av); ExitPostmaster(0); } -#endif /* EXEC_BACKEND */ +#endif /* EXEC_BACKEND */ if (pid < 0) { @@ -6228,7 +6226,7 @@ ShmemBackendArrayRemove(Backend *bn) /* Mark the slot as empty */ ShmemBackendArray[i].pid = 0; } -#endif /* EXEC_BACKEND */ +#endif /* EXEC_BACKEND */ #ifdef WIN32 @@ -6304,7 +6302,7 @@ pgwin32_deadchild_callback(PVOID lpParameter, BOOLEAN TimerOrWaitFired) /* Queue SIGCHLD signal */ pg_queue_signal(SIGCHLD); } -#endif /* WIN32 */ +#endif /* WIN32 */ /* * Initialize one and only handle for monitoring postmaster death. @@ -6355,5 +6353,5 @@ InitPostmasterDeathWatchHandle(void) ereport(FATAL, (errmsg_internal("could not duplicate postmaster handle: error code %lu", GetLastError()))); -#endif /* WIN32 */ +#endif /* WIN32 */ } diff --git a/src/backend/postmaster/startup.c b/src/backend/postmaster/startup.c index b623252475..4693a1bb86 100644 --- a/src/backend/postmaster/startup.c +++ b/src/backend/postmaster/startup.c @@ -183,7 +183,7 @@ StartupProcessMain(void) */ pqsignal(SIGHUP, StartupProcSigHupHandler); /* reload config file */ pqsignal(SIGINT, SIG_IGN); /* ignore query cancel */ - pqsignal(SIGTERM, StartupProcShutdownHandler); /* request shutdown */ + pqsignal(SIGTERM, StartupProcShutdownHandler); /* request shutdown */ pqsignal(SIGQUIT, startupproc_quickdie); /* hard crash time */ InitializeTimeouts(); /* establishes SIGALRM handler */ pqsignal(SIGPIPE, SIG_IGN); diff --git a/src/backend/postmaster/syslogger.c b/src/backend/postmaster/syslogger.c index 9828999eb8..7e4d7a9041 100644 --- a/src/backend/postmaster/syslogger.c +++ b/src/backend/postmaster/syslogger.c @@ -169,7 +169,7 @@ SysLoggerMain(int argc, char *argv[]) #ifdef EXEC_BACKEND syslogger_parseArgs(argc, argv); -#endif /* EXEC_BACKEND */ +#endif /* EXEC_BACKEND */ am_syslogger = true; @@ -268,7 +268,7 @@ SysLoggerMain(int argc, char *argv[]) threadHandle = (HANDLE) _beginthreadex(NULL, 0, pipeThread, NULL, 0, NULL); if (threadHandle == 0) elog(FATAL, "could not create syslogger data transfer thread: %m"); -#endif /* WIN32 */ +#endif /* WIN32 */ /* * Remember active logfile's name. We recompute this from the reference @@ -490,7 +490,7 @@ SysLoggerMain(int argc, char *argv[]) WAIT_EVENT_SYSLOGGER_MAIN); EnterCriticalSection(&sysloggerSection); -#endif /* WIN32 */ +#endif /* WIN32 */ if (pipe_eof_seen) { @@ -716,7 +716,7 @@ syslogger_forkexec(void) (long) _get_osfhandle(_fileno(syslogFile))); else strcpy(filenobuf, "0"); -#endif /* WIN32 */ +#endif /* WIN32 */ av[ac++] = filenobuf; av[ac] = NULL; @@ -756,9 +756,9 @@ syslogger_parseArgs(int argc, char *argv[]) setvbuf(syslogFile, NULL, PG_IOLBF, 0); } } -#endif /* WIN32 */ +#endif /* WIN32 */ } -#endif /* EXEC_BACKEND */ +#endif /* EXEC_BACKEND */ /* -------------------------------- @@ -1084,7 +1084,7 @@ pipeThread(void *arg) _endthread(); return 0; } -#endif /* WIN32 */ +#endif /* WIN32 */ /* * Open the csv log file - we do this opportunistically, because @@ -1103,7 +1103,7 @@ open_csvlogfile(void) csvlogFile = logfile_open(filename, "a", false); - if (last_csv_file_name != NULL) /* probably shouldn't happen */ + if (last_csv_file_name != NULL) /* probably shouldn't happen */ pfree(last_csv_file_name); last_csv_file_name = filename; diff --git a/src/backend/postmaster/walwriter.c b/src/backend/postmaster/walwriter.c index a575d8f953..7b89e02428 100644 --- a/src/backend/postmaster/walwriter.c +++ b/src/backend/postmaster/walwriter.c @@ -109,8 +109,8 @@ WalWriterMain(void) * reasonable to treat like SIGTERM. */ pqsignal(SIGHUP, WalSigHupHandler); /* set flag to read config file */ - pqsignal(SIGINT, WalShutdownHandler); /* request shutdown */ - pqsignal(SIGTERM, WalShutdownHandler); /* request shutdown */ + pqsignal(SIGINT, WalShutdownHandler); /* request shutdown */ + pqsignal(SIGTERM, WalShutdownHandler); /* request shutdown */ pqsignal(SIGQUIT, wal_quickdie); /* hard crash time */ pqsignal(SIGALRM, SIG_IGN); pqsignal(SIGPIPE, SIG_IGN); @@ -286,7 +286,7 @@ WalWriterMain(void) * sleep time so as to reduce the server's idle power consumption. */ if (left_till_hibernate > 0) - cur_timeout = WalWriterDelay; /* in ms */ + cur_timeout = WalWriterDelay; /* in ms */ else cur_timeout = WalWriterDelay * HIBERNATE_FACTOR; diff --git a/src/backend/regex/regc_color.c b/src/backend/regex/regc_color.c index 823bec018f..f5a4151757 100644 --- a/src/backend/regex/regc_color.c +++ b/src/backend/regex/regc_color.c @@ -145,7 +145,7 @@ pg_reg_getcolor(struct colormap *cm, chr c) low = middle + 1; else { - rownum = cmr->rownum; /* found a match */ + rownum = cmr->rownum; /* found a match */ break; } } @@ -1040,8 +1040,7 @@ static void colorcomplement(struct nfa *nfa, struct colormap *cm, int type, - struct state *of, /* complements of this guy's PLAIN - * outarcs */ + struct state *of, /* complements of this guy's PLAIN outarcs */ struct state *from, struct state *to) { @@ -1138,4 +1137,4 @@ dumpchr(chr c, fprintf(f, "\\u%04lx", (long) c); } -#endif /* REG_DEBUG */ +#endif /* REG_DEBUG */ diff --git a/src/backend/regex/regc_lex.c b/src/backend/regex/regc_lex.c index b2506ca814..2c6551ca74 100644 --- a/src/backend/regex/regc_lex.c +++ b/src/backend/regex/regc_lex.c @@ -586,10 +586,10 @@ next(struct vars *v) FAILW(REG_BADRPT); switch (*v->now++) { - case CHR(':'): /* non-capturing paren */ + case CHR(':'): /* non-capturing paren */ RETV('(', 0); break; - case CHR('#'): /* comment */ + case CHR('#'): /* comment */ while (!ATEOS() && *v->now != CHR(')')) v->now++; if (!ATEOS()) @@ -597,11 +597,11 @@ next(struct vars *v) assert(v->nexttype == v->lasttype); return next(v); break; - case CHR('='): /* positive lookahead */ + case CHR('='): /* positive lookahead */ NOTE(REG_ULOOKAROUND); RETV(LACON, LATYPE_AHEAD_POS); break; - case CHR('!'): /* negative lookahead */ + case CHR('!'): /* negative lookahead */ NOTE(REG_ULOOKAROUND); RETV(LACON, LATYPE_AHEAD_NEG); break; @@ -610,11 +610,11 @@ next(struct vars *v) FAILW(REG_BADRPT); switch (*v->now++) { - case CHR('='): /* positive lookbehind */ + case CHR('='): /* positive lookbehind */ NOTE(REG_ULOOKAROUND); RETV(LACON, LATYPE_BEHIND_POS); break; - case CHR('!'): /* negative lookbehind */ + case CHR('!'): /* negative lookbehind */ NOTE(REG_ULOOKAROUND); RETV(LACON, LATYPE_BEHIND_NEG); break; @@ -836,7 +836,7 @@ lexescape(struct vars *v) break; case CHR('x'): NOTE(REG_UUNPORT); - c = lexdigits(v, 16, 1, 255); /* REs >255 long outside spec */ + c = lexdigits(v, 16, 1, 255); /* REs >255 long outside spec */ if (ISERR() || !CHR_IS_IN_RANGE(c)) FAILW(REG_EESCAPE); RETV(PLAIN, c); @@ -863,7 +863,7 @@ lexescape(struct vars *v) case CHR('9'): save = v->now; v->now--; /* put first digit back */ - c = lexdigits(v, 10, 1, 255); /* REs >255 long outside spec */ + c = lexdigits(v, 10, 1, 255); /* REs >255 long outside spec */ if (ISERR()) FAILW(REG_EESCAPE); /* ugly heuristic (first test is "exactly 1 digit?") */ diff --git a/src/backend/regex/regc_locale.c b/src/backend/regex/regc_locale.c index acae90abce..047abc3e1e 100644 --- a/src/backend/regex/regc_locale.c +++ b/src/backend/regex/regc_locale.c @@ -754,7 +754,7 @@ cmp(const chr *x, const chr *y, /* strings to compare */ * stop at embedded NULs! */ static int /* 0 for equal, nonzero for unequal */ -casecmp(const chr *x, const chr *y, /* strings to compare */ +casecmp(const chr *x, const chr *y, /* strings to compare */ size_t len) /* exact length of comparison */ { for (; len > 0; len--, x++, y++) diff --git a/src/backend/regex/regc_nfa.c b/src/backend/regex/regc_nfa.c index 2179a38a22..92c9c4d795 100644 --- a/src/backend/regex/regc_nfa.c +++ b/src/backend/regex/regc_nfa.c @@ -67,7 +67,7 @@ newnfa(struct vars *v, nfa->eos[0] = nfa->eos[1] = COLORLESS; nfa->parent = parent; /* Precedes newfstate so parent is valid. */ nfa->post = newfstate(nfa, '@'); /* number 0 */ - nfa->pre = newfstate(nfa, '>'); /* number 1 */ + nfa->pre = newfstate(nfa, '>'); /* number 1 */ nfa->init = newstate(nfa); /* may become invalid later */ nfa->final = newstate(nfa); @@ -1253,7 +1253,7 @@ deltraverse(struct nfa *nfa, } assert(s->no != FREESTATE); /* we're still here */ - assert(s == leftend || s->nins != 0); /* and still reachable */ + assert(s == leftend || s->nins != 0); /* and still reachable */ assert(s->nouts == 0); /* but have no outarcs */ s->tmp = NULL; /* we're done here */ @@ -1751,7 +1751,7 @@ push(struct nfa *nfa, if (NISERR()) return 0; copyouts(nfa, to, s); /* duplicate outarcs */ - cparc(nfa, con, from, s); /* move constraint arc */ + cparc(nfa, con, from, s); /* move constraint arc */ freearc(nfa, con); if (NISERR()) return 0; @@ -1833,7 +1833,7 @@ combine(struct arc *con, case CA('$', '$'): case CA(AHEAD, AHEAD): case CA(BEHIND, BEHIND): - if (con->co == a->co) /* true duplication */ + if (con->co == a->co) /* true duplication */ return SATISFIED; return INCOMPATIBLE; break; @@ -2763,8 +2763,8 @@ cleanup(struct nfa *nfa) static void markreachable(struct nfa *nfa, struct state *s, - struct state *okay, /* consider only states with this mark */ - struct state *mark) /* the value to mark with */ + struct state *okay, /* consider only states with this mark */ + struct state *mark) /* the value to mark with */ { struct arc *a; @@ -3114,7 +3114,7 @@ dumparc(struct arc *a, if (aa == NULL) fprintf(f, "?!?"); /* missing from in-chain */ } -#endif /* REG_DEBUG */ +#endif /* REG_DEBUG */ /* * dumpcnfa - dump a compacted NFA in human-readable form @@ -3178,4 +3178,4 @@ dumpcstate(int st, fflush(f); } -#endif /* REG_DEBUG */ +#endif /* REG_DEBUG */ diff --git a/src/backend/regex/regc_pg_locale.c b/src/backend/regex/regc_pg_locale.c index 4bdcb4fd6a..6982879688 100644 --- a/src/backend/regex/regc_pg_locale.c +++ b/src/backend/regex/regc_pg_locale.c @@ -277,7 +277,7 @@ pg_set_regex_collation(Oid collation) pg_regex_strategy = PG_REGEX_LOCALE_WIDE; } else -#endif /* USE_WIDE_UPPER_LOWER */ +#endif /* USE_WIDE_UPPER_LOWER */ { if (pg_regex_locale) pg_regex_strategy = PG_REGEX_LOCALE_1BYTE_L; diff --git a/src/backend/regex/regcomp.c b/src/backend/regex/regcomp.c index 777373e691..51385509bb 100644 --- a/src/backend/regex/regcomp.c +++ b/src/backend/regex/regcomp.c @@ -257,7 +257,7 @@ struct vars /* parsing macros; most know that `v' is the struct vars pointer */ #define NEXT() (next(v)) /* advance by one token */ #define SEE(t) (v->nexttype == (t)) /* is next token this? */ -#define EAT(t) (SEE(t) && next(v)) /* if next is this, swallow it */ +#define EAT(t) (SEE(t) && next(v)) /* if next is this, swallow it */ #define VISERR(vv) ((vv)->err != 0) /* have we seen an error yet? */ #define ISERR() VISERR(v) #define VERR(vv,e) ((vv)->nexttype = EOS, \ @@ -942,7 +942,7 @@ parseqatom(struct vars *v, assert((size_t) subno < v->nsubs); } else - atomtype = PLAIN; /* something that's not '(' */ + atomtype = PLAIN; /* something that's not '(' */ NEXT(); /* need new endpoints because tree will contain pointers */ s = newstate(v->nfa); @@ -1124,7 +1124,7 @@ parseqatom(struct vars *v, /* if it's a backref, now is the time to replicate the subNFA */ if (atomtype == BACKREF) { - assert(atom->begin->nouts == 1); /* just the EMPTY */ + assert(atom->begin->nouts == 1); /* just the EMPTY */ delsub(v->nfa, atom->begin, atom->end); assert(v->subs[subno] != NULL); @@ -1145,7 +1145,7 @@ parseqatom(struct vars *v, if (atomtype == BACKREF) { /* special case: backrefs have internal quantifiers */ - EMPTYARC(s, atom->begin); /* empty prefix */ + EMPTYARC(s, atom->begin); /* empty prefix */ /* just stuff everything into atom */ repeat(v, atom->begin, atom->end, m, n); atom->min = (short) m; @@ -1157,7 +1157,7 @@ parseqatom(struct vars *v, else if (m == 1 && n == 1) { /* no/vacuous quantifier: done */ - EMPTYARC(s, atom->begin); /* empty prefix */ + EMPTYARC(s, atom->begin); /* empty prefix */ /* rest of branch can be strung starting from atom->end */ s2 = atom->end; } @@ -1175,7 +1175,7 @@ parseqatom(struct vars *v, assert(m >= 1 && m != DUPINF && n >= 1); repeat(v, s, atom->begin, m - 1, (n == DUPINF) ? n : n - 1); f = COMBINE(qprefer, atom->flags); - t = subre(v, '.', f, s, atom->end); /* prefix and atom */ + t = subre(v, '.', f, s, atom->end); /* prefix and atom */ NOERR(); t->left = subre(v, '=', PREF(f), s, atom->begin); NOERR(); @@ -1618,7 +1618,7 @@ wordchrs(struct vars *v) */ static void processlacon(struct vars *v, - struct state *begin, /* start of parsed LACON sub-re */ + struct state *begin, /* start of parsed LACON sub-re */ struct state *end, /* end of parsed LACON sub-re */ int latype, struct state *lp, /* left state to hang it on */ @@ -2180,7 +2180,7 @@ stid(struct subre *t, sprintf(buf, "%p", t); return buf; } -#endif /* REG_DEBUG */ +#endif /* REG_DEBUG */ #include "regc_lex.c" diff --git a/src/backend/regex/rege_dfa.c b/src/backend/regex/rege_dfa.c index 366b79f492..5695e158a5 100644 --- a/src/backend/regex/rege_dfa.c +++ b/src/backend/regex/rege_dfa.c @@ -303,7 +303,7 @@ static int matchuntil(struct vars *v, struct dfa *d, chr *probe, /* we want to know if a match ends here */ - struct sset **lastcss, /* state storage across calls */ + struct sset **lastcss, /* state storage across calls */ chr **lastcp) /* state storage across calls */ { chr *cp = *lastcp; @@ -672,15 +672,15 @@ miss(struct vars *v, for (ca = cnfa->states[i]; ca->co != COLORLESS; ca++) { if (ca->co < cnfa->ncolors) - continue; /* not a LACON arc */ + continue; /* not a LACON arc */ if (ISBSET(d->work, ca->to)) - continue; /* arc would be a no-op anyway */ - sawlacons = 1; /* this LACON affects our result */ + continue; /* arc would be a no-op anyway */ + sawlacons = 1; /* this LACON affects our result */ if (!lacon(v, cnfa, cp, ca->co)) { if (ISERR()) return NULL; - continue; /* LACON arc cannot be traversed */ + continue; /* LACON arc cannot be traversed */ } if (ISERR()) return NULL; @@ -821,7 +821,7 @@ getvacant(struct vars *v, FDEBUG(("zapping c%d's %ld outarc\n", (int) (p - d->ssets), (long) co)); p->outs[co] = NULL; ap = p->inchain[co]; - p->inchain[co].ss = NULL; /* paranoia */ + p->inchain[co].ss = NULL; /* paranoia */ } ss->ins.ss = NULL; diff --git a/src/backend/regex/regerror.c b/src/backend/regex/regerror.c index 2d38fbc646..4a27c2552c 100644 --- a/src/backend/regex/regerror.c +++ b/src/backend/regex/regerror.c @@ -64,7 +64,7 @@ pg_regerror(int errcode, /* error code, or REG_ATOI or REG_ITOA */ { const struct rerr *r; const char *msg; - char convbuf[sizeof(unk) + 50]; /* 50 = plenty for int */ + char convbuf[sizeof(unk) + 50]; /* 50 = plenty for int */ size_t len; int icode; @@ -78,7 +78,7 @@ pg_regerror(int errcode, /* error code, or REG_ATOI or REG_ITOA */ msg = convbuf; break; case REG_ITOA: /* convert number to name */ - icode = atoi(errbuf); /* not our problem if this fails */ + icode = atoi(errbuf); /* not our problem if this fails */ for (r = rerrs; r->code >= 0; r++) if (r->code == icode) break; diff --git a/src/backend/regex/regexec.c b/src/backend/regex/regexec.c index 471ddb2aad..f7eaa76b02 100644 --- a/src/backend/regex/regexec.c +++ b/src/backend/regex/regexec.c @@ -403,7 +403,7 @@ find(struct vars *v, v->details->rm_extend.rm_so = OFF(cold); else v->details->rm_extend.rm_so = OFF(v->stop); - v->details->rm_extend.rm_eo = OFF(v->stop); /* unknown */ + v->details->rm_extend.rm_eo = OFF(v->stop); /* unknown */ } if (close == NULL) /* not found */ return REG_NOMATCH; @@ -449,7 +449,7 @@ find(struct vars *v, v->details->rm_extend.rm_so = OFF(cold); else v->details->rm_extend.rm_so = OFF(v->stop); - v->details->rm_extend.rm_eo = OFF(v->stop); /* unknown */ + v->details->rm_extend.rm_eo = OFF(v->stop); /* unknown */ } if (v->nmatch == 1) /* no need for submatches */ return REG_OKAY; @@ -494,7 +494,7 @@ cfind(struct vars *v, v->details->rm_extend.rm_so = OFF(cold); else v->details->rm_extend.rm_so = OFF(v->stop); - v->details->rm_extend.rm_eo = OFF(v->stop); /* unknown */ + v->details->rm_extend.rm_eo = OFF(v->stop); /* unknown */ } return ret; } @@ -718,7 +718,7 @@ cdissect(struct vars *v, break; case '.': /* concatenation */ assert(t->left != NULL && t->right != NULL); - if (t->left->flags & SHORTER) /* reverse scan */ + if (t->left->flags & SHORTER) /* reverse scan */ er = crevcondissect(v, t, begin, end); else er = ccondissect(v, t, begin, end); @@ -729,7 +729,7 @@ cdissect(struct vars *v, break; case '*': /* iteration */ assert(t->left != NULL); - if (t->left->flags & SHORTER) /* reverse scan */ + if (t->left->flags & SHORTER) /* reverse scan */ er = creviterdissect(v, t, begin, end); else er = citerdissect(v, t, begin, end); diff --git a/src/backend/regex/regexport.c b/src/backend/regex/regexport.c index 53417f0e7d..febf2adaec 100644 --- a/src/backend/regex/regexport.c +++ b/src/backend/regex/regexport.c @@ -235,7 +235,7 @@ pg_reg_getnumcharacters(const regex_t *regex, int co) if (co <= 0 || co > cm->max) /* we reject 0 which is WHITE */ return -1; - if (cm->cd[co].flags & PSEUDO) /* also pseudocolors (BOS etc) */ + if (cm->cd[co].flags & PSEUDO) /* also pseudocolors (BOS etc) */ return -1; /* diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index f3671cf41f..25ce7a7bd2 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -16,7 +16,7 @@ #include #include -#include "access/xlog_internal.h" /* for pg_start/stop_backup */ +#include "access/xlog_internal.h" /* for pg_start/stop_backup */ #include "catalog/catalog.h" #include "catalog/pg_type.h" #include "lib/stringinfo.h" @@ -273,8 +273,8 @@ perform_base_backup(basebackup_options *opt, DIR *tblspcdir) /* Send CopyOutResponse message */ pq_beginmessage(&buf, 'H'); - pq_sendbyte(&buf, 0); /* overall format */ - pq_sendint(&buf, 0, 2); /* natts */ + pq_sendbyte(&buf, 0); /* overall format */ + pq_sendint(&buf, 0, 2); /* natts */ pq_endmessage(&buf); if (ti->path == NULL) @@ -318,7 +318,7 @@ perform_base_backup(basebackup_options *opt, DIR *tblspcdir) Assert(lnext(lc) == NULL); } else - pq_putemptymessage('c'); /* CopyDone */ + pq_putemptymessage('c'); /* CopyDone */ } } PG_END_ENSURE_ERROR_CLEANUP(base_backup_cleanup, (Datum) 0); @@ -814,7 +814,7 @@ SendXlogRecPtrResult(XLogRecPtr ptr, TimeLineID tli) pq_sendstring(&buf, "recptr"); pq_sendint(&buf, 0, 4); /* table oid */ pq_sendint(&buf, 0, 2); /* attnum */ - pq_sendint(&buf, TEXTOID, 4); /* type oid */ + pq_sendint(&buf, TEXTOID, 4); /* type oid */ pq_sendint(&buf, -1, 2); pq_sendint(&buf, 0, 4); pq_sendint(&buf, 0, 2); @@ -827,7 +827,7 @@ SendXlogRecPtrResult(XLogRecPtr ptr, TimeLineID tli) * int8 may seem like a surprising data type for this, but in theory int4 * would not be wide enough for this, as TimeLineID is unsigned. */ - pq_sendint(&buf, INT8OID, 4); /* type oid */ + pq_sendint(&buf, INT8OID, 4); /* type oid */ pq_sendint(&buf, -1, 2); pq_sendint(&buf, 0, 4); pq_sendint(&buf, 0, 2); @@ -1115,7 +1115,7 @@ sendDir(char *path, int basepathlen, bool sizeonly, List *tablespaces, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("tablespaces are not supported on this platform"))); continue; -#endif /* HAVE_READLINK */ +#endif /* HAVE_READLINK */ } else if (S_ISDIR(statbuf.st_mode)) { diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c index 33cb01b8d0..f4d123ec05 100644 --- a/src/backend/replication/logical/logical.c +++ b/src/backend/replication/logical/logical.c @@ -451,7 +451,7 @@ DecodingContextFindStartpoint(LogicalDecodingContext *ctx) if (err) elog(ERROR, "%s", err); if (!record) - elog(ERROR, "no record found"); /* shouldn't happen */ + elog(ERROR, "no record found"); /* shouldn't happen */ startptr = InvalidXLogRecPtr; @@ -661,7 +661,7 @@ commit_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn, /* Push callback + info on the error context stack */ state.ctx = ctx; state.callback_name = "commit"; - state.report_location = txn->final_lsn; /* beginning of commit record */ + state.report_location = txn->final_lsn; /* beginning of commit record */ errcallback.callback = output_plugin_error_callback; errcallback.arg = (void *) &state; errcallback.previous = error_context_stack; diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c index 09206f29a0..f73b1a6d6c 100644 --- a/src/backend/replication/logical/origin.c +++ b/src/backend/replication/logical/origin.c @@ -147,7 +147,7 @@ typedef struct ReplicationStateCtl } ReplicationStateCtl; /* external variables */ -RepOriginId replorigin_session_origin = InvalidRepOriginId; /* assumed identity */ +RepOriginId replorigin_session_origin = InvalidRepOriginId; /* assumed identity */ XLogRecPtr replorigin_session_origin_lsn = InvalidXLogRecPtr; TimestampTz replorigin_session_origin_timestamp = 0; diff --git a/src/backend/replication/logical/proto.c b/src/backend/replication/logical/proto.c index ff348ff2a8..e3230e1fa2 100644 --- a/src/backend/replication/logical/proto.c +++ b/src/backend/replication/logical/proto.c @@ -194,9 +194,9 @@ logicalrep_write_update(StringInfo out, Relation rel, HeapTuple oldtuple, if (oldtuple != NULL) { if (rel->rd_rel->relreplident == REPLICA_IDENTITY_FULL) - pq_sendbyte(out, 'O'); /* old tuple follows */ + pq_sendbyte(out, 'O'); /* old tuple follows */ else - pq_sendbyte(out, 'K'); /* old key follows */ + pq_sendbyte(out, 'K'); /* old key follows */ logicalrep_write_tuple(out, rel, oldtuple); } @@ -424,12 +424,12 @@ logicalrep_write_tuple(StringInfo out, Relation rel, HeapTuple tuple) if (isnull[i]) { - pq_sendbyte(out, 'n'); /* null column */ + pq_sendbyte(out, 'n'); /* null column */ continue; } else if (att->attlen == -1 && VARATT_IS_EXTERNAL_ONDISK(values[i])) { - pq_sendbyte(out, 'u'); /* unchanged toast column */ + pq_sendbyte(out, 'u'); /* unchanged toast column */ continue; } diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index 0182fb7fa7..4905207893 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -62,7 +62,7 @@ #include "replication/logical.h" #include "replication/reorderbuffer.h" #include "replication/slot.h" -#include "replication/snapbuild.h" /* just for SnapBuildSnapDecRefcount */ +#include "replication/snapbuild.h" /* just for SnapBuildSnapDecRefcount */ #include "storage/bufmgr.h" #include "storage/fd.h" #include "storage/sinval.h" @@ -124,8 +124,8 @@ typedef struct ReorderBufferToastEnt Size num_chunks; /* number of chunks we've already seen */ Size size; /* combined size of chunks seen */ dlist_head chunks; /* linked list of chunks */ - struct varlena *reconstructed; /* reconstructed varlena now pointed - * to in main tup */ + struct varlena *reconstructed; /* reconstructed varlena now pointed to in + * main tup */ } ReorderBufferToastEnt; /* Disk serialization support datastructures */ @@ -157,7 +157,7 @@ static const Size max_changes_in_memory = 4096; * major bottleneck, especially when spilling to disk while decoding batch * workloads. */ -static const Size max_cached_tuplebufs = 4096 * 2; /* ~8MB */ +static const Size max_cached_tuplebufs = 4096 * 2; /* ~8MB */ /* --------------------------------------- * primary reorderbuffer support routines diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c index e06aa0992a..fc9dc525b3 100644 --- a/src/backend/replication/logical/snapbuild.c +++ b/src/backend/replication/logical/snapbuild.c @@ -210,7 +210,7 @@ struct SnapBuild TransactionId was_xmax; size_t was_xcnt; /* number of used xip entries */ - size_t was_xcnt_space; /* allocated size of xip */ + size_t was_xcnt_space; /* allocated size of xip */ TransactionId *was_xip; /* running xacts array, xidComparator-sorted */ } was_running; @@ -336,7 +336,7 @@ AllocateSnapshotBuilder(ReorderBuffer *reorder, /* Other struct members initialized by zeroing via palloc0 above */ builder->committed.xcnt = 0; - builder->committed.xcnt_space = 128; /* arbitrary number */ + builder->committed.xcnt_space = 128; /* arbitrary number */ builder->committed.xip = palloc0(builder->committed.xcnt_space * sizeof(TransactionId)); builder->committed.includes_all_transactions = true; @@ -1248,8 +1248,8 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn builder->start_decoding_at = lsn + 1; /* As no transactions were running xmin/xmax can be trivially set. */ - builder->xmin = running->nextXid; /* < are finished */ - builder->xmax = running->nextXid; /* >= are running */ + builder->xmin = running->nextXid; /* < are finished */ + builder->xmax = running->nextXid; /* >= are running */ /* so we can safely use the faster comparisons */ Assert(TransactionIdIsNormal(builder->xmin)); @@ -1295,8 +1295,8 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn * currently running transactions have finished. We'll update both * while waiting for the pending transactions to finish. */ - builder->xmin = running->nextXid; /* < are finished */ - builder->xmax = running->nextXid; /* >= are running */ + builder->xmin = running->nextXid; /* < are finished */ + builder->xmax = running->nextXid; /* >= are running */ /* so we can safely use the faster comparisons */ Assert(TransactionIdIsNormal(builder->xmin)); diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c index 3ff08bfb2b..d5577e38d2 100644 --- a/src/backend/replication/logical/tablesync.c +++ b/src/backend/replication/logical/tablesync.c @@ -812,7 +812,7 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos) * NAMEDATALEN on the remote that matters, but this scheme will also work * reasonably if that is different.) */ - StaticAssertStmt(NAMEDATALEN >= 32, "NAMEDATALEN too small"); /* for sanity */ + StaticAssertStmt(NAMEDATALEN >= 32, "NAMEDATALEN too small"); /* for sanity */ slotname = psprintf("%.*s_%u_sync_%u", NAMEDATALEN - 28, MySubscription->slotname, diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c index 21a4fea821..2288675ff2 100644 --- a/src/backend/replication/logical/worker.c +++ b/src/backend/replication/logical/worker.c @@ -1290,9 +1290,9 @@ send_feedback(XLogRecPtr recvpos, bool force, bool requestReply) resetStringInfo(reply_message); pq_sendbyte(reply_message, 'r'); - pq_sendint64(reply_message, recvpos); /* write */ - pq_sendint64(reply_message, flushpos); /* flush */ - pq_sendint64(reply_message, writepos); /* apply */ + pq_sendint64(reply_message, recvpos); /* write */ + pq_sendint64(reply_message, flushpos); /* flush */ + pq_sendint64(reply_message, writepos); /* apply */ pq_sendint64(reply_message, now); /* sendTime */ pq_sendbyte(reply_message, requestReply); /* replyRequested */ diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c index c0f7fbb2b2..4bc2816241 100644 --- a/src/backend/replication/slot.c +++ b/src/backend/replication/slot.c @@ -86,7 +86,7 @@ typedef struct ReplicationSlotOnDisk #define ReplicationSlotOnDiskV2Size \ sizeof(ReplicationSlotOnDisk) - ReplicationSlotOnDiskConstantSize -#define SLOT_MAGIC 0x1051CA1 /* format identifier */ +#define SLOT_MAGIC 0x1051CA1 /* format identifier */ #define SLOT_VERSION 2 /* version for new files */ /* Control array for replication slot management */ diff --git a/src/backend/replication/slotfuncs.c b/src/backend/replication/slotfuncs.c index bbd26f3d6a..6dc808874d 100644 --- a/src/backend/replication/slotfuncs.c +++ b/src/backend/replication/slotfuncs.c @@ -132,7 +132,7 @@ pg_create_logical_replication_slot(PG_FUNCTION_ARGS) * Create logical decoding context, to build the initial snapshot. */ ctx = CreateInitDecodingContext(NameStr(*plugin), NIL, - false, /* do not build snapshot */ + false, /* do not build snapshot */ logical_read_local_xlog_page, NULL, NULL, NULL); diff --git a/src/backend/replication/syncrep.c b/src/backend/replication/syncrep.c index ad213fc454..8092f01edd 100644 --- a/src/backend/replication/syncrep.c +++ b/src/backend/replication/syncrep.c @@ -888,7 +888,7 @@ SyncRepGetSyncStandbysPriority(bool *am_sync) if (list_length(result) == SyncRepConfig->num_sync) { list_free(pending); - return result; /* Exit if got enough sync standbys */ + return result; /* Exit if got enough sync standbys */ } /* diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c index 01b86ffe8a..8e64e8bf7a 100644 --- a/src/backend/replication/walreceiver.c +++ b/src/backend/replication/walreceiver.c @@ -259,8 +259,7 @@ WalReceiverMain(void) walrcv->latch = &MyProc->procLatch; /* Properly accept or ignore signals the postmaster might send us */ - pqsignal(SIGHUP, WalRcvSigHupHandler); /* set flag to read config - * file */ + pqsignal(SIGHUP, WalRcvSigHupHandler); /* set flag to read config file */ pqsignal(SIGINT, SIG_IGN); pqsignal(SIGTERM, WalRcvShutdownHandler); /* request shutdown */ pqsignal(SIGQUIT, WalRcvQuickDieHandler); /* hard crash time */ diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index b61eaef6f5..71057aecfa 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -111,16 +111,16 @@ WalSndCtlData *WalSndCtl = NULL; WalSnd *MyWalSnd = NULL; /* Global state */ -bool am_walsender = false; /* Am I a walsender process? */ -bool am_cascading_walsender = false; /* Am I cascading WAL to - * another standby? */ +bool am_walsender = false; /* Am I a walsender process? */ +bool am_cascading_walsender = false; /* Am I cascading WAL to another + * standby? */ bool am_db_walsender = false; /* Connected to a database? */ /* User-settable parameters for walsender */ int max_wal_senders = 0; /* the maximum number of concurrent * walsenders */ -int wal_sender_timeout = 60 * 1000; /* maximum time to send one - * WAL data message */ +int wal_sender_timeout = 60 * 1000; /* maximum time to send one WAL + * data message */ bool log_replication_commands = false; /* @@ -450,16 +450,16 @@ SendTimeLineHistory(TimeLineHistoryCmd *cmd) pq_sendstring(&buf, "filename"); /* col name */ pq_sendint(&buf, 0, 4); /* table oid */ pq_sendint(&buf, 0, 2); /* attnum */ - pq_sendint(&buf, TEXTOID, 4); /* type oid */ + pq_sendint(&buf, TEXTOID, 4); /* type oid */ pq_sendint(&buf, -1, 2); /* typlen */ pq_sendint(&buf, 0, 4); /* typmod */ pq_sendint(&buf, 0, 2); /* format code */ /* second field */ - pq_sendstring(&buf, "content"); /* col name */ + pq_sendstring(&buf, "content"); /* col name */ pq_sendint(&buf, 0, 4); /* table oid */ pq_sendint(&buf, 0, 2); /* attnum */ - pq_sendint(&buf, BYTEAOID, 4); /* type oid */ + pq_sendint(&buf, BYTEAOID, 4); /* type oid */ pq_sendint(&buf, -1, 2); /* typlen */ pq_sendint(&buf, 0, 4); /* typmod */ pq_sendint(&buf, 0, 2); /* format code */ @@ -1748,7 +1748,7 @@ ProcessStandbyReplyMessage(void) writePtr = pq_getmsgint64(&reply_message); flushPtr = pq_getmsgint64(&reply_message); applyPtr = pq_getmsgint64(&reply_message); - (void) pq_getmsgint64(&reply_message); /* sendTime; not used ATM */ + (void) pq_getmsgint64(&reply_message); /* sendTime; not used ATM */ replyRequested = pq_getmsgbyte(&reply_message); elog(DEBUG2, "write %X/%X flush %X/%X apply %X/%X%s", @@ -1911,7 +1911,7 @@ ProcessStandbyHSFeedbackMessage(void) * byte. See XLogWalRcvSendHSFeedback() in walreceiver.c for the creation * of this message. */ - (void) pq_getmsgint64(&reply_message); /* sendTime; not used ATM */ + (void) pq_getmsgint64(&reply_message); /* sendTime; not used ATM */ feedbackXmin = pq_getmsgint(&reply_message, 4); feedbackEpoch = pq_getmsgint(&reply_message, 4); feedbackCatalogXmin = pq_getmsgint(&reply_message, 4); @@ -1978,7 +1978,7 @@ ProcessStandbyHSFeedbackMessage(void) * XXX: It might make sense to generalize the ephemeral slot concept and * always use the slot mechanism to handle the feedback xmin. */ - if (MyReplicationSlot != NULL) /* XXX: persistency configurable? */ + if (MyReplicationSlot != NULL) /* XXX: persistency configurable? */ PhysicalReplicationSlotNewXmin(feedbackXmin, feedbackCatalogXmin); else { @@ -2000,7 +2000,7 @@ ProcessStandbyHSFeedbackMessage(void) static long WalSndComputeSleeptime(TimestampTz now) { - long sleeptime = 10000; /* 10 s */ + long sleeptime = 10000; /* 10 s */ if (wal_sender_timeout > 0 && last_reply_timestamp > 0) { diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c index 2ca6c63799..248f0cc872 100644 --- a/src/backend/rewrite/rewriteHandler.c +++ b/src/backend/rewrite/rewriteHandler.c @@ -2076,7 +2076,7 @@ fireRules(Query *parsetree, returning_flag); rule_action->querySource = qsrc; - rule_action->canSetTag = false; /* might change later */ + rule_action->canSetTag = false; /* might change later */ results = lappend(results, rule_action); } @@ -2555,9 +2555,9 @@ relation_is_updatable(Oid reloid, updatable_cols = bms_int_members(updatable_cols, include_cols); if (bms_is_empty(updatable_cols)) - auto_events = (1 << CMD_DELETE); /* May support DELETE */ + auto_events = (1 << CMD_DELETE); /* May support DELETE */ else - auto_events = ALL_EVENTS; /* May support all events */ + auto_events = ALL_EVENTS; /* May support all events */ /* * The base relation must also support these update commands. diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c index 00ee3a3e0a..ef131adc91 100644 --- a/src/backend/statistics/dependencies.c +++ b/src/backend/statistics/dependencies.c @@ -883,7 +883,7 @@ find_strongest_dependency(StatisticExtInfo *stats, MVDependencies *dependencies, * slightly more expensive than the previous checks. */ if (dependency_is_fully_matched(dependency, attnums)) - strongest = dependency; /* save new best match */ + strongest = dependency; /* save new best match */ } return strongest; diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 77296646d9..ec7460764e 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -582,7 +582,7 @@ PrefetchBuffer(Relation reln, ForkNumber forkNum, BlockNumber blockNum) * not clear that there's enough of a problem to justify that. */ } -#endif /* USE_PREFETCH */ +#endif /* USE_PREFETCH */ } @@ -991,10 +991,10 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, { BufferTag newTag; /* identity of requested block */ uint32 newHash; /* hash value for newTag */ - LWLock *newPartitionLock; /* buffer partition lock for it */ + LWLock *newPartitionLock; /* buffer partition lock for it */ BufferTag oldTag; /* previous identity of selected buffer */ uint32 oldHash; /* hash value for oldTag */ - LWLock *oldPartitionLock; /* buffer partition lock for it */ + LWLock *oldPartitionLock; /* buffer partition lock for it */ uint32 oldFlags; int buf_id; BufferDesc *buf; @@ -1353,7 +1353,7 @@ InvalidateBuffer(BufferDesc *buf) { BufferTag oldTag; uint32 oldHash; /* hash value for oldTag */ - LWLock *oldPartitionLock; /* buffer partition lock for it */ + LWLock *oldPartitionLock; /* buffer partition lock for it */ uint32 oldFlags; uint32 buf_state; @@ -2947,7 +2947,7 @@ DropRelFileNodesAllBuffers(RelFileNodeBackend *rnodes, int nnodes) if (nnodes == 0) return; - nodes = palloc(sizeof(RelFileNode) * nnodes); /* non-local relations */ + nodes = palloc(sizeof(RelFileNode) * nnodes); /* non-local relations */ /* If it's a local relation, it's localbuf.c's problem. */ for (i = 0; i < nnodes; i++) diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c index 6e59ce888c..c130283f36 100644 --- a/src/backend/storage/buffer/localbuf.c +++ b/src/backend/storage/buffer/localbuf.c @@ -86,7 +86,7 @@ LocalPrefetchBuffer(SMgrRelation smgr, ForkNumber forkNum, /* Not in buffers, so initiate prefetch */ smgrprefetch(smgr, forkNum, blockNum); -#endif /* USE_PREFETCH */ +#endif /* USE_PREFETCH */ } diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 2851c5d6a2..5ddc5e1af1 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -815,10 +815,10 @@ count_usable_fds(int max_to_probe, int *usable_fds, int *already_open) getrlimit_status = getrlimit(RLIMIT_NOFILE, &rlim); #else /* but BSD doesn't ... */ getrlimit_status = getrlimit(RLIMIT_OFILE, &rlim); -#endif /* RLIMIT_NOFILE */ +#endif /* RLIMIT_NOFILE */ if (getrlimit_status != 0) ereport(WARNING, (errmsg("getrlimit failed: %m"))); -#endif /* HAVE_GETRLIMIT */ +#endif /* HAVE_GETRLIMIT */ /* dup until failure or probe limit reached */ for (;;) @@ -978,7 +978,7 @@ _dump_lru(void) snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "LEAST"); elog(LOG, "%s", buf); } -#endif /* FDDEBUG */ +#endif /* FDDEBUG */ static void Delete(File file) @@ -2502,7 +2502,7 @@ closeAllVfds(void) if (SizeVfdCache > 0) { - Assert(FileIsNotOpen(0)); /* Make sure ring not corrupted */ + Assert(FileIsNotOpen(0)); /* Make sure ring not corrupted */ for (i = 1; i < SizeVfdCache; i++) { if (!FileIsNotOpen(i)) @@ -2653,7 +2653,7 @@ CleanupTempFiles(bool isProcExit) */ if (isProcExit || have_xact_temporary_files) { - Assert(FileIsNotOpen(0)); /* Make sure ring not corrupted */ + Assert(FileIsNotOpen(0)); /* Make sure ring not corrupted */ for (i = 1; i < SizeVfdCache; i++) { unsigned short fdstate = VfdCache[i].fdstate; @@ -3102,7 +3102,7 @@ pre_sync_fname(const char *fname, bool isdir, int elevel) (void) CloseTransientFile(fd); } -#endif /* PG_FLUSH_DATA_WORKS */ +#endif /* PG_FLUSH_DATA_WORKS */ static void datadir_fsync_fname(const char *fname, bool isdir, int elevel) diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c index e0eaefeeb3..d101c717d3 100644 --- a/src/backend/storage/ipc/dsm_impl.c +++ b/src/backend/storage/ipc/dsm_impl.c @@ -686,9 +686,9 @@ dsm_impl_windows(dsm_op op, dsm_handle handle, Size request_size, hmap = CreateFileMapping(INVALID_HANDLE_VALUE, /* Use the pagefile */ NULL, /* Default security attrs */ - PAGE_READWRITE, /* Memory is read/write */ - size_high, /* Upper 32 bits of size */ - size_low, /* Lower 32 bits of size */ + PAGE_READWRITE, /* Memory is read/write */ + size_high, /* Upper 32 bits of size */ + size_low, /* Lower 32 bits of size */ name); errcode = GetLastError(); diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c index 55959de91f..29eb4ea54f 100644 --- a/src/backend/storage/ipc/latch.c +++ b/src/backend/storage/ipc/latch.c @@ -124,7 +124,7 @@ static int selfpipe_owner_pid = 0; /* Private function prototypes */ static void sendSelfPipeByte(void); static void drainSelfPipe(void); -#endif /* WIN32 */ +#endif /* WIN32 */ #if defined(WAIT_USE_EPOLL) static void WaitEventAdjustEpoll(WaitEventSet *set, WaitEvent *event, int action); @@ -230,7 +230,7 @@ InitLatch(volatile Latch *latch) latch->event = CreateEvent(NULL, TRUE, FALSE, NULL); if (latch->event == NULL) elog(ERROR, "CreateEvent failed: error code %lu", GetLastError()); -#endif /* WIN32 */ +#endif /* WIN32 */ } /* @@ -576,7 +576,7 @@ CreateWaitEventSet(MemoryContext context, int nevents) elog(ERROR, "epoll_create failed: %m"); if (fcntl(set->epoll_fd, F_SETFD, FD_CLOEXEC) == -1) elog(ERROR, "fcntl(F_SETFD) failed on epoll descriptor: %m"); -#endif /* EPOLL_CLOEXEC */ +#endif /* EPOLL_CLOEXEC */ #elif defined(WAIT_USE_WIN32) /* @@ -1469,7 +1469,7 @@ latch_sigusr1_handler(void) if (waiting) sendSelfPipeByte(); } -#endif /* !WIN32 */ +#endif /* !WIN32 */ /* Send one byte to the self-pipe, to wake up WaitLatch */ #ifndef WIN32 @@ -1502,7 +1502,7 @@ retry: return; } } -#endif /* !WIN32 */ +#endif /* !WIN32 */ /* * Read all available data from the self-pipe @@ -1550,4 +1550,4 @@ drainSelfPipe(void) /* else buffer wasn't big enough, so read again */ } } -#endif /* !WIN32 */ +#endif /* !WIN32 */ diff --git a/src/backend/storage/ipc/pmsignal.c b/src/backend/storage/ipc/pmsignal.c index 98f4082d94..85db6b21f8 100644 --- a/src/backend/storage/ipc/pmsignal.c +++ b/src/backend/storage/ipc/pmsignal.c @@ -289,5 +289,5 @@ PostmasterIsAlive(void) return false; #else /* WIN32 */ return (WaitForSingleObject(PostmasterHandle, 0) == WAIT_TIMEOUT); -#endif /* WIN32 */ +#endif /* WIN32 */ } diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index dfddfc4002..2d6ae23eec 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -75,7 +75,7 @@ typedef struct ProcArrayStruct int numKnownAssignedXids; /* current # of valid entries */ int tailKnownAssignedXids; /* index of oldest valid element */ int headKnownAssignedXids; /* index of newest element, + 1 */ - slock_t known_assigned_xids_lck; /* protects head/tail pointers */ + slock_t known_assigned_xids_lck; /* protects head/tail pointers */ /* * Highest subxid that has been removed from KnownAssignedXids array to @@ -149,7 +149,7 @@ static void DisplayXidCache(void); #define xc_by_known_assigned_inc() ((void) 0) #define xc_no_overflow_inc() ((void) 0) #define xc_slow_answer_inc() ((void) 0) -#endif /* XIDCACHE_DEBUG */ +#endif /* XIDCACHE_DEBUG */ /* Primitives for KnownAssignedXids array handling for standby */ static void KnownAssignedXidsCompress(bool force); @@ -364,7 +364,7 @@ ProcArrayRemove(PGPROC *proc, TransactionId latestXid) /* Keep the PGPROC array sorted. See notes above */ memmove(&arrayP->pgprocnos[index], &arrayP->pgprocnos[index + 1], (arrayP->numProcs - index - 1) * sizeof(int)); - arrayP->pgprocnos[arrayP->numProcs - 1] = -1; /* for debugging */ + arrayP->pgprocnos[arrayP->numProcs - 1] = -1; /* for debugging */ arrayP->numProcs--; LWLockRelease(ProcArrayLock); return; @@ -432,7 +432,7 @@ ProcArrayEndTransaction(PGPROC *proc, TransactionId latestXid) pgxact->xmin = InvalidTransactionId; /* must be cleared with xid/xmin: */ pgxact->vacuumFlags &= ~PROC_VACUUM_STATE_MASK; - pgxact->delayChkpt = false; /* be sure this is cleared in abort */ + pgxact->delayChkpt = false; /* be sure this is cleared in abort */ proc->recoveryConflictPending = false; Assert(pgxact->nxids == 0); @@ -1354,7 +1354,7 @@ GetOldestXmin(Relation rel, int flags) if (allDbs || proc->databaseId == MyDatabaseId || - proc->databaseId == 0) /* always include WalSender */ + proc->databaseId == 0) /* always include WalSender */ { /* Fetch xid just once - see GetNewTransactionId */ TransactionId xid = pgxact->xid; @@ -3099,7 +3099,7 @@ DisplayXidCache(void) xc_no_overflow, xc_slow_answer); } -#endif /* XIDCACHE_DEBUG */ +#endif /* XIDCACHE_DEBUG */ /* ---------------------------------------------- diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c index b5f49727f7..e18d4c7e1c 100644 --- a/src/backend/storage/ipc/shmem.c +++ b/src/backend/storage/ipc/shmem.c @@ -75,7 +75,7 @@ /* shared memory global variables */ -static PGShmemHeader *ShmemSegHdr; /* shared mem segment header */ +static PGShmemHeader *ShmemSegHdr; /* shared mem segment header */ static void *ShmemBase; /* start address of shared memory */ @@ -314,7 +314,7 @@ InitShmemIndex(void) * for NULL. */ HTAB * -ShmemInitHash(const char *name, /* table string name for shmem index */ +ShmemInitHash(const char *name, /* table string name for shmem index */ long init_size, /* initial table size */ long max_size, /* max size of the table */ HASHCTL *infoP, /* info about key and bucket size */ diff --git a/src/backend/storage/ipc/sinvaladt.c b/src/backend/storage/ipc/sinvaladt.c index 18302caf5e..1b9d32b7cf 100644 --- a/src/backend/storage/ipc/sinvaladt.c +++ b/src/backend/storage/ipc/sinvaladt.c @@ -240,7 +240,7 @@ CreateSharedInvalidationState(void) /* Mark all backends inactive, and initialize nextLXID */ for (i = 0; i < shmInvalBuffer->maxBackends; i++) { - shmInvalBuffer->procState[i].procPid = 0; /* inactive */ + shmInvalBuffer->procState[i].procPid = 0; /* inactive */ shmInvalBuffer->procState[i].proc = NULL; shmInvalBuffer->procState[i].nextMsgNum = 0; /* meaningless */ shmInvalBuffer->procState[i].resetState = false; @@ -271,7 +271,7 @@ SharedInvalBackendInit(bool sendOnly) /* Look for a free entry in the procState array */ for (index = 0; index < segP->lastBackend; index++) { - if (segP->procState[index].procPid == 0) /* inactive slot? */ + if (segP->procState[index].procPid == 0) /* inactive slot? */ { stateP = &segP->procState[index]; break; diff --git a/src/backend/storage/large_object/inv_api.c b/src/backend/storage/large_object/inv_api.c index 6597b36b17..154516ff36 100644 --- a/src/backend/storage/large_object/inv_api.c +++ b/src/backend/storage/large_object/inv_api.c @@ -624,7 +624,7 @@ inv_write(LargeObjectDesc *obj_desc, const char *buf, int nbytes) { if ((oldtuple = systable_getnext_ordered(sd, ForwardScanDirection)) != NULL) { - if (HeapTupleHasNulls(oldtuple)) /* paranoia */ + if (HeapTupleHasNulls(oldtuple)) /* paranoia */ elog(ERROR, "null field found in pg_largeobject"); olddata = (Form_pg_largeobject) GETSTRUCT(oldtuple); Assert(olddata->pageno >= pageno); @@ -806,7 +806,7 @@ inv_truncate(LargeObjectDesc *obj_desc, int64 len) olddata = NULL; if ((oldtuple = systable_getnext_ordered(sd, ForwardScanDirection)) != NULL) { - if (HeapTupleHasNulls(oldtuple)) /* paranoia */ + if (HeapTupleHasNulls(oldtuple)) /* paranoia */ elog(ERROR, "null field found in pg_largeobject"); olddata = (Form_pg_largeobject) GETSTRUCT(oldtuple); Assert(olddata->pageno >= pageno); diff --git a/src/backend/storage/lmgr/deadlock.c b/src/backend/storage/lmgr/deadlock.c index de67e5db49..d1a9ec8a48 100644 --- a/src/backend/storage/lmgr/deadlock.c +++ b/src/backend/storage/lmgr/deadlock.c @@ -539,8 +539,8 @@ static bool FindLockCycleRecurseMember(PGPROC *checkProc, PGPROC *checkProcLeader, int depth, - EDGE *softEdges, /* output argument */ - int *nSoftEdges) /* output argument */ + EDGE *softEdges, /* output argument */ + int *nSoftEdges) /* output argument */ { PGPROC *proc; LOCK *lock = checkProc->waitLock; diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index 4315be4077..19cec580c3 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -336,7 +336,7 @@ PROCLOCK_PRINT(const char *where, const PROCLOCK *proclockP) #define LOCK_PRINT(where, lock, type) ((void) 0) #define PROCLOCK_PRINT(where, proclockP) ((void) 0) -#endif /* not LOCK_DEBUG */ +#endif /* not LOCK_DEBUG */ static uint32 proclock_hash(const void *key, Size keysize); @@ -595,7 +595,7 @@ LockHasWaiters(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock) /* * Find the LOCALLOCK entry for this lock and lockmode */ - MemSet(&localtag, 0, sizeof(localtag)); /* must clear padding */ + MemSet(&localtag, 0, sizeof(localtag)); /* must clear padding */ localtag.lock = *locktag; localtag.mode = lockmode; @@ -749,7 +749,7 @@ LockAcquireExtended(const LOCKTAG *locktag, /* * Find or create a LOCALLOCK entry for this lock and lockmode */ - MemSet(&localtag, 0, sizeof(localtag)); /* must clear padding */ + MemSet(&localtag, 0, sizeof(localtag)); /* must clear padding */ localtag.lock = *locktag; localtag.mode = lockmode; @@ -1212,7 +1212,7 @@ SetupLockInTable(LockMethod lockMethodTable, PGPROC *proc, } } } -#endif /* CHECK_DEADLOCK_RISK */ +#endif /* CHECK_DEADLOCK_RISK */ } /* @@ -1842,7 +1842,7 @@ LockRelease(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock) /* * Find the LOCALLOCK entry for this lock and lockmode */ - MemSet(&localtag, 0, sizeof(localtag)); /* must clear padding */ + MemSet(&localtag, 0, sizeof(localtag)); /* must clear padding */ localtag.lock = *locktag; localtag.mode = lockmode; @@ -3923,7 +3923,7 @@ DumpAllLocks(void) elog(LOG, "DumpAllLocks: proclock->tag.myLock = NULL"); } } -#endif /* LOCK_DEBUG */ +#endif /* LOCK_DEBUG */ /* * LOCK 2PC resource manager's routines diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c index a021fbb229..82a1cf5150 100644 --- a/src/backend/storage/lmgr/lwlock.c +++ b/src/backend/storage/lmgr/lwlock.c @@ -226,7 +226,7 @@ LOG_LWDEBUG(const char *where, LWLock *lock, const char *msg) #else /* not LOCK_DEBUG */ #define PRINT_LWDEBUG(a,b,c) ((void)0) #define LOG_LWDEBUG(a,b,c) ((void)0) -#endif /* LOCK_DEBUG */ +#endif /* LOCK_DEBUG */ #ifdef LWLOCK_STATS @@ -323,7 +323,7 @@ get_lwlock_stats_entry(LWLock *lock) } return lwstats; } -#endif /* LWLOCK_STATS */ +#endif /* LWLOCK_STATS */ /* @@ -1129,7 +1129,7 @@ LWLockAcquire(LWLock *lock, LWLockMode mode) lwstats->ex_acquire_count++; else lwstats->sh_acquire_count++; -#endif /* LWLOCK_STATS */ +#endif /* LWLOCK_STATS */ /* * We can't wait if we haven't got a PGPROC. This should only occur diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c index b07ef4c21b..3b355641c2 100644 --- a/src/backend/storage/lmgr/predicate.c +++ b/src/backend/storage/lmgr/predicate.c @@ -358,9 +358,9 @@ static SERIALIZABLEXACT *OldCommittedSxact; * attempt to degrade performance (mostly as false positive serialization * failure) gracefully in the face of memory pressurel */ -int max_predicate_locks_per_xact; /* set by guc.c */ +int max_predicate_locks_per_xact; /* set by guc.c */ int max_predicate_locks_per_relation; /* set by guc.c */ -int max_predicate_locks_per_page; /* set by guc.c */ +int max_predicate_locks_per_page; /* set by guc.c */ /* * This provides a list of objects in order to track transactions @@ -2914,8 +2914,8 @@ DropAllPredicateLocksFromTable(Relation relation, bool transfer) heapId = relation->rd_index->indrelid; } Assert(heapId != InvalidOid); - Assert(transfer || !isIndex); /* index OID only makes sense with - * transfer */ + Assert(transfer || !isIndex); /* index OID only makes sense with + * transfer */ /* Retrieve first time needed, then keep. */ heaptargettaghash = 0; diff --git a/src/backend/storage/lmgr/s_lock.c b/src/backend/storage/lmgr/s_lock.c index 09f1c64e46..c3cfdfcb44 100644 --- a/src/backend/storage/lmgr/s_lock.c +++ b/src/backend/storage/lmgr/s_lock.c @@ -133,7 +133,7 @@ perform_spin_delay(SpinDelayStatus *status) if (++(status->delays) > NUM_DELAYS) s_lock_stuck(status->file, status->line, status->func); - if (status->cur_delay == 0) /* first time to delay? */ + if (status->cur_delay == 0) /* first time to delay? */ status->cur_delay = MIN_DELAY_USEC; pg_usleep(status->cur_delay); @@ -276,12 +276,12 @@ _tas: \n\ _success: \n\ moveq #0,d0 \n\ rts \n" -#endif /* __NetBSD__ && __ELF__ */ +#endif /* __NetBSD__ && __ELF__ */ ); } -#endif /* __m68k__ && !__linux__ */ -#endif /* not __GNUC__ */ -#endif /* HAVE_SPINLOCKS */ +#endif /* __m68k__ && !__linux__ */ +#endif /* not __GNUC__ */ +#endif /* HAVE_SPINLOCKS */ @@ -375,4 +375,4 @@ main() return 1; } -#endif /* S_LOCK_TEST */ +#endif /* S_LOCK_TEST */ diff --git a/src/backend/storage/lmgr/spin.c b/src/backend/storage/lmgr/spin.c index f7b1ac04f9..2c16938f5a 100644 --- a/src/backend/storage/lmgr/spin.c +++ b/src/backend/storage/lmgr/spin.c @@ -140,4 +140,4 @@ tas_sema(volatile slock_t *lock) return !PGSemaphoreTryLock(SpinlockSemaArray[lockndx - 1]); } -#endif /* !HAVE_SPINLOCKS */ +#endif /* !HAVE_SPINLOCKS */ diff --git a/src/backend/storage/page/bufpage.c b/src/backend/storage/page/bufpage.c index 1b53d651cd..b6425e409c 100644 --- a/src/backend/storage/page/bufpage.c +++ b/src/backend/storage/page/bufpage.c @@ -237,7 +237,7 @@ PageAddItemExtended(Page page, else { if (offsetNumber < limit) - needshuffle = true; /* need to move existing linp's */ + needshuffle = true; /* need to move existing linp's */ } } else @@ -912,7 +912,7 @@ PageIndexMultiDelete(Page page, OffsetNumber *itemnos, int nitems) } else { - itemidptr->offsetindex = nused; /* where it will go */ + itemidptr->offsetindex = nused; /* where it will go */ itemidptr->itemoff = offset; itemidptr->alignedlen = MAXALIGN(size); totallen += itemidptr->alignedlen; diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c index 1b1de1f879..c5be21dd91 100644 --- a/src/backend/storage/smgr/md.c +++ b/src/backend/storage/smgr/md.c @@ -154,7 +154,7 @@ typedef struct static HTAB *pendingOpsTable = NULL; static List *pendingUnlinks = NIL; -static MemoryContext pendingOpsCxt; /* context for the above */ +static MemoryContext pendingOpsCxt; /* context for the above */ static CycleCtr mdsync_cycle_ctr = 0; static CycleCtr mdckpt_cycle_ctr = 0; @@ -669,7 +669,7 @@ mdprefetch(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum) Assert(seekpos < (off_t) BLCKSZ * RELSEG_SIZE); (void) FilePrefetch(v->mdfd_vfd, seekpos, BLCKSZ, WAIT_EVENT_DATA_FILE_PREFETCH); -#endif /* USE_PREFETCH */ +#endif /* USE_PREFETCH */ } /* diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c index e9850f79ae..6955e4c577 100644 --- a/src/backend/storage/smgr/smgr.c +++ b/src/backend/storage/smgr/smgr.c @@ -38,7 +38,7 @@ typedef struct f_smgr { void (*smgr_init) (void); /* may be NULL */ - void (*smgr_shutdown) (void); /* may be NULL */ + void (*smgr_shutdown) (void); /* may be NULL */ void (*smgr_close) (SMgrRelation reln, ForkNumber forknum); void (*smgr_create) (SMgrRelation reln, ForkNumber forknum, bool isRedo); @@ -59,9 +59,9 @@ typedef struct f_smgr void (*smgr_truncate) (SMgrRelation reln, ForkNumber forknum, BlockNumber nblocks); void (*smgr_immedsync) (SMgrRelation reln, ForkNumber forknum); - void (*smgr_pre_ckpt) (void); /* may be NULL */ + void (*smgr_pre_ckpt) (void); /* may be NULL */ void (*smgr_sync) (void); /* may be NULL */ - void (*smgr_post_ckpt) (void); /* may be NULL */ + void (*smgr_post_ckpt) (void); /* may be NULL */ } f_smgr; diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c index ba0f06c302..90491c9062 100644 --- a/src/backend/tcop/fastpath.c +++ b/src/backend/tcop/fastpath.c @@ -54,7 +54,7 @@ struct fp_info Oid namespace; /* other stuff from pg_proc */ Oid rettype; Oid argtypes[FUNC_MAX_ARGS]; - char fname[NAMEDATALEN]; /* function name for logging */ + char fname[NAMEDATALEN]; /* function name for logging */ }; @@ -293,7 +293,7 @@ HandleFunctionRequest(StringInfo msgBuf) if (PG_PROTOCOL_MAJOR(FrontendProtocol) < 3) (void) pq_getmsgstring(msgBuf); /* dummy string */ - fid = (Oid) pq_getmsgint(msgBuf, 4); /* function oid */ + fid = (Oid) pq_getmsgint(msgBuf, 4); /* function oid */ /* * There used to be a lame attempt at caching lookup info here. Now we diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index fdc8c71a85..2645cbe692 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -153,7 +153,7 @@ static CachedPlanSource *unnamed_stmt_psrc = NULL; /* assorted command-line switches */ static const char *userDoption = NULL; /* -D switch */ static bool EchoQuery = false; /* -E switch */ -static bool UseSemiNewlineNewline = false; /* -j switch */ +static bool UseSemiNewlineNewline = false; /* -j switch */ /* whether or not, and why, we were canceled by conflict with recovery */ static bool RecoveryConflictPending = false; @@ -682,7 +682,7 @@ pg_analyze_and_rewrite_params(RawStmt *parsetree, Query *query; List *querytree_list; - Assert(query_string != NULL); /* required as of 8.4 */ + Assert(query_string != NULL); /* required as of 8.4 */ TRACE_POSTGRESQL_QUERY_REWRITE_START(query_string); @@ -1193,9 +1193,9 @@ exec_simple_query(const char *query_string) */ static void exec_parse_message(const char *query_string, /* string to execute */ - const char *stmt_name, /* name for prepared stmt */ - Oid *paramTypes, /* parameter types */ - int numParams) /* number of parameters */ + const char *stmt_name, /* name for prepared stmt */ + Oid *paramTypes, /* parameter types */ + int numParams) /* number of parameters */ { MemoryContext unnamed_stmt_context = NULL; MemoryContext oldcontext; @@ -1660,7 +1660,7 @@ exec_bind_message(StringInfo input_message) } else { - pbuf.data = NULL; /* keep compiler quiet */ + pbuf.data = NULL; /* keep compiler quiet */ csave = 0; } @@ -1694,7 +1694,7 @@ exec_bind_message(StringInfo input_message) if (pstring && pstring != pbuf.data) pfree(pstring); } - else if (pformat == 1) /* binary mode */ + else if (pformat == 1) /* binary mode */ { Oid typreceive; Oid typioparam; @@ -2555,7 +2555,7 @@ drop_unnamed_stmt(void) void quickdie(SIGNAL_ARGS) { - sigaddset(&BlockSig, SIGQUIT); /* prevent nested calls */ + sigaddset(&BlockSig, SIGQUIT); /* prevent nested calls */ PG_SETMASK(&BlockSig); /* @@ -2832,7 +2832,7 @@ ProcessInterrupts(void) if (ProcDiePending) { ProcDiePending = false; - QueryCancelPending = false; /* ProcDie trumps QueryCancel */ + QueryCancelPending = false; /* ProcDie trumps QueryCancel */ LockErrorCleanup(); /* As in quickdie, don't risk sending to client during auth */ if (ClientAuthInProgress && whereToSendOutput == DestRemote) @@ -2883,7 +2883,7 @@ ProcessInterrupts(void) } if (ClientConnectionLost) { - QueryCancelPending = false; /* lost connection trumps QueryCancel */ + QueryCancelPending = false; /* lost connection trumps QueryCancel */ LockErrorCleanup(); /* don't send to client, we already know the connection to be dead. */ whereToSendOutput = DestNone; @@ -2900,7 +2900,7 @@ ProcessInterrupts(void) */ if (RecoveryConflictPending && DoingCommandRead) { - QueryCancelPending = false; /* this trumps QueryCancel */ + QueryCancelPending = false; /* this trumps QueryCancel */ RecoveryConflictPending = false; LockErrorCleanup(); pgstat_report_recovery_conflict(RecoveryConflictReason); @@ -2950,7 +2950,7 @@ ProcessInterrupts(void) */ if (lock_timeout_occurred && stmt_timeout_occurred && get_timeout_finish_time(STATEMENT_TIMEOUT) < get_timeout_finish_time(LOCK_TIMEOUT)) - lock_timeout_occurred = false; /* report stmt timeout */ + lock_timeout_occurred = false; /* report stmt timeout */ if (lock_timeout_occurred) { @@ -3050,7 +3050,7 @@ ia64_get_bsp(void) return ret; } #endif -#endif /* IA64 */ +#endif /* IA64 */ /* @@ -3168,7 +3168,7 @@ stack_is_too_deep(void) if (stack_depth > max_stack_depth_bytes && register_stack_base_ptr != NULL) return true; -#endif /* IA64 */ +#endif /* IA64 */ return false; } @@ -3283,7 +3283,7 @@ get_stats_option_name(const char *arg) switch (arg[0]) { case 'p': - if (optarg[1] == 'a') /* "parser" */ + if (optarg[1] == 'a') /* "parser" */ return "log_parser_stats"; else if (optarg[1] == 'l') /* "planner" */ return "log_planner_stats"; @@ -3339,7 +3339,7 @@ process_postgres_switches(int argc, char *argv[], GucContext ctx, } else { - gucsource = PGC_S_CLIENT; /* switches came from client */ + gucsource = PGC_S_CLIENT; /* switches came from client */ } #ifdef HAVE_INT_OPTERR @@ -3640,9 +3640,9 @@ PostgresMain(int argc, char *argv[], WalSndSignals(); else { - pqsignal(SIGHUP, PostgresSigHupHandler); /* set flag to read - * config file */ - pqsignal(SIGINT, StatementCancelHandler); /* cancel current query */ + pqsignal(SIGHUP, PostgresSigHupHandler); /* set flag to read config + * file */ + pqsignal(SIGINT, StatementCancelHandler); /* cancel current query */ pqsignal(SIGTERM, die); /* cancel current query and exit */ /* @@ -3651,9 +3651,9 @@ PostgresMain(int argc, char *argv[], * rather than quickdie(). */ if (IsUnderPostmaster) - pqsignal(SIGQUIT, quickdie); /* hard crash time */ + pqsignal(SIGQUIT, quickdie); /* hard crash time */ else - pqsignal(SIGQUIT, die); /* cancel current query and exit */ + pqsignal(SIGQUIT, die); /* cancel current query and exit */ InitializeTimeouts(); /* establishes SIGALRM handler */ /* @@ -3671,8 +3671,8 @@ PostgresMain(int argc, char *argv[], * Reset some signals that are accepted by postmaster but not by * backend */ - pqsignal(SIGCHLD, SIG_DFL); /* system() requires this on some - * platforms */ + pqsignal(SIGCHLD, SIG_DFL); /* system() requires this on some + * platforms */ } pqinitmask(); @@ -3856,7 +3856,7 @@ PostgresMain(int argc, char *argv[], * forgetting a timeout cancel. */ disable_all_timeouts(false); - QueryCancelPending = false; /* second to avoid race condition */ + QueryCancelPending = false; /* second to avoid race condition */ /* Not reading from the client anymore. */ DoingCommandRead = false; @@ -4225,7 +4225,7 @@ PostgresMain(int argc, char *argv[], } if (whereToSendOutput == DestRemote) - pq_putemptymessage('3'); /* CloseComplete */ + pq_putemptymessage('3'); /* CloseComplete */ } break; @@ -4468,7 +4468,7 @@ ShowUsage(const char *title) r.ru_nvcsw - Save_r.ru_nvcsw, r.ru_nivcsw - Save_r.ru_nivcsw, r.ru_nvcsw, r.ru_nivcsw); -#endif /* HAVE_GETRUSAGE */ +#endif /* HAVE_GETRUSAGE */ /* remove trailing newline */ if (str.data[str.len - 1] == '\n') diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index e30aeb1c7f..756249ef4b 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -76,7 +76,7 @@ CreateQueryDesc(PlannedStmt *plannedstmt, QueryDesc *qd = (QueryDesc *) palloc(sizeof(QueryDesc)); qd->operation = plannedstmt->commandType; /* operation */ - qd->plannedstmt = plannedstmt; /* plan */ + qd->plannedstmt = plannedstmt; /* plan */ qd->sourceText = sourceText; /* query text */ qd->snapshot = RegisterSnapshot(snapshot); /* snapshot */ /* RI check snapshot */ @@ -84,8 +84,7 @@ CreateQueryDesc(PlannedStmt *plannedstmt, qd->dest = dest; /* output dest */ qd->params = params; /* parameter values passed into query */ qd->queryEnv = queryEnv; - qd->instrument_options = instrument_options; /* instrumentation - * wanted? */ + qd->instrument_options = instrument_options; /* instrumentation wanted? */ /* null these fields until set by ExecutorStart */ qd->tupDesc = NULL; @@ -939,7 +938,7 @@ PortalRunSelect(Portal portal, if (!ScanDirectionIsNoMovement(direction)) { if (nprocessed > 0) - portal->atStart = false; /* OK to go backward now */ + portal->atStart = false; /* OK to go backward now */ if (count == 0 || nprocessed < (uint64) count) portal->atEnd = true; /* we retrieved 'em all */ portal->portalPos += nprocessed; diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index dd1916f366..b0e8a84c62 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -1183,7 +1183,7 @@ ProcessUtilitySlow(ParseState *pstate, */ switch (stmt->subtype) { - case 'T': /* ALTER DOMAIN DEFAULT */ + case 'T': /* ALTER DOMAIN DEFAULT */ /* * Recursively alter column default for table and, @@ -1193,30 +1193,30 @@ ProcessUtilitySlow(ParseState *pstate, AlterDomainDefault(stmt->typeName, stmt->def); break; - case 'N': /* ALTER DOMAIN DROP NOT NULL */ + case 'N': /* ALTER DOMAIN DROP NOT NULL */ address = AlterDomainNotNull(stmt->typeName, false); break; - case 'O': /* ALTER DOMAIN SET NOT NULL */ + case 'O': /* ALTER DOMAIN SET NOT NULL */ address = AlterDomainNotNull(stmt->typeName, true); break; - case 'C': /* ADD CONSTRAINT */ + case 'C': /* ADD CONSTRAINT */ address = AlterDomainAddConstraint(stmt->typeName, stmt->def, &secondaryObject); break; - case 'X': /* DROP CONSTRAINT */ + case 'X': /* DROP CONSTRAINT */ address = AlterDomainDropConstraint(stmt->typeName, stmt->name, stmt->behavior, stmt->missing_ok); break; - case 'V': /* VALIDATE CONSTRAINT */ + case 'V': /* VALIDATE CONSTRAINT */ address = AlterDomainValidateConstraint(stmt->typeName, stmt->name); @@ -1324,14 +1324,14 @@ ProcessUtilitySlow(ParseState *pstate, /* ... and do it */ EventTriggerAlterTableStart(parsetree); address = - DefineIndex(relid, /* OID of heap relation */ + DefineIndex(relid, /* OID of heap relation */ stmt, InvalidOid, /* no predefined OID */ - false, /* is_alter_table */ - true, /* check_rights */ - true, /* check_not_in_use */ - false, /* skip_build */ - false); /* quiet */ + false, /* is_alter_table */ + true, /* check_rights */ + true, /* check_not_in_use */ + false, /* skip_build */ + false); /* quiet */ /* * Add the CREATE INDEX node itself to stash right away; @@ -1403,15 +1403,15 @@ ProcessUtilitySlow(ParseState *pstate, } break; - case T_CreateEnumStmt: /* CREATE TYPE AS ENUM */ + case T_CreateEnumStmt: /* CREATE TYPE AS ENUM */ address = DefineEnum((CreateEnumStmt *) parsetree); break; - case T_CreateRangeStmt: /* CREATE TYPE AS RANGE */ + case T_CreateRangeStmt: /* CREATE TYPE AS RANGE */ address = DefineRange((CreateRangeStmt *) parsetree); break; - case T_AlterEnumStmt: /* ALTER TYPE (enum) */ + case T_AlterEnumStmt: /* ALTER TYPE (enum) */ address = AlterEnum((AlterEnumStmt *) parsetree); break; @@ -1594,7 +1594,7 @@ ProcessUtilitySlow(ParseState *pstate, address = CreatePolicy((CreatePolicyStmt *) parsetree); break; - case T_AlterPolicyStmt: /* ALTER POLICY */ + case T_AlterPolicyStmt: /* ALTER POLICY */ address = AlterPolicy((AlterPolicyStmt *) parsetree); break; @@ -1725,7 +1725,7 @@ UtilityReturnsTuples(Node *parsetree) return false; portal = GetPortalByName(stmt->portalname); if (!PortalIsValid(portal)) - return false; /* not our business to raise error */ + return false; /* not our business to raise error */ return portal->tupDesc ? true : false; } @@ -1736,7 +1736,7 @@ UtilityReturnsTuples(Node *parsetree) entry = FetchPreparedStatement(stmt->name, false); if (!entry) - return false; /* not our business to raise error */ + return false; /* not our business to raise error */ if (entry->plansource->resultDesc) return true; return false; @@ -2887,7 +2887,7 @@ GetCommandLogLevel(Node *parsetree) case T_SelectStmt: if (((SelectStmt *) parsetree)->intoClause) - lev = LOGSTMT_DDL; /* SELECT INTO */ + lev = LOGSTMT_DDL; /* SELECT INTO */ else lev = LOGSTMT_ALL; break; diff --git a/src/backend/tsearch/dict_thesaurus.c b/src/backend/tsearch/dict_thesaurus.c index 9a01075d4e..ccf057b5d6 100644 --- a/src/backend/tsearch/dict_thesaurus.c +++ b/src/backend/tsearch/dict_thesaurus.c @@ -405,7 +405,7 @@ compileTheLexeme(DictThesaurus *d) { TSLexeme *ptr; - if (strcmp(d->wrds[i].lexeme, "?") == 0) /* Is stop word marker? */ + if (strcmp(d->wrds[i].lexeme, "?") == 0) /* Is stop word marker? */ newwrds = addCompiledLexeme(newwrds, &nnw, &tnm, NULL, d->wrds[i].entries, 0); else { diff --git a/src/backend/tsearch/spell.c b/src/backend/tsearch/spell.c index 817237ce4d..3bcc93fa1b 100644 --- a/src/backend/tsearch/spell.c +++ b/src/backend/tsearch/spell.c @@ -827,7 +827,7 @@ get_nextfield(char **str, char *next) *next = '\0'; - return (state == PAE_INMASK); /* OK if we got a nonempty field */ + return (state == PAE_INMASK); /* OK if we got a nonempty field */ } /* diff --git a/src/backend/tsearch/ts_locale.c b/src/backend/tsearch/ts_locale.c index 19d2cc3f30..2cc084770d 100644 --- a/src/backend/tsearch/ts_locale.c +++ b/src/backend/tsearch/ts_locale.c @@ -28,7 +28,7 @@ t_isdigit(const char *ptr) { int clen = pg_mblen(ptr); wchar_t character[2]; - Oid collation = DEFAULT_COLLATION_OID; /* TODO */ + Oid collation = DEFAULT_COLLATION_OID; /* TODO */ pg_locale_t mylocale = 0; /* TODO */ if (clen == 1 || lc_ctype_is_c(collation)) @@ -44,7 +44,7 @@ t_isspace(const char *ptr) { int clen = pg_mblen(ptr); wchar_t character[2]; - Oid collation = DEFAULT_COLLATION_OID; /* TODO */ + Oid collation = DEFAULT_COLLATION_OID; /* TODO */ pg_locale_t mylocale = 0; /* TODO */ if (clen == 1 || lc_ctype_is_c(collation)) @@ -60,7 +60,7 @@ t_isalpha(const char *ptr) { int clen = pg_mblen(ptr); wchar_t character[2]; - Oid collation = DEFAULT_COLLATION_OID; /* TODO */ + Oid collation = DEFAULT_COLLATION_OID; /* TODO */ pg_locale_t mylocale = 0; /* TODO */ if (clen == 1 || lc_ctype_is_c(collation)) @@ -76,7 +76,7 @@ t_isprint(const char *ptr) { int clen = pg_mblen(ptr); wchar_t character[2]; - Oid collation = DEFAULT_COLLATION_OID; /* TODO */ + Oid collation = DEFAULT_COLLATION_OID; /* TODO */ pg_locale_t mylocale = 0; /* TODO */ if (clen == 1 || lc_ctype_is_c(collation)) @@ -86,7 +86,7 @@ t_isprint(const char *ptr) return iswprint((wint_t) character[0]); } -#endif /* USE_WIDE_UPPER_LOWER */ +#endif /* USE_WIDE_UPPER_LOWER */ /* @@ -246,7 +246,7 @@ lowerstr_with_len(const char *str, int len) char *out; #ifdef USE_WIDE_UPPER_LOWER - Oid collation = DEFAULT_COLLATION_OID; /* TODO */ + Oid collation = DEFAULT_COLLATION_OID; /* TODO */ pg_locale_t mylocale = 0; /* TODO */ #endif @@ -300,7 +300,7 @@ lowerstr_with_len(const char *str, int len) Assert(wlen < len); } else -#endif /* USE_WIDE_UPPER_LOWER */ +#endif /* USE_WIDE_UPPER_LOWER */ { const char *ptr = str; char *outptr; diff --git a/src/backend/tsearch/ts_typanalyze.c b/src/backend/tsearch/ts_typanalyze.c index f4298ca9aa..975623fa96 100644 --- a/src/backend/tsearch/ts_typanalyze.c +++ b/src/backend/tsearch/ts_typanalyze.c @@ -423,7 +423,7 @@ compute_tsvector_stats(VacAttrStats *stats, stats->stats_valid = true; stats->stanullfrac = 1.0; stats->stawidth = 0; /* "unknown" */ - stats->stadistinct = 0.0; /* "unknown" */ + stats->stadistinct = 0.0; /* "unknown" */ } /* diff --git a/src/backend/tsearch/wparser_def.c b/src/backend/tsearch/wparser_def.c index 0cfc6552d7..0ce2e00eb2 100644 --- a/src/backend/tsearch/wparser_def.c +++ b/src/backend/tsearch/wparser_def.c @@ -199,10 +199,10 @@ typedef enum /* forward declaration */ struct TParser; -typedef int (*TParserCharTest) (struct TParser *); /* any p_is* functions - * except p_iseq */ -typedef void (*TParserSpecial) (struct TParser *); /* special handler for - * special cases... */ +typedef int (*TParserCharTest) (struct TParser *); /* any p_is* functions + * except p_iseq */ +typedef void (*TParserSpecial) (struct TParser *); /* special handler for + * special cases... */ typedef struct { @@ -302,7 +302,7 @@ TParserInit(char *str, int len) if (prs->charmaxlen > 1) { Oid collation = DEFAULT_COLLATION_OID; /* TODO */ - pg_locale_t mylocale = 0; /* TODO */ + pg_locale_t mylocale = 0; /* TODO */ prs->usewide = true; if (lc_ctype_is_c(collation)) @@ -560,7 +560,7 @@ p_iseq(TParser *prs, char c) p_iswhat(alnum) p_iswhat(alpha) -#endif /* USE_WIDE_UPPER_LOWER */ +#endif /* USE_WIDE_UPPER_LOWER */ p_iswhat(digit) p_iswhat(lower) @@ -1697,7 +1697,7 @@ static const TParserStateActionItem actionTPS_InHyphenUnsignedInt[] = { */ typedef struct { - const TParserStateActionItem *action; /* the actual state info */ + const TParserStateActionItem *action; /* the actual state info */ TParserState state; /* only for Assert crosscheck */ #ifdef WPARSER_TRACE const char *state_name; /* only for debug printout */ diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c index 35bdfc9a46..c4899cb3bc 100644 --- a/src/backend/utils/adt/acl.c +++ b/src/backend/utils/adt/acl.c @@ -793,7 +793,7 @@ acldefault(GrantObjectType objtype, Oid ownerId) break; default: elog(ERROR, "unrecognized objtype: %d", (int) objtype); - world_default = ACL_NO_RIGHTS; /* keep compiler quiet */ + world_default = ACL_NO_RIGHTS; /* keep compiler quiet */ owner_default = ACL_NO_RIGHTS; break; } @@ -4713,7 +4713,7 @@ roles_has_privs_of(Oid roleid) /* * Now safe to assign to state variable */ - cached_privs_role = InvalidOid; /* just paranoia */ + cached_privs_role = InvalidOid; /* just paranoia */ list_free(cached_privs_roles); cached_privs_roles = new_cached_privs_roles; cached_privs_role = roleid; diff --git a/src/backend/utils/adt/array_selfuncs.c b/src/backend/utils/adt/array_selfuncs.c index 3ae6018c67..7be5e6c677 100644 --- a/src/backend/utils/adt/array_selfuncs.c +++ b/src/backend/utils/adt/array_selfuncs.c @@ -788,7 +788,7 @@ mcelem_array_contained_selec(Datum *mcelem, int nmcelem, else { if (cmp == 0) - match = true; /* mcelem is found */ + match = true; /* mcelem is found */ break; } } diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index 1d202dba12..e1ebe57681 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -171,8 +171,8 @@ Datum array_in(PG_FUNCTION_ARGS) { char *string = PG_GETARG_CSTRING(0); /* external form */ - Oid element_type = PG_GETARG_OID(1); /* type of an array - * element */ + Oid element_type = PG_GETARG_OID(1); /* type of an array + * element */ int32 typmod = PG_GETARG_INT32(2); /* typmod for array elements */ int typlen; bool typbyval; @@ -1130,9 +1130,9 @@ array_out(PG_FUNCTION_ARGS) /* count data plus backslashes; detect chars needing quotes */ if (values[i][0] == '\0') - needquote = true; /* force quotes for empty string */ + needquote = true; /* force quotes for empty string */ else if (pg_strcasecmp(values[i], "NULL") == 0) - needquote = true; /* force quotes for literal NULL */ + needquote = true; /* force quotes for literal NULL */ else needquote = false; @@ -2318,14 +2318,14 @@ array_set_element(Datum arraydatum, dim[0] += addedbefore; lb[0] = indx[0]; if (addedbefore > 1) - newhasnulls = true; /* will insert nulls */ + newhasnulls = true; /* will insert nulls */ } if (indx[0] >= (dim[0] + lb[0])) { addedafter = indx[0] - (dim[0] + lb[0]) + 1; dim[0] += addedafter; if (addedafter > 1) - newhasnulls = true; /* will insert nulls */ + newhasnulls = true; /* will insert nulls */ } } else @@ -2575,7 +2575,7 @@ array_set_element_expanded(Datum arraydatum, lb[0] = indx[0]; dimschanged = true; if (addedbefore > 1) - newhasnulls = true; /* will insert nulls */ + newhasnulls = true; /* will insert nulls */ } if (indx[0] >= (dim[0] + lb[0])) { @@ -2583,7 +2583,7 @@ array_set_element_expanded(Datum arraydatum, dim[0] += addedafter; dimschanged = true; if (addedafter > 1) - newhasnulls = true; /* will insert nulls */ + newhasnulls = true; /* will insert nulls */ } } else @@ -2871,7 +2871,7 @@ array_set_slice(Datum arraydatum, if (lowerIndx[0] < lb[0]) { if (upperIndx[0] < lb[0] - 1) - newhasnulls = true; /* will insert nulls */ + newhasnulls = true; /* will insert nulls */ addedbefore = lb[0] - lowerIndx[0]; dim[0] += addedbefore; lb[0] = lowerIndx[0]; @@ -2879,7 +2879,7 @@ array_set_slice(Datum arraydatum, if (upperIndx[0] >= (dim[0] + lb[0])) { if (lowerIndx[0] > (dim[0] + lb[0])) - newhasnulls = true; /* will insert nulls */ + newhasnulls = true; /* will insert nulls */ addedafter = upperIndx[0] - (dim[0] + lb[0]) + 1; dim[0] += addedafter; } @@ -2956,7 +2956,7 @@ array_set_slice(Datum arraydatum, ndim, dim, lb, lowerIndx, upperIndx, elmlen, elmbyval, elmalign); - lenbefore = lenafter = 0; /* keep compiler quiet */ + lenbefore = lenafter = 0; /* keep compiler quiet */ itemsbefore = itemsafter = nolditems = 0; } else @@ -4963,8 +4963,7 @@ initArrayResult(Oid element_type, MemoryContext rcontext, bool subcontext) MemoryContextAlloc(arr_context, sizeof(ArrayBuildState)); astate->mcontext = arr_context; astate->private_cxt = subcontext; - astate->alen = (subcontext ? 64 : 8); /* arbitrary starting array - * size */ + astate->alen = (subcontext ? 64 : 8); /* arbitrary starting array size */ astate->dvalues = (Datum *) MemoryContextAlloc(arr_context, astate->alen * sizeof(Datum)); astate->dnulls = (bool *) @@ -5140,8 +5139,7 @@ initArrayResultArr(Oid array_type, Oid element_type, MemoryContext rcontext, bool subcontext) { ArrayBuildStateArr *astate; - MemoryContext arr_context = rcontext; /* by default use the parent - * ctx */ + MemoryContext arr_context = rcontext; /* by default use the parent ctx */ /* Lookup element type, unless element_type already provided */ if (!OidIsValid(element_type)) diff --git a/src/backend/utils/adt/ascii.c b/src/backend/utils/adt/ascii.c index e219d4b495..362272277f 100644 --- a/src/backend/utils/adt/ascii.c +++ b/src/backend/utils/adt/ascii.c @@ -102,9 +102,9 @@ pg_to_ascii(unsigned char *src, unsigned char *src_end, unsigned char *dest, int static text * encode_to_ascii(text *data, int enc) { - pg_to_ascii((unsigned char *) VARDATA(data), /* src */ - (unsigned char *) (data) + VARSIZE(data), /* src end */ - (unsigned char *) VARDATA(data), /* dest */ + pg_to_ascii((unsigned char *) VARDATA(data), /* src */ + (unsigned char *) (data) + VARSIZE(data), /* src end */ + (unsigned char *) VARDATA(data), /* dest */ enc); /* encoding */ return data; diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c index 677037c246..7bbc634bd2 100644 --- a/src/backend/utils/adt/cash.c +++ b/src/backend/utils/adt/cash.c @@ -971,10 +971,10 @@ cash_words(PG_FUNCTION_ARGS) val = (uint64) value; m0 = val % INT64CONST(100); /* cents */ - m1 = (val / INT64CONST(100)) % 1000; /* hundreds */ - m2 = (val / INT64CONST(100000)) % 1000; /* thousands */ + m1 = (val / INT64CONST(100)) % 1000; /* hundreds */ + m2 = (val / INT64CONST(100000)) % 1000; /* thousands */ m3 = (val / INT64CONST(100000000)) % 1000; /* millions */ - m4 = (val / INT64CONST(100000000000)) % 1000; /* billions */ + m4 = (val / INT64CONST(100000000000)) % 1000; /* billions */ m5 = (val / INT64CONST(100000000000000)) % 1000; /* trillions */ m6 = (val / INT64CONST(100000000000000000)) % 1000; /* quadrillions */ diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index 3095047f0b..2b261cd5bd 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -527,7 +527,7 @@ date_pli(PG_FUNCTION_ARGS) DateADT result; if (DATE_NOT_FINITE(dateVal)) - PG_RETURN_DATEADT(dateVal); /* can't change infinity */ + PG_RETURN_DATEADT(dateVal); /* can't change infinity */ result = dateVal + days; @@ -551,7 +551,7 @@ date_mii(PG_FUNCTION_ARGS) DateADT result; if (DATE_NOT_FINITE(dateVal)) - PG_RETURN_DATEADT(dateVal); /* can't change infinity */ + PG_RETURN_DATEADT(dateVal); /* can't change infinity */ result = dateVal - days; diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 107b8fdad9..73c4e41213 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -91,7 +91,7 @@ static const datetkn datetktbl[] = { /* token, type, value */ {EARLY, RESERV, DTK_EARLY}, /* "-infinity" reserved for "early time" */ {DA_D, ADBC, AD}, /* "ad" for years > 0 */ - {"allballs", RESERV, DTK_ZULU}, /* 00:00:00 */ + {"allballs", RESERV, DTK_ZULU}, /* 00:00:00 */ {"am", AMPM, AM}, {"apr", MONTH, 4}, {"april", MONTH, 4}, @@ -113,8 +113,8 @@ static const datetkn datetktbl[] = { {"friday", DOW, 5}, {"h", UNITS, DTK_HOUR}, /* "hour" */ {LATE, RESERV, DTK_LATE}, /* "infinity" reserved for "late time" */ - {INVALID, RESERV, DTK_INVALID}, /* "invalid" reserved for bad time */ - {"isodow", UNITS, DTK_ISODOW}, /* ISO day of week, Sunday == 7 */ + {INVALID, RESERV, DTK_INVALID}, /* "invalid" reserved for bad time */ + {"isodow", UNITS, DTK_ISODOW}, /* ISO day of week, Sunday == 7 */ {"isoyear", UNITS, DTK_ISOYEAR}, /* year in terms of the ISO week date */ {"j", UNITS, DTK_JULIAN}, {"jan", MONTH, 1}, @@ -176,33 +176,33 @@ static const datetkn deltatktbl[] = { {"@", IGNORE_DTF, 0}, /* postgres relative prefix */ {DAGO, AGO, 0}, /* "ago" indicates negative time offset */ {"c", UNITS, DTK_CENTURY}, /* "century" relative */ - {"cent", UNITS, DTK_CENTURY}, /* "century" relative */ + {"cent", UNITS, DTK_CENTURY}, /* "century" relative */ {"centuries", UNITS, DTK_CENTURY}, /* "centuries" relative */ - {DCENTURY, UNITS, DTK_CENTURY}, /* "century" relative */ + {DCENTURY, UNITS, DTK_CENTURY}, /* "century" relative */ {"d", UNITS, DTK_DAY}, /* "day" relative */ {DDAY, UNITS, DTK_DAY}, /* "day" relative */ {"days", UNITS, DTK_DAY}, /* "days" relative */ {"dec", UNITS, DTK_DECADE}, /* "decade" relative */ - {DDECADE, UNITS, DTK_DECADE}, /* "decade" relative */ - {"decades", UNITS, DTK_DECADE}, /* "decades" relative */ + {DDECADE, UNITS, DTK_DECADE}, /* "decade" relative */ + {"decades", UNITS, DTK_DECADE}, /* "decades" relative */ {"decs", UNITS, DTK_DECADE}, /* "decades" relative */ {"h", UNITS, DTK_HOUR}, /* "hour" relative */ {DHOUR, UNITS, DTK_HOUR}, /* "hour" relative */ {"hours", UNITS, DTK_HOUR}, /* "hours" relative */ {"hr", UNITS, DTK_HOUR}, /* "hour" relative */ {"hrs", UNITS, DTK_HOUR}, /* "hours" relative */ - {INVALID, RESERV, DTK_INVALID}, /* reserved for invalid time */ + {INVALID, RESERV, DTK_INVALID}, /* reserved for invalid time */ {"m", UNITS, DTK_MINUTE}, /* "minute" relative */ - {"microsecon", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ - {"mil", UNITS, DTK_MILLENNIUM}, /* "millennium" relative */ - {"millennia", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */ - {DMILLENNIUM, UNITS, DTK_MILLENNIUM}, /* "millennium" relative */ - {"millisecon", UNITS, DTK_MILLISEC}, /* relative */ + {"microsecon", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ + {"mil", UNITS, DTK_MILLENNIUM}, /* "millennium" relative */ + {"millennia", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */ + {DMILLENNIUM, UNITS, DTK_MILLENNIUM}, /* "millennium" relative */ + {"millisecon", UNITS, DTK_MILLISEC}, /* relative */ {"mils", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */ {"min", UNITS, DTK_MINUTE}, /* "minute" relative */ {"mins", UNITS, DTK_MINUTE}, /* "minutes" relative */ - {DMINUTE, UNITS, DTK_MINUTE}, /* "minute" relative */ - {"minutes", UNITS, DTK_MINUTE}, /* "minutes" relative */ + {DMINUTE, UNITS, DTK_MINUTE}, /* "minute" relative */ + {"minutes", UNITS, DTK_MINUTE}, /* "minutes" relative */ {"mon", UNITS, DTK_MONTH}, /* "months" relative */ {"mons", UNITS, DTK_MONTH}, /* "months" relative */ {DMONTH, UNITS, DTK_MONTH}, /* "month" relative */ @@ -213,7 +213,7 @@ static const datetkn deltatktbl[] = { {"mseconds", UNITS, DTK_MILLISEC}, {"msecs", UNITS, DTK_MILLISEC}, {"qtr", UNITS, DTK_QUARTER}, /* "quarter" relative */ - {DQUARTER, UNITS, DTK_QUARTER}, /* "quarter" relative */ + {DQUARTER, UNITS, DTK_QUARTER}, /* "quarter" relative */ {"s", UNITS, DTK_SECOND}, {"sec", UNITS, DTK_SECOND}, {DSECOND, UNITS, DTK_SECOND}, @@ -221,13 +221,13 @@ static const datetkn deltatktbl[] = { {"secs", UNITS, DTK_SECOND}, {DTIMEZONE, UNITS, DTK_TZ}, /* "timezone" time offset */ {"timezone_h", UNITS, DTK_TZ_HOUR}, /* timezone hour units */ - {"timezone_m", UNITS, DTK_TZ_MINUTE}, /* timezone minutes units */ + {"timezone_m", UNITS, DTK_TZ_MINUTE}, /* timezone minutes units */ {"undefined", RESERV, DTK_INVALID}, /* pre-v6.1 invalid time */ {"us", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ - {"usec", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ + {"usec", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ {DMICROSEC, UNITS, DTK_MICROSEC}, /* "microsecond" relative */ {"useconds", UNITS, DTK_MICROSEC}, /* "microseconds" relative */ - {"usecs", UNITS, DTK_MICROSEC}, /* "microseconds" relative */ + {"usecs", UNITS, DTK_MICROSEC}, /* "microseconds" relative */ {"w", UNITS, DTK_WEEK}, /* "week" relative */ {DWEEK, UNITS, DTK_WEEK}, /* "week" relative */ {"weeks", UNITS, DTK_WEEK}, /* "weeks" relative */ @@ -2752,7 +2752,7 @@ DecodeNumber(int flen, char *str, bool haveTextMonth, int fmask, if (flen >= 3 && *is2digits) { /* Guess that first numeric field is day was wrong */ - *tmask = DTK_M(DAY); /* YEAR is already set */ + *tmask = DTK_M(DAY); /* YEAR is already set */ tm->tm_mday = tm->tm_year; tm->tm_year = val; *is2digits = FALSE; diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index 894f026a41..30746ef908 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -65,7 +65,7 @@ do { \ /* Configurable GUC parameter */ -int extra_float_digits = 0; /* Added to DBL_DIG or FLT_DIG */ +int extra_float_digits = 0; /* Added to DBL_DIG or FLT_DIG */ /* Cached constants for degree-based trig functions */ static bool degree_consts_set = false; @@ -105,7 +105,7 @@ static void init_degree_constants(void); */ #define cbrt my_cbrt static double cbrt(double x); -#endif /* HAVE_CBRT */ +#endif /* HAVE_CBRT */ /* @@ -329,7 +329,7 @@ float4in(PG_FUNCTION_ARGS) if (endptr != num && endptr[-1] == '\0') endptr--; } -#endif /* HAVE_BUGGY_SOLARIS_STRTOD */ +#endif /* HAVE_BUGGY_SOLARIS_STRTOD */ /* skip trailing whitespace */ while (*endptr != '\0' && isspace((unsigned char) *endptr)) @@ -555,7 +555,7 @@ float8in_internal(char *num, char **endptr_p, if (endptr != num && endptr[-1] == '\0') endptr--; } -#endif /* HAVE_BUGGY_SOLARIS_STRTOD */ +#endif /* HAVE_BUGGY_SOLARIS_STRTOD */ /* skip trailing whitespace */ while (*endptr != '\0' && isspace((unsigned char) *endptr)) @@ -3608,4 +3608,4 @@ cbrt(double x) return isneg ? -tmpres : tmpres; } -#endif /* !HAVE_CBRT */ +#endif /* !HAVE_CBRT */ diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index ba7e4fc934..807ce589da 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -114,8 +114,8 @@ * Maximal length of one node * ---------- */ -#define DCH_MAX_ITEM_SIZ 12 /* max localized day name */ -#define NUM_MAX_ITEM_SIZ 8 /* roman number (RN has 15 chars) */ +#define DCH_MAX_ITEM_SIZ 12 /* max localized day name */ +#define NUM_MAX_ITEM_SIZ 8 /* roman number (RN has 15 chars) */ /* ---------- * More is in float.c @@ -724,7 +724,7 @@ static const KeyWord DCH_keywords[] = { {"AM", 2, DCH_AM, FALSE, FROM_CHAR_DATE_NONE}, {"B.C.", 4, DCH_B_C, FALSE, FROM_CHAR_DATE_NONE}, /* B */ {"BC", 2, DCH_BC, FALSE, FROM_CHAR_DATE_NONE}, - {"CC", 2, DCH_CC, TRUE, FROM_CHAR_DATE_NONE}, /* C */ + {"CC", 2, DCH_CC, TRUE, FROM_CHAR_DATE_NONE}, /* C */ {"DAY", 3, DCH_DAY, FALSE, FROM_CHAR_DATE_NONE}, /* D */ {"DDD", 3, DCH_DDD, TRUE, FROM_CHAR_DATE_GREGORIAN}, {"DD", 2, DCH_DD, TRUE, FROM_CHAR_DATE_GREGORIAN}, @@ -732,11 +732,11 @@ static const KeyWord DCH_keywords[] = { {"Day", 3, DCH_Day, FALSE, FROM_CHAR_DATE_NONE}, {"Dy", 2, DCH_Dy, FALSE, FROM_CHAR_DATE_NONE}, {"D", 1, DCH_D, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"FX", 2, DCH_FX, FALSE, FROM_CHAR_DATE_NONE}, /* F */ + {"FX", 2, DCH_FX, FALSE, FROM_CHAR_DATE_NONE}, /* F */ {"HH24", 4, DCH_HH24, TRUE, FROM_CHAR_DATE_NONE}, /* H */ {"HH12", 4, DCH_HH12, TRUE, FROM_CHAR_DATE_NONE}, {"HH", 2, DCH_HH, TRUE, FROM_CHAR_DATE_NONE}, - {"IDDD", 4, DCH_IDDD, TRUE, FROM_CHAR_DATE_ISOWEEK}, /* I */ + {"IDDD", 4, DCH_IDDD, TRUE, FROM_CHAR_DATE_ISOWEEK}, /* I */ {"ID", 2, DCH_ID, TRUE, FROM_CHAR_DATE_ISOWEEK}, {"IW", 2, DCH_IW, TRUE, FROM_CHAR_DATE_ISOWEEK}, {"IYYY", 4, DCH_IYYY, TRUE, FROM_CHAR_DATE_ISOWEEK}, @@ -744,22 +744,22 @@ static const KeyWord DCH_keywords[] = { {"IY", 2, DCH_IY, TRUE, FROM_CHAR_DATE_ISOWEEK}, {"I", 1, DCH_I, TRUE, FROM_CHAR_DATE_ISOWEEK}, {"J", 1, DCH_J, TRUE, FROM_CHAR_DATE_NONE}, /* J */ - {"MI", 2, DCH_MI, TRUE, FROM_CHAR_DATE_NONE}, /* M */ + {"MI", 2, DCH_MI, TRUE, FROM_CHAR_DATE_NONE}, /* M */ {"MM", 2, DCH_MM, TRUE, FROM_CHAR_DATE_GREGORIAN}, {"MONTH", 5, DCH_MONTH, FALSE, FROM_CHAR_DATE_GREGORIAN}, {"MON", 3, DCH_MON, FALSE, FROM_CHAR_DATE_GREGORIAN}, {"MS", 2, DCH_MS, TRUE, FROM_CHAR_DATE_NONE}, {"Month", 5, DCH_Month, FALSE, FROM_CHAR_DATE_GREGORIAN}, {"Mon", 3, DCH_Mon, FALSE, FROM_CHAR_DATE_GREGORIAN}, - {"OF", 2, DCH_OF, FALSE, FROM_CHAR_DATE_NONE}, /* O */ + {"OF", 2, DCH_OF, FALSE, FROM_CHAR_DATE_NONE}, /* O */ {"P.M.", 4, DCH_P_M, FALSE, FROM_CHAR_DATE_NONE}, /* P */ {"PM", 2, DCH_PM, FALSE, FROM_CHAR_DATE_NONE}, {"Q", 1, DCH_Q, TRUE, FROM_CHAR_DATE_NONE}, /* Q */ {"RM", 2, DCH_RM, FALSE, FROM_CHAR_DATE_GREGORIAN}, /* R */ {"SSSS", 4, DCH_SSSS, TRUE, FROM_CHAR_DATE_NONE}, /* S */ {"SS", 2, DCH_SS, TRUE, FROM_CHAR_DATE_NONE}, - {"TZ", 2, DCH_TZ, FALSE, FROM_CHAR_DATE_NONE}, /* T */ - {"US", 2, DCH_US, TRUE, FROM_CHAR_DATE_NONE}, /* U */ + {"TZ", 2, DCH_TZ, FALSE, FROM_CHAR_DATE_NONE}, /* T */ + {"US", 2, DCH_US, TRUE, FROM_CHAR_DATE_NONE}, /* U */ {"WW", 2, DCH_WW, TRUE, FROM_CHAR_DATE_GREGORIAN}, /* W */ {"W", 1, DCH_W, TRUE, FROM_CHAR_DATE_GREGORIAN}, {"Y,YYY", 5, DCH_Y_YYY, TRUE, FROM_CHAR_DATE_GREGORIAN}, /* Y */ @@ -773,17 +773,17 @@ static const KeyWord DCH_keywords[] = { {"am", 2, DCH_am, FALSE, FROM_CHAR_DATE_NONE}, {"b.c.", 4, DCH_b_c, FALSE, FROM_CHAR_DATE_NONE}, /* b */ {"bc", 2, DCH_bc, FALSE, FROM_CHAR_DATE_NONE}, - {"cc", 2, DCH_CC, TRUE, FROM_CHAR_DATE_NONE}, /* c */ + {"cc", 2, DCH_CC, TRUE, FROM_CHAR_DATE_NONE}, /* c */ {"day", 3, DCH_day, FALSE, FROM_CHAR_DATE_NONE}, /* d */ {"ddd", 3, DCH_DDD, TRUE, FROM_CHAR_DATE_GREGORIAN}, {"dd", 2, DCH_DD, TRUE, FROM_CHAR_DATE_GREGORIAN}, {"dy", 2, DCH_dy, FALSE, FROM_CHAR_DATE_NONE}, {"d", 1, DCH_D, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"fx", 2, DCH_FX, FALSE, FROM_CHAR_DATE_NONE}, /* f */ + {"fx", 2, DCH_FX, FALSE, FROM_CHAR_DATE_NONE}, /* f */ {"hh24", 4, DCH_HH24, TRUE, FROM_CHAR_DATE_NONE}, /* h */ {"hh12", 4, DCH_HH12, TRUE, FROM_CHAR_DATE_NONE}, {"hh", 2, DCH_HH, TRUE, FROM_CHAR_DATE_NONE}, - {"iddd", 4, DCH_IDDD, TRUE, FROM_CHAR_DATE_ISOWEEK}, /* i */ + {"iddd", 4, DCH_IDDD, TRUE, FROM_CHAR_DATE_ISOWEEK}, /* i */ {"id", 2, DCH_ID, TRUE, FROM_CHAR_DATE_ISOWEEK}, {"iw", 2, DCH_IW, TRUE, FROM_CHAR_DATE_ISOWEEK}, {"iyyy", 4, DCH_IYYY, TRUE, FROM_CHAR_DATE_ISOWEEK}, @@ -791,7 +791,7 @@ static const KeyWord DCH_keywords[] = { {"iy", 2, DCH_IY, TRUE, FROM_CHAR_DATE_ISOWEEK}, {"i", 1, DCH_I, TRUE, FROM_CHAR_DATE_ISOWEEK}, {"j", 1, DCH_J, TRUE, FROM_CHAR_DATE_NONE}, /* j */ - {"mi", 2, DCH_MI, TRUE, FROM_CHAR_DATE_NONE}, /* m */ + {"mi", 2, DCH_MI, TRUE, FROM_CHAR_DATE_NONE}, /* m */ {"mm", 2, DCH_MM, TRUE, FROM_CHAR_DATE_GREGORIAN}, {"month", 5, DCH_month, FALSE, FROM_CHAR_DATE_GREGORIAN}, {"mon", 3, DCH_mon, FALSE, FROM_CHAR_DATE_GREGORIAN}, @@ -802,8 +802,8 @@ static const KeyWord DCH_keywords[] = { {"rm", 2, DCH_rm, FALSE, FROM_CHAR_DATE_GREGORIAN}, /* r */ {"ssss", 4, DCH_SSSS, TRUE, FROM_CHAR_DATE_NONE}, /* s */ {"ss", 2, DCH_SS, TRUE, FROM_CHAR_DATE_NONE}, - {"tz", 2, DCH_tz, FALSE, FROM_CHAR_DATE_NONE}, /* t */ - {"us", 2, DCH_US, TRUE, FROM_CHAR_DATE_NONE}, /* u */ + {"tz", 2, DCH_tz, FALSE, FROM_CHAR_DATE_NONE}, /* t */ + {"us", 2, DCH_US, TRUE, FROM_CHAR_DATE_NONE}, /* u */ {"ww", 2, DCH_WW, TRUE, FROM_CHAR_DATE_GREGORIAN}, /* w */ {"w", 1, DCH_W, TRUE, FROM_CHAR_DATE_GREGORIAN}, {"y,yyy", 5, DCH_Y_YYY, TRUE, FROM_CHAR_DATE_GREGORIAN}, /* y */ @@ -1377,7 +1377,7 @@ dump_node(FormatNode *node, int max) elog(DEBUG_elog_output, "%d:\t unknown NODE!", a); } } -#endif /* DEBUG */ +#endif /* DEBUG */ /***************************************************************************** * Private utils @@ -1491,7 +1491,7 @@ u_strToTitle_default_BI(UChar *dest, int32_t destCapacity, NULL, locale, pErrorCode); } -#endif /* USE_ICU */ +#endif /* USE_ICU */ /* * If the system provides the needed functions for wide-character manipulation @@ -1602,7 +1602,7 @@ str_tolower(const char *buff, size_t nbytes, Oid collid) wchar2char(result, workspace, result_size, mylocale); pfree(workspace); } -#endif /* USE_WIDE_UPPER_LOWER */ +#endif /* USE_WIDE_UPPER_LOWER */ else { char *p; @@ -1725,7 +1725,7 @@ str_toupper(const char *buff, size_t nbytes, Oid collid) wchar2char(result, workspace, result_size, mylocale); pfree(workspace); } -#endif /* USE_WIDE_UPPER_LOWER */ +#endif /* USE_WIDE_UPPER_LOWER */ else { char *p; @@ -1861,7 +1861,7 @@ str_initcap(const char *buff, size_t nbytes, Oid collid) wchar2char(result, workspace, result_size, mylocale); pfree(workspace); } -#endif /* USE_WIDE_UPPER_LOWER */ +#endif /* USE_WIDE_UPPER_LOWER */ else { char *p; @@ -2066,7 +2066,7 @@ dump_index(const KeyWord *k, const int *index) elog(DEBUG_elog_output, "\n\t\tUsed positions: %d,\n\t\tFree positions: %d", count, free_i); } -#endif /* DEBUG */ +#endif /* DEBUG */ /* ---------- * Return TRUE if next format picture is not digit value @@ -4309,12 +4309,12 @@ NUM_numpart_from_char(NUMProc *Np, int id, int input_len) if (*Np->inout_p == '-' || (IS_BRACKET(Np->Num) && *Np->inout_p == '<')) { - *Np->number = '-'; /* set - */ + *Np->number = '-'; /* set - */ Np->inout_p++; } else if (*Np->inout_p == '+') { - *Np->number = '+'; /* set + */ + *Np->number = '+'; /* set + */ Np->inout_p++; } } @@ -4512,7 +4512,7 @@ NUM_numpart_to_char(NUMProc *Np, int id) { if (!IS_FILLMODE(Np->Num)) { - *Np->inout_p = ' '; /* Write + */ + *Np->inout_p = ' '; /* Write + */ ++Np->inout_p; } Np->sign_wrote = TRUE; @@ -4539,7 +4539,7 @@ NUM_numpart_to_char(NUMProc *Np, int id) */ if (!IS_FILLMODE(Np->Num)) { - *Np->inout_p = ' '; /* Write ' ' */ + *Np->inout_p = ' '; /* Write ' ' */ ++Np->inout_p; } } @@ -4608,7 +4608,7 @@ NUM_numpart_to_char(NUMProc *Np, int id) } else { - *Np->inout_p = *Np->number_p; /* Write DIGIT */ + *Np->inout_p = *Np->number_p; /* Write DIGIT */ ++Np->inout_p; Np->num_in = TRUE; } @@ -4847,7 +4847,7 @@ NUM_processor(FormatNode *node, NUMDesc *Num, char *inout, if (Np->is_to_char) { NUM_numpart_to_char(Np, n->key->id); - continue; /* for() */ + continue; /* for() */ } else { diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index 40de01b7bc..97210e8db3 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -1598,7 +1598,7 @@ path_inter(PG_FUNCTION_ARGS) { if (!p1->closed) continue; - iprev = p1->npts - 1; /* include the closure segment */ + iprev = p1->npts - 1; /* include the closure segment */ } for (j = 0; j < p2->npts; j++) @@ -1652,7 +1652,7 @@ path_distance(PG_FUNCTION_ARGS) { if (!p1->closed) continue; - iprev = p1->npts - 1; /* include the closure segment */ + iprev = p1->npts - 1; /* include the closure segment */ } for (j = 0; j < p2->npts; j++) @@ -1710,7 +1710,7 @@ path_length(PG_FUNCTION_ARGS) { if (!path->closed) continue; - iprev = path->npts - 1; /* include the closure segment */ + iprev = path->npts - 1; /* include the closure segment */ } result += point_dt(&path->p[iprev], &path->p[i]); @@ -2457,7 +2457,7 @@ dist_ppath(PG_FUNCTION_ARGS) { if (!path->closed) continue; - iprev = path->npts - 1; /* include the closure segment */ + iprev = path->npts - 1; /* include the closure segment */ } statlseg_construct(&lseg, &path->p[iprev], &path->p[i]); @@ -2776,7 +2776,7 @@ close_ps(PG_FUNCTION_ARGS) xh = lseg->p[0].x < lseg->p[1].x; yh = lseg->p[0].y < lseg->p[1].y; - if (FPeq(lseg->p[0].x, lseg->p[1].x)) /* vertical? */ + if (FPeq(lseg->p[0].x, lseg->p[1].x)) /* vertical? */ { #ifdef GEODEBUG printf("close_ps- segment is vertical\n"); @@ -2822,24 +2822,24 @@ close_ps(PG_FUNCTION_ARGS) */ invm = -1.0 / point_sl(&(lseg->p[0]), &(lseg->p[1])); - tmp = line_construct_pm(&lseg->p[!yh], invm); /* lower edge of the - * "band" */ + tmp = line_construct_pm(&lseg->p[!yh], invm); /* lower edge of the + * "band" */ if (pt->y < (tmp->A * pt->x + tmp->C)) { /* we are below the lower edge */ - result = point_copy(&lseg->p[!yh]); /* below the lseg, take lower - * end pt */ + result = point_copy(&lseg->p[!yh]); /* below the lseg, take lower end + * pt */ #ifdef GEODEBUG printf("close_ps below: tmp A %f B %f C %f\n", tmp->A, tmp->B, tmp->C); #endif PG_RETURN_POINT_P(result); } - tmp = line_construct_pm(&lseg->p[yh], invm); /* upper edge of the - * "band" */ + tmp = line_construct_pm(&lseg->p[yh], invm); /* upper edge of the + * "band" */ if (pt->y > (tmp->A * pt->x + tmp->C)) { /* we are below the lower edge */ - result = point_copy(&lseg->p[yh]); /* above the lseg, take higher - * end pt */ + result = point_copy(&lseg->p[yh]); /* above the lseg, take higher end + * pt */ #ifdef GEODEBUG printf("close_ps above: tmp A %f B %f C %f\n", tmp->A, tmp->B, tmp->C); diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c index 0c6a412f2a..e8354dee44 100644 --- a/src/backend/utils/adt/int8.c +++ b/src/backend/utils/adt/int8.c @@ -104,7 +104,7 @@ scanint8(const char *str, bool errorOK, int64 *result) { int64 newtmp = tmp * 10 + (*ptr++ - '0'); - if ((newtmp / 10) != tmp) /* overflow? */ + if ((newtmp / 10) != tmp) /* overflow? */ { if (errorOK) return false; diff --git a/src/backend/utils/adt/json.c b/src/backend/utils/adt/json.c index 0f99b613f5..8b822b2736 100644 --- a/src/backend/utils/adt/json.c +++ b/src/backend/utils/adt/json.c @@ -347,7 +347,7 @@ pg_parse_json(JsonLexContext *lex, JsonSemAction *sem) parse_array(lex, sem); break; default: - parse_scalar(lex, sem); /* json can be a bare scalar */ + parse_scalar(lex, sem); /* json can be a bare scalar */ } lex_expect(JSON_PARSE_END, lex, JSON_TOKEN_END); diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c index 01df06ebfd..aa0dc165f0 100644 --- a/src/backend/utils/adt/jsonfuncs.c +++ b/src/backend/utils/adt/jsonfuncs.c @@ -57,8 +57,8 @@ typedef struct OkeysState typedef struct IterateJsonStringValuesState { JsonLexContext *lex; - JsonIterateStringValuesAction action; /* an action that will be - * applied to each json value */ + JsonIterateStringValuesAction action; /* an action that will be applied + * to each json value */ void *action_state; /* any necessary context for iteration */ } IterateJsonStringValuesState; @@ -67,8 +67,8 @@ typedef struct TransformJsonStringValuesState { JsonLexContext *lex; StringInfo strval; /* resulting json */ - JsonTransformStringValuesAction action; /* an action that will be - * applied to each json value */ + JsonTransformStringValuesAction action; /* an action that will be applied + * to each json value */ void *action_state; /* any necessary context for transformation */ } TransformJsonStringValuesState; @@ -136,7 +136,7 @@ typedef struct JHashState /* hashtable element */ typedef struct JsonHashEntry { - char fname[NAMEDATALEN]; /* hash key (MUST BE FIRST) */ + char fname[NAMEDATALEN]; /* hash key (MUST BE FIRST) */ char *val; JsonTokenType type; } JsonHashEntry; @@ -2479,7 +2479,7 @@ populate_array_element_end(void *_state, bool isnull) else if (state->element_scalar) { jsv.val.json.str = state->element_scalar; - jsv.val.json.len = -1; /* null-terminated */ + jsv.val.json.len = -1; /* null-terminated */ } else { @@ -2545,9 +2545,9 @@ populate_array_json(PopulateArrayContext *ctx, char *json, int len) * elements and accumulate result using given ArrayBuildState. */ static void -populate_array_dim_jsonb(PopulateArrayContext *ctx, /* context */ - JsonbValue *jbv, /* jsonb sub-array */ - int ndim) /* current dimension */ +populate_array_dim_jsonb(PopulateArrayContext *ctx, /* context */ + JsonbValue *jbv, /* jsonb sub-array */ + int ndim) /* current dimension */ { JsonbContainer *jbc = jbv->val.binary.data; JsonbIterator *it; @@ -2812,7 +2812,7 @@ populate_scalar(ScalarIOData *io, Oid typid, int32 typmod, JsValue *jsv) str = JsonbToCString(NULL, &jsonb->root, VARSIZE(jsonb)); } - else if (jbv->type == jbvString) /* quotes are stripped */ + else if (jbv->type == jbvString) /* quotes are stripped */ str = pnstrdup(jbv->val.string.val, jbv->val.string.len); else if (jbv->type == jbvBool) str = pstrdup(jbv->val.boolean ? "true" : "false"); @@ -3977,8 +3977,8 @@ addJsonbToParseState(JsonbParseState **jbps, Jsonb *jb) if (JB_ROOT_IS_SCALAR(jb)) { - (void) JsonbIteratorNext(&it, &v, false); /* skip array header */ - (void) JsonbIteratorNext(&it, &v, false); /* fetch scalar value */ + (void) JsonbIteratorNext(&it, &v, false); /* skip array header */ + (void) JsonbIteratorNext(&it, &v, false); /* fetch scalar value */ switch (o->type) { diff --git a/src/backend/utils/adt/like_match.c b/src/backend/utils/adt/like_match.c index 634953ae67..087a720625 100644 --- a/src/backend/utils/adt/like_match.c +++ b/src/backend/utils/adt/like_match.c @@ -337,7 +337,7 @@ do_like_escape(text *pat, text *esc) return result; } -#endif /* do_like_escape */ +#endif /* do_like_escape */ #ifdef CHAREQ #undef CHAREQ diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c index 38dc1266e0..e3a858c7c7 100644 --- a/src/backend/utils/adt/nabstime.c +++ b/src/backend/utils/adt/nabstime.c @@ -772,7 +772,7 @@ tintervalrecv(PG_FUNCTION_ARGS) if (tinterval->data[0] == INVALID_ABSTIME || tinterval->data[1] == INVALID_ABSTIME) - status = T_INTERVAL_INVAL; /* undefined */ + status = T_INTERVAL_INVAL; /* undefined */ else status = T_INTERVAL_VALID; @@ -919,7 +919,7 @@ timepl(PG_FUNCTION_ARGS) if (AbsoluteTimeIsReal(t1) && RelativeTimeIsValid(t2) && ((t2 > 0 && t1 < NOEND_ABSTIME - t2) || - (t2 <= 0 && t1 > NOSTART_ABSTIME - t2))) /* prevent overflow */ + (t2 <= 0 && t1 > NOSTART_ABSTIME - t2))) /* prevent overflow */ PG_RETURN_ABSOLUTETIME(t1 + t2); PG_RETURN_ABSOLUTETIME(INVALID_ABSTIME); @@ -1538,7 +1538,7 @@ bogus: (errcode(ERRCODE_INVALID_DATETIME_FORMAT), errmsg("invalid input syntax for type %s: \"%s\"", "tinterval", i_string))); - *i_start = *i_end = INVALID_ABSTIME; /* keep compiler quiet */ + *i_start = *i_end = INVALID_ABSTIME; /* keep compiler quiet */ } diff --git a/src/backend/utils/adt/name.c b/src/backend/utils/adt/name.c index e41ee478ec..974e6e8401 100644 --- a/src/backend/utils/adt/name.c +++ b/src/backend/utils/adt/name.c @@ -200,8 +200,7 @@ namecpy(Name n1, Name n2) int namecat(Name n1, Name n2) { - return namestrcat(n1, NameStr(*n2)); /* n2 can't be any longer than - * n1 */ + return namestrcat(n1, NameStr(*n2)); /* n2 can't be any longer than n1 */ } #endif @@ -317,9 +316,9 @@ current_schemas(PG_FUNCTION_ARGS) array = construct_array(names, i, NAMEOID, - NAMEDATALEN, /* sizeof(Name) */ - false, /* Name is not by-val */ - 'c'); /* alignment of Name */ + NAMEDATALEN, /* sizeof(Name) */ + false, /* Name is not by-val */ + 'c'); /* alignment of Name */ PG_RETURN_POINTER(array); } diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index 6cce0f292c..1a182a0725 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -1933,7 +1933,7 @@ numeric_abbrev_convert_var(NumericVar *var, NumericSortSupport *nss) return NumericAbbrevGetDatum(result); } -#endif /* NUMERIC_ABBREV_BITS == 64 */ +#endif /* NUMERIC_ABBREV_BITS == 64 */ #if NUMERIC_ABBREV_BITS == 32 @@ -2010,7 +2010,7 @@ numeric_abbrev_convert_var(NumericVar *var, NumericSortSupport *nss) return NumericAbbrevGetDatum(result); } -#endif /* NUMERIC_ABBREV_BITS == 32 */ +#endif /* NUMERIC_ABBREV_BITS == 32 */ /* * Ordinary (non-sortsupport) comparisons follow. @@ -4704,7 +4704,7 @@ numeric_stddev_internal(NumericAggState *state, rscale = vsumX.dscale * 2; mul_var(&vsumX, &vsumX, &vsumX, rscale); /* vsumX = sumX * sumX */ - mul_var(&vN, &vsumX2, &vsumX2, rscale); /* vsumX2 = N * sumX2 */ + mul_var(&vN, &vsumX2, &vsumX2, rscale); /* vsumX2 = N * sumX2 */ sub_var(&vsumX2, &vsumX, &vsumX2); /* N * sumX2 - sumX * sumX */ if (cmp_var(&vsumX2, &const_zero) <= 0) @@ -4715,11 +4715,11 @@ numeric_stddev_internal(NumericAggState *state, else { if (sample) - mul_var(&vN, &vNminus1, &vNminus1, 0); /* N * (N - 1) */ + mul_var(&vN, &vNminus1, &vNminus1, 0); /* N * (N - 1) */ else mul_var(&vN, &vN, &vNminus1, 0); /* N * N */ rscale = select_div_scale(&vsumX2, &vNminus1); - div_var(&vsumX2, &vNminus1, &vsumX, rscale, true); /* variance */ + div_var(&vsumX2, &vNminus1, &vsumX, rscale, true); /* variance */ if (!variance) sqrt_var(&vsumX, &vsumX, rscale); /* stddev */ @@ -5369,7 +5369,7 @@ dump_var(const char *str, NumericVar *var) printf("\n"); } -#endif /* NUMERIC_DEBUG */ +#endif /* NUMERIC_DEBUG */ /* ---------------------------------------------------------------------- @@ -8081,7 +8081,7 @@ power_var(NumericVar *base, NumericVar *exp, NumericVar *result) if (cmp_var(base, &const_zero) == 0) { set_var_from_var(&const_zero, result); - result->dscale = NUMERIC_MIN_SIG_DIGITS; /* no need to round */ + result->dscale = NUMERIC_MIN_SIG_DIGITS; /* no need to round */ return; } diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c index a2855984d5..7554fbb22c 100644 --- a/src/backend/utils/adt/pg_locale.c +++ b/src/backend/utils/adt/pg_locale.c @@ -129,7 +129,7 @@ static HTAB *collation_cache = NULL; #if defined(WIN32) && defined(LC_MESSAGES) -static char *IsoLocaleName(const char *); /* MSVC specific */ +static char *IsoLocaleName(const char *); /* MSVC specific */ #endif @@ -174,7 +174,7 @@ pg_perm_setlocale(int category, const char *locale) else #endif result = setlocale(category, locale); -#endif /* WIN32 */ +#endif /* WIN32 */ if (result == NULL) return result; /* fall out immediately on failure */ @@ -219,9 +219,9 @@ pg_perm_setlocale(int category, const char *locale) result = IsoLocaleName(locale); if (result == NULL) result = (char *) locale; -#endif /* WIN32 */ +#endif /* WIN32 */ break; -#endif /* LC_MESSAGES */ +#endif /* LC_MESSAGES */ case LC_MONETARY: envvar = "LC_MONETARY"; envbuf = lc_monetary_envbuf; @@ -752,7 +752,7 @@ strftime_win32(char *dst, size_t dstlen, /* redefine strftime() */ #define strftime(a,b,c,d) strftime_win32(a,b,c,d) -#endif /* WIN32 */ +#endif /* WIN32 */ /* Subroutine for cache_locale_time(). */ static void @@ -972,9 +972,9 @@ IsoLocaleName(const char *winlocname) return NULL; #else return NULL; /* Not supported on this version of msvc/mingw */ -#endif /* _MSC_VER >= 1400 */ +#endif /* _MSC_VER >= 1400 */ } -#endif /* WIN32 && LC_MESSAGES */ +#endif /* WIN32 && LC_MESSAGES */ /* @@ -1242,7 +1242,7 @@ report_newlocale_failure(const char *localename) errdetail("The operating system could not find any locale data for the locale name \"%s\".", localename) : 0))); } -#endif /* HAVE_LOCALE_T */ +#endif /* HAVE_LOCALE_T */ /* @@ -1346,7 +1346,7 @@ pg_newlocale_from_collation(Oid collid) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("collation provider LIBC is not supported on this platform"))); -#endif /* not HAVE_LOCALE_T */ +#endif /* not HAVE_LOCALE_T */ } else if (collform->collprovider == COLLPROVIDER_ICU) { @@ -1369,7 +1369,7 @@ pg_newlocale_from_collation(Oid collid) (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("ICU is not supported in this build"), \ errhint("You need to rebuild PostgreSQL using --with-icu."))); -#endif /* not USE_ICU */ +#endif /* not USE_ICU */ } collversion = SysCacheGetAttr(COLLOID, tp, Anum_pg_collation_collversion, @@ -1569,7 +1569,7 @@ wchar2char(char *to, const wchar_t *from, size_t tolen, pg_locale_t locale) } } else -#endif /* WIN32 */ +#endif /* WIN32 */ if (locale == (pg_locale_t) 0) { /* Use wcstombs directly for the default locale */ @@ -1588,12 +1588,12 @@ wchar2char(char *to, const wchar_t *from, size_t tolen, pg_locale_t locale) result = wcstombs(to, from, tolen); uselocale(save_locale); -#endif /* HAVE_WCSTOMBS_L */ +#endif /* HAVE_WCSTOMBS_L */ #else /* !HAVE_LOCALE_T */ /* Can't have locale != 0 without HAVE_LOCALE_T */ elog(ERROR, "wcstombs_l is not available"); result = 0; /* keep compiler quiet */ -#endif /* HAVE_LOCALE_T */ +#endif /* HAVE_LOCALE_T */ } return result; @@ -1642,7 +1642,7 @@ char2wchar(wchar_t *to, size_t tolen, const char *from, size_t fromlen, } } else -#endif /* WIN32 */ +#endif /* WIN32 */ { /* mbstowcs requires ending '\0' */ char *str = pnstrdup(from, fromlen); @@ -1665,12 +1665,12 @@ char2wchar(wchar_t *to, size_t tolen, const char *from, size_t fromlen, result = mbstowcs(to, str, tolen); uselocale(save_locale); -#endif /* HAVE_MBSTOWCS_L */ +#endif /* HAVE_MBSTOWCS_L */ #else /* !HAVE_LOCALE_T */ /* Can't have locale != 0 without HAVE_LOCALE_T */ elog(ERROR, "mbstowcs_l is not available"); result = 0; /* keep compiler quiet */ -#endif /* HAVE_LOCALE_T */ +#endif /* HAVE_LOCALE_T */ } pfree(str); @@ -1697,4 +1697,4 @@ char2wchar(wchar_t *to, size_t tolen, const char *from, size_t fromlen, return result; } -#endif /* USE_WIDE_UPPER_LOWER */ +#endif /* USE_WIDE_UPPER_LOWER */ diff --git a/src/backend/utils/adt/rangetypes_gist.c b/src/backend/utils/adt/rangetypes_gist.c index f81b16c236..a1f4f4d372 100644 --- a/src/backend/utils/adt/rangetypes_gist.c +++ b/src/backend/utils/adt/rangetypes_gist.c @@ -70,7 +70,7 @@ typedef enum typedef struct { TypeCacheEntry *typcache; /* typcache for range type */ - bool has_subtype_diff; /* does it have subtype_diff? */ + bool has_subtype_diff; /* does it have subtype_diff? */ int entries_count; /* total number of entries being split */ /* Information about currently selected split follows */ diff --git a/src/backend/utils/adt/rangetypes_selfuncs.c b/src/backend/utils/adt/rangetypes_selfuncs.c index c4c549658d..e803f72924 100644 --- a/src/backend/utils/adt/rangetypes_selfuncs.c +++ b/src/backend/utils/adt/rangetypes_selfuncs.c @@ -251,7 +251,7 @@ calc_rangesel(TypeCacheEntry *typcache, VariableStatData *vardata, ATTSTATSSLOT_NUMBERS)) { if (sslot.nnumbers != 1) - elog(ERROR, "invalid empty fraction statistic"); /* shouldn't happen */ + elog(ERROR, "invalid empty fraction statistic"); /* shouldn't happen */ empty_frac = sslot.numbers[0]; free_attstatsslot(&sslot); } diff --git a/src/backend/utils/adt/rangetypes_typanalyze.c b/src/backend/utils/adt/rangetypes_typanalyze.c index a8d585ce7a..879540fc1a 100644 --- a/src/backend/utils/adt/rangetypes_typanalyze.c +++ b/src/backend/utils/adt/rangetypes_typanalyze.c @@ -347,7 +347,7 @@ compute_range_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, stats->stats_valid = true; stats->stanullfrac = 1.0; stats->stawidth = 0; /* "unknown" */ - stats->stadistinct = 0.0; /* "unknown" */ + stats->stadistinct = 0.0; /* "unknown" */ } /* diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c index 37139f9647..1c02f143ba 100644 --- a/src/backend/utils/adt/ri_triggers.c +++ b/src/backend/utils/adt/ri_triggers.c @@ -119,14 +119,11 @@ typedef struct RI_ConstraintInfo char confdeltype; /* foreign key's ON DELETE action */ char confmatchtype; /* foreign key's match type */ int nkeys; /* number of key columns */ - int16 pk_attnums[RI_MAX_NUMKEYS]; /* attnums of referenced cols */ - int16 fk_attnums[RI_MAX_NUMKEYS]; /* attnums of referencing cols */ - Oid pf_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (PK = - * FK) */ - Oid pp_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (PK = - * PK) */ - Oid ff_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (FK = - * FK) */ + int16 pk_attnums[RI_MAX_NUMKEYS]; /* attnums of referenced cols */ + int16 fk_attnums[RI_MAX_NUMKEYS]; /* attnums of referencing cols */ + Oid pf_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (PK = FK) */ + Oid pp_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (PK = PK) */ + Oid ff_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (FK = FK) */ dlist_node valid_link; /* Link in list of valid entries */ } RI_ConstraintInfo; @@ -579,7 +576,7 @@ ri_Check_Pk_Match(Relation pk_rel, Relation fk_rel, result = ri_PerformCheck(riinfo, &qkey, qplan, fk_rel, pk_rel, old_row, NULL, - true, /* treat like update */ + true, /* treat like update */ SPI_OK_SELECT); if (SPI_finish() != SPI_OK_FINISH) @@ -771,7 +768,7 @@ ri_restrict_del(TriggerData *trigdata, bool is_no_action) ri_PerformCheck(riinfo, &qkey, qplan, fk_rel, pk_rel, old_row, NULL, - true, /* must detect new rows */ + true, /* must detect new rows */ SPI_OK_SELECT); if (SPI_finish() != SPI_OK_FINISH) @@ -994,7 +991,7 @@ ri_restrict_upd(TriggerData *trigdata, bool is_no_action) ri_PerformCheck(riinfo, &qkey, qplan, fk_rel, pk_rel, old_row, NULL, - true, /* must detect new rows */ + true, /* must detect new rows */ SPI_OK_SELECT); if (SPI_finish() != SPI_OK_FINISH) @@ -1150,7 +1147,7 @@ RI_FKey_cascade_del(PG_FUNCTION_ARGS) ri_PerformCheck(riinfo, &qkey, qplan, fk_rel, pk_rel, old_row, NULL, - true, /* must detect new rows */ + true, /* must detect new rows */ SPI_OK_DELETE); if (SPI_finish() != SPI_OK_FINISH) @@ -1331,7 +1328,7 @@ RI_FKey_cascade_upd(PG_FUNCTION_ARGS) ri_PerformCheck(riinfo, &qkey, qplan, fk_rel, pk_rel, old_row, new_row, - true, /* must detect new rows */ + true, /* must detect new rows */ SPI_OK_UPDATE); if (SPI_finish() != SPI_OK_FINISH) @@ -1496,7 +1493,7 @@ RI_FKey_setnull_del(PG_FUNCTION_ARGS) ri_PerformCheck(riinfo, &qkey, qplan, fk_rel, pk_rel, old_row, NULL, - true, /* must detect new rows */ + true, /* must detect new rows */ SPI_OK_UPDATE); if (SPI_finish() != SPI_OK_FINISH) @@ -1672,7 +1669,7 @@ RI_FKey_setnull_upd(PG_FUNCTION_ARGS) ri_PerformCheck(riinfo, &qkey, qplan, fk_rel, pk_rel, old_row, NULL, - true, /* must detect new rows */ + true, /* must detect new rows */ SPI_OK_UPDATE); if (SPI_finish() != SPI_OK_FINISH) @@ -1838,7 +1835,7 @@ RI_FKey_setdefault_del(PG_FUNCTION_ARGS) ri_PerformCheck(riinfo, &qkey, qplan, fk_rel, pk_rel, old_row, NULL, - true, /* must detect new rows */ + true, /* must detect new rows */ SPI_OK_UPDATE); if (SPI_finish() != SPI_OK_FINISH) @@ -2029,7 +2026,7 @@ RI_FKey_setdefault_upd(PG_FUNCTION_ARGS) ri_PerformCheck(riinfo, &qkey, qplan, fk_rel, pk_rel, old_row, NULL, - true, /* must detect new rows */ + true, /* must detect new rows */ SPI_OK_UPDATE); if (SPI_finish() != SPI_OK_FINISH) @@ -3111,7 +3108,7 @@ ri_PerformCheck(const RI_ConstraintInfo *riinfo, */ if (IsolationUsesXactSnapshot() && detectNewRows) { - CommandCounterIncrement(); /* be sure all my own work is visible */ + CommandCounterIncrement(); /* be sure all my own work is visible */ test_snapshot = GetLatestSnapshot(); crosscheck_snapshot = GetTransactionSnapshot(); } @@ -3584,11 +3581,11 @@ ri_AttributesEqual(Oid eq_opr, Oid typeid, { oldvalue = FunctionCall3(&entry->cast_func_finfo, oldvalue, - Int32GetDatum(-1), /* typmod */ + Int32GetDatum(-1), /* typmod */ BoolGetDatum(false)); /* implicit coercion */ newvalue = FunctionCall3(&entry->cast_func_finfo, newvalue, - Int32GetDatum(-1), /* typmod */ + Int32GetDatum(-1), /* typmod */ BoolGetDatum(false)); /* implicit coercion */ } @@ -3663,7 +3660,7 @@ ri_HashCompareOp(Oid eq_opr, Oid typeid) op_input_types(eq_opr, &lefttype, &righttype); Assert(lefttype == righttype); if (typeid == lefttype) - castfunc = InvalidOid; /* simplest case */ + castfunc = InvalidOid; /* simplest case */ else { pathtype = find_coercion_pathway(lefttype, typeid, diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 5f3f7968d5..b8ad47a20c 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -83,7 +83,7 @@ #define PRETTYINDENT_JOIN 4 #define PRETTYINDENT_VAR 4 -#define PRETTYINDENT_LIMIT 40 /* wrap limit */ +#define PRETTYINDENT_LIMIT 40 /* wrap limit */ /* Pretty flags */ #define PRETTYFLAG_PAREN 1 @@ -113,8 +113,8 @@ typedef struct int wrapColumn; /* max line length, or -1 for no limit */ int indentLevel; /* current indent level for prettyprint */ bool varprefix; /* TRUE to print prefixes on Vars */ - ParseExprKind special_exprkind; /* set only for exprkinds needing - * special handling */ + ParseExprKind special_exprkind; /* set only for exprkinds needing special + * handling */ } deparse_context; /* @@ -280,7 +280,7 @@ typedef struct */ typedef struct { - char name[NAMEDATALEN]; /* Hash key --- must be first */ + char name[NAMEDATALEN]; /* Hash key --- must be first */ int counter; /* Largest addition used so far for name */ } NameHashEntry; @@ -2566,7 +2566,7 @@ pg_get_functiondef(PG_FUNCTION_ARGS) if (!isnull) { simple_quote_literal(&buf, TextDatumGetCString(tmp)); - appendStringInfoString(&buf, ", "); /* assume prosrc isn't null */ + appendStringInfoString(&buf, ", "); /* assume prosrc isn't null */ } tmp = SysCacheGetAttr(PROCOID, proctup, Anum_pg_proc_prosrc, &isnull); @@ -7376,14 +7376,14 @@ isSimpleNode(Node *node, Node *parentNode, int prettyFlags) } case T_BoolExpr: /* lower precedence */ case T_ArrayRef: /* other separators */ - case T_ArrayExpr: /* other separators */ + case T_ArrayExpr: /* other separators */ case T_RowExpr: /* other separators */ case T_CoalesceExpr: /* own parentheses */ - case T_MinMaxExpr: /* own parentheses */ + case T_MinMaxExpr: /* own parentheses */ case T_XmlExpr: /* own parentheses */ - case T_NullIfExpr: /* other separators */ + case T_NullIfExpr: /* other separators */ case T_Aggref: /* own parentheses */ - case T_WindowFunc: /* own parentheses */ + case T_WindowFunc: /* own parentheses */ case T_CaseExpr: /* other separators */ return true; default: @@ -7426,14 +7426,14 @@ isSimpleNode(Node *node, Node *parentNode, int prettyFlags) return true; /* own parentheses */ } case T_ArrayRef: /* other separators */ - case T_ArrayExpr: /* other separators */ + case T_ArrayExpr: /* other separators */ case T_RowExpr: /* other separators */ case T_CoalesceExpr: /* own parentheses */ - case T_MinMaxExpr: /* own parentheses */ + case T_MinMaxExpr: /* own parentheses */ case T_XmlExpr: /* own parentheses */ - case T_NullIfExpr: /* other separators */ + case T_NullIfExpr: /* other separators */ case T_Aggref: /* own parentheses */ - case T_WindowFunc: /* own parentheses */ + case T_WindowFunc: /* own parentheses */ case T_CaseExpr: /* other separators */ return true; default: @@ -9219,7 +9219,7 @@ get_const_expr(Const *constval, deparse_context *context, int showtype) else { appendStringInfo(buf, "'%s'", extval); - needlabel = true; /* we must attach a cast */ + needlabel = true; /* we must attach a cast */ } break; @@ -9238,7 +9238,7 @@ get_const_expr(Const *constval, deparse_context *context, int showtype) else { appendStringInfo(buf, "'%s'", extval); - needlabel = true; /* we must attach a cast */ + needlabel = true; /* we must attach a cast */ } break; @@ -9432,7 +9432,7 @@ get_sublink_expr(SubLink *sublink, deparse_context *context) break; case ANY_SUBLINK: - if (strcmp(opname, "=") == 0) /* Represent = ANY as IN */ + if (strcmp(opname, "=") == 0) /* Represent = ANY as IN */ appendStringInfoString(buf, " IN "); else appendStringInfo(buf, " %s ANY ", opname); diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 33788a2b36..63a25db5d3 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -811,7 +811,7 @@ ineq_histogram_selectivity(PlannerInfo *root, */ double histfrac; int lobound = 0; /* first possible slot to search */ - int hibound = sslot.nvalues; /* last+1 slot to search */ + int hibound = sslot.nvalues; /* last+1 slot to search */ bool have_end = false; /* @@ -1805,7 +1805,7 @@ scalararraysel(PlannerInfo *root, /* get nominal (after relabeling) element type of rightop */ nominal_element_type = get_base_element_type(exprType(rightop)); if (!OidIsValid(nominal_element_type)) - return (Selectivity) 0.5; /* probably shouldn't happen */ + return (Selectivity) 0.5; /* probably shouldn't happen */ /* get nominal collation, too, for generating constants */ nominal_element_collation = exprCollation(rightop); @@ -4510,10 +4510,10 @@ get_join_variables(PlannerInfo *root, List *args, SpecialJoinInfo *sjinfo, if (vardata1->rel && bms_is_subset(vardata1->rel->relids, sjinfo->syn_righthand)) - *join_is_reversed = true; /* var1 is on RHS */ + *join_is_reversed = true; /* var1 is on RHS */ else if (vardata2->rel && bms_is_subset(vardata2->rel->relids, sjinfo->syn_lefthand)) - *join_is_reversed = true; /* var2 is on LHS */ + *join_is_reversed = true; /* var2 is on LHS */ else *join_is_reversed = false; } @@ -5331,7 +5331,7 @@ get_actual_variable_range(PlannerInfo *root, VariableStatData *vardata, ScanKeyEntryInitialize(&scankeys[0], SK_ISNULL | SK_SEARCHNOTNULL, 1, /* index col to scan */ - InvalidStrategy, /* no strategy */ + InvalidStrategy, /* no strategy */ InvalidOid, /* no strategy subtype */ InvalidOid, /* no collation */ InvalidOid, /* no reg proc for this */ @@ -5725,7 +5725,7 @@ pattern_fixed_prefix(Const *patt, Pattern_Type ptype, Oid collation, break; default: elog(ERROR, "unrecognized ptype: %d", (int) ptype); - result = Pattern_Prefix_None; /* keep compiler quiet */ + result = Pattern_Prefix_None; /* keep compiler quiet */ break; } return result; @@ -5931,8 +5931,7 @@ regex_selectivity_sub(const char *patt, int pattlen, bool case_insensitive) negclass = true; pos++; } - if (patt[pos] == ']') /* ']' at start of class is not - * special */ + if (patt[pos] == ']') /* ']' at start of class is not special */ pos++; while (pos < pattlen && patt[pos] != ']') pos++; @@ -6430,7 +6429,7 @@ orderby_operands_eval_cost(PlannerInfo *root, IndexPath *path) { elog(ERROR, "unsupported indexorderby type: %d", (int) nodeTag(clause)); - other_operand = NULL; /* keep compiler quiet */ + other_operand = NULL; /* keep compiler quiet */ } cost_qual_eval_node(&index_qual_cost, other_operand, root); diff --git a/src/backend/utils/adt/tsquery.c b/src/backend/utils/adt/tsquery.c index 41e1ecd70f..53e36afbe8 100644 --- a/src/backend/utils/adt/tsquery.c +++ b/src/backend/utils/adt/tsquery.c @@ -234,8 +234,8 @@ gettoken_query(TSQueryParserState state, case WAITOPERAND: if (t_iseq(state->buf, '!')) { - (state->buf)++; /* can safely ++, t_iseq guarantee - * that pg_mblen()==1 */ + (state->buf)++; /* can safely ++, t_iseq guarantee that + * pg_mblen()==1 */ *operator = OP_NOT; state->state = WAITOPERAND; return PT_OPR; @@ -542,7 +542,7 @@ findoprnd_recurse(QueryItem *ptr, uint32 *pos, int nnodes, bool *needcleanup) if (ptr[*pos].qoperator.oper == OP_NOT) { - ptr[*pos].qoperator.left = 1; /* fixed offset */ + ptr[*pos].qoperator.left = 1; /* fixed offset */ (*pos)++; /* process the only argument */ @@ -551,7 +551,7 @@ findoprnd_recurse(QueryItem *ptr, uint32 *pos, int nnodes, bool *needcleanup) else { QueryOperator *curitem = &ptr[*pos].qoperator; - int tmp = *pos; /* save current position */ + int tmp = *pos; /* save current position */ Assert(curitem->oper == OP_AND || curitem->oper == OP_OR || @@ -1056,7 +1056,7 @@ tsqueryrecv(PG_FUNCTION_ARGS) */ operands[i] = val; - datalen += val_len + 1; /* + 1 for the '\0' terminator */ + datalen += val_len + 1; /* + 1 for the '\0' terminator */ } else if (item->type == QI_OPR) { diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c index a41eb1fa9c..4577bcc0b8 100644 --- a/src/backend/utils/adt/tsrank.c +++ b/src/backend/utils/adt/tsrank.c @@ -908,8 +908,8 @@ calc_rank_cd(const float4 *arrdata, TSVector txt, TSQuery query, int method) Wdoc += Cpos / ((double) (1 + nNoise)); CurExtPos = ((double) (ext.q + ext.p)) / 2.0; - if (NExtent > 0 && CurExtPos > PrevExtPos /* prevent division by - * zero in a case of + if (NExtent > 0 && CurExtPos > PrevExtPos /* prevent division by + * zero in a case of * multiple lexize */ ) SumDist += 1.0 / (CurExtPos - PrevExtPos); diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c index 89aa0f1b32..66c5255f8b 100644 --- a/src/backend/utils/adt/tsvector_op.c +++ b/src/backend/utils/adt/tsvector_op.c @@ -2466,7 +2466,7 @@ tsvector_update_trigger(PG_FUNCTION_ARGS, bool config_column) Oid cfgId; /* Check call context */ - if (!CALLED_AS_TRIGGER(fcinfo)) /* internal error */ + if (!CALLED_AS_TRIGGER(fcinfo)) /* internal error */ elog(ERROR, "tsvector_update_trigger: not fired by trigger manager"); trigdata = (TriggerData *) fcinfo->context; diff --git a/src/backend/utils/adt/varbit.c b/src/backend/utils/adt/varbit.c index e947785d81..41238dd763 100644 --- a/src/backend/utils/adt/varbit.c +++ b/src/backend/utils/adt/varbit.c @@ -1131,8 +1131,8 @@ bitoverlay(PG_FUNCTION_ARGS) { VarBit *t1 = PG_GETARG_VARBIT_P(0); VarBit *t2 = PG_GETARG_VARBIT_P(1); - int sp = PG_GETARG_INT32(2); /* substring start position */ - int sl = PG_GETARG_INT32(3); /* substring length */ + int sp = PG_GETARG_INT32(2); /* substring start position */ + int sl = PG_GETARG_INT32(3); /* substring length */ PG_RETURN_VARBIT_P(bit_overlay(t1, t2, sp, sl)); } @@ -1142,7 +1142,7 @@ bitoverlay_no_len(PG_FUNCTION_ARGS) { VarBit *t1 = PG_GETARG_VARBIT_P(0); VarBit *t2 = PG_GETARG_VARBIT_P(1); - int sp = PG_GETARG_INT32(2); /* substring start position */ + int sp = PG_GETARG_INT32(2); /* substring start position */ int sl; sl = VARBITLEN(t2); /* defaults to length(t2) */ diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index cb1fd4d9ce..be53f7d60d 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -268,7 +268,7 @@ byteain(PG_FUNCTION_ARGS) bc = (len - 2) / 2 + VARHDRSZ; /* maximum possible length */ result = palloc(bc); bc = hex_decode(inputText + 2, len - 2, VARDATA(result)); - SET_VARSIZE(result, bc + VARHDRSZ); /* actual length */ + SET_VARSIZE(result, bc + VARHDRSZ); /* actual length */ PG_RETURN_BYTEA_P(result); } @@ -823,8 +823,8 @@ text_substring(Datum str, int32 start, int32 length, bool length_not_specified) { S1 = Max(S, 1); - if (length_not_specified) /* special case - get length to end of - * string */ + if (length_not_specified) /* special case - get length to end of + * string */ L1 = -1; else { @@ -888,8 +888,8 @@ text_substring(Datum str, int32 start, int32 length, bool length_not_specified) */ slice_start = 0; - if (length_not_specified) /* special case - get length to end of - * string */ + if (length_not_specified) /* special case - get length to end of + * string */ slice_size = L1 = -1; else { @@ -1012,8 +1012,8 @@ textoverlay(PG_FUNCTION_ARGS) { text *t1 = PG_GETARG_TEXT_PP(0); text *t2 = PG_GETARG_TEXT_PP(1); - int sp = PG_GETARG_INT32(2); /* substring start position */ - int sl = PG_GETARG_INT32(3); /* substring length */ + int sp = PG_GETARG_INT32(2); /* substring start position */ + int sl = PG_GETARG_INT32(3); /* substring length */ PG_RETURN_TEXT_P(text_overlay(t1, t2, sp, sl)); } @@ -1023,10 +1023,10 @@ textoverlay_no_len(PG_FUNCTION_ARGS) { text *t1 = PG_GETARG_TEXT_PP(0); text *t2 = PG_GETARG_TEXT_PP(1); - int sp = PG_GETARG_INT32(2); /* substring start position */ + int sp = PG_GETARG_INT32(2); /* substring start position */ int sl; - sl = text_length(PointerGetDatum(t2)); /* defaults to length(t2) */ + sl = text_length(PointerGetDatum(t2)); /* defaults to length(t2) */ PG_RETURN_TEXT_P(text_overlay(t1, t2, sp, sl)); } @@ -1520,7 +1520,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid) return result; } -#endif /* WIN32 */ +#endif /* WIN32 */ if (len1 >= TEXTBUFLEN) a1p = (char *) palloc(len1 + 1); @@ -1573,7 +1573,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid) #else /* not USE_ICU */ /* shouldn't happen */ elog(ERROR, "unsupported collprovider: %c", mylocale->provider); -#endif /* not USE_ICU */ +#endif /* not USE_ICU */ } else { @@ -2159,7 +2159,7 @@ varstrfastcmp_locale(Datum x, Datum y, SortSupport ssup) #else /* not USE_ICU */ /* shouldn't happen */ elog(ERROR, "unsupported collprovider: %c", sss->locale->provider); -#endif /* not USE_ICU */ +#endif /* not USE_ICU */ } else { @@ -2899,8 +2899,8 @@ byteaoverlay(PG_FUNCTION_ARGS) { bytea *t1 = PG_GETARG_BYTEA_PP(0); bytea *t2 = PG_GETARG_BYTEA_PP(1); - int sp = PG_GETARG_INT32(2); /* substring start position */ - int sl = PG_GETARG_INT32(3); /* substring length */ + int sp = PG_GETARG_INT32(2); /* substring start position */ + int sl = PG_GETARG_INT32(3); /* substring length */ PG_RETURN_BYTEA_P(bytea_overlay(t1, t2, sp, sl)); } @@ -2910,7 +2910,7 @@ byteaoverlay_no_len(PG_FUNCTION_ARGS) { bytea *t1 = PG_GETARG_BYTEA_PP(0); bytea *t2 = PG_GETARG_BYTEA_PP(1); - int sp = PG_GETARG_INT32(2); /* substring start position */ + int sp = PG_GETARG_INT32(2); /* substring start position */ int sl; sl = VARSIZE_ANY_EXHDR(t2); /* defaults to length(t2) */ @@ -3273,7 +3273,7 @@ SplitIdentifierString(char *rawstring, char separator, { endp = strchr(nextp + 1, '"'); if (endp == NULL) - return false; /* mismatched quotes */ + return false; /* mismatched quotes */ if (endp[1] != '"') break; /* found end of quoted name */ /* Collapse adjacent quotes into one quote, and look again */ @@ -3400,7 +3400,7 @@ SplitDirectoriesString(char *rawstring, char separator, { endp = strchr(nextp + 1, '"'); if (endp == NULL) - return false; /* mismatched quotes */ + return false; /* mismatched quotes */ if (endp[1] != '"') break; /* found end of quoted name */ /* Collapse adjacent quotes into one quote, and look again */ @@ -3932,7 +3932,7 @@ replace_text_regexp(text *src_text, void *regexp, data, data_len, search_start, - NULL, /* no details */ + NULL, /* no details */ REGEXP_REPLACE_BACKREF_CNT, pmatch, 0); @@ -4251,7 +4251,7 @@ text_to_array_internal(PG_FUNCTION_ARGS) /* start_ptr points to the start_posn'th character of inputstring */ start_ptr = VARDATA_ANY(inputstring); - for (fldnum = 1;; fldnum++) /* field number is 1 based */ + for (fldnum = 1;; fldnum++) /* field number is 1 based */ { CHECK_FOR_INTERRUPTS(); @@ -4695,7 +4695,7 @@ string_agg_transfn(PG_FUNCTION_ARGS) else if (!PG_ARGISNULL(2)) appendStringInfoText(state, PG_GETARG_TEXT_PP(2)); /* delimiter */ - appendStringInfoText(state, PG_GETARG_TEXT_PP(1)); /* value */ + appendStringInfoText(state, PG_GETARG_TEXT_PP(1)); /* value */ } /* diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c index cdcd45419a..0ed679eea6 100644 --- a/src/backend/utils/adt/xml.c +++ b/src/backend/utils/adt/xml.c @@ -65,7 +65,7 @@ #if LIBXML_VERSION >= 20704 #define HAVE_XMLSTRUCTUREDERRORCONTEXT 1 #endif -#endif /* USE_LIBXML */ +#endif /* USE_LIBXML */ #include "access/htup_details.h" #include "catalog/namespace.h" @@ -133,7 +133,7 @@ static void *xml_palloc(size_t size); static void *xml_repalloc(void *ptr, size_t size); static void xml_pfree(void *ptr); static char *xml_pstrdup(const char *string); -#endif /* USE_LIBXMLCONTEXT */ +#endif /* USE_LIBXMLCONTEXT */ static xmlChar *xml_text2xmlChar(text *in); static int parse_xml_decl(const xmlChar *str, size_t *lenp, @@ -147,7 +147,7 @@ static int xml_xpathobjtoxmlarray(xmlXPathObjectPtr xpathobj, ArrayBuildState *astate, PgXmlErrorContext *xmlerrcxt); static xmlChar *pg_xmlCharStrndup(char *str, size_t len); -#endif /* USE_LIBXML */ +#endif /* USE_LIBXML */ static void xmldata_root_element_start(StringInfo result, const char *eltname, const char *xmlschema, const char *targetns, @@ -924,7 +924,7 @@ xml_is_document(xmltype *arg) #else /* not USE_LIBXML */ NO_XML_SUPPORT(); return false; -#endif /* not USE_LIBXML */ +#endif /* not USE_LIBXML */ } @@ -1405,7 +1405,7 @@ xml_parse(text *data, XmlOptionType xmloption_arg, bool preserve_whitespace, volatile xmlParserCtxtPtr ctxt = NULL; volatile xmlDocPtr doc = NULL; - len = VARSIZE_ANY_EXHDR(data); /* will be useful later */ + len = VARSIZE_ANY_EXHDR(data); /* will be useful later */ string = xml_text2xmlChar(data); utf8string = pg_do_encoding_conversion(string, @@ -1555,7 +1555,7 @@ xml_pstrdup(const char *string) { return MemoryContextStrdup(LibxmlContext, string); } -#endif /* USE_LIBXMLCONTEXT */ +#endif /* USE_LIBXMLCONTEXT */ /* @@ -1887,7 +1887,7 @@ is_valid_xml_namechar(pg_wchar c) || xmlIsCombiningQ(c) || xmlIsExtenderQ(c)); } -#endif /* USE_LIBXML */ +#endif /* USE_LIBXML */ /* @@ -1942,7 +1942,7 @@ map_sql_identifier_to_xml_name(char *ident, bool fully_escaped, #else /* not USE_LIBXML */ NO_XML_SUPPORT(); return NULL; -#endif /* not USE_LIBXML */ +#endif /* not USE_LIBXML */ } @@ -2201,7 +2201,7 @@ map_sql_value_to_xml_value(Datum value, Oid type, bool xml_escape_strings) return result; } -#endif /* USE_LIBXML */ +#endif /* USE_LIBXML */ } @@ -3942,7 +3942,7 @@ xpath_internal(text *xpath_expr_text, xmltype *data, ArrayType *namespaces, if (xmlXPathRegisterNs(xpathctx, (xmlChar *) ns_name, (xmlChar *) ns_uri) != 0) - ereport(ERROR, /* is this an internal error??? */ + ereport(ERROR, /* is this an internal error??? */ (errmsg("could not register XML namespace with name \"%s\" and URI \"%s\"", ns_name, ns_uri))); } @@ -4000,7 +4000,7 @@ xpath_internal(text *xpath_expr_text, xmltype *data, ArrayType *namespaces, pg_xml_done(xmlerrcxt, false); } -#endif /* USE_LIBXML */ +#endif /* USE_LIBXML */ /* * Evaluate XPath expression and return array of XML values. @@ -4115,7 +4115,7 @@ xml_is_well_formed(PG_FUNCTION_ARGS) #else NO_XML_SUPPORT(); return 0; -#endif /* not USE_LIBXML */ +#endif /* not USE_LIBXML */ } Datum @@ -4128,7 +4128,7 @@ xml_is_well_formed_document(PG_FUNCTION_ARGS) #else NO_XML_SUPPORT(); return 0; -#endif /* not USE_LIBXML */ +#endif /* not USE_LIBXML */ } Datum @@ -4141,7 +4141,7 @@ xml_is_well_formed_content(PG_FUNCTION_ARGS) #else NO_XML_SUPPORT(); return 0; -#endif /* not USE_LIBXML */ +#endif /* not USE_LIBXML */ } /* @@ -4221,7 +4221,7 @@ XmlTableInitOpaque(TableFuncScanState *state, int natts) state->opaque = xtCxt; #else NO_XML_SUPPORT(); -#endif /* not USE_LIBXML */ +#endif /* not USE_LIBXML */ } /* @@ -4281,7 +4281,7 @@ XmlTableSetDocument(TableFuncScanState *state, Datum value) xtCxt->xpathcxt = xpathcxt; #else NO_XML_SUPPORT(); -#endif /* not USE_LIBXML */ +#endif /* not USE_LIBXML */ } /* @@ -4307,7 +4307,7 @@ XmlTableSetNamespace(TableFuncScanState *state, char *name, char *uri) "could not set XML namespace"); #else NO_XML_SUPPORT(); -#endif /* not USE_LIBXML */ +#endif /* not USE_LIBXML */ } /* @@ -4336,7 +4336,7 @@ XmlTableSetRowFilter(TableFuncScanState *state, char *path) "invalid XPath expression"); #else NO_XML_SUPPORT(); -#endif /* not USE_LIBXML */ +#endif /* not USE_LIBXML */ } /* @@ -4367,7 +4367,7 @@ XmlTableSetColumnFilter(TableFuncScanState *state, char *path, int colnum) "invalid XPath expression"); #else NO_XML_SUPPORT(); -#endif /* not USE_LIBXML */ +#endif /* not USE_LIBXML */ } /* @@ -4415,7 +4415,7 @@ XmlTableFetchRow(TableFuncScanState *state) #else NO_XML_SUPPORT(); return false; -#endif /* not USE_LIBXML */ +#endif /* not USE_LIBXML */ } /* @@ -4585,7 +4585,7 @@ XmlTableGetValue(TableFuncScanState *state, int colnum, #else NO_XML_SUPPORT(); return 0; -#endif /* not USE_LIBXML */ +#endif /* not USE_LIBXML */ } /* @@ -4631,5 +4631,5 @@ XmlTableDestroyOpaque(TableFuncScanState *state) #else NO_XML_SUPPORT(); -#endif /* not USE_LIBXML */ +#endif /* not USE_LIBXML */ } diff --git a/src/backend/utils/cache/attoptcache.c b/src/backend/utils/cache/attoptcache.c index 4b30e6bc62..da8b42ddb8 100644 --- a/src/backend/utils/cache/attoptcache.c +++ b/src/backend/utils/cache/attoptcache.c @@ -111,8 +111,7 @@ get_attribute_options(Oid attrelid, int attnum) /* Find existing cache entry, if any. */ if (!AttoptCacheHash) InitializeAttoptCache(); - memset(&key, 0, sizeof(key)); /* make sure any padding bits are - * unset */ + memset(&key, 0, sizeof(key)); /* make sure any padding bits are unset */ key.attrelid = attrelid; key.attnum = attnum; attopt = diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c index 74bfd56169..e7e8e3b54c 100644 --- a/src/backend/utils/cache/catcache.c +++ b/src/backend/utils/cache/catcache.c @@ -339,7 +339,7 @@ CatCachePrintStats(int code, Datum arg) cc_lsearches, cc_lhits); } -#endif /* CATCACHE_STATS */ +#endif /* CATCACHE_STATS */ /* diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c index 055705136a..5652c3abe0 100644 --- a/src/backend/utils/cache/inval.c +++ b/src/backend/utils/cache/inval.c @@ -121,7 +121,7 @@ */ typedef struct InvalidationChunk { - struct InvalidationChunk *next; /* list link */ + struct InvalidationChunk *next; /* list link */ int nitems; /* # items currently stored in chunk */ int maxitems; /* size of allocated array in this chunk */ SharedInvalidationMessage msgs[FLEXIBLE_ARRAY_MEMBER]; diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c index 4def73ddfb..82763f8013 100644 --- a/src/backend/utils/cache/lsyscache.c +++ b/src/backend/utils/cache/lsyscache.c @@ -2770,7 +2770,7 @@ get_typmodout(Oid typid) else return InvalidOid; } -#endif /* NOT_USED */ +#endif /* NOT_USED */ /* * get_typcollation diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c index 4b5f8107ef..dfe5592a25 100644 --- a/src/backend/utils/cache/plancache.c +++ b/src/backend/utils/cache/plancache.c @@ -157,7 +157,7 @@ CreateCachedPlan(RawStmt *raw_parse_tree, MemoryContext source_context; MemoryContext oldcxt; - Assert(query_string != NULL); /* required as of 8.4 */ + Assert(query_string != NULL); /* required as of 8.4 */ /* * Make a dedicated memory context for the CachedPlanSource and its @@ -238,7 +238,7 @@ CreateOneShotCachedPlan(RawStmt *raw_parse_tree, { CachedPlanSource *plansource; - Assert(query_string != NULL); /* required as of 8.4 */ + Assert(query_string != NULL); /* required as of 8.4 */ /* * Create and fill the CachedPlanSource struct within the caller's memory diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index c2e8361f2f..93bcac1e77 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -1371,7 +1371,7 @@ RelationBuildDesc(Oid targetRelId, bool insertIt) /* * initialize the relation lock manager information */ - RelationInitLockInfo(relation); /* see lmgr.c */ + RelationInitLockInfo(relation); /* see lmgr.c */ /* * initialize physical addressing information for the relation @@ -2011,7 +2011,7 @@ formrdesc(const char *relationName, Oid relationReltype, /* * initialize the relation lock manager information */ - RelationInitLockInfo(relation); /* see lmgr.c */ + RelationInitLockInfo(relation); /* see lmgr.c */ /* * initialize physical addressing information for the relation @@ -2423,7 +2423,7 @@ RelationClearRelation(Relation relation, bool rebuild) if (relation->rd_rel->relkind == RELKIND_INDEX) { - relation->rd_isvalid = false; /* needs to be revalidated */ + relation->rd_isvalid = false; /* needs to be revalidated */ if (relation->rd_refcnt > 1 && IsTransactionState()) RelationReloadIndexInfo(relation); } @@ -3657,7 +3657,7 @@ RelationCacheInitializePhase3(void) formrdesc("pg_type", TypeRelation_Rowtype_Id, false, true, Natts_pg_type, Desc_pg_type); -#define NUM_CRITICAL_LOCAL_RELS 4 /* fix if you change list above */ +#define NUM_CRITICAL_LOCAL_RELS 4 /* fix if you change list above */ } MemoryContextSwitchTo(oldcxt); @@ -3960,7 +3960,7 @@ BuildHardcodedDescriptor(int natts, const FormData_pg_attribute *attrs, oldcxt = MemoryContextSwitchTo(CacheMemoryContext); result = CreateTemplateTupleDesc(natts, hasoids); - result->tdtypeid = RECORDOID; /* not right, but we don't care */ + result->tdtypeid = RECORDOID; /* not right, but we don't care */ result->tdtypmod = -1; for (i = 0; i < natts; i++) @@ -4239,7 +4239,7 @@ RelationGetFKeyList(Relation relation) elog(ERROR, "null conkey for rel %s", RelationGetRelationName(relation)); - arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */ + arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */ nelem = ARR_DIMS(arr)[0]; if (ARR_NDIM(arr) != 1 || nelem < 1 || @@ -4258,7 +4258,7 @@ RelationGetFKeyList(Relation relation) elog(ERROR, "null confkey for rel %s", RelationGetRelationName(relation)); - arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */ + arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */ nelem = ARR_DIMS(arr)[0]; if (ARR_NDIM(arr) != 1 || nelem != info->nkeys || @@ -4275,7 +4275,7 @@ RelationGetFKeyList(Relation relation) elog(ERROR, "null conpfeqop for rel %s", RelationGetRelationName(relation)); - arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */ + arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */ nelem = ARR_DIMS(arr)[0]; if (ARR_NDIM(arr) != 1 || nelem != info->nkeys || @@ -5448,7 +5448,7 @@ load_relcache_init_file(bool shared) rel->rd_att->tdrefcount = 1; /* mark as refcounted */ rel->rd_att->tdtypeid = relform->reltype; - rel->rd_att->tdtypmod = -1; /* unnecessary, but... */ + rel->rd_att->tdtypmod = -1; /* unnecessary, but... */ /* next read all the attribute tuple form data entries */ has_not_null = false; @@ -5473,7 +5473,7 @@ load_relcache_init_file(bool shared) if (fread(rel->rd_options, 1, len, fp) != len) goto read_failed; if (len != VARSIZE(rel->rd_options)) - goto read_failed; /* sanity check */ + goto read_failed; /* sanity check */ } else { diff --git a/src/backend/utils/cache/relfilenodemap.c b/src/backend/utils/cache/relfilenodemap.c index 612f0f3a0d..3e811e1c9b 100644 --- a/src/backend/utils/cache/relfilenodemap.c +++ b/src/backend/utils/cache/relfilenodemap.c @@ -68,9 +68,9 @@ RelfilenodeMapInvalidateCallback(Datum arg, Oid relid) * all entries, otherwise just remove the specific relation's entry. * Always remove negative cache entries. */ - if (relid == InvalidOid || /* complete reset */ - entry->relid == InvalidOid || /* negative cache entry */ - entry->relid == relid) /* individual flushed relation */ + if (relid == InvalidOid || /* complete reset */ + entry->relid == InvalidOid || /* negative cache entry */ + entry->relid == relid) /* individual flushed relation */ { if (hash_search(RelfilenodeMapHash, (void *) &entry->key, diff --git a/src/backend/utils/cache/relmapper.c b/src/backend/utils/cache/relmapper.c index 047c5b40e8..6836c601e0 100644 --- a/src/backend/utils/cache/relmapper.c +++ b/src/backend/utils/cache/relmapper.c @@ -72,9 +72,9 @@ */ #define RELMAPPER_FILENAME "pg_filenode.map" -#define RELMAPPER_FILEMAGIC 0x592717 /* version ID value */ +#define RELMAPPER_FILEMAGIC 0x592717 /* version ID value */ -#define MAX_MAPPINGS 62 /* 62 * 8 + 16 = 512 */ +#define MAX_MAPPINGS 62 /* 62 * 8 + 16 = 512 */ typedef struct RelMapping { diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c index e66bb03ea5..607fe9db79 100644 --- a/src/backend/utils/cache/syscache.c +++ b/src/backend/utils/cache/syscache.c @@ -419,7 +419,7 @@ static const struct cachedesc cacheinfo[] = { }, 8 }, - {ForeignDataWrapperRelationId, /* FOREIGNDATAWRAPPERNAME */ + {ForeignDataWrapperRelationId, /* FOREIGNDATAWRAPPERNAME */ ForeignDataWrapperNameIndexId, 1, { @@ -430,7 +430,7 @@ static const struct cachedesc cacheinfo[] = { }, 2 }, - {ForeignDataWrapperRelationId, /* FOREIGNDATAWRAPPEROID */ + {ForeignDataWrapperRelationId, /* FOREIGNDATAWRAPPEROID */ ForeignDataWrapperOidIndexId, 1, { @@ -683,7 +683,7 @@ static const struct cachedesc cacheinfo[] = { }, 128 }, - {ReplicationOriginRelationId, /* REPLORIGIDENT */ + {ReplicationOriginRelationId, /* REPLORIGIDENT */ ReplicationOriginIdentIndex, 1, { @@ -694,7 +694,7 @@ static const struct cachedesc cacheinfo[] = { }, 16 }, - {ReplicationOriginRelationId, /* REPLORIGNAME */ + {ReplicationOriginRelationId, /* REPLORIGNAME */ ReplicationOriginNameIndex, 1, { diff --git a/src/backend/utils/cache/typcache.c b/src/backend/utils/cache/typcache.c index 6ba199b40d..7ec31eb3e3 100644 --- a/src/backend/utils/cache/typcache.c +++ b/src/backend/utils/cache/typcache.c @@ -152,7 +152,7 @@ static HTAB *RecordCacheHash = NULL; static TupleDesc *RecordCacheArray = NULL; static int32 RecordCacheArrayLen = 0; /* allocated length of array */ -static int32 NextRecordTypmod = 0; /* number of entries used */ +static int32 NextRecordTypmod = 0; /* number of entries used */ static void load_typcache_tupdesc(TypeCacheEntry *typentry); static void load_rangetype_info(TypeCacheEntry *typentry); @@ -572,7 +572,7 @@ load_typcache_tupdesc(TypeCacheEntry *typentry) { Relation rel; - if (!OidIsValid(typentry->typrelid)) /* should not happen */ + if (!OidIsValid(typentry->typrelid)) /* should not happen */ elog(ERROR, "invalid typrelid for composite type %u", typentry->type_id); rel = relation_open(typentry->typrelid, AccessShareLock); diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index cad75c80d8..234c8e3aa9 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -102,7 +102,7 @@ emit_log_hook_type emit_log_hook = NULL; /* GUC parameters */ int Log_error_verbosity = PGERROR_VERBOSE; -char *Log_line_prefix = NULL; /* format for extra log line info */ +char *Log_line_prefix = NULL; /* format for extra log line info */ int Log_destination = LOG_DESTINATION_STDERR; char *Log_destination_string = NULL; bool syslog_sequence_numbers = true; @@ -356,7 +356,7 @@ errstart(int elevel, const char *filename, int lineno, * because it suggests an infinite loop of errors during error * recovery. */ - errordata_stack_depth = -1; /* make room on stack */ + errordata_stack_depth = -1; /* make room on stack */ ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded"))); } @@ -1317,7 +1317,7 @@ elog_start(const char *filename, int lineno, const char *funcname) * else failure to convert it to client encoding could cause further * recursion. */ - errordata_stack_depth = -1; /* make room on stack */ + errordata_stack_depth = -1; /* make room on stack */ ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded"))); } @@ -1684,7 +1684,7 @@ ReThrowError(ErrorData *edata) * because it suggests an infinite loop of errors during error * recovery. */ - errordata_stack_depth = -1; /* make room on stack */ + errordata_stack_depth = -1; /* make room on stack */ ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded"))); } @@ -1810,7 +1810,7 @@ GetErrorContextStack(void) * because it suggests an infinite loop of errors during error * recovery. */ - errordata_stack_depth = -1; /* make room on stack */ + errordata_stack_depth = -1; /* make room on stack */ ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded"))); } @@ -2047,7 +2047,7 @@ write_syslog(int level, const char *line) syslog(level, "%s", line); } } -#endif /* HAVE_SYSLOG */ +#endif /* HAVE_SYSLOG */ #ifdef WIN32 /* @@ -2151,7 +2151,7 @@ write_eventlog(int level, const char *line, int len) &line, NULL); } -#endif /* WIN32 */ +#endif /* WIN32 */ static void write_console(const char *line, int len) @@ -2997,7 +2997,7 @@ send_message_to_server_log(ErrorData *edata) write_syslog(syslog_level, buf.data); } -#endif /* HAVE_SYSLOG */ +#endif /* HAVE_SYSLOG */ #ifdef WIN32 /* Write to eventlog, if enabled */ @@ -3005,7 +3005,7 @@ send_message_to_server_log(ErrorData *edata) { write_eventlog(edata->elevel, buf.data, buf.len); } -#endif /* WIN32 */ +#endif /* WIN32 */ /* Write to stderr, if enabled */ if ((Log_destination & LOG_DESTINATION_STDERR) || whereToSendOutput == DestDebug) @@ -3273,7 +3273,7 @@ send_message_to_frontend(ErrorData *edata) err_sendstring(&msgbuf, edata->funcname); } - pq_sendbyte(&msgbuf, '\0'); /* terminator */ + pq_sendbyte(&msgbuf, '\0'); /* terminator */ } else { diff --git a/src/backend/utils/fmgr/dfmgr.c b/src/backend/utils/fmgr/dfmgr.c index bfd1b11850..0783145a16 100644 --- a/src/backend/utils/fmgr/dfmgr.c +++ b/src/backend/utils/fmgr/dfmgr.c @@ -48,7 +48,7 @@ typedef struct df_files ino_t inode; /* Inode number of file */ #endif void *handle; /* a handle for pg_dl* functions */ - char filename[FLEXIBLE_ARRAY_MEMBER]; /* Full pathname of file */ + char filename[FLEXIBLE_ARRAY_MEMBER]; /* Full pathname of file */ } DynamicFileList; static DynamicFileList *file_list = NULL; @@ -448,7 +448,7 @@ internal_unload_library(const char *libname) else prv = file_scanner; } -#endif /* NOT_USED */ +#endif /* NOT_USED */ } static bool diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c index 0382c158c5..fe268e7d44 100644 --- a/src/backend/utils/fmgr/fmgr.c +++ b/src/backend/utils/fmgr/fmgr.c @@ -46,7 +46,7 @@ typedef struct TransactionId fn_xmin; /* for checking up-to-dateness */ ItemPointerData fn_tid; PGFunction user_fn; /* the function's address */ - const Pg_finfo_record *inforec; /* address of its info record */ + const Pg_finfo_record *inforec; /* address of its info record */ } CFuncHashTabEntry; static HTAB *CFuncHash = NULL; @@ -172,7 +172,7 @@ fmgr_info_cxt_security(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt, finfo->fn_nargs = fbp->nargs; finfo->fn_strict = fbp->strict; finfo->fn_retset = fbp->retset; - finfo->fn_stats = TRACK_FUNC_ALL; /* ie, never track */ + finfo->fn_stats = TRACK_FUNC_ALL; /* ie, never track */ finfo->fn_addr = fbp->func; finfo->fn_oid = functionId; return; @@ -208,7 +208,7 @@ fmgr_info_cxt_security(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt, FmgrHookIsNeeded(functionId))) { finfo->fn_addr = fmgr_security_definer; - finfo->fn_stats = TRACK_FUNC_ALL; /* ie, never track */ + finfo->fn_stats = TRACK_FUNC_ALL; /* ie, never track */ finfo->fn_oid = functionId; ReleaseSysCache(procedureTuple); return; @@ -1795,7 +1795,7 @@ Int64GetDatum(int64 X) *retval = X; return PointerGetDatum(retval); } -#endif /* USE_FLOAT8_BYVAL */ +#endif /* USE_FLOAT8_BYVAL */ #ifndef USE_FLOAT4_BYVAL diff --git a/src/backend/utils/fmgr/funcapi.c b/src/backend/utils/fmgr/funcapi.c index af08f102fe..6324220426 100644 --- a/src/backend/utils/fmgr/funcapi.c +++ b/src/backend/utils/fmgr/funcapi.c @@ -814,7 +814,7 @@ get_func_arg_info(HeapTuple procTup, * deconstruct_array() since the array data is just going to look like * a C array of values. */ - arr = DatumGetArrayTypeP(proallargtypes); /* ensure not toasted */ + arr = DatumGetArrayTypeP(proallargtypes); /* ensure not toasted */ numargs = ARR_DIMS(arr)[0]; if (ARR_NDIM(arr) != 1 || numargs < 0 || @@ -953,7 +953,7 @@ get_func_input_arg_names(Datum proargnames, Datum proargmodes, * For proargmodes, we don't need to use deconstruct_array() since the * array data is just going to look like a C array of values. */ - arr = DatumGetArrayTypeP(proargnames); /* ensure not toasted */ + arr = DatumGetArrayTypeP(proargnames); /* ensure not toasted */ if (ARR_NDIM(arr) != 1 || ARR_HASNULL(arr) || ARR_ELEMTYPE(arr) != TEXTOID) @@ -1200,7 +1200,7 @@ build_function_result_tupdesc_d(Datum proallargtypes, ARR_ELEMTYPE(arr) != OIDOID) elog(ERROR, "proallargtypes is not a 1-D Oid array"); argtypes = (Oid *) ARR_DATA_PTR(arr); - arr = DatumGetArrayTypeP(proargmodes); /* ensure not toasted */ + arr = DatumGetArrayTypeP(proargmodes); /* ensure not toasted */ if (ARR_NDIM(arr) != 1 || ARR_DIMS(arr)[0] != numargs || ARR_HASNULL(arr) || diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c index 578b1daccf..111d63df2b 100644 --- a/src/backend/utils/hash/dynahash.c +++ b/src/backend/utils/hash/dynahash.c @@ -352,7 +352,7 @@ hash_create(const char *tabname, long nelem, HASHCTL *info, int flags) hashp->hash = tag_hash; } else - hashp->hash = string_hash; /* default hash function */ + hashp->hash = string_hash; /* default hash function */ /* * If you don't specify a match function, it defaults to string_compare if @@ -1417,7 +1417,7 @@ hash_seq_search(HASH_SEQ_STATUS *status) /* Begin scan of curBucket... */ status->curEntry = curElem->link; - if (status->curEntry == NULL) /* end of this bucket */ + if (status->curEntry == NULL) /* end of this bucket */ ++curBucket; status->curBucket = curBucket; return (void *) ELEMENTKEY(curElem); @@ -1740,7 +1740,7 @@ next_pow2_int(long num) #define MAX_SEQ_SCANS 100 static HTAB *seq_scan_tables[MAX_SEQ_SCANS]; /* tables being scanned */ -static int seq_scan_level[MAX_SEQ_SCANS]; /* subtransaction nest level */ +static int seq_scan_level[MAX_SEQ_SCANS]; /* subtransaction nest level */ static int num_seq_scans = 0; diff --git a/src/backend/utils/init/globals.c b/src/backend/utils/init/globals.c index 8000b79e5a..7c09498dc0 100644 --- a/src/backend/utils/init/globals.c +++ b/src/backend/utils/init/globals.c @@ -62,10 +62,10 @@ char *DataDir = NULL; char OutputFileName[MAXPGPATH]; /* debugging output file */ char my_exec_path[MAXPGPATH]; /* full path to my executable */ -char pkglib_path[MAXPGPATH]; /* full path to lib directory */ +char pkglib_path[MAXPGPATH]; /* full path to lib directory */ #ifdef EXEC_BACKEND -char postgres_exec_path[MAXPGPATH]; /* full path to backend */ +char postgres_exec_path[MAXPGPATH]; /* full path to backend */ /* note: currently this is not valid in backend processes */ #endif @@ -126,7 +126,7 @@ int max_worker_processes = 8; int max_parallel_workers = 8; int MaxBackends = 0; -int VacuumCostPageHit = 1; /* GUC parameters for vacuum */ +int VacuumCostPageHit = 1; /* GUC parameters for vacuum */ int VacuumCostPageMiss = 10; int VacuumCostPageDirty = 20; int VacuumCostLimit = 200; @@ -136,5 +136,5 @@ int VacuumPageHit = 0; int VacuumPageMiss = 0; int VacuumPageDirty = 0; -int VacuumCostBalance = 0; /* working state for vacuum */ +int VacuumCostBalance = 0; /* working state for vacuum */ bool VacuumCostActive = false; diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c index 64b3785d7b..1c75e6357e 100644 --- a/src/backend/utils/init/miscinit.c +++ b/src/backend/utils/init/miscinit.c @@ -1137,8 +1137,8 @@ TouchSocketLockFiles(void) read(fd, buffer, sizeof(buffer)); close(fd); } -#endif /* HAVE_UTIMES */ -#endif /* HAVE_UTIME */ +#endif /* HAVE_UTIMES */ +#endif /* HAVE_UTIME */ } } diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index b8b4a06350..56b4a5b8c3 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -275,7 +275,7 @@ PerformAuthentication(Port *port) set_ps_display("startup", false); - ClientAuthInProgress = false; /* client_min_messages is active now */ + ClientAuthInProgress = false; /* client_min_messages is active now */ } diff --git a/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c b/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c index c55bcc978c..83c2712eba 100644 --- a/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c +++ b/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c @@ -261,7 +261,7 @@ shift_jis_20042euc_jis_2004(const unsigned char *sjis, unsigned char *p, int len /* * JIS X 0213 */ - if (c1 >= 0x81 && c1 <= 0x9f) /* plane 1 1ku-62ku */ + if (c1 >= 0x81 && c1 <= 0x9f) /* plane 1 1ku-62ku */ { ku = (c1 << 1) - 0x100; ten = get_ten(c2, &kubun); diff --git a/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c b/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c index 09002a77d8..1d9b10f8a7 100644 --- a/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c +++ b/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c @@ -22,7 +22,7 @@ typedef struct } codes_t; /* map Big5 Level 1 to CNS 11643-1992 Plane 1 */ -static const codes_t big5Level1ToCnsPlane1[25] = { /* range */ +static const codes_t big5Level1ToCnsPlane1[25] = { /* range */ {0xA140, 0x2121}, {0xA1F6, 0x2258}, {0xA1F7, 0x2257}, @@ -51,7 +51,7 @@ static const codes_t big5Level1ToCnsPlane1[25] = { /* range */ }; /* map CNS 11643-1992 Plane 1 to Big5 Level 1 */ -static const codes_t cnsPlane1ToBig5Level1[26] = { /* range */ +static const codes_t cnsPlane1ToBig5Level1[26] = { /* range */ {0x2121, 0xA140}, {0x2257, 0xA1F7}, {0x2258, 0xA1F6}, @@ -81,7 +81,7 @@ static const codes_t cnsPlane1ToBig5Level1[26] = { /* range */ }; /* map Big5 Level 2 to CNS 11643-1992 Plane 2 */ -static const codes_t big5Level2ToCnsPlane2[48] = { /* range */ +static const codes_t big5Level2ToCnsPlane2[48] = { /* range */ {0xC940, 0x2121}, {0xc94a, 0x0000}, {0xC94B, 0x212B}, @@ -133,7 +133,7 @@ static const codes_t big5Level2ToCnsPlane2[48] = { /* range */ }; /* map CNS 11643-1992 Plane 2 to Big5 Level 2 */ -static const codes_t cnsPlane2ToBig5Level2[49] = { /* range */ +static const codes_t cnsPlane2ToBig5Level2[49] = { /* range */ {0x2121, 0xC940}, {0x212B, 0xC94B}, {0x214C, 0xC9BE}, diff --git a/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c b/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c index ac0bc915ed..4e47cf66c5 100644 --- a/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c +++ b/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c @@ -60,37 +60,37 @@ PG_FUNCTION_INFO_V1(utf8_to_iso8859); typedef struct { pg_enc encoding; - const pg_mb_radix_tree *map1; /* to UTF8 map name */ - const pg_mb_radix_tree *map2; /* from UTF8 map name */ + const pg_mb_radix_tree *map1; /* to UTF8 map name */ + const pg_mb_radix_tree *map2; /* from UTF8 map name */ } pg_conv_map; static const pg_conv_map maps[] = { {PG_LATIN2, &iso8859_2_to_unicode_tree, - &iso8859_2_from_unicode_tree}, /* ISO-8859-2 Latin 2 */ + &iso8859_2_from_unicode_tree}, /* ISO-8859-2 Latin 2 */ {PG_LATIN3, &iso8859_3_to_unicode_tree, - &iso8859_3_from_unicode_tree}, /* ISO-8859-3 Latin 3 */ + &iso8859_3_from_unicode_tree}, /* ISO-8859-3 Latin 3 */ {PG_LATIN4, &iso8859_4_to_unicode_tree, - &iso8859_4_from_unicode_tree}, /* ISO-8859-4 Latin 4 */ + &iso8859_4_from_unicode_tree}, /* ISO-8859-4 Latin 4 */ {PG_LATIN5, &iso8859_9_to_unicode_tree, - &iso8859_9_from_unicode_tree}, /* ISO-8859-9 Latin 5 */ + &iso8859_9_from_unicode_tree}, /* ISO-8859-9 Latin 5 */ {PG_LATIN6, &iso8859_10_to_unicode_tree, - &iso8859_10_from_unicode_tree}, /* ISO-8859-10 Latin 6 */ + &iso8859_10_from_unicode_tree}, /* ISO-8859-10 Latin 6 */ {PG_LATIN7, &iso8859_13_to_unicode_tree, - &iso8859_13_from_unicode_tree}, /* ISO-8859-13 Latin 7 */ + &iso8859_13_from_unicode_tree}, /* ISO-8859-13 Latin 7 */ {PG_LATIN8, &iso8859_14_to_unicode_tree, - &iso8859_14_from_unicode_tree}, /* ISO-8859-14 Latin 8 */ + &iso8859_14_from_unicode_tree}, /* ISO-8859-14 Latin 8 */ {PG_LATIN9, &iso8859_15_to_unicode_tree, - &iso8859_15_from_unicode_tree}, /* ISO-8859-15 Latin 9 */ + &iso8859_15_from_unicode_tree}, /* ISO-8859-15 Latin 9 */ {PG_LATIN10, &iso8859_16_to_unicode_tree, - &iso8859_16_from_unicode_tree}, /* ISO-8859-16 Latin 10 */ + &iso8859_16_from_unicode_tree}, /* ISO-8859-16 Latin 10 */ {PG_ISO_8859_5, &iso8859_5_to_unicode_tree, - &iso8859_5_from_unicode_tree}, /* ISO-8859-5 */ + &iso8859_5_from_unicode_tree}, /* ISO-8859-5 */ {PG_ISO_8859_6, &iso8859_6_to_unicode_tree, - &iso8859_6_from_unicode_tree}, /* ISO-8859-6 */ + &iso8859_6_from_unicode_tree}, /* ISO-8859-6 */ {PG_ISO_8859_7, &iso8859_7_to_unicode_tree, - &iso8859_7_from_unicode_tree}, /* ISO-8859-7 */ + &iso8859_7_from_unicode_tree}, /* ISO-8859-7 */ {PG_ISO_8859_8, &iso8859_8_to_unicode_tree, - &iso8859_8_from_unicode_tree}, /* ISO-8859-8 */ + &iso8859_8_from_unicode_tree}, /* ISO-8859-8 */ }; Datum diff --git a/src/backend/utils/mb/conversion_procs/utf8_and_win/utf8_and_win.c b/src/backend/utils/mb/conversion_procs/utf8_and_win/utf8_and_win.c index 971de32f6c..cec458c9f4 100644 --- a/src/backend/utils/mb/conversion_procs/utf8_and_win/utf8_and_win.c +++ b/src/backend/utils/mb/conversion_procs/utf8_and_win/utf8_and_win.c @@ -56,8 +56,8 @@ PG_FUNCTION_INFO_V1(utf8_to_win); typedef struct { pg_enc encoding; - const pg_mb_radix_tree *map1; /* to UTF8 map name */ - const pg_mb_radix_tree *map2; /* from UTF8 map name */ + const pg_mb_radix_tree *map1; /* to UTF8 map name */ + const pg_mb_radix_tree *map2; /* from UTF8 map name */ } pg_conv_map; static const pg_conv_map maps[] = { diff --git a/src/backend/utils/mb/encnames.c b/src/backend/utils/mb/encnames.c index f97505e55a..12b61cd3db 100644 --- a/src/backend/utils/mb/encnames.c +++ b/src/backend/utils/mb/encnames.c @@ -476,7 +476,7 @@ get_encoding_name_for_icu(int encoding) return icu_encoding_name; } -#endif /* not FRONTEND */ +#endif /* not FRONTEND */ /* ---------- diff --git a/src/backend/utils/mb/wchar.c b/src/backend/utils/mb/wchar.c index 9334039f78..b71b5e016a 100644 --- a/src/backend/utils/mb/wchar.c +++ b/src/backend/utils/mb/wchar.c @@ -85,14 +85,14 @@ pg_euc2wchar_with_len(const unsigned char *from, pg_wchar *to, int len) *to = (SS2 << 8) | *from++; len -= 2; } - else if (*from == SS3 && len >= 3) /* JIS X 0212 KANJI */ + else if (*from == SS3 && len >= 3) /* JIS X 0212 KANJI */ { from++; *to = (SS3 << 16) | (*from++ << 8); *to |= *from++; len -= 3; } - else if (IS_HIGHBIT_SET(*from) && len >= 2) /* JIS X 0208 KANJI */ + else if (IS_HIGHBIT_SET(*from) && len >= 2) /* JIS X 0208 KANJI */ { *to = *from++ << 8; *to |= *from++; @@ -212,14 +212,14 @@ pg_euccn2wchar_with_len(const unsigned char *from, pg_wchar *to, int len) *to |= *from++; len -= 3; } - else if (*from == SS3 && len >= 3) /* code set 3 (unused ?) */ + else if (*from == SS3 && len >= 3) /* code set 3 (unused ?) */ { from++; *to = (SS3 << 16) | (*from++ << 8); *to |= *from++; len -= 3; } - else if (IS_HIGHBIT_SET(*from) && len >= 2) /* code set 1 */ + else if (IS_HIGHBIT_SET(*from) && len >= 2) /* code set 1 */ { *to = *from++ << 8; *to |= *from++; @@ -280,14 +280,14 @@ pg_euctw2wchar_with_len(const unsigned char *from, pg_wchar *to, int len) *to |= *from++; len -= 4; } - else if (*from == SS3 && len >= 3) /* code set 3 (unused?) */ + else if (*from == SS3 && len >= 3) /* code set 3 (unused?) */ { from++; *to = (SS3 << 16) | (*from++ << 8); *to |= *from++; len -= 3; } - else if (IS_HIGHBIT_SET(*from) && len >= 2) /* code set 2 */ + else if (IS_HIGHBIT_SET(*from) && len >= 2) /* code set 2 */ { *to = *from++ << 8; *to |= *from++; @@ -984,7 +984,7 @@ pg_sjis_dsplen(const unsigned char *s) else if (IS_HIGHBIT_SET(*s)) len = 2; /* kanji? */ else - len = pg_ascii_dsplen(s); /* should be ASCII */ + len = pg_ascii_dsplen(s); /* should be ASCII */ return len; } @@ -1011,7 +1011,7 @@ pg_big5_dsplen(const unsigned char *s) if (IS_HIGHBIT_SET(*s)) len = 2; /* kanji? */ else - len = pg_ascii_dsplen(s); /* should be ASCII */ + len = pg_ascii_dsplen(s); /* should be ASCII */ return len; } @@ -1038,7 +1038,7 @@ pg_gbk_dsplen(const unsigned char *s) if (IS_HIGHBIT_SET(*s)) len = 2; /* kanji? */ else - len = pg_ascii_dsplen(s); /* should be ASCII */ + len = pg_ascii_dsplen(s); /* should be ASCII */ return len; } @@ -1065,7 +1065,7 @@ pg_uhc_dsplen(const unsigned char *s) if (IS_HIGHBIT_SET(*s)) len = 2; /* 2byte? */ else - len = pg_ascii_dsplen(s); /* should be ASCII */ + len = pg_ascii_dsplen(s); /* should be ASCII */ return len; } @@ -1095,7 +1095,7 @@ pg_gb18030_dsplen(const unsigned char *s) if (IS_HIGHBIT_SET(*s)) len = 2; else - len = pg_ascii_dsplen(s); /* ASCII */ + len = pg_ascii_dsplen(s); /* ASCII */ return len; } @@ -1157,7 +1157,7 @@ pg_eucjp_verifier(const unsigned char *s, int len) break; default: - if (IS_HIGHBIT_SET(c1)) /* JIS X 0208? */ + if (IS_HIGHBIT_SET(c1)) /* JIS X 0208? */ { l = 2; if (l > len) @@ -1241,7 +1241,7 @@ pg_euctw_verifier(const unsigned char *s, int len) return -1; default: - if (IS_HIGHBIT_SET(c1)) /* CNS 11643 Plane 1 */ + if (IS_HIGHBIT_SET(c1)) /* CNS 11643 Plane 1 */ { l = 2; if (l > len) @@ -1683,7 +1683,7 @@ pg_eucjp_increment(unsigned char *charptr, int length) return false; default: - if (IS_HIGHBIT_SET(c1)) /* JIS X 0208? */ + if (IS_HIGHBIT_SET(c1)) /* JIS X 0208? */ { if (length != 2) return false; @@ -1717,7 +1717,7 @@ pg_eucjp_increment(unsigned char *charptr, int length) return true; } -#endif /* !FRONTEND */ +#endif /* !FRONTEND */ /* @@ -1734,40 +1734,40 @@ const pg_wchar_tbl pg_wchar_table[] = { {pg_euctw2wchar_with_len, pg_wchar2euc_with_len, pg_euctw_mblen, pg_euctw_dsplen, pg_euctw_verifier, 4}, /* PG_EUC_TW */ {pg_eucjp2wchar_with_len, pg_wchar2euc_with_len, pg_eucjp_mblen, pg_eucjp_dsplen, pg_eucjp_verifier, 3}, /* PG_EUC_JIS_2004 */ {pg_utf2wchar_with_len, pg_wchar2utf_with_len, pg_utf_mblen, pg_utf_dsplen, pg_utf8_verifier, 4}, /* PG_UTF8 */ - {pg_mule2wchar_with_len, pg_wchar2mule_with_len, pg_mule_mblen, pg_mule_dsplen, pg_mule_verifier, 4}, /* PG_MULE_INTERNAL */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN1 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN2 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN3 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN4 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN5 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN6 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN7 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN8 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN9 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN10 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1256 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1258 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN866 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN874 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_KOI8R */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1251 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1252 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-5 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-6 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-7 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-8 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1250 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1253 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1254 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1255 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1257 */ - {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_KOI8U */ + {pg_mule2wchar_with_len, pg_wchar2mule_with_len, pg_mule_mblen, pg_mule_dsplen, pg_mule_verifier, 4}, /* PG_MULE_INTERNAL */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN1 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN2 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN3 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN4 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN5 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN6 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN7 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN8 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN9 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN10 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1256 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1258 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN866 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN874 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_KOI8R */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1251 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1252 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-5 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-6 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-7 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-8 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1250 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1253 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1254 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1255 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1257 */ + {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_KOI8U */ {0, 0, pg_sjis_mblen, pg_sjis_dsplen, pg_sjis_verifier, 2}, /* PG_SJIS */ {0, 0, pg_big5_mblen, pg_big5_dsplen, pg_big5_verifier, 2}, /* PG_BIG5 */ {0, 0, pg_gbk_mblen, pg_gbk_dsplen, pg_gbk_verifier, 2}, /* PG_GBK */ {0, 0, pg_uhc_mblen, pg_uhc_dsplen, pg_uhc_verifier, 2}, /* PG_UHC */ - {0, 0, pg_gb18030_mblen, pg_gb18030_dsplen, pg_gb18030_verifier, 4}, /* PG_GB18030 */ - {0, 0, pg_johab_mblen, pg_johab_dsplen, pg_johab_verifier, 3}, /* PG_JOHAB */ + {0, 0, pg_gb18030_mblen, pg_gb18030_dsplen, pg_gb18030_verifier, 4}, /* PG_GB18030 */ + {0, 0, pg_johab_mblen, pg_johab_dsplen, pg_johab_verifier, 3}, /* PG_JOHAB */ {0, 0, pg_sjis_mblen, pg_sjis_dsplen, pg_sjis_verifier, 2} /* PG_SHIFT_JIS_2004 */ }; @@ -2051,4 +2051,4 @@ report_untranslatable_char(int src_encoding, int dest_encoding, pg_enc2name_tbl[dest_encoding].name))); } -#endif /* !FRONTEND */ +#endif /* !FRONTEND */ diff --git a/src/backend/utils/misc/backend_random.c b/src/backend/utils/misc/backend_random.c index 9a0b2ce9eb..4f18656fda 100644 --- a/src/backend/utils/misc/backend_random.c +++ b/src/backend/utils/misc/backend_random.c @@ -155,4 +155,4 @@ pg_backend_random(char *dst, int len) } -#endif /* HAVE_STRONG_RANDOM */ +#endif /* HAVE_STRONG_RANDOM */ diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index d9469e4181..f96a556a5e 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -438,8 +438,8 @@ bool Debug_pretty_print = true; bool log_parser_stats = false; bool log_planner_stats = false; bool log_executor_stats = false; -bool log_statement_stats = false; /* this is sort of all three - * above together */ +bool log_statement_stats = false; /* this is sort of all three above + * together */ bool log_btree_build_stats = false; char *event_source; @@ -7040,7 +7040,7 @@ replace_auto_config_value(ConfigVariable **head_p, ConfigVariable **tail_p, item->name = pstrdup(name); item->value = pstrdup(value); item->errmsg = NULL; - item->filename = pstrdup(""); /* new item has no location */ + item->filename = pstrdup(""); /* new item has no location */ item->sourceline = 0; item->ignore = false; item->applied = false; @@ -8956,7 +8956,7 @@ read_nondefault_variables(void) FreeFile(fp); } -#endif /* EXEC_BACKEND */ +#endif /* EXEC_BACKEND */ /* * can_skip_gucvar: @@ -10404,7 +10404,7 @@ check_effective_io_concurrency(int *newval, void **extra, GucSource source) return false; #else return true; -#endif /* USE_PREFETCH */ +#endif /* USE_PREFETCH */ } static void @@ -10412,7 +10412,7 @@ assign_effective_io_concurrency(int newval, void *extra) { #ifdef USE_PREFETCH target_prefetch_pages = *((int *) extra); -#endif /* USE_PREFETCH */ +#endif /* USE_PREFETCH */ } static void @@ -10424,13 +10424,13 @@ assign_pgstat_temp_directory(const char *newval, void *extra) char *fname; /* directory */ - dname = guc_malloc(ERROR, strlen(newval) + 1); /* runtime dir */ + dname = guc_malloc(ERROR, strlen(newval) + 1); /* runtime dir */ sprintf(dname, "%s", newval); /* global stats */ - tname = guc_malloc(ERROR, strlen(newval) + 12); /* /global.tmp */ + tname = guc_malloc(ERROR, strlen(newval) + 12); /* /global.tmp */ sprintf(tname, "%s/global.tmp", newval); - fname = guc_malloc(ERROR, strlen(newval) + 13); /* /global.stat */ + fname = guc_malloc(ERROR, strlen(newval) + 13); /* /global.stat */ sprintf(fname, "%s/global.stat", newval); if (pgstat_stat_directory) diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c index 4007a17800..5742de0802 100644 --- a/src/backend/utils/misc/ps_status.c +++ b/src/backend/utils/misc/ps_status.c @@ -93,11 +93,11 @@ static const size_t ps_buffer_size = PS_BUFFER_SIZE; static char *ps_buffer; /* will point to argv area */ static size_t ps_buffer_size; /* space determined at run time */ static size_t last_status_len; /* use to minimize length of clobber */ -#endif /* PS_USE_CLOBBER_ARGV */ +#endif /* PS_USE_CLOBBER_ARGV */ static size_t ps_buffer_cur_len; /* nominal strlen(ps_buffer) */ -static size_t ps_buffer_fixed_size; /* size of the constant prefix */ +static size_t ps_buffer_fixed_size; /* size of the constant prefix */ /* save the original argv[] location here */ static int save_argc; @@ -183,7 +183,7 @@ save_ps_display_args(int argc, char **argv) new_environ[i] = NULL; environ = new_environ; } -#endif /* PS_USE_CLOBBER_ARGV */ +#endif /* PS_USE_CLOBBER_ARGV */ #if defined(PS_USE_CHANGE_ARGV) || defined(PS_USE_CLOBBER_ARGV) @@ -231,7 +231,7 @@ save_ps_display_args(int argc, char **argv) argv = new_argv; } -#endif /* PS_USE_CHANGE_ARGV or PS_USE_CLOBBER_ARGV */ +#endif /* PS_USE_CHANGE_ARGV or PS_USE_CLOBBER_ARGV */ return argv; } @@ -270,7 +270,7 @@ init_ps_display(const char *username, const char *dbname, #ifdef PS_USE_CHANGE_ARGV save_argv[0] = ps_buffer; save_argv[1] = NULL; -#endif /* PS_USE_CHANGE_ARGV */ +#endif /* PS_USE_CHANGE_ARGV */ #ifdef PS_USE_CLOBBER_ARGV { @@ -280,7 +280,7 @@ init_ps_display(const char *username, const char *dbname, for (i = 1; i < save_argc; i++) save_argv[i] = ps_buffer + ps_buffer_size; } -#endif /* PS_USE_CLOBBER_ARGV */ +#endif /* PS_USE_CLOBBER_ARGV */ /* * Make fixed prefix of ps display. @@ -313,7 +313,7 @@ init_ps_display(const char *username, const char *dbname, ps_buffer_cur_len = ps_buffer_fixed_size = strlen(ps_buffer); set_ps_display(initial_str, true); -#endif /* not PS_USE_NONE */ +#endif /* not PS_USE_NONE */ } @@ -358,12 +358,12 @@ set_ps_display(const char *activity, bool force) pst.pst_command = ps_buffer; pstat(PSTAT_SETCMD, pst, ps_buffer_cur_len, 0, 0); } -#endif /* PS_USE_PSTAT */ +#endif /* PS_USE_PSTAT */ #ifdef PS_USE_PS_STRINGS PS_STRINGS->ps_nargvstr = 1; PS_STRINGS->ps_argvstr = ps_buffer; -#endif /* PS_USE_PS_STRINGS */ +#endif /* PS_USE_PS_STRINGS */ #ifdef PS_USE_CLOBBER_ARGV /* pad unused memory; need only clobber remainder of old status string */ @@ -371,7 +371,7 @@ set_ps_display(const char *activity, bool force) MemSet(ps_buffer + ps_buffer_cur_len, PS_PADDING, last_status_len - ps_buffer_cur_len); last_status_len = ps_buffer_cur_len; -#endif /* PS_USE_CLOBBER_ARGV */ +#endif /* PS_USE_CLOBBER_ARGV */ #ifdef PS_USE_WIN32 { @@ -390,8 +390,8 @@ set_ps_display(const char *activity, bool force) ident_handle = CreateEvent(NULL, TRUE, FALSE, name); } -#endif /* PS_USE_WIN32 */ -#endif /* not PS_USE_NONE */ +#endif /* PS_USE_WIN32 */ +#endif /* not PS_USE_NONE */ } diff --git a/src/backend/utils/misc/sampling.c b/src/backend/utils/misc/sampling.c index c36459ebad..b618ed1d7e 100644 --- a/src/backend/utils/misc/sampling.c +++ b/src/backend/utils/misc/sampling.c @@ -59,8 +59,8 @@ BlockSampler_HasMore(BlockSampler bs) BlockNumber BlockSampler_Next(BlockSampler bs) { - BlockNumber K = bs->N - bs->t; /* remaining blocks */ - int k = bs->n - bs->m; /* blocks still to sample */ + BlockNumber K = bs->N - bs->t; /* remaining blocks */ + int k = bs->n - bs->m; /* blocks still to sample */ double p; /* probability to skip block */ double V; /* random */ @@ -150,7 +150,7 @@ reservoir_get_next_S(ReservoirState rs, double t, int n) double V, quot; - V = sampler_random_fract(rs->randstate); /* Generate V */ + V = sampler_random_fract(rs->randstate); /* Generate V */ S = 0; t += 1; /* Note: "num" in Vitter's code is always equal to t - n */ @@ -211,7 +211,7 @@ reservoir_get_next_S(ReservoirState rs, double t, int n) y *= numer / denom; denom -= 1; } - W = exp(-log(sampler_random_fract(rs->randstate)) / n); /* Generate W in advance */ + W = exp(-log(sampler_random_fract(rs->randstate)) / n); /* Generate W in advance */ if (exp(log(y) / n) <= (t + X) / t) break; } diff --git a/src/backend/utils/mmgr/aset.c b/src/backend/utils/mmgr/aset.c index 9d8f02a179..51668d88fe 100644 --- a/src/backend/utils/mmgr/aset.c +++ b/src/backend/utils/mmgr/aset.c @@ -99,7 +99,7 @@ #define ALLOC_BLOCKHDRSZ MAXALIGN(sizeof(AllocBlockData)) #define ALLOC_CHUNKHDRSZ sizeof(struct AllocChunkData) -typedef struct AllocBlockData *AllocBlock; /* forward reference */ +typedef struct AllocBlockData *AllocBlock; /* forward reference */ typedef struct AllocChunkData *AllocChunk; /* @@ -122,7 +122,7 @@ typedef struct AllocSetContext MemoryContextData header; /* Standard memory-context fields */ /* Info about storage allocated in this context: */ AllocBlock blocks; /* head of list of blocks in this set */ - AllocChunk freelist[ALLOCSET_NUM_FREELISTS]; /* free chunk lists */ + AllocChunk freelist[ALLOCSET_NUM_FREELISTS]; /* free chunk lists */ /* Allocation parameters for this context: */ Size initBlockSize; /* initial block size */ Size maxBlockSize; /* maximum block size */ @@ -170,7 +170,7 @@ typedef struct AllocChunkData Size padding; #endif -#endif /* MEMORY_CONTEXT_CHECKING */ +#endif /* MEMORY_CONTEXT_CHECKING */ /* aset is the owning aset if allocated, or the freelist link if free */ void *aset; @@ -721,7 +721,7 @@ AllocSetAlloc(MemoryContext context, Size size) chunk->size = availchunk; #ifdef MEMORY_CONTEXT_CHECKING - chunk->requested_size = 0; /* mark it free */ + chunk->requested_size = 0; /* mark it free */ #endif chunk->aset = (void *) set->freelist[a_fidx]; set->freelist[a_fidx] = chunk; @@ -1252,10 +1252,10 @@ AllocSetCheck(MemoryContext context) Size chsize, dsize; - chsize = chunk->size; /* aligned chunk size */ + chsize = chunk->size; /* aligned chunk size */ VALGRIND_MAKE_MEM_DEFINED(&chunk->requested_size, sizeof(chunk->requested_size)); - dsize = chunk->requested_size; /* real data */ + dsize = chunk->requested_size; /* real data */ if (dsize > 0) /* not on a free list */ VALGRIND_MAKE_MEM_NOACCESS(&chunk->requested_size, sizeof(chunk->requested_size)); @@ -1305,4 +1305,4 @@ AllocSetCheck(MemoryContext context) } } -#endif /* MEMORY_CONTEXT_CHECKING */ +#endif /* MEMORY_CONTEXT_CHECKING */ diff --git a/src/backend/utils/mmgr/dsa.c b/src/backend/utils/mmgr/dsa.c index f09a9c0487..7852fde300 100644 --- a/src/backend/utils/mmgr/dsa.c +++ b/src/backend/utils/mmgr/dsa.c @@ -235,7 +235,7 @@ typedef struct */ static const uint16 dsa_size_classes[] = { sizeof(dsa_area_span), 0, /* special size classes */ - 8, 16, 24, 32, 40, 48, 56, 64, /* 8 classes separated by 8 bytes */ + 8, 16, 24, 32, 40, 48, 56, 64, /* 8 classes separated by 8 bytes */ 80, 96, 112, 128, /* 4 classes separated by 16 bytes */ 160, 192, 224, 256, /* 4 classes separated by 32 bytes */ 320, 384, 448, 512, /* 4 classes separated by 64 bytes */ @@ -1304,7 +1304,7 @@ attach_internal(void *place, dsm_segment *segment, dsa_handle handle) /* Set up the segment map for this process's mapping. */ segment_map = &area->segment_maps[0]; - segment_map->segment = segment; /* NULL for in-place */ + segment_map->segment = segment; /* NULL for in-place */ segment_map->mapped_address = place; segment_map->header = (dsa_segment_header *) segment_map->mapped_address; segment_map->fpm = (FreePageManager *) diff --git a/src/backend/utils/mmgr/memdebug.c b/src/backend/utils/mmgr/memdebug.c index 243607732c..f0a87d3f20 100644 --- a/src/backend/utils/mmgr/memdebug.c +++ b/src/backend/utils/mmgr/memdebug.c @@ -90,4 +90,4 @@ randomize_mem(char *ptr, size_t size) save_ctr = ctr; } -#endif /* RANDOMIZE_ALLOCATED_MEMORY */ +#endif /* RANDOMIZE_ALLOCATED_MEMORY */ diff --git a/src/backend/utils/mmgr/slab.c b/src/backend/utils/mmgr/slab.c index 2cf58059d0..35de6b6d82 100644 --- a/src/backend/utils/mmgr/slab.c +++ b/src/backend/utils/mmgr/slab.c @@ -764,4 +764,4 @@ SlabCheck(MemoryContext context) } } -#endif /* MEMORY_CONTEXT_CHECKING */ +#endif /* MEMORY_CONTEXT_CHECKING */ diff --git a/src/backend/utils/resowner/resowner.c b/src/backend/utils/resowner/resowner.c index 8f324cd580..4a4a287148 100644 --- a/src/backend/utils/resowner/resowner.c +++ b/src/backend/utils/resowner/resowner.c @@ -127,7 +127,7 @@ typedef struct ResourceOwnerData /* We can remember up to MAX_RESOWNER_LOCKS references to local locks. */ int nlocks; /* number of owned locks */ - LOCALLOCK *locks[MAX_RESOWNER_LOCKS]; /* list of owned locks */ + LOCALLOCK *locks[MAX_RESOWNER_LOCKS]; /* list of owned locks */ } ResourceOwnerData; diff --git a/src/backend/utils/sort/logtape.c b/src/backend/utils/sort/logtape.c index 455735925e..e1628f7379 100644 --- a/src/backend/utils/sort/logtape.c +++ b/src/backend/utils/sort/logtape.c @@ -161,7 +161,7 @@ struct LogicalTapeSet * blocks that have been allocated for a tape, but have not been written * to the underlying file yet. */ - long nBlocksAllocated; /* # of blocks allocated */ + long nBlocksAllocated; /* # of blocks allocated */ long nBlocksWritten; /* # of blocks used in underlying file */ /* diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index 420a34afe7..362f589625 100644 --- a/src/backend/utils/time/snapmgr.c +++ b/src/backend/utils/time/snapmgr.c @@ -72,7 +72,7 @@ /* * GUC parameters */ -int old_snapshot_threshold; /* number of minutes, -1 disables */ +int old_snapshot_threshold; /* number of minutes, -1 disables */ /* * Structure for dealing with old_snapshot_threshold implementation. @@ -84,9 +84,8 @@ typedef struct OldSnapshotControlData * only allowed to move forward. */ slock_t mutex_current; /* protect current_timestamp */ - TimestampTz current_timestamp; /* latest snapshot timestamp */ - slock_t mutex_latest_xmin; /* protect latest_xmin and - * next_map_update */ + TimestampTz current_timestamp; /* latest snapshot timestamp */ + slock_t mutex_latest_xmin; /* protect latest_xmin and next_map_update */ TransactionId latest_xmin; /* latest snapshot xmin */ TimestampTz next_map_update; /* latest snapshot valid up to */ slock_t mutex_threshold; /* protect threshold fields */ diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c index 519f3b6803..f9da9e17f5 100644 --- a/src/backend/utils/time/tqual.c +++ b/src/backend/utils/time/tqual.c @@ -512,7 +512,7 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid, else if (TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetRawXmin(tuple))) { if (HeapTupleHeaderGetCmin(tuple) >= curcid) - return HeapTupleInvisible; /* inserted after scan started */ + return HeapTupleInvisible; /* inserted after scan started */ if (tuple->t_infomask & HEAP_XMAX_INVALID) /* xid invalid */ return HeapTupleMayBeUpdated; @@ -571,8 +571,8 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid, return HeapTupleSelfUpdated; /* updated after scan * started */ else - return HeapTupleInvisible; /* updated before scan - * started */ + return HeapTupleInvisible; /* updated before scan + * started */ } } @@ -587,7 +587,7 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid, if (HeapTupleHeaderGetCmax(tuple) >= curcid) return HeapTupleSelfUpdated; /* updated after scan started */ else - return HeapTupleInvisible; /* updated before scan started */ + return HeapTupleInvisible; /* updated before scan started */ } else if (TransactionIdIsInProgress(HeapTupleHeaderGetRawXmin(tuple))) return HeapTupleInvisible; @@ -646,7 +646,7 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid, if (HeapTupleHeaderGetCmax(tuple) >= curcid) return HeapTupleSelfUpdated; /* updated after scan started */ else - return HeapTupleInvisible; /* updated before scan started */ + return HeapTupleInvisible; /* updated before scan started */ } if (MultiXactIdIsRunning(HeapTupleHeaderGetRawXmax(tuple), false)) @@ -682,7 +682,7 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid, if (HEAP_XMAX_IS_LOCKED_ONLY(tuple->t_infomask)) return HeapTupleBeingUpdated; if (HeapTupleHeaderGetCmax(tuple) >= curcid) - return HeapTupleSelfUpdated; /* updated after scan started */ + return HeapTupleSelfUpdated; /* updated after scan started */ else return HeapTupleInvisible; /* updated before scan started */ } @@ -1038,7 +1038,7 @@ HeapTupleSatisfiesMVCC(HeapTuple htup, Snapshot snapshot, else if (HeapTupleHeaderGetCmax(tuple) >= snapshot->curcid) return true; /* updated after scan started */ else - return false; /* updated before scan started */ + return false; /* updated before scan started */ } if (!TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetRawXmax(tuple))) diff --git a/src/bin/initdb/findtimezone.c b/src/bin/initdb/findtimezone.c index edfeb52d54..96aa39021e 100644 --- a/src/bin/initdb/findtimezone.c +++ b/src/bin/initdb/findtimezone.c @@ -279,7 +279,7 @@ score_timezone(const char *tzname, struct tztry *tt) if (pgtm->tm_zone == NULL) return -1; /* probably shouldn't happen */ memset(cbuf, 0, sizeof(cbuf)); - strftime(cbuf, sizeof(cbuf) - 1, "%Z", systm); /* zone abbr */ + strftime(cbuf, sizeof(cbuf) - 1, "%Z", systm); /* zone abbr */ if (strcmp(cbuf, pgtm->tm_zone) != 0) { #ifdef DEBUG_IDENTIFY_TIMEZONE @@ -1336,7 +1336,7 @@ identify_system_timezone(void) #endif return NULL; /* go to GMT */ } -#endif /* WIN32 */ +#endif /* WIN32 */ /* diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index bc8a8706c1..7fdaca868a 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -1231,7 +1231,7 @@ setup_config(void) conflines = replace_token(conflines, "host replication all ::1", "#host replication all ::1"); -#endif /* HAVE_IPV6 */ +#endif /* HAVE_IPV6 */ /* Replace default authentication methods */ conflines = replace_token(conflines, @@ -2961,7 +2961,7 @@ main(int argc, char *argv[]) {"show", no_argument, NULL, 's'}, {"noclean", no_argument, NULL, 'n'}, /* for backwards compatibility */ {"no-clean", no_argument, NULL, 'n'}, - {"nosync", no_argument, NULL, 'N'}, /* for backwards compatibility */ + {"nosync", no_argument, NULL, 'N'}, /* for backwards compatibility */ {"no-sync", no_argument, NULL, 'N'}, {"sync-only", no_argument, NULL, 'S'}, {"waldir", required_argument, NULL, 'X'}, diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index 990fe47e03..c5e344f3cf 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -28,14 +28,13 @@ const char *progname; /* Options and defaults */ bool debug = false; /* are we debugging? */ bool dryrun = false; /* are we performing a dry-run operation? */ -char *additional_ext = NULL; /* Extension to remove from filenames */ +char *additional_ext = NULL; /* Extension to remove from filenames */ char *archiveLocation; /* where to find the archive? */ char *restartWALFileName; /* the file from which we can restart restore */ char WALFilePath[MAXPGPATH * 2]; /* the file path including archive */ -char exclusiveCleanupFileName[MAXFNAMELEN]; /* the oldest file we - * want to remain in - * archive */ +char exclusiveCleanupFileName[MAXFNAMELEN]; /* the oldest file we want + * to remain in archive */ /* ===================================================================== @@ -315,8 +314,8 @@ main(int argc, char **argv) dryrun = true; break; case 'x': - additional_ext = pg_strdup(optarg); /* Extension to remove - * from xlogfile names */ + additional_ext = pg_strdup(optarg); /* Extension to remove + * from xlogfile names */ break; default: fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname); diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index 54d27dc658..2c4efd7645 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -87,7 +87,7 @@ static IncludeWal includewal = STREAM_WAL; static bool fastcheckpoint = false; static bool writerecoveryconf = false; static bool do_sync = true; -static int standby_message_timeout = 10 * 1000; /* 10 sec = default */ +static int standby_message_timeout = 10 * 1000; /* 10 sec = default */ static pg_time_t last_progress_report = 0; static int32 maxrate = 0; /* no limit by default */ static char *replication_slot = NULL; @@ -1398,7 +1398,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) /* * Directory */ - filename[strlen(filename) - 1] = '\0'; /* Remove trailing slash */ + filename[strlen(filename) - 1] = '\0'; /* Remove trailing slash */ if (mkdir(filename, S_IRWXU) != 0) { /* @@ -1442,7 +1442,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) * are, you can call it an undocumented feature that you * can map them too.) */ - filename[strlen(filename) - 1] = '\0'; /* Remove trailing slash */ + filename[strlen(filename) - 1] = '\0'; /* Remove trailing slash */ mapped_tblspc_path = get_tablespace_mapping(©buf[157]); if (symlink(mapped_tblspc_path, filename) != 0) @@ -2204,7 +2204,7 @@ main(int argc, char **argv) #ifdef HAVE_LIBZ compresslevel = Z_DEFAULT_COMPRESSION; #else - compresslevel = 1; /* will be rejected below */ + compresslevel = 1; /* will be rejected below */ #endif break; case 'Z': diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c index 370d871660..15caf32a76 100644 --- a/src/bin/pg_basebackup/pg_receivewal.c +++ b/src/bin/pg_basebackup/pg_receivewal.c @@ -35,7 +35,7 @@ static char *basedir = NULL; static int verbose = 0; static int compresslevel = 0; static int noloop = 0; -static int standby_message_timeout = 10 * 1000; /* 10 sec = default */ +static int standby_message_timeout = 10 * 1000; /* 10 sec = default */ static volatile bool time_to_abort = false; static bool do_create_slot = false; static bool slot_exists_ok = false; diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c index 5f7412e9d5..fbe9fbb9a8 100644 --- a/src/bin/pg_basebackup/pg_recvlogical.c +++ b/src/bin/pg_basebackup/pg_recvlogical.c @@ -37,7 +37,7 @@ static char *outfile = NULL; static int verbose = 0; static int noloop = 0; -static int standby_message_timeout = 10 * 1000; /* 10 sec = default */ +static int standby_message_timeout = 10 * 1000; /* 10 sec = default */ static int fsync_interval = 10 * 1000; /* 10 sec = default */ static XLogRecPtr startpos = InvalidXLogRecPtr; static XLogRecPtr endpos = InvalidXLogRecPtr; @@ -142,13 +142,13 @@ sendFeedback(PGconn *conn, TimestampTz now, bool force, bool replyRequested) len += 1; fe_sendint64(output_written_lsn, &replybuf[len]); /* write */ len += 8; - fe_sendint64(output_fsync_lsn, &replybuf[len]); /* flush */ + fe_sendint64(output_fsync_lsn, &replybuf[len]); /* flush */ len += 8; fe_sendint64(InvalidXLogRecPtr, &replybuf[len]); /* apply */ len += 8; fe_sendint64(now, &replybuf[len]); /* sendTime */ len += 8; - replybuf[len] = replyRequested ? 1 : 0; /* replyRequested */ + replybuf[len] = replyRequested ? 1 : 0; /* replyRequested */ len += 1; startpos = output_written_lsn; diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c index 52aa274bb8..0fe4df126d 100644 --- a/src/bin/pg_basebackup/receivelog.c +++ b/src/bin/pg_basebackup/receivelog.c @@ -35,7 +35,7 @@ static char current_walfile_name[MAXPGPATH] = ""; static bool reportFlushPosition = false; static XLogRecPtr lastFlushPosition = InvalidXLogRecPtr; -static bool still_sending = true; /* feedback still needs to be sent? */ +static bool still_sending = true; /* feedback still needs to be sent? */ static PGresult *HandleCopyStream(PGconn *conn, StreamCtl *stream, XLogRecPtr *stoppos); @@ -330,18 +330,18 @@ sendFeedback(PGconn *conn, XLogRecPtr blockpos, TimestampTz now, bool replyReque replybuf[len] = 'r'; len += 1; - fe_sendint64(blockpos, &replybuf[len]); /* write */ + fe_sendint64(blockpos, &replybuf[len]); /* write */ len += 8; if (reportFlushPosition) - fe_sendint64(lastFlushPosition, &replybuf[len]); /* flush */ + fe_sendint64(lastFlushPosition, &replybuf[len]); /* flush */ else - fe_sendint64(InvalidXLogRecPtr, &replybuf[len]); /* flush */ + fe_sendint64(InvalidXLogRecPtr, &replybuf[len]); /* flush */ len += 8; fe_sendint64(InvalidXLogRecPtr, &replybuf[len]); /* apply */ len += 8; fe_sendint64(now, &replybuf[len]); /* sendTime */ len += 8; - replybuf[len] = replyRequested ? 1 : 0; /* replyRequested */ + replybuf[len] = replyRequested ? 1 : 0; /* replyRequested */ len += 1; if (PQputCopyData(conn, replybuf, len) <= 0 || PQflush(conn)) diff --git a/src/bin/pg_basebackup/receivelog.h b/src/bin/pg_basebackup/receivelog.h index 9a51d9a9c4..bb786ce289 100644 --- a/src/bin/pg_basebackup/receivelog.h +++ b/src/bin/pg_basebackup/receivelog.h @@ -33,8 +33,7 @@ typedef struct StreamCtl TimeLineID timeline; /* Timeline to stream data from */ char *sysidentifier; /* Validate this system identifier and * timeline */ - int standby_message_timeout; /* Send status messages this - * often */ + int standby_message_timeout; /* Send status messages this often */ bool synchronous; /* Flush immediately WAL data on write */ bool mark_done; /* Mark segment as done in generated archive */ bool do_sync; /* Flush to disk to ensure consistent state of @@ -47,7 +46,7 @@ typedef struct StreamCtl WalWriteMethod *walmethod; /* How to write the WAL */ char *partial_suffix; /* Suffix appended to partially received files */ - char *replication_slot; /* Replication slot to use, or NULL */ + char *replication_slot; /* Replication slot to use, or NULL */ bool temp_slot; /* Create temporary replication slot */ } StreamCtl; @@ -57,4 +56,4 @@ extern bool CheckServerVersionForStreaming(PGconn *conn); extern bool ReceiveXlogStream(PGconn *conn, StreamCtl *stream); -#endif /* RECEIVELOG_H */ +#endif /* RECEIVELOG_H */ diff --git a/src/bin/pg_basebackup/streamutil.h b/src/bin/pg_basebackup/streamutil.h index 460dcb5267..6f6878679f 100644 --- a/src/bin/pg_basebackup/streamutil.h +++ b/src/bin/pg_basebackup/streamutil.h @@ -48,4 +48,4 @@ extern bool feTimestampDifferenceExceeds(TimestampTz start_time, TimestampTz sto extern void fe_sendint64(int64 i, char *buf); extern int64 fe_recvint64(char *buf); -#endif /* STREAMUTIL_H */ +#endif /* STREAMUTIL_H */ diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 8387a0b080..9e262dee8b 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -83,7 +83,7 @@ static const char *progname; static char *log_file = NULL; static char *exec_path = NULL; static char *event_source = NULL; -static char *register_servicename = "PostgreSQL"; /* FIXME: + version ID? */ +static char *register_servicename = "PostgreSQL"; /* FIXME: + version ID? */ static char *register_username = NULL; static char *register_password = NULL; static char *argv0 = NULL; @@ -211,7 +211,7 @@ write_stderr(const char *fmt,...) */ if (pgwin32_is_service()) /* Running as a service */ { - char errbuf[2048]; /* Arbitrary size? */ + char errbuf[2048]; /* Arbitrary size? */ vsnprintf(errbuf, sizeof(errbuf), fmt, ap); @@ -500,7 +500,7 @@ start_postmaster(void) postmasterProcess = pi.hProcess; CloseHandle(pi.hThread); return pi.dwProcessId; /* Shell's PID, not postmaster's! */ -#endif /* WIN32 */ +#endif /* WIN32 */ } @@ -787,8 +787,7 @@ read_post_opts(void) */ if ((arg1 = strstr(optline, " \"")) != NULL) { - *arg1 = '\0'; /* terminate so we get only program - * name */ + *arg1 = '\0'; /* terminate so we get only program name */ post_opts = pg_strdup(arg1 + 1); /* point past whitespace */ } if (exec_path == NULL) @@ -1005,7 +1004,7 @@ do_stop(void) if ((pid = get_pgpid(false)) != 0) { print_msg("."); - pg_usleep(1000000); /* 1 sec */ + pg_usleep(1000000); /* 1 sec */ } else break; @@ -1095,7 +1094,7 @@ do_restart(void) if ((pid = get_pgpid(false)) != 0) { print_msg("."); - pg_usleep(1000000); /* 1 sec */ + pg_usleep(1000000); /* 1 sec */ } else break; @@ -1362,7 +1361,7 @@ IsWindowsXPOrGreater(void) osv.dwOSVersionInfoSize = sizeof(osv); /* Windows XP = Version 5.1 */ - return (!GetVersionEx(&osv) || /* could not get version */ + return (!GetVersionEx(&osv) || /* could not get version */ osv.dwMajorVersion > 5 || (osv.dwMajorVersion == 5 && osv.dwMinorVersion >= 1)); } @@ -1374,7 +1373,7 @@ IsWindows7OrGreater(void) osv.dwOSVersionInfoSize = sizeof(osv); /* Windows 7 = Version 6.0 */ - return (!GetVersionEx(&osv) || /* could not get version */ + return (!GetVersionEx(&osv) || /* could not get version */ osv.dwMajorVersion > 6 || (osv.dwMajorVersion == 6 && osv.dwMinorVersion >= 0)); } #endif @@ -1665,7 +1664,7 @@ pgwin32_ServiceMain(DWORD argc, LPTSTR *argv) break; } - case (WAIT_OBJECT_0 + 1): /* postmaster went down */ + case (WAIT_OBJECT_0 + 1): /* postmaster went down */ break; default: @@ -1917,7 +1916,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser */ return r; } -#endif /* WIN32 */ +#endif /* WIN32 */ static void do_advice(void) diff --git a/src/bin/pg_dump/compress_io.c b/src/bin/pg_dump/compress_io.c index 631fa337e6..025835a2e0 100644 --- a/src/bin/pg_dump/compress_io.c +++ b/src/bin/pg_dump/compress_io.c @@ -388,7 +388,7 @@ ReadDataFromArchiveZlib(ArchiveHandle *AH, ReadFunc readF) free(out); free(zp); } -#endif /* HAVE_LIBZ */ +#endif /* HAVE_LIBZ */ /* diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c index 79eac8c7cf..04159bcfc6 100644 --- a/src/bin/pg_dump/dumputils.c +++ b/src/bin/pg_dump/dumputils.c @@ -604,7 +604,7 @@ copyAclUserName(PQExpBuffer output, char *input) while (!(*input == '"' && *(input + 1) != '"')) { if (*input == '\0') - return input; /* really a syntax error... */ + return input; /* really a syntax error... */ /* * Quoting convention is to escape " as "". Keep this code in diff --git a/src/bin/pg_dump/dumputils.h b/src/bin/pg_dump/dumputils.h index d7eecdfb3c..fe364dd8c4 100644 --- a/src/bin/pg_dump/dumputils.h +++ b/src/bin/pg_dump/dumputils.h @@ -56,4 +56,4 @@ extern void buildACLQueries(PQExpBuffer acl_subquery, PQExpBuffer racl_subquery, const char *acl_column, const char *acl_owner, const char *obj_kind, bool binary_upgrade); -#endif /* DUMPUTILS_H */ +#endif /* DUMPUTILS_H */ diff --git a/src/bin/pg_dump/parallel.c b/src/bin/pg_dump/parallel.c index feda575af8..4452436d0e 100644 --- a/src/bin/pg_dump/parallel.c +++ b/src/bin/pg_dump/parallel.c @@ -91,7 +91,7 @@ struct ParallelSlot T_WorkerStatus workerStatus; /* see enum above */ /* These fields are valid if workerStatus == WRKR_WORKING: */ - ParallelCompletionPtr callback; /* function to call on completion */ + ParallelCompletionPtr callback; /* function to call on completion */ void *callback_data; /* passthrough data for it */ ArchiveHandle *AH; /* Archive data worker is using */ @@ -134,7 +134,7 @@ static int piperead(int s, char *buf, int len); #define piperead(a,b,c) read(a,b,c) #define pipewrite(a,b,c) write(a,b,c) -#endif /* WIN32 */ +#endif /* WIN32 */ /* * State info for archive_close_connection() shutdown callback. @@ -193,7 +193,7 @@ static DWORD tls_index; /* globally visible variables (needed by exit_nicely) */ bool parallel_init_done = false; DWORD mainThreadId; -#endif /* WIN32 */ +#endif /* WIN32 */ static const char *modulename = gettext_noop("parallel archiver"); @@ -335,7 +335,7 @@ getThreadLocalPQExpBuffer(void) return id_return; } -#endif /* WIN32 */ +#endif /* WIN32 */ /* * pg_dump and pg_restore call this to register the cleanup handler @@ -512,7 +512,7 @@ WaitForTerminatingWorkers(ParallelState *pstate) break; } } -#endif /* WIN32 */ +#endif /* WIN32 */ /* On all platforms, update workerStatus and te[] as well */ Assert(j < pstate->numWorkers); @@ -729,7 +729,7 @@ setup_cancel_handler(void) } } -#endif /* WIN32 */ +#endif /* WIN32 */ /* @@ -898,7 +898,7 @@ init_spawned_worker_win32(WorkerInfo *wi) _endthreadex(0); return 0; } -#endif /* WIN32 */ +#endif /* WIN32 */ /* * This function starts a parallel dump or restore by spawning off the worker @@ -1044,7 +1044,7 @@ ParallelBackupStart(ArchiveHandle *AH) closesocket(pipeMW[PIPE_READ]); /* close write end of Worker -> Master */ closesocket(pipeWM[PIPE_WRITE]); -#endif /* WIN32 */ +#endif /* WIN32 */ } /* @@ -1840,4 +1840,4 @@ piperead(int s, char *buf, int len) return ret; } -#endif /* WIN32 */ +#endif /* WIN32 */ diff --git a/src/bin/pg_dump/parallel.h b/src/bin/pg_dump/parallel.h index 27ae2eda73..8d800bdf83 100644 --- a/src/bin/pg_dump/parallel.h +++ b/src/bin/pg_dump/parallel.h @@ -67,4 +67,4 @@ extern void ParallelBackupEnd(ArchiveHandle *AH, ParallelState *pstate); extern void set_archive_cancel_info(ArchiveHandle *AH, PGconn *conn); -#endif /* PG_DUMP_PARALLEL_H */ +#endif /* PG_DUMP_PARALLEL_H */ diff --git a/src/bin/pg_dump/pg_backup.h b/src/bin/pg_dump/pg_backup.h index 77da43c08a..144068ac49 100644 --- a/src/bin/pg_dump/pg_backup.h +++ b/src/bin/pg_dump/pg_backup.h @@ -63,8 +63,8 @@ typedef struct _restoreOptions int createDB; /* Issue commands to create the database */ int noOwner; /* Don't try to match original object owner */ int noTablespace; /* Don't issue tablespace-related commands */ - int disable_triggers; /* disable triggers during data-only - * restore */ + int disable_triggers; /* disable triggers during data-only + * restore */ int use_setsessauth; /* Use SET SESSION AUTHORIZATION commands * instead of OWNER TO */ char *superuser; /* Username to use as superuser */ @@ -75,8 +75,8 @@ typedef struct _restoreOptions int column_inserts; int if_exists; int no_publications; /* Skip publication entries */ - int no_security_labels; /* Skip security label entries */ - int no_subscriptions; /* Skip subscription entries */ + int no_security_labels; /* Skip security label entries */ + int no_subscriptions; /* Skip subscription entries */ int strict_names; const char *filename; @@ -181,16 +181,15 @@ typedef struct Archive RestoreOptions *ropt; /* options, if restoring */ int verbose; - char *remoteVersionStr; /* server's version string */ + char *remoteVersionStr; /* server's version string */ int remoteVersion; /* same in numeric form */ bool isStandby; /* is server a standby node */ - int minRemoteVersion; /* allowable range */ + int minRemoteVersion; /* allowable range */ int maxRemoteVersion; int numWorkers; /* number of parallel processes */ - char *sync_snapshot_id; /* sync snapshot id for parallel - * operation */ + char *sync_snapshot_id; /* sync snapshot id for parallel operation */ /* info needed for string escaping */ int encoding; /* libpq code for client_encoding */ @@ -299,4 +298,4 @@ extern int archprintf(Archive *AH, const char *fmt,...) pg_attribute_printf(2, 3 #define appendStringLiteralAH(buf,str,AH) \ appendStringLiteral(buf, str, (AH)->encoding, (AH)->std_strings) -#endif /* PG_BACKUP_H */ +#endif /* PG_BACKUP_H */ diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index 0161fc4231..35ff958eba 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -744,7 +744,7 @@ restore_toc_entry(ArchiveHandle *AH, TocEntry *te, bool is_parallel) defnDumped = false; - if ((reqs & REQ_SCHEMA) != 0) /* We want the schema */ + if ((reqs & REQ_SCHEMA) != 0) /* We want the schema */ { /* Show namespace if available */ if (te->namespace) @@ -2179,7 +2179,7 @@ _discoverArchiveFormat(ArchiveHandle *AH) AH->lookahead[AH->lookaheadLen++] = vmin; /* Check header version; varies from V1.0 */ - if (vmaj > 1 || (vmaj == 1 && vmin > 0)) /* Version > 1.0 */ + if (vmaj > 1 || (vmaj == 1 && vmin > 0)) /* Version > 1.0 */ { if ((byteread = fgetc(fh)) == EOF) READ_ERROR_EXIT(fh); @@ -3600,7 +3600,7 @@ WriteHead(ArchiveHandle *AH) { struct tm crtm; - (*AH->WriteBufPtr) (AH, "PGDMP", 5); /* Magic code */ + (*AH->WriteBufPtr) (AH, "PGDMP", 5); /* Magic code */ (*AH->WriteBytePtr) (AH, ARCHIVE_MAJOR(AH->version)); (*AH->WriteBytePtr) (AH, ARCHIVE_MINOR(AH->version)); (*AH->WriteBytePtr) (AH, ARCHIVE_REV(AH->version)); @@ -3648,7 +3648,7 @@ ReadHead(ArchiveHandle *AH) vmaj = (*AH->ReadBytePtr) (AH); vmin = (*AH->ReadBytePtr) (AH); - if (vmaj > 1 || (vmaj == 1 && vmin > 0)) /* Version > 1.0 */ + if (vmaj > 1 || (vmaj == 1 && vmin > 0)) /* Version > 1.0 */ vrev = (*AH->ReadBytePtr) (AH); else vrev = 0; diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_backup_archiver.h index 3ee75f0b6e..6123859132 100644 --- a/src/bin/pg_dump/pg_backup_archiver.h +++ b/src/bin/pg_dump/pg_backup_archiver.h @@ -75,23 +75,23 @@ typedef z_stream *z_streamp; /* Historical version numbers (checked in code) */ #define K_VERS_1_0 MAKE_ARCHIVE_VERSION(1, 0, 0) -#define K_VERS_1_2 MAKE_ARCHIVE_VERSION(1, 2, 0) /* Allow No ZLIB */ -#define K_VERS_1_3 MAKE_ARCHIVE_VERSION(1, 3, 0) /* BLOBs */ -#define K_VERS_1_4 MAKE_ARCHIVE_VERSION(1, 4, 0) /* Date & name in header */ -#define K_VERS_1_5 MAKE_ARCHIVE_VERSION(1, 5, 0) /* Handle dependencies */ -#define K_VERS_1_6 MAKE_ARCHIVE_VERSION(1, 6, 0) /* Schema field in TOCs */ -#define K_VERS_1_7 MAKE_ARCHIVE_VERSION(1, 7, 0) /* File Offset size in - * header */ -#define K_VERS_1_8 MAKE_ARCHIVE_VERSION(1, 8, 0) /* change interpretation - * of ID numbers and - * dependencies */ -#define K_VERS_1_9 MAKE_ARCHIVE_VERSION(1, 9, 0) /* add default_with_oids - * tracking */ -#define K_VERS_1_10 MAKE_ARCHIVE_VERSION(1, 10, 0) /* add tablespace */ -#define K_VERS_1_11 MAKE_ARCHIVE_VERSION(1, 11, 0) /* add toc section - * indicator */ -#define K_VERS_1_12 MAKE_ARCHIVE_VERSION(1, 12, 0) /* add separate BLOB - * entries */ +#define K_VERS_1_2 MAKE_ARCHIVE_VERSION(1, 2, 0) /* Allow No ZLIB */ +#define K_VERS_1_3 MAKE_ARCHIVE_VERSION(1, 3, 0) /* BLOBs */ +#define K_VERS_1_4 MAKE_ARCHIVE_VERSION(1, 4, 0) /* Date & name in header */ +#define K_VERS_1_5 MAKE_ARCHIVE_VERSION(1, 5, 0) /* Handle dependencies */ +#define K_VERS_1_6 MAKE_ARCHIVE_VERSION(1, 6, 0) /* Schema field in TOCs */ +#define K_VERS_1_7 MAKE_ARCHIVE_VERSION(1, 7, 0) /* File Offset size in + * header */ +#define K_VERS_1_8 MAKE_ARCHIVE_VERSION(1, 8, 0) /* change interpretation + * of ID numbers and + * dependencies */ +#define K_VERS_1_9 MAKE_ARCHIVE_VERSION(1, 9, 0) /* add default_with_oids + * tracking */ +#define K_VERS_1_10 MAKE_ARCHIVE_VERSION(1, 10, 0) /* add tablespace */ +#define K_VERS_1_11 MAKE_ARCHIVE_VERSION(1, 11, 0) /* add toc section + * indicator */ +#define K_VERS_1_12 MAKE_ARCHIVE_VERSION(1, 12, 0) /* add separate BLOB + * entries */ /* Current archive version number (the format we can output) */ #define K_VERS_MAJOR 1 @@ -217,8 +217,8 @@ struct _archiveHandle char *archiveRemoteVersion; /* When reading an archive, the * version of the dumped DB */ - char *archiveDumpVersion; /* When reading an archive, the - * version of the dumper */ + char *archiveDumpVersion; /* When reading an archive, the version of + * the dumper */ int debugLevel; /* Used for logging (currently only by * --verbose) */ @@ -242,25 +242,24 @@ struct _archiveHandle size_t lookaheadLen; /* Length of data in lookahead */ pgoff_t lookaheadPos; /* Current read position in lookahead buffer */ - ArchiveEntryPtrType ArchiveEntryPtr; /* Called for each metadata - * object */ - StartDataPtrType StartDataPtr; /* Called when table data is about to - * be dumped */ - WriteDataPtrType WriteDataPtr; /* Called to send some table data to - * the archive */ + ArchiveEntryPtrType ArchiveEntryPtr; /* Called for each metadata object */ + StartDataPtrType StartDataPtr; /* Called when table data is about to be + * dumped */ + WriteDataPtrType WriteDataPtr; /* Called to send some table data to the + * archive */ EndDataPtrType EndDataPtr; /* Called when table data dump is finished */ - WriteBytePtrType WriteBytePtr; /* Write a byte to output */ + WriteBytePtrType WriteBytePtr; /* Write a byte to output */ ReadBytePtrType ReadBytePtr; /* Read a byte from an archive */ WriteBufPtrType WriteBufPtr; /* Write a buffer of output to the archive */ ReadBufPtrType ReadBufPtr; /* Read a buffer of input from the archive */ ClosePtrType ClosePtr; /* Close the archive */ ReopenPtrType ReopenPtr; /* Reopen the archive */ - WriteExtraTocPtrType WriteExtraTocPtr; /* Write extra TOC entry data - * associated with the current - * archive format */ - ReadExtraTocPtrType ReadExtraTocPtr; /* Read extra info associated - * with archive format */ - PrintExtraTocPtrType PrintExtraTocPtr; /* Extra TOC info for format */ + WriteExtraTocPtrType WriteExtraTocPtr; /* Write extra TOC entry data + * associated with the current + * archive format */ + ReadExtraTocPtrType ReadExtraTocPtr; /* Read extra info associated with + * archive format */ + PrintExtraTocPtrType PrintExtraTocPtr; /* Extra TOC info for format */ PrintTocDataPtrType PrintTocDataPtr; StartBlobsPtrType StartBlobsPtr; @@ -275,7 +274,7 @@ struct _archiveHandle ClonePtrType ClonePtr; /* Clone format-specific fields */ DeClonePtrType DeClonePtr; /* Clean up cloned fields */ - CustomOutPtrType CustomOutPtr; /* Alternative script output routine */ + CustomOutPtrType CustomOutPtr; /* Alternative script output routine */ /* Stuff for direct DB connection */ char *archdbname; /* DB name *read* from archive */ diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c index a2b320f371..22ff8413d3 100644 --- a/src/bin/pg_dump/pg_backup_tar.c +++ b/src/bin/pg_dump/pg_backup_tar.c @@ -1193,7 +1193,7 @@ _tarPositionTo(ArchiveHandle *AH, const char *filename) th->targetFile, filename); /* Header doesn't match, so read to next header */ - len = ((th->fileLen + 511) & ~511); /* Padded length */ + len = ((th->fileLen + 511) & ~511); /* Padded length */ blks = len >> 9; /* # of 512 byte blocks */ for (i = 0; i < blks; i++) diff --git a/src/bin/pg_dump/pg_backup_utils.h b/src/bin/pg_dump/pg_backup_utils.h index 04b53f496e..14661a1160 100644 --- a/src/bin/pg_dump/pg_backup_utils.h +++ b/src/bin/pg_dump/pg_backup_utils.h @@ -35,4 +35,4 @@ extern void exit_nicely(int code) pg_attribute_noreturn(); extern void exit_horribly(const char *modulename, const char *fmt,...) pg_attribute_printf(2, 3) pg_attribute_noreturn(); -#endif /* PG_BACKUP_UTILS_H */ +#endif /* PG_BACKUP_UTILS_H */ diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 1bec66ebbb..e03fdebecb 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -2103,8 +2103,8 @@ refreshMatViewData(Archive *fout, TableDataInfo *tdinfo) if (tdinfo->dobj.dump & DUMP_COMPONENT_DATA) ArchiveEntry(fout, - tdinfo->dobj.catId, /* catalog ID */ - tdinfo->dobj.dumpId, /* dump ID */ + tdinfo->dobj.catId, /* catalog ID */ + tdinfo->dobj.dumpId, /* dump ID */ tbinfo->dobj.name, /* Name */ tbinfo->dobj.namespace->dobj.name, /* Namespace */ NULL, /* Tablespace */ @@ -2116,7 +2116,7 @@ refreshMatViewData(Archive *fout, TableDataInfo *tdinfo) "", /* Del */ NULL, /* Copy */ tdinfo->dobj.dependencies, /* Deps */ - tdinfo->dobj.nDeps, /* # Deps */ + tdinfo->dobj.nDeps, /* # Deps */ NULL, /* Dumper */ NULL); /* Dumper Arg */ @@ -2610,7 +2610,7 @@ dumpDatabase(Archive *fout) dba, /* Owner */ false, /* with oids */ "DATABASE", /* Desc */ - SECTION_PRE_DATA, /* Section */ + SECTION_PRE_DATA, /* Section */ creaQry->data, /* Create */ delQry->data, /* Del */ NULL, /* Copy */ @@ -5211,8 +5211,8 @@ getAggregates(Archive *fout, int *numAggs) if (strlen(agginfo[i].aggfn.rolname) == 0) write_msg(NULL, "WARNING: owner of aggregate function \"%s\" appears to be invalid\n", agginfo[i].aggfn.dobj.name); - agginfo[i].aggfn.lang = InvalidOid; /* not currently interesting */ - agginfo[i].aggfn.prorettype = InvalidOid; /* not saved */ + agginfo[i].aggfn.lang = InvalidOid; /* not currently interesting */ + agginfo[i].aggfn.prorettype = InvalidOid; /* not saved */ agginfo[i].aggfn.proacl = pg_strdup(PQgetvalue(res, i, i_aggacl)); agginfo[i].aggfn.rproacl = pg_strdup(PQgetvalue(res, i, i_raggacl)); agginfo[i].aggfn.initproacl = pg_strdup(PQgetvalue(res, i, i_initaggacl)); @@ -6210,7 +6210,7 @@ getTables(Archive *fout, int *numTables) tblinfo[i].interesting = tblinfo[i].dobj.dump ? true : false; tblinfo[i].dummy_view = false; /* might get set during sort */ - tblinfo[i].postponed_def = false; /* might get set during sort */ + tblinfo[i].postponed_def = false; /* might get set during sort */ tblinfo[i].is_identity_sequence = (i_is_identity_sequence >= 0 && strcmp(PQgetvalue(res, i, i_is_identity_sequence), "t") == 0); @@ -11212,7 +11212,7 @@ dumpFunc(Archive *fout, FuncInfo *finfo) PQExpBuffer asPart; PGresult *res; char *funcsig; /* identity signature */ - char *funcfullsig = NULL; /* full signature */ + char *funcfullsig = NULL; /* full signature */ char *funcsig_tag; char *proretset; char *prosrc; @@ -13300,7 +13300,7 @@ dumpAgg(Archive *fout, AggInfo *agginfo) PQExpBuffer labelq; PQExpBuffer details; char *aggsig; /* identity signature */ - char *aggfullsig = NULL; /* full signature */ + char *aggfullsig = NULL; /* full signature */ char *aggsig_tag; PGresult *res; int i_aggtransfn; diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h index 4afffc0690..e7593e6da7 100644 --- a/src/bin/pg_dump/pg_dump.h +++ b/src/bin/pg_dump/pg_dump.h @@ -133,7 +133,7 @@ typedef struct _dumpableObject char *name; /* object name (should never be NULL) */ struct _namespaceInfo *namespace; /* containing namespace, or NULL */ DumpComponents dump; /* bitmask of components to dump */ - DumpComponents dump_contains; /* as above, but for contained objects */ + DumpComponents dump_contains; /* as above, but for contained objects */ bool ext_member; /* true if object is member of extension */ DumpId *dependencies; /* dumpIds of objects this one depends on */ int nDeps; /* number of valid dependencies */ @@ -271,7 +271,7 @@ typedef struct _tableInfo char *reltablespace; /* relation tablespace */ char *reloptions; /* options specified by WITH (...) */ char *checkoption; /* WITH CHECK OPTION, if any */ - char *toast_reloptions; /* WITH options for the TOAST table */ + char *toast_reloptions; /* WITH options for the TOAST table */ bool hasindex; /* does it have any indexes? */ bool hasrules; /* does it have any rules? */ bool hastriggers; /* does it have any triggers? */ @@ -317,7 +317,7 @@ typedef struct _tableInfo char **attfdwoptions; /* per-attribute fdw options */ bool *notnull; /* NOT NULL constraints on attributes */ bool *inhNotNull; /* true if NOT NULL is inherited */ - struct _attrDefInfo **attrdefs; /* DEFAULT expressions */ + struct _attrDefInfo **attrdefs; /* DEFAULT expressions */ struct _constraintInfo *checkexprs; /* CHECK constraints */ char *partkeydef; /* partition key definition */ char *partbound; /* partition bound definition */ @@ -328,9 +328,9 @@ typedef struct _tableInfo */ int numParents; /* number of (immediate) parent tables */ struct _tableInfo **parents; /* TableInfos of immediate parents */ - struct _tableDataInfo *dataObj; /* TableDataInfo, if dumping its data */ + struct _tableDataInfo *dataObj; /* TableDataInfo, if dumping its data */ int numTriggers; /* number of triggers for table */ - struct _triggerInfo *triggers; /* array of TriggerInfo structs */ + struct _triggerInfo *triggers; /* array of TriggerInfo structs */ } TableInfo; typedef struct _attrDefInfo @@ -712,4 +712,4 @@ extern void getPublicationTables(Archive *fout, TableInfo tblinfo[], int numTables); extern void getSubscriptions(Archive *fout); -#endif /* PG_DUMP_H */ +#endif /* PG_DUMP_H */ diff --git a/src/bin/pg_dump/pg_dump_sort.c b/src/bin/pg_dump/pg_dump_sort.c index d29723c171..5044a76787 100644 --- a/src/bin/pg_dump/pg_dump_sort.c +++ b/src/bin/pg_dump/pg_dump_sort.c @@ -360,7 +360,7 @@ sortDumpableObjects(DumpableObject **objs, int numObjs, static bool TopoSort(DumpableObject **objs, int numObjs, - DumpableObject **ordering, /* output argument */ + DumpableObject **ordering, /* output argument */ int *nOrdering) /* output argument */ { DumpId maxDumpId = getMaxDumpId(); diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index 7f01067581..27c5309f63 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -57,7 +57,7 @@ #include "pg_getopt.h" -static ControlFileData ControlFile; /* pg_control values */ +static ControlFileData ControlFile; /* pg_control values */ static XLogSegNo newXlogSegNo; /* new XLOG segment # */ static bool guessed = false; /* T if we had to guess at any values */ static const char *progname; @@ -834,7 +834,7 @@ static void RewriteControlFile(void) { int fd; - char buffer[PG_CONTROL_SIZE]; /* need not be aligned */ + char buffer[PG_CONTROL_SIZE]; /* need not be aligned */ /* * Adjust fields as needed to force an empty XLOG starting at diff --git a/src/bin/pg_rewind/copy_fetch.c b/src/bin/pg_rewind/copy_fetch.c index 347d4e4d4c..f7ac5b30b5 100644 --- a/src/bin/pg_rewind/copy_fetch.c +++ b/src/bin/pg_rewind/copy_fetch.c @@ -137,7 +137,7 @@ recurse_dir(const char *datadir, const char *parentpath, #else pg_fatal("\"%s\" is a symbolic link, but symbolic links are not supported on this platform\n", fullpath); -#endif /* HAVE_READLINK */ +#endif /* HAVE_READLINK */ } } diff --git a/src/bin/pg_rewind/datapagemap.h b/src/bin/pg_rewind/datapagemap.h index 15ebd68b27..db991c16df 100644 --- a/src/bin/pg_rewind/datapagemap.h +++ b/src/bin/pg_rewind/datapagemap.h @@ -27,4 +27,4 @@ extern datapagemap_iterator_t *datapagemap_iterate(datapagemap_t *map); extern bool datapagemap_next(datapagemap_iterator_t *iter, BlockNumber *blkno); extern void datapagemap_print(datapagemap_t *map); -#endif /* DATAPAGEMAP_H */ +#endif /* DATAPAGEMAP_H */ diff --git a/src/bin/pg_rewind/fetch.h b/src/bin/pg_rewind/fetch.h index ccb2dab3e9..1e08f76b3e 100644 --- a/src/bin/pg_rewind/fetch.h +++ b/src/bin/pg_rewind/fetch.h @@ -41,4 +41,4 @@ extern void copy_executeFileMap(filemap_t *map); typedef void (*process_file_callback_t) (const char *path, file_type_t type, size_t size, const char *link_target); extern void traverse_datadir(const char *datadir, process_file_callback_t callback); -#endif /* FETCH_H */ +#endif /* FETCH_H */ diff --git a/src/bin/pg_rewind/file_ops.h b/src/bin/pg_rewind/file_ops.h index d247f3dc65..f9aea52d6d 100644 --- a/src/bin/pg_rewind/file_ops.h +++ b/src/bin/pg_rewind/file_ops.h @@ -21,4 +21,4 @@ extern void remove_target(file_entry_t *t); extern char *slurpFile(const char *datadir, const char *path, size_t *filesize); -#endif /* FILE_OPS_H */ +#endif /* FILE_OPS_H */ diff --git a/src/bin/pg_rewind/filemap.h b/src/bin/pg_rewind/filemap.h index 3431047bf7..6c97fa74d1 100644 --- a/src/bin/pg_rewind/filemap.h +++ b/src/bin/pg_rewind/filemap.h @@ -102,4 +102,4 @@ extern void process_block_change(ForkNumber forknum, RelFileNode rnode, BlockNumber blkno); extern void filemap_finalize(void); -#endif /* FILEMAP_H */ +#endif /* FILEMAP_H */ diff --git a/src/bin/pg_rewind/logging.h b/src/bin/pg_rewind/logging.h index c2f4689104..c665194050 100644 --- a/src/bin/pg_rewind/logging.h +++ b/src/bin/pg_rewind/logging.h @@ -32,4 +32,4 @@ extern void pg_fatal(const char *fmt,...) pg_attribute_printf(1, 2) pg_attribute extern void progress_report(bool force); -#endif /* PG_REWIND_LOGGING_H */ +#endif /* PG_REWIND_LOGGING_H */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 622dc6d135..5526ff96c7 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -596,7 +596,7 @@ createBackupLabel(XLogRecPtr startpoint, TimeLineID starttli, XLogRecPtr checkpo pg_fatal("backup label buffer too small\n"); /* shouldn't happen */ /* TODO: move old file out of the way, if any. */ - open_target_file("backup_label", true); /* BACKUP_LABEL_FILE */ + open_target_file("backup_label", true); /* BACKUP_LABEL_FILE */ write_target_range(buf, 0, len); close_target_file(); } diff --git a/src/bin/pg_rewind/pg_rewind.h b/src/bin/pg_rewind/pg_rewind.h index 524478a72b..31353dd354 100644 --- a/src/bin/pg_rewind/pg_rewind.h +++ b/src/bin/pg_rewind/pg_rewind.h @@ -43,4 +43,4 @@ extern XLogRecPtr readOneRecord(const char *datadir, XLogRecPtr ptr, extern TimeLineHistoryEntry *rewind_parseTimeLineHistory(char *buffer, TimeLineID targetTLI, int *nentries); -#endif /* PG_REWIND_H */ +#endif /* PG_REWIND_H */ diff --git a/src/bin/pg_upgrade/file.c b/src/bin/pg_upgrade/file.c index 50897e7b7a..eb925d1e0f 100644 --- a/src/bin/pg_upgrade/file.c +++ b/src/bin/pg_upgrade/file.c @@ -89,7 +89,7 @@ copyFile(const char *src, const char *dst, schemaName, relName, src, dst, strerror(errno)); } -#endif /* WIN32 */ +#endif /* WIN32 */ } diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h index e3a577a782..c0beb5f4cb 100644 --- a/src/bin/pg_upgrade/pg_upgrade.h +++ b/src/bin/pg_upgrade/pg_upgrade.h @@ -183,8 +183,8 @@ typedef struct { Oid db_oid; /* oid of the database */ char *db_name; /* database name */ - char db_tablespace[MAXPGPATH]; /* database default tablespace - * path */ + char db_tablespace[MAXPGPATH]; /* database default tablespace + * path */ char *db_collate; char *db_ctype; int db_encoding; @@ -272,7 +272,7 @@ typedef struct uint32 major_version; /* PG_VERSION of cluster */ char major_version_str[64]; /* string PG_VERSION of cluster */ uint32 bin_version; /* version returned from pg_ctl */ - const char *tablespace_suffix; /* directory specification */ + const char *tablespace_suffix; /* directory specification */ } ClusterInfo; diff --git a/src/bin/pg_waldump/pg_waldump.c b/src/bin/pg_waldump/pg_waldump.c index 2578d4b692..f024a17f29 100644 --- a/src/bin/pg_waldump/pg_waldump.c +++ b/src/bin/pg_waldump/pg_waldump.c @@ -132,7 +132,7 @@ split_path(const char *path, char **dir, char **fname) if (sep != NULL) { *dir = pg_strdup(path); - (*dir)[(sep - path) + 1] = '\0'; /* no strndup */ + (*dir)[(sep - path) + 1] = '\0'; /* no strndup */ *fname = pg_strdup(sep + 1); } /* local directory */ diff --git a/src/bin/pg_waldump/rmgrdesc.h b/src/bin/pg_waldump/rmgrdesc.h index 2fa60d90ad..d5f6923e5c 100644 --- a/src/bin/pg_waldump/rmgrdesc.h +++ b/src/bin/pg_waldump/rmgrdesc.h @@ -19,4 +19,4 @@ typedef struct RmgrDescData extern const RmgrDescData RmgrDescTable[]; -#endif /* RMGRDESC_H */ +#endif /* RMGRDESC_H */ diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index e420b37e39..3bd33f2d52 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -29,7 +29,7 @@ #ifdef WIN32 #define FD_SETSIZE 1024 /* set before winsock2.h is included */ -#endif /* ! WIN32 */ +#endif /* ! WIN32 */ #include "postgres_fe.h" @@ -93,7 +93,7 @@ static int pthread_join(pthread_t th, void **thread_return); #define LOG_STEP_SECONDS 5 /* seconds between log messages */ #define DEFAULT_NXACTS 10 /* default nxacts */ -#define MIN_GAUSSIAN_PARAM 2.0 /* minimum parameter for gauss */ +#define MIN_GAUSSIAN_PARAM 2.0 /* minimum parameter for gauss */ int nxacts = 0; /* number of transactions per client */ int duration = 0; /* duration in seconds */ @@ -342,8 +342,8 @@ typedef struct pthread_t thread; /* thread handle */ CState *state; /* array of CState */ int nstate; /* length of state[] */ - unsigned short random_state[3]; /* separate randomness for each thread */ - int64 throttle_trigger; /* previous/next throttling (us) */ + unsigned short random_state[3]; /* separate randomness for each thread */ + int64 throttle_trigger; /* previous/next throttling (us) */ FILE *logfile; /* where to log, or NULL */ /* per thread collected stats */ @@ -605,7 +605,7 @@ strtoint64(const char *str) { int64 tmp = result * 10 + (*ptr++ - '0'); - if ((tmp / 10) != result) /* overflow? */ + if ((tmp / 10) != result) /* overflow? */ fprintf(stderr, "value \"%s\" is out of range for type bigint\n", str); result = tmp; } @@ -2235,7 +2235,7 @@ doCustom(TState *thread, CState *st, StatsData *agg) st->state = CSTATE_FINISHED; break; } - else if (!ret) /* on error */ + else if (!ret) /* on error */ { commandFailed(st, "execution of meta-command 'setshell' failed"); st->state = CSTATE_ABORTED; @@ -2255,7 +2255,7 @@ doCustom(TState *thread, CState *st, StatsData *agg) st->state = CSTATE_FINISHED; break; } - else if (!ret) /* on error */ + else if (!ret) /* on error */ { commandFailed(st, "execution of meta-command 'shell' failed"); st->state = CSTATE_ABORTED; @@ -3029,7 +3029,7 @@ process_backslash_command(PsqlScanState sstate, const char *source) Command *my_command; PQExpBufferData word_buf; int word_offset; - int offsets[MAX_ARGS]; /* offsets of argument words */ + int offsets[MAX_ARGS]; /* offsets of argument words */ int start_offset, end_offset; int lineno; @@ -3649,8 +3649,8 @@ main(int argc, char **argv) }; int c; - int is_init_mode = 0; /* initialize mode? */ - int is_no_vacuum = 0; /* no vacuum at all before testing? */ + int is_init_mode = 0; /* initialize mode? */ + int is_no_vacuum = 0; /* no vacuum at all before testing? */ int do_vacuum_accounts = 0; /* do vacuum accounts before testing? */ int optindex; bool scale_given = false; @@ -3749,7 +3749,7 @@ main(int argc, char **argv) if (getrlimit(RLIMIT_NOFILE, &rlim) == -1) #else /* but BSD doesn't ... */ if (getrlimit(RLIMIT_OFILE, &rlim) == -1) -#endif /* RLIMIT_NOFILE */ +#endif /* RLIMIT_NOFILE */ { fprintf(stderr, "getrlimit failed: %s\n", strerror(errno)); exit(1); @@ -3761,7 +3761,7 @@ main(int argc, char **argv) fprintf(stderr, "Reduce number of clients, or use limit/ulimit to increase the system limit.\n"); exit(1); } -#endif /* HAVE_GETRLIMIT */ +#endif /* HAVE_GETRLIMIT */ break; case 'j': /* jobs */ benchmarking_option_set = true; @@ -3778,7 +3778,7 @@ main(int argc, char **argv) fprintf(stderr, "threads are not supported on this platform; use -j1\n"); exit(1); } -#endif /* !ENABLE_THREAD_SAFETY */ +#endif /* !ENABLE_THREAD_SAFETY */ break; case 'C': benchmarking_option_set = true; @@ -4315,7 +4315,7 @@ main(int argc, char **argv) end_time = INSTR_TIME_GET_MICROSEC(threads[0].start_time) + (int64) 1000000 * duration; threads[0].thread = INVALID_THREAD; -#endif /* ENABLE_THREAD_SAFETY */ +#endif /* ENABLE_THREAD_SAFETY */ /* wait for threads and accumulate results */ initStats(&stats, 0); @@ -4333,7 +4333,7 @@ main(int argc, char **argv) pthread_join(thread->thread, NULL); #else (void) threadRun(thread); -#endif /* ENABLE_THREAD_SAFETY */ +#endif /* ENABLE_THREAD_SAFETY */ /* aggregate thread level stats */ mergeSimpleStats(&stats.latency, &thread->stats.latency); @@ -4370,7 +4370,7 @@ threadRun(void *arg) instr_time start, end; int nstate = thread->nstate; - int remains = nstate; /* number of remaining clients */ + int remains = nstate; /* number of remaining clients */ int i; /* for reporting progress: */ @@ -4441,7 +4441,7 @@ threadRun(void *arg) fd_set input_mask; int maxsock; /* max socket number to be waited for */ int64 min_usec; - int64 now_usec = 0; /* set this only if needed */ + int64 now_usec = 0; /* set this only if needed */ /* identify which client sockets should be checked for input */ FD_ZERO(&input_mask); @@ -4825,4 +4825,4 @@ pthread_join(pthread_t th, void **thread_return) return 0; } -#endif /* WIN32 */ +#endif /* WIN32 */ diff --git a/src/bin/pgbench/pgbench.h b/src/bin/pgbench/pgbench.h index 38b3af5ab1..abc13e9463 100644 --- a/src/bin/pgbench/pgbench.h +++ b/src/bin/pgbench/pgbench.h @@ -137,4 +137,4 @@ extern void syntax_error(const char *source, int lineno, const char *line, extern int64 strtoint64(const char *str); -#endif /* PGBENCH_H */ +#endif /* PGBENCH_H */ diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index b3263a9570..7faf5bc582 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -563,7 +563,7 @@ exec_command_cd(PsqlScanState scan_state, bool active_branch, const char *cmd) * directory, so if someone wants to code this here instead... */ dir = "/"; -#endif /* WIN32 */ +#endif /* WIN32 */ } if (chdir(dir) == -1) diff --git a/src/bin/psql/command.h b/src/bin/psql/command.h index e8ea8473e8..7aedd0d625 100644 --- a/src/bin/psql/command.h +++ b/src/bin/psql/command.h @@ -43,4 +43,4 @@ extern void SyncVariables(void); extern void UnsyncVariables(void); -#endif /* COMMAND_H */ +#endif /* COMMAND_H */ diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index a2f1259c1e..044cdb82a7 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -377,7 +377,7 @@ setup_cancel_handler(void) SetConsoleCtrlHandler(consoleHandler, TRUE); } -#endif /* WIN32 */ +#endif /* WIN32 */ /* ConnectionUp diff --git a/src/bin/psql/common.h b/src/bin/psql/common.h index 1ceb8ae386..f34868b54e 100644 --- a/src/bin/psql/common.h +++ b/src/bin/psql/common.h @@ -46,4 +46,4 @@ extern void expand_tilde(char **filename); extern bool recognized_connection_string(const char *connstr); -#endif /* COMMON_H */ +#endif /* COMMON_H */ diff --git a/src/bin/psql/conditional.h b/src/bin/psql/conditional.h index 00fbe90ed0..0957627742 100644 --- a/src/bin/psql/conditional.h +++ b/src/bin/psql/conditional.h @@ -80,4 +80,4 @@ extern void conditional_stack_set_paren_depth(ConditionalStack cstack, int depth extern int conditional_stack_get_paren_depth(ConditionalStack cstack); -#endif /* CONDITIONAL_H */ +#endif /* CONDITIONAL_H */ diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c index 12a50d215c..cd2e656911 100644 --- a/src/bin/psql/copy.c +++ b/src/bin/psql/copy.c @@ -102,7 +102,7 @@ parse_slash_copy(const char *args) result = pg_malloc0(sizeof(struct copy_options)); - result->before_tofrom = pg_strdup(""); /* initialize for appending */ + result->before_tofrom = pg_strdup(""); /* initialize for appending */ token = strtokx(args, whitespace, ".,()", "\"", 0, false, false, pset.encoding); diff --git a/src/bin/psql/crosstabview.h b/src/bin/psql/crosstabview.h index 97c72a5139..ad63ddef50 100644 --- a/src/bin/psql/crosstabview.h +++ b/src/bin/psql/crosstabview.h @@ -24,4 +24,4 @@ /* prototypes */ extern bool PrintResultsInCrosstab(const PGresult *res); -#endif /* CROSSTABVIEW_H */ +#endif /* CROSSTABVIEW_H */ diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 83c133534c..17bfedb433 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -3391,7 +3391,7 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys if (showSeq) appendPQExpBufferStr(&buf, CppAsString2(RELKIND_SEQUENCE) ","); if (showSystem || pattern) - appendPQExpBufferStr(&buf, "'s',"); /* was RELKIND_SPECIAL */ + appendPQExpBufferStr(&buf, "'s',"); /* was RELKIND_SPECIAL */ if (showForeign) appendPQExpBufferStr(&buf, CppAsString2(RELKIND_FOREIGN_TABLE) ","); diff --git a/src/bin/psql/describe.h b/src/bin/psql/describe.h index b05d6bb976..14a5667f3e 100644 --- a/src/bin/psql/describe.h +++ b/src/bin/psql/describe.h @@ -111,4 +111,4 @@ bool describePublications(const char *pattern); /* \dRs */ bool describeSubscriptions(const char *pattern, bool verbose); -#endif /* DESCRIBE_H */ +#endif /* DESCRIBE_H */ diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index f097b06594..f6acf87197 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -515,7 +515,7 @@ helpSQL(const char *topic, unsigned short int pager) while (topic[j] != ' ' && j++ <= len) wordlen++; } - if (wordlen >= len) /* Don't try again if the same word */ + if (wordlen >= len) /* Don't try again if the same word */ { if (!output) output = PageOutput(nl_count, pager ? &(pset.popt.topt) : NULL); diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c index b8c9a00b09..62f5f77383 100644 --- a/src/bin/psql/input.c +++ b/src/bin/psql/input.c @@ -333,7 +333,7 @@ decode_history(void) } END_ITERATE_HISTORY(); } -#endif /* USE_READLINE */ +#endif /* USE_READLINE */ /* diff --git a/src/bin/psql/input.h b/src/bin/psql/input.h index f40561459d..35886dae22 100644 --- a/src/bin/psql/input.h +++ b/src/bin/psql/input.h @@ -32,8 +32,8 @@ #if defined(HAVE_HISTORY_H) #include #endif -#endif /* HAVE_READLINE_READLINE_H, etc */ -#endif /* HAVE_LIBREADLINE */ +#endif /* HAVE_READLINE_READLINE_H, etc */ +#endif /* HAVE_LIBREADLINE */ #include "pqexpbuffer.h" @@ -48,4 +48,4 @@ extern bool printHistory(const char *fname, unsigned short int pager); extern void pg_append_history(const char *s, PQExpBuffer history_buf); extern void pg_send_history(PQExpBuffer history_buf); -#endif /* INPUT_H */ +#endif /* INPUT_H */ diff --git a/src/bin/psql/large_obj.h b/src/bin/psql/large_obj.h index 7d74d5fdb7..5750b5d9cc 100644 --- a/src/bin/psql/large_obj.h +++ b/src/bin/psql/large_obj.h @@ -13,4 +13,4 @@ bool do_lo_import(const char *filename_arg, const char *comment_arg); bool do_lo_unlink(const char *loid_arg); bool do_lo_list(void); -#endif /* LARGE_OBJ_H */ +#endif /* LARGE_OBJ_H */ diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c index 67e922fa94..e35b907764 100644 --- a/src/bin/psql/mainloop.c +++ b/src/bin/psql/mainloop.c @@ -36,7 +36,7 @@ MainLoop(FILE *source) { PsqlScanState scan_state; /* lexer working state */ ConditionalStack cond_stack; /* \if status stack */ - volatile PQExpBuffer query_buf; /* buffer for query being accumulated */ + volatile PQExpBuffer query_buf; /* buffer for query being accumulated */ volatile PQExpBuffer previous_buf; /* if there isn't anything in the new * buffer yet, use this one for \e, * etc. */ diff --git a/src/bin/psql/mainloop.h b/src/bin/psql/mainloop.h index 228a5e085e..8ef8cc1bd6 100644 --- a/src/bin/psql/mainloop.h +++ b/src/bin/psql/mainloop.h @@ -14,4 +14,4 @@ extern const PsqlScanCallbacks psqlscan_callbacks; extern int MainLoop(FILE *source); -#endif /* MAINLOOP_H */ +#endif /* MAINLOOP_H */ diff --git a/src/bin/psql/prompt.c b/src/bin/psql/prompt.c index e502ff3f6e..913b23e4cd 100644 --- a/src/bin/psql/prompt.c +++ b/src/bin/psql/prompt.c @@ -310,7 +310,7 @@ get_prompt(promptStatus_t status, ConditionalStack cstack) */ buf[0] = (*p == '[') ? RL_PROMPT_START_IGNORE : RL_PROMPT_END_IGNORE; buf[1] = '\0'; -#endif /* USE_READLINE */ +#endif /* USE_READLINE */ break; default: diff --git a/src/bin/psql/prompt.h b/src/bin/psql/prompt.h index b3d2d98fd7..a7a95effb4 100644 --- a/src/bin/psql/prompt.h +++ b/src/bin/psql/prompt.h @@ -14,4 +14,4 @@ char *get_prompt(promptStatus_t status, ConditionalStack cstack); -#endif /* PROMPT_H */ +#endif /* PROMPT_H */ diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index 70ff1812c8..b78f151acd 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -86,7 +86,7 @@ typedef struct _psqlSettings FILE *copyStream; /* Stream to read/write for \copy command */ - PGresult *last_error_result; /* most recent error result, if any */ + PGresult *last_error_result; /* most recent error result, if any */ printQueryOpt popt; diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 751ef913f0..7f767976a5 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -12,7 +12,7 @@ #else /* WIN32 */ #include #include -#endif /* WIN32 */ +#endif /* WIN32 */ #include "getopt_long.h" diff --git a/src/bin/psql/stringutils.h b/src/bin/psql/stringutils.h index 360ee030a1..213473f919 100644 --- a/src/bin/psql/stringutils.h +++ b/src/bin/psql/stringutils.h @@ -24,4 +24,4 @@ extern void strip_quotes(char *source, char quote, char escape, int encoding); extern char *quote_if_needed(const char *source, const char *entails_quote, char quote, char escape, int encoding); -#endif /* STRINGUTILS_H */ +#endif /* STRINGUTILS_H */ diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 4ef8ed4735..20c41b7ce5 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -131,8 +131,8 @@ static int completion_max_records; */ static const char *completion_charp; /* to pass a string */ static const char *const *completion_charpp; /* to pass a list of strings */ -static const char *completion_info_charp; /* to pass a second string */ -static const char *completion_info_charp2; /* to pass a third string */ +static const char *completion_info_charp; /* to pass a second string */ +static const char *completion_info_charp2; /* to pass a third string */ static const SchemaQuery *completion_squery; /* to pass a SchemaQuery */ static bool completion_case_sensitive; /* completion is case sensitive */ @@ -1043,8 +1043,8 @@ static const pgsql_thing_t words_after_create[] = { {"SYSTEM", NULL, NULL, THING_NO_CREATE | THING_NO_DROP}, {"TABLE", NULL, &Query_for_list_of_tables}, {"TABLESPACE", Query_for_list_of_tablespaces}, - {"TEMP", NULL, NULL, THING_NO_DROP | THING_NO_ALTER}, /* for CREATE TEMP TABLE - * ... */ + {"TEMP", NULL, NULL, THING_NO_DROP | THING_NO_ALTER}, /* for CREATE TEMP TABLE + * ... */ {"TEMPLATE", Query_for_list_of_ts_templates, NULL, THING_NO_SHOW}, {"TEMPORARY", NULL, NULL, THING_NO_DROP | THING_NO_ALTER}, /* for CREATE TEMPORARY * TABLE ... */ @@ -1052,8 +1052,8 @@ static const pgsql_thing_t words_after_create[] = { {"TRANSFORM", NULL, NULL}, {"TRIGGER", "SELECT pg_catalog.quote_ident(tgname) FROM pg_catalog.pg_trigger WHERE substring(pg_catalog.quote_ident(tgname),1,%d)='%s' AND NOT tgisinternal"}, {"TYPE", NULL, &Query_for_list_of_datatypes}, - {"UNIQUE", NULL, NULL, THING_NO_DROP | THING_NO_ALTER}, /* for CREATE UNIQUE - * INDEX ... */ + {"UNIQUE", NULL, NULL, THING_NO_DROP | THING_NO_ALTER}, /* for CREATE UNIQUE + * INDEX ... */ {"UNLOGGED", NULL, NULL, THING_NO_DROP | THING_NO_ALTER}, /* for CREATE UNLOGGED * TABLE ... */ {"USER", Query_for_list_of_roles}, @@ -4422,6 +4422,6 @@ dequote_file_name(char *text, char quote_char) return s; } -#endif /* NOT_USED */ +#endif /* NOT_USED */ -#endif /* USE_READLINE */ +#endif /* USE_READLINE */ diff --git a/src/bin/psql/tab-complete.h b/src/bin/psql/tab-complete.h index 9c0309dc1e..1a42ef1c66 100644 --- a/src/bin/psql/tab-complete.h +++ b/src/bin/psql/tab-complete.h @@ -14,4 +14,4 @@ extern PQExpBuffer tab_completion_query_buf; extern void initialize_readline(void); -#endif /* TAB_COMPLETE_H */ +#endif /* TAB_COMPLETE_H */ diff --git a/src/bin/psql/variables.c b/src/bin/psql/variables.c index d9d07631a5..806d39bfbe 100644 --- a/src/bin/psql/variables.c +++ b/src/bin/psql/variables.c @@ -273,7 +273,7 @@ SetVariable(VariableSpace space, const char *name, const char *value) } } else if (new_value) - pg_free(new_value); /* current->value is left unchanged */ + pg_free(new_value); /* current->value is left unchanged */ return confirmed; } diff --git a/src/bin/psql/variables.h b/src/bin/psql/variables.h index 19257937c7..02d85b1bc2 100644 --- a/src/bin/psql/variables.h +++ b/src/bin/psql/variables.h @@ -93,4 +93,4 @@ void SetVariableHooks(VariableSpace space, const char *name, void PsqlVarEnumError(const char *name, const char *value, const char *suggestions); -#endif /* VARIABLES_H */ +#endif /* VARIABLES_H */ diff --git a/src/bin/scripts/common.c b/src/bin/scripts/common.c index 0b88fa6b4d..7394bf293e 100644 --- a/src/bin/scripts/common.c +++ b/src/bin/scripts/common.c @@ -425,4 +425,4 @@ setup_cancel_handler(void) SetConsoleCtrlHandler(consoleHandler, TRUE); } -#endif /* WIN32 */ +#endif /* WIN32 */ diff --git a/src/bin/scripts/common.h b/src/bin/scripts/common.h index 6532eb2372..61a31a7f4d 100644 --- a/src/bin/scripts/common.h +++ b/src/bin/scripts/common.h @@ -55,4 +55,4 @@ extern void SetCancelConn(PGconn *conn); extern void ResetCancelConn(void); -#endif /* COMMON_H */ +#endif /* COMMON_H */ diff --git a/src/common/exec.c b/src/common/exec.c index 617feff861..67bf4d1d79 100644 --- a/src/common/exec.c +++ b/src/common/exec.c @@ -293,7 +293,7 @@ resolve_symlinks(char *path) log_error4(_("could not change directory to \"%s\": %s"), orig_wd, strerror(errno)); return -1; } -#endif /* HAVE_READLINK */ +#endif /* HAVE_READLINK */ return 0; } @@ -499,7 +499,7 @@ pipe_read_line(char *cmd, char *line, int maxsize) CloseHandle(childstdoutrddup); return retval; -#endif /* WIN32 */ +#endif /* WIN32 */ } diff --git a/src/common/file_utils.c b/src/common/file_utils.c index 7f24325b8a..31e71d855d 100644 --- a/src/common/file_utils.c +++ b/src/common/file_utils.c @@ -250,7 +250,7 @@ pre_sync_fname(const char *fname, bool isdir, const char *progname) return 0; } -#endif /* PG_FLUSH_DATA_WORKS */ +#endif /* PG_FLUSH_DATA_WORKS */ /* * fsync_fname -- Try to fsync a file or directory diff --git a/src/common/ip.c b/src/common/ip.c index b71160066c..bb536d3e86 100644 --- a/src/common/ip.c +++ b/src/common/ip.c @@ -101,7 +101,7 @@ pg_freeaddrinfo_all(int hint_ai_family, struct addrinfo *ai) } } else -#endif /* HAVE_UNIX_SOCKETS */ +#endif /* HAVE_UNIX_SOCKETS */ { /* struct was built by getaddrinfo() */ if (ai != NULL) @@ -256,4 +256,4 @@ getnameinfo_unix(const struct sockaddr_un *sa, int salen, return 0; } -#endif /* HAVE_UNIX_SOCKETS */ +#endif /* HAVE_UNIX_SOCKETS */ diff --git a/src/common/keywords.c b/src/common/keywords.c index 266c29205f..a5c6c41cb8 100644 --- a/src/common/keywords.c +++ b/src/common/keywords.c @@ -35,7 +35,7 @@ */ #define PG_KEYWORD(a,b,c) {a,0,c}, -#endif /* FRONTEND */ +#endif /* FRONTEND */ const ScanKeyword ScanKeywords[] = { diff --git a/src/common/md5.c b/src/common/md5.c index 6e70b218d2..ba65b02af6 100644 --- a/src/common/md5.c +++ b/src/common/md5.c @@ -117,21 +117,21 @@ doTheRounds(uint32 X[16], uint32 state[4]) b = c + ROT_LEFT((b + F(c, d, a) + X[7] + 0xfd469501), 22); /* 8 */ a = b + ROT_LEFT((a + F(b, c, d) + X[8] + 0x698098d8), 7); /* 9 */ d = a + ROT_LEFT((d + F(a, b, c) + X[9] + 0x8b44f7af), 12); /* 10 */ - c = d + ROT_LEFT((c + F(d, a, b) + X[10] + 0xffff5bb1), 17); /* 11 */ - b = c + ROT_LEFT((b + F(c, d, a) + X[11] + 0x895cd7be), 22); /* 12 */ + c = d + ROT_LEFT((c + F(d, a, b) + X[10] + 0xffff5bb1), 17); /* 11 */ + b = c + ROT_LEFT((b + F(c, d, a) + X[11] + 0x895cd7be), 22); /* 12 */ a = b + ROT_LEFT((a + F(b, c, d) + X[12] + 0x6b901122), 7); /* 13 */ - d = a + ROT_LEFT((d + F(a, b, c) + X[13] + 0xfd987193), 12); /* 14 */ - c = d + ROT_LEFT((c + F(d, a, b) + X[14] + 0xa679438e), 17); /* 15 */ - b = c + ROT_LEFT((b + F(c, d, a) + X[15] + 0x49b40821), 22); /* 16 */ + d = a + ROT_LEFT((d + F(a, b, c) + X[13] + 0xfd987193), 12); /* 14 */ + c = d + ROT_LEFT((c + F(d, a, b) + X[14] + 0xa679438e), 17); /* 15 */ + b = c + ROT_LEFT((b + F(c, d, a) + X[15] + 0x49b40821), 22); /* 16 */ /* round 2 */ a = b + ROT_LEFT((a + G(b, c, d) + X[1] + 0xf61e2562), 5); /* 17 */ d = a + ROT_LEFT((d + G(a, b, c) + X[6] + 0xc040b340), 9); /* 18 */ - c = d + ROT_LEFT((c + G(d, a, b) + X[11] + 0x265e5a51), 14); /* 19 */ + c = d + ROT_LEFT((c + G(d, a, b) + X[11] + 0x265e5a51), 14); /* 19 */ b = c + ROT_LEFT((b + G(c, d, a) + X[0] + 0xe9b6c7aa), 20); /* 20 */ a = b + ROT_LEFT((a + G(b, c, d) + X[5] + 0xd62f105d), 5); /* 21 */ d = a + ROT_LEFT((d + G(a, b, c) + X[10] + 0x02441453), 9); /* 22 */ - c = d + ROT_LEFT((c + G(d, a, b) + X[15] + 0xd8a1e681), 14); /* 23 */ + c = d + ROT_LEFT((c + G(d, a, b) + X[15] + 0xd8a1e681), 14); /* 23 */ b = c + ROT_LEFT((b + G(c, d, a) + X[4] + 0xe7d3fbc8), 20); /* 24 */ a = b + ROT_LEFT((a + G(b, c, d) + X[9] + 0x21e1cde6), 5); /* 25 */ d = a + ROT_LEFT((d + G(a, b, c) + X[14] + 0xc33707d6), 9); /* 26 */ @@ -140,41 +140,41 @@ doTheRounds(uint32 X[16], uint32 state[4]) a = b + ROT_LEFT((a + G(b, c, d) + X[13] + 0xa9e3e905), 5); /* 29 */ d = a + ROT_LEFT((d + G(a, b, c) + X[2] + 0xfcefa3f8), 9); /* 30 */ c = d + ROT_LEFT((c + G(d, a, b) + X[7] + 0x676f02d9), 14); /* 31 */ - b = c + ROT_LEFT((b + G(c, d, a) + X[12] + 0x8d2a4c8a), 20); /* 32 */ + b = c + ROT_LEFT((b + G(c, d, a) + X[12] + 0x8d2a4c8a), 20); /* 32 */ /* round 3 */ a = b + ROT_LEFT((a + H(b, c, d) + X[5] + 0xfffa3942), 4); /* 33 */ d = a + ROT_LEFT((d + H(a, b, c) + X[8] + 0x8771f681), 11); /* 34 */ - c = d + ROT_LEFT((c + H(d, a, b) + X[11] + 0x6d9d6122), 16); /* 35 */ - b = c + ROT_LEFT((b + H(c, d, a) + X[14] + 0xfde5380c), 23); /* 36 */ + c = d + ROT_LEFT((c + H(d, a, b) + X[11] + 0x6d9d6122), 16); /* 35 */ + b = c + ROT_LEFT((b + H(c, d, a) + X[14] + 0xfde5380c), 23); /* 36 */ a = b + ROT_LEFT((a + H(b, c, d) + X[1] + 0xa4beea44), 4); /* 37 */ d = a + ROT_LEFT((d + H(a, b, c) + X[4] + 0x4bdecfa9), 11); /* 38 */ c = d + ROT_LEFT((c + H(d, a, b) + X[7] + 0xf6bb4b60), 16); /* 39 */ - b = c + ROT_LEFT((b + H(c, d, a) + X[10] + 0xbebfbc70), 23); /* 40 */ + b = c + ROT_LEFT((b + H(c, d, a) + X[10] + 0xbebfbc70), 23); /* 40 */ a = b + ROT_LEFT((a + H(b, c, d) + X[13] + 0x289b7ec6), 4); /* 41 */ d = a + ROT_LEFT((d + H(a, b, c) + X[0] + 0xeaa127fa), 11); /* 42 */ c = d + ROT_LEFT((c + H(d, a, b) + X[3] + 0xd4ef3085), 16); /* 43 */ b = c + ROT_LEFT((b + H(c, d, a) + X[6] + 0x04881d05), 23); /* 44 */ a = b + ROT_LEFT((a + H(b, c, d) + X[9] + 0xd9d4d039), 4); /* 45 */ - d = a + ROT_LEFT((d + H(a, b, c) + X[12] + 0xe6db99e5), 11); /* 46 */ - c = d + ROT_LEFT((c + H(d, a, b) + X[15] + 0x1fa27cf8), 16); /* 47 */ + d = a + ROT_LEFT((d + H(a, b, c) + X[12] + 0xe6db99e5), 11); /* 46 */ + c = d + ROT_LEFT((c + H(d, a, b) + X[15] + 0x1fa27cf8), 16); /* 47 */ b = c + ROT_LEFT((b + H(c, d, a) + X[2] + 0xc4ac5665), 23); /* 48 */ /* round 4 */ a = b + ROT_LEFT((a + I(b, c, d) + X[0] + 0xf4292244), 6); /* 49 */ d = a + ROT_LEFT((d + I(a, b, c) + X[7] + 0x432aff97), 10); /* 50 */ - c = d + ROT_LEFT((c + I(d, a, b) + X[14] + 0xab9423a7), 15); /* 51 */ + c = d + ROT_LEFT((c + I(d, a, b) + X[14] + 0xab9423a7), 15); /* 51 */ b = c + ROT_LEFT((b + I(c, d, a) + X[5] + 0xfc93a039), 21); /* 52 */ a = b + ROT_LEFT((a + I(b, c, d) + X[12] + 0x655b59c3), 6); /* 53 */ d = a + ROT_LEFT((d + I(a, b, c) + X[3] + 0x8f0ccc92), 10); /* 54 */ - c = d + ROT_LEFT((c + I(d, a, b) + X[10] + 0xffeff47d), 15); /* 55 */ + c = d + ROT_LEFT((c + I(d, a, b) + X[10] + 0xffeff47d), 15); /* 55 */ b = c + ROT_LEFT((b + I(c, d, a) + X[1] + 0x85845dd1), 21); /* 56 */ a = b + ROT_LEFT((a + I(b, c, d) + X[8] + 0x6fa87e4f), 6); /* 57 */ - d = a + ROT_LEFT((d + I(a, b, c) + X[15] + 0xfe2ce6e0), 10); /* 58 */ + d = a + ROT_LEFT((d + I(a, b, c) + X[15] + 0xfe2ce6e0), 10); /* 58 */ c = d + ROT_LEFT((c + I(d, a, b) + X[6] + 0xa3014314), 15); /* 59 */ - b = c + ROT_LEFT((b + I(c, d, a) + X[13] + 0x4e0811a1), 21); /* 60 */ + b = c + ROT_LEFT((b + I(c, d, a) + X[13] + 0x4e0811a1), 21); /* 60 */ a = b + ROT_LEFT((a + I(b, c, d) + X[4] + 0xf7537e82), 6); /* 61 */ - d = a + ROT_LEFT((d + I(a, b, c) + X[11] + 0xbd3af235), 10); /* 62 */ + d = a + ROT_LEFT((d + I(a, b, c) + X[11] + 0xbd3af235), 10); /* 62 */ c = d + ROT_LEFT((c + I(d, a, b) + X[2] + 0x2ad7d2bb), 15); /* 63 */ b = c + ROT_LEFT((b + I(c, d, a) + X[9] + 0xeb86d391), 21); /* 64 */ diff --git a/src/common/pg_lzcompress.c b/src/common/pg_lzcompress.c index 5ec93ec7a6..67f570c362 100644 --- a/src/common/pg_lzcompress.c +++ b/src/common/pg_lzcompress.c @@ -752,7 +752,7 @@ pglz_decompress(const char *source, int32 slen, char *dest, * An unset control bit means LITERAL BYTE. So we just copy * one from INPUT to OUTPUT. */ - if (dp >= destend) /* check for buffer overrun */ + if (dp >= destend) /* check for buffer overrun */ break; /* do not clobber memory */ *dp++ = *sp++; diff --git a/src/common/psprintf.c b/src/common/psprintf.c index 8561e9aed6..8f5903d519 100644 --- a/src/common/psprintf.c +++ b/src/common/psprintf.c @@ -25,7 +25,7 @@ #include "postgres_fe.h" /* It's possible we could use a different value for this in frontend code */ -#define MaxAllocSize ((Size) 0x3fffffff) /* 1 gigabyte - 1 */ +#define MaxAllocSize ((Size) 0x3fffffff) /* 1 gigabyte - 1 */ #endif diff --git a/src/common/scram-common.c b/src/common/scram-common.c index 461d75db12..e43d035d4d 100644 --- a/src/common/scram-common.c +++ b/src/common/scram-common.c @@ -221,7 +221,7 @@ scram_build_verifier(const char *salt, int saltlen, int iterations, maxlen = strlen("SCRAM-SHA-256") + 1 + 10 + 1 /* iteration count */ + pg_b64_enc_len(saltlen) + 1 /* Base64-encoded salt */ - + pg_b64_enc_len(SCRAM_KEY_LEN) + 1 /* Base64-encoded StoredKey */ + + pg_b64_enc_len(SCRAM_KEY_LEN) + 1 /* Base64-encoded StoredKey */ + pg_b64_enc_len(SCRAM_KEY_LEN) + 1; /* Base64-encoded ServerKey */ #ifdef FRONTEND diff --git a/src/common/sha2.c b/src/common/sha2.c index 496467507d..7c6f1b49ad 100644 --- a/src/common/sha2.c +++ b/src/common/sha2.c @@ -94,7 +94,7 @@ (x) = ((tmp & 0xffff0000ffff0000ULL) >> 16) | \ ((tmp & 0x0000ffff0000ffffULL) << 16); \ } -#endif /* not bigendian */ +#endif /* not bigendian */ /* * Macro for incrementally adding the unsigned 64-bit integer n to the @@ -459,7 +459,7 @@ SHA256_Transform(pg_sha256_ctx *context, const uint8 *data) /* Clean up */ a = b = c = d = e = f = g = h = T1 = T2 = 0; } -#endif /* SHA2_UNROLL_TRANSFORM */ +#endif /* SHA2_UNROLL_TRANSFORM */ void pg_sha256_update(pg_sha256_ctx *context, const uint8 *data, size_t len) @@ -785,7 +785,7 @@ SHA512_Transform(pg_sha512_ctx *context, const uint8 *data) /* Clean up */ a = b = c = d = e = f = g = h = T1 = T2 = 0; } -#endif /* SHA2_UNROLL_TRANSFORM */ +#endif /* SHA2_UNROLL_TRANSFORM */ void pg_sha512_update(pg_sha512_ctx *context, const uint8 *data, size_t len) diff --git a/src/fe_utils/mbprint.c b/src/fe_utils/mbprint.c index 364baa6a1b..8db72624d5 100644 --- a/src/fe_utils/mbprint.c +++ b/src/fe_utils/mbprint.c @@ -233,14 +233,14 @@ pg_wcssize(const unsigned char *pwcs, size_t len, int encoding, width = linewidth; linewidth = 0; height += 1; - format_size += 1; /* For NUL char */ + format_size += 1; /* For NUL char */ } - else if (*pwcs == '\r') /* Linefeed */ + else if (*pwcs == '\r') /* Linefeed */ { linewidth += 2; format_size += 2; } - else if (*pwcs == '\t') /* Tab */ + else if (*pwcs == '\t') /* Tab */ { do { @@ -321,13 +321,13 @@ pg_wcsformat(const unsigned char *pwcs, size_t len, int encoding, /* make next line point to remaining memory */ lines->ptr = ptr; } - else if (*pwcs == '\r') /* Linefeed */ + else if (*pwcs == '\r') /* Linefeed */ { strcpy((char *) ptr, "\\r"); linewidth += 2; ptr += 2; } - else if (*pwcs == '\t') /* Tab */ + else if (*pwcs == '\t') /* Tab */ { do { diff --git a/src/fe_utils/print.c b/src/fe_utils/print.c index 4c320b215c..4f3d9e3afe 100644 --- a/src/fe_utils/print.c +++ b/src/fe_utils/print.c @@ -608,12 +608,12 @@ print_aligned_text(const printTableContent *cont, FILE *fout, bool is_pager) const char *const *ptr; - struct lineptr **col_lineptrs; /* pointers to line pointer per column */ + struct lineptr **col_lineptrs; /* pointers to line pointer per column */ bool *header_done; /* Have all header lines been output? */ int *bytes_output; /* Bytes output for column value */ printTextLineWrap *wrap; /* Wrap status for each column */ - int output_columns = 0; /* Width of interactive console */ + int output_columns = 0; /* Width of interactive console */ bool is_local_pager = false; if (cancel_pressed) @@ -1086,7 +1086,7 @@ print_aligned_text(const printTableContent *cont, FILE *fout, bool is_pager) * If left-aligned, pad out remaining space if needed (not * last column, and/or wrap marks required). */ - if (cont->aligns[j] != 'r') /* Left aligned cell */ + if (cont->aligns[j] != 'r') /* Left aligned cell */ { if (finalspaces || wrap[j] == PRINT_LINE_WRAP_WRAP || @@ -1249,7 +1249,7 @@ print_aligned_vertical(const printTableContent *cont, bool is_local_pager = false, hmultiline = false, dmultiline = false; - int output_columns = 0; /* Width of interactive console */ + int output_columns = 0; /* Width of interactive console */ if (cancel_pressed) return; diff --git a/src/fe_utils/string_utils.c b/src/fe_utils/string_utils.c index 45a08c7ee1..c7e42ddec9 100644 --- a/src/fe_utils/string_utils.c +++ b/src/fe_utils/string_utils.c @@ -536,7 +536,7 @@ appendShellStringNoError(PQExpBuffer buf, const char *str) backslash_run_length--; } appendPQExpBufferStr(buf, "^\""); -#endif /* WIN32 */ +#endif /* WIN32 */ return ok; } @@ -713,9 +713,9 @@ parsePGArray(const char *atext, char ***itemarray, int *nitems) { atext++; if (*atext == '\0') - return false; /* premature end of string */ + return false; /* premature end of string */ } - *strings++ = *atext++; /* copy quoted data */ + *strings++ = *atext++; /* copy quoted data */ } atext++; } diff --git a/src/include/access/amapi.h b/src/include/access/amapi.h index 37bd51f85b..2d714fded0 100644 --- a/src/include/access/amapi.h +++ b/src/include/access/amapi.h @@ -203,19 +203,19 @@ typedef struct IndexAmRoutine amcanreturn_function amcanreturn; /* can be NULL */ amcostestimate_function amcostestimate; amoptions_function amoptions; - amproperty_function amproperty; /* can be NULL */ + amproperty_function amproperty; /* can be NULL */ amvalidate_function amvalidate; ambeginscan_function ambeginscan; amrescan_function amrescan; - amgettuple_function amgettuple; /* can be NULL */ + amgettuple_function amgettuple; /* can be NULL */ amgetbitmap_function amgetbitmap; /* can be NULL */ amendscan_function amendscan; - ammarkpos_function ammarkpos; /* can be NULL */ - amrestrpos_function amrestrpos; /* can be NULL */ + ammarkpos_function ammarkpos; /* can be NULL */ + amrestrpos_function amrestrpos; /* can be NULL */ /* interface functions to support parallel index scans */ - amestimateparallelscan_function amestimateparallelscan; /* can be NULL */ - aminitparallelscan_function aminitparallelscan; /* can be NULL */ + amestimateparallelscan_function amestimateparallelscan; /* can be NULL */ + aminitparallelscan_function aminitparallelscan; /* can be NULL */ amparallelrescan_function amparallelrescan; /* can be NULL */ } IndexAmRoutine; @@ -224,4 +224,4 @@ typedef struct IndexAmRoutine extern IndexAmRoutine *GetIndexAmRoutine(Oid amhandler); extern IndexAmRoutine *GetIndexAmRoutineByAmId(Oid amoid, bool noerror); -#endif /* AMAPI_H */ +#endif /* AMAPI_H */ diff --git a/src/include/access/amvalidate.h b/src/include/access/amvalidate.h index 742c25a78d..04b7429a78 100644 --- a/src/include/access/amvalidate.h +++ b/src/include/access/amvalidate.h @@ -33,4 +33,4 @@ extern bool check_amop_signature(Oid opno, Oid restype, Oid lefttype, Oid righttype); extern bool opfamily_can_sort_type(Oid opfamilyoid, Oid datatypeoid); -#endif /* AMVALIDATE_H */ +#endif /* AMVALIDATE_H */ diff --git a/src/include/access/attnum.h b/src/include/access/attnum.h index 7fa459fc8c..d23888b098 100644 --- a/src/include/access/attnum.h +++ b/src/include/access/attnum.h @@ -61,4 +61,4 @@ typedef int16 AttrNumber; #define AttrOffsetGetAttrNumber(attributeOffset) \ ((AttrNumber) (1 + (attributeOffset))) -#endif /* ATTNUM_H */ +#endif /* ATTNUM_H */ diff --git a/src/include/access/brin.h b/src/include/access/brin.h index 45d55a9733..61a38804ca 100644 --- a/src/include/access/brin.h +++ b/src/include/access/brin.h @@ -49,4 +49,4 @@ typedef struct BrinStatsData extern void brinGetStats(Relation index, BrinStatsData *stats); -#endif /* BRIN_H */ +#endif /* BRIN_H */ diff --git a/src/include/access/brin_internal.h b/src/include/access/brin_internal.h index abe887788b..3ed67438b2 100644 --- a/src/include/access/brin_internal.h +++ b/src/include/access/brin_internal.h @@ -107,4 +107,4 @@ extern bytea *brinoptions(Datum reloptions, bool validate); /* brin_validate.c */ extern bool brinvalidate(Oid opclassoid); -#endif /* BRIN_INTERNAL_H */ +#endif /* BRIN_INTERNAL_H */ diff --git a/src/include/access/brin_page.h b/src/include/access/brin_page.h index e2b3b92fac..bf03a6e9f8 100644 --- a/src/include/access/brin_page.h +++ b/src/include/access/brin_page.h @@ -93,4 +93,4 @@ typedef struct RevmapContents #define REVMAP_PAGE_MAXITEMS \ (REVMAP_CONTENT_SIZE / sizeof(ItemPointerData)) -#endif /* BRIN_PAGE_H */ +#endif /* BRIN_PAGE_H */ diff --git a/src/include/access/brin_pageops.h b/src/include/access/brin_pageops.h index ab38093a23..e0f5641635 100644 --- a/src/include/access/brin_pageops.h +++ b/src/include/access/brin_pageops.h @@ -35,4 +35,4 @@ extern void brin_evacuate_page(Relation idxRel, BlockNumber pagesPerRange, extern bool brin_page_cleanup(Relation idxrel, Buffer buf); -#endif /* BRIN_PAGEOPS_H */ +#endif /* BRIN_PAGEOPS_H */ diff --git a/src/include/access/brin_revmap.h b/src/include/access/brin_revmap.h index 7fdcf877f4..ddd87e040b 100644 --- a/src/include/access/brin_revmap.h +++ b/src/include/access/brin_revmap.h @@ -38,4 +38,4 @@ extern BrinTuple *brinGetTupleForHeapBlock(BrinRevmap *revmap, Size *size, int mode, Snapshot snapshot); extern bool brinRevmapDesummarizeRange(Relation idxrel, BlockNumber heapBlk); -#endif /* BRIN_REVMAP_H */ +#endif /* BRIN_REVMAP_H */ diff --git a/src/include/access/brin_tuple.h b/src/include/access/brin_tuple.h index 3f4a7b6d3c..6545c0a6ff 100644 --- a/src/include/access/brin_tuple.h +++ b/src/include/access/brin_tuple.h @@ -99,4 +99,4 @@ extern BrinMemTuple *brin_memtuple_initialize(BrinMemTuple *dtuple, extern BrinMemTuple *brin_deform_tuple(BrinDesc *brdesc, BrinTuple *tuple, BrinMemTuple *dMemtuple); -#endif /* BRIN_TUPLE_H */ +#endif /* BRIN_TUPLE_H */ diff --git a/src/include/access/brin_xlog.h b/src/include/access/brin_xlog.h index 38e6dcccf2..10e90d3c78 100644 --- a/src/include/access/brin_xlog.h +++ b/src/include/access/brin_xlog.h @@ -148,4 +148,4 @@ extern void brin_desc(StringInfo buf, XLogReaderState *record); extern const char *brin_identify(uint8 info); extern void brin_mask(char *pagedata, BlockNumber blkno); -#endif /* BRIN_XLOG_H */ +#endif /* BRIN_XLOG_H */ diff --git a/src/include/access/clog.h b/src/include/access/clog.h index 5ac7cdd618..19a4a2b9b8 100644 --- a/src/include/access/clog.h +++ b/src/include/access/clog.h @@ -58,4 +58,4 @@ extern void clog_redo(XLogReaderState *record); extern void clog_desc(StringInfo buf, XLogReaderState *record); extern const char *clog_identify(uint8 info); -#endif /* CLOG_H */ +#endif /* CLOG_H */ diff --git a/src/include/access/commit_ts.h b/src/include/access/commit_ts.h index f172c91d8f..31936faf08 100644 --- a/src/include/access/commit_ts.h +++ b/src/include/access/commit_ts.h @@ -74,4 +74,4 @@ extern void commit_ts_redo(XLogReaderState *record); extern void commit_ts_desc(StringInfo buf, XLogReaderState *record); extern const char *commit_ts_identify(uint8 info); -#endif /* COMMIT_TS_H */ +#endif /* COMMIT_TS_H */ diff --git a/src/include/access/genam.h b/src/include/access/genam.h index f467b18a9c..dadc5d143d 100644 --- a/src/include/access/genam.h +++ b/src/include/access/genam.h @@ -48,7 +48,7 @@ typedef struct IndexVacuumInfo bool estimated_count; /* num_heap_tuples is an estimate */ int message_level; /* ereport level for progress messages */ double num_heap_tuples; /* tuples remaining in heap */ - BufferAccessStrategy strategy; /* access strategy for reads */ + BufferAccessStrategy strategy; /* access strategy for reads */ } IndexVacuumInfo; /* @@ -73,7 +73,7 @@ typedef struct IndexBulkDeleteResult BlockNumber num_pages; /* pages remaining in index */ BlockNumber pages_removed; /* # removed during vacuum operation */ bool estimated_count; /* num_index_tuples is an estimate */ - double num_index_tuples; /* tuples remaining */ + double num_index_tuples; /* tuples remaining */ double tuples_removed; /* # removed during vacuum operation */ BlockNumber pages_deleted; /* # unused pages in index */ BlockNumber pages_free; /* # pages available for reuse */ @@ -203,4 +203,4 @@ extern HeapTuple systable_getnext_ordered(SysScanDesc sysscan, ScanDirection direction); extern void systable_endscan_ordered(SysScanDesc sysscan); -#endif /* GENAM_H */ +#endif /* GENAM_H */ diff --git a/src/include/access/generic_xlog.h b/src/include/access/generic_xlog.h index 0dc17f55f2..02696141ea 100644 --- a/src/include/access/generic_xlog.h +++ b/src/include/access/generic_xlog.h @@ -42,4 +42,4 @@ extern const char *generic_identify(uint8 info); extern void generic_desc(StringInfo buf, XLogReaderState *record); extern void generic_mask(char *pagedata, BlockNumber blkno); -#endif /* GENERIC_XLOG_H */ +#endif /* GENERIC_XLOG_H */ diff --git a/src/include/access/gin.h b/src/include/access/gin.h index bd9e8833de..ec83058095 100644 --- a/src/include/access/gin.h +++ b/src/include/access/gin.h @@ -33,7 +33,7 @@ #define GIN_SEARCH_MODE_DEFAULT 0 #define GIN_SEARCH_MODE_INCLUDE_EMPTY 1 #define GIN_SEARCH_MODE_ALL 2 -#define GIN_SEARCH_MODE_EVERYTHING 3 /* for internal use only */ +#define GIN_SEARCH_MODE_EVERYTHING 3 /* for internal use only */ /* * GinStatsData represents stats data for planner use @@ -73,4 +73,4 @@ extern int gin_pending_list_limit; extern void ginGetStats(Relation index, GinStatsData *stats); extern void ginUpdateStats(Relation index, const GinStatsData *stats); -#endif /* GIN_H */ +#endif /* GIN_H */ diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h index 45616f9c4d..4d66c27f58 100644 --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@ -75,7 +75,7 @@ typedef struct GinState FmgrInfo extractQueryFn[INDEX_MAX_KEYS]; FmgrInfo consistentFn[INDEX_MAX_KEYS]; FmgrInfo triConsistentFn[INDEX_MAX_KEYS]; - FmgrInfo comparePartialFn[INDEX_MAX_KEYS]; /* optional method */ + FmgrInfo comparePartialFn[INDEX_MAX_KEYS]; /* optional method */ /* canPartialMatch[i] is true if comparePartialFn[i] is valid */ bool canPartialMatch[INDEX_MAX_KEYS]; /* Collations to pass to the support functions */ @@ -473,4 +473,4 @@ ginCompareItemPointers(ItemPointer a, ItemPointer b) extern int ginTraverseLock(Buffer buffer, bool searchMode); -#endif /* GIN_PRIVATE_H */ +#endif /* GIN_PRIVATE_H */ diff --git a/src/include/access/ginblock.h b/src/include/access/ginblock.h index 438912c6a0..114370c7d7 100644 --- a/src/include/access/ginblock.h +++ b/src/include/access/ginblock.h @@ -41,7 +41,7 @@ typedef GinPageOpaqueData *GinPageOpaque; #define GIN_DELETED (1 << 2) #define GIN_META (1 << 3) #define GIN_LIST (1 << 4) -#define GIN_LIST_FULLROW (1 << 5) /* makes sense only on GIN_LIST page */ +#define GIN_LIST_FULLROW (1 << 5) /* makes sense only on GIN_LIST page */ #define GIN_INCOMPLETE_SPLIT (1 << 6) /* page was split, but parent not * updated */ #define GIN_COMPRESSED (1 << 7) @@ -196,10 +196,10 @@ typedef struct */ typedef signed char GinNullCategory; -#define GIN_CAT_NORM_KEY 0 /* normal, non-null key value */ -#define GIN_CAT_NULL_KEY 1 /* null key value */ -#define GIN_CAT_EMPTY_ITEM 2 /* placeholder for zero-key item */ -#define GIN_CAT_NULL_ITEM 3 /* placeholder for null item */ +#define GIN_CAT_NORM_KEY 0 /* normal, non-null key value */ +#define GIN_CAT_NULL_KEY 1 /* null key value */ +#define GIN_CAT_EMPTY_ITEM 2 /* placeholder for zero-key item */ +#define GIN_CAT_NULL_ITEM 3 /* placeholder for null item */ #define GIN_CAT_EMPTY_QUERY (-1) /* placeholder for full-scan query */ /* @@ -333,4 +333,4 @@ typedef struct #define SizeOfGinPostingList(plist) (offsetof(GinPostingList, bytes) + SHORTALIGN((plist)->nbytes) ) #define GinNextPostingListSegment(cur) ((GinPostingList *) (((char *) (cur)) + SizeOfGinPostingList((cur)))) -#endif /* GINBLOCK_H */ +#endif /* GINBLOCK_H */ diff --git a/src/include/access/ginxlog.h b/src/include/access/ginxlog.h index 641ae252fa..42e0ae90c3 100644 --- a/src/include/access/ginxlog.h +++ b/src/include/access/ginxlog.h @@ -90,11 +90,11 @@ typedef struct } ginxlogSegmentAction; /* Action types */ -#define GIN_SEGMENT_UNMODIFIED 0 /* no action (not used in WAL records) */ -#define GIN_SEGMENT_DELETE 1 /* a whole segment is removed */ -#define GIN_SEGMENT_INSERT 2 /* a whole segment is added */ -#define GIN_SEGMENT_REPLACE 3 /* a segment is replaced */ -#define GIN_SEGMENT_ADDITEMS 4 /* items are added to existing segment */ +#define GIN_SEGMENT_UNMODIFIED 0 /* no action (not used in WAL records) */ +#define GIN_SEGMENT_DELETE 1 /* a whole segment is removed */ +#define GIN_SEGMENT_INSERT 2 /* a whole segment is added */ +#define GIN_SEGMENT_REPLACE 3 /* a segment is replaced */ +#define GIN_SEGMENT_ADDITEMS 4 /* items are added to existing segment */ typedef struct { @@ -214,4 +214,4 @@ extern void gin_xlog_startup(void); extern void gin_xlog_cleanup(void); extern void gin_mask(char *pagedata, BlockNumber blkno); -#endif /* GINXLOG_H */ +#endif /* GINXLOG_H */ diff --git a/src/include/access/gist.h b/src/include/access/gist.h index 5824e90bda..83642189db 100644 --- a/src/include/access/gist.h +++ b/src/include/access/gist.h @@ -105,12 +105,12 @@ typedef struct GIST_SPLITVEC OffsetNumber *spl_left; /* array of entries that go left */ int spl_nleft; /* size of this array */ Datum spl_ldatum; /* Union of keys in spl_left */ - bool spl_ldatum_exists; /* true, if spl_ldatum already exists. */ + bool spl_ldatum_exists; /* true, if spl_ldatum already exists. */ OffsetNumber *spl_right; /* array of entries that go right */ int spl_nright; /* size of the array */ Datum spl_rdatum; /* Union of keys in spl_right */ - bool spl_rdatum_exists; /* true, if spl_rdatum already exists. */ + bool spl_rdatum_exists; /* true, if spl_rdatum already exists. */ } GIST_SPLITVEC; /* @@ -170,4 +170,4 @@ typedef struct do { (e).key = (k); (e).rel = (r); (e).page = (pg); \ (e).offset = (o); (e).leafkey = (l); } while (0) -#endif /* GIST_H */ +#endif /* GIST_H */ diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h index 1ad4ed6da7..bfef2df420 100644 --- a/src/include/access/gist_private.h +++ b/src/include/access/gist_private.h @@ -118,7 +118,7 @@ typedef struct GISTSearchHeapItem { ItemPointerData heapPtr; bool recheck; /* T if quals must be rechecked */ - bool recheckDistances; /* T if distances must be rechecked */ + bool recheckDistances; /* T if distances must be rechecked */ HeapTuple recontup; /* data reconstructed from the index, used in * index-only scans */ OffsetNumber offnum; /* track offset in page to mark tuple as @@ -136,8 +136,8 @@ typedef struct GISTSearchItem /* we must store parentlsn to detect whether a split occurred */ GISTSearchHeapItem heap; /* heap info, if heap tuple */ } data; - double distances[FLEXIBLE_ARRAY_MEMBER]; /* numberOfOrderBys - * entries */ + double distances[FLEXIBLE_ARRAY_MEMBER]; /* numberOfOrderBys + * entries */ } GISTSearchItem; #define GISTSearchItemIsHeap(item) ((item).blkno == InvalidBlockNumber) @@ -225,12 +225,12 @@ typedef struct GistSplitVector { GIST_SPLITVEC splitVector; /* passed to/from user PickSplit method */ - Datum spl_lattr[INDEX_MAX_KEYS]; /* Union of subkeys in - * splitVector.spl_left */ + Datum spl_lattr[INDEX_MAX_KEYS]; /* Union of subkeys in + * splitVector.spl_left */ bool spl_lisnull[INDEX_MAX_KEYS]; - Datum spl_rattr[INDEX_MAX_KEYS]; /* Union of subkeys in - * splitVector.spl_right */ + Datum spl_rattr[INDEX_MAX_KEYS]; /* Union of subkeys in + * splitVector.spl_right */ bool spl_risnull[INDEX_MAX_KEYS]; bool *spl_dontcare; /* flags tuples which could go to either side @@ -288,7 +288,7 @@ typedef struct int32 blocksCount; /* current # of blocks occupied by buffer */ BlockNumber pageBlocknum; /* temporary file block # */ - GISTNodeBufferPage *pageBuffer; /* in-memory buffer page */ + GISTNodeBufferPage *pageBuffer; /* in-memory buffer page */ /* is this buffer queued for emptying? */ bool queuedForEmptying; @@ -360,8 +360,8 @@ typedef struct GISTBuildBuffers * loaded in main memory. */ GISTNodeBuffer **loadedBuffers; - int loadedBuffersCount; /* # of entries in loadedBuffers */ - int loadedBuffersLen; /* allocated size of loadedBuffers */ + int loadedBuffersCount; /* # of entries in loadedBuffers */ + int loadedBuffersLen; /* allocated size of loadedBuffers */ /* Level of the current root node (= height of the index tree - 1) */ int rootlevel; @@ -522,4 +522,4 @@ extern void gistRelocateBuildBuffersOnSplit(GISTBuildBuffers *gfbb, List *splitinfo); extern void gistUnloadNodeBuffers(GISTBuildBuffers *gfbb); -#endif /* GIST_PRIVATE_H */ +#endif /* GIST_PRIVATE_H */ diff --git a/src/include/access/gistscan.h b/src/include/access/gistscan.h index 017740d14a..2aea6ad309 100644 --- a/src/include/access/gistscan.h +++ b/src/include/access/gistscan.h @@ -21,4 +21,4 @@ extern void gistrescan(IndexScanDesc scan, ScanKey key, int nkeys, ScanKey orderbys, int norderbys); extern void gistendscan(IndexScanDesc scan); -#endif /* GISTSCAN_H */ +#endif /* GISTSCAN_H */ diff --git a/src/include/access/hash.h b/src/include/access/hash.h index 9e8c44bfd3..fec6e6e9a6 100644 --- a/src/include/access/hash.h +++ b/src/include/access/hash.h @@ -145,8 +145,7 @@ typedef struct HashScanOpaqueData */ bool hashso_buc_split; /* info about killed items if any (killedItems is NULL if never used) */ - HashScanPosItem *killedItems; /* tids and offset numbers of killed - * items */ + HashScanPosItem *killedItems; /* tids and offset numbers of killed items */ int numKilled; /* number of currently stored items */ } HashScanOpaqueData; @@ -218,8 +217,8 @@ typedef struct HashMetaPageData uint32 hashm_firstfree; /* lowest-number free ovflpage (bit#) */ uint32 hashm_nmaps; /* number of bitmap pages */ RegProcedure hashm_procid; /* hash procedure id from pg_proc */ - uint32 hashm_spares[HASH_MAX_SPLITPOINTS]; /* spare pages before - * each splitpoint */ + uint32 hashm_spares[HASH_MAX_SPLITPOINTS]; /* spare pages before each + * splitpoint */ BlockNumber hashm_mapp[HASH_MAX_BITMAPS]; /* blknos of ovfl bitmaps */ } HashMetaPageData; @@ -242,7 +241,7 @@ typedef HashMetaPageData *HashMetaPage; /* * Constants */ -#define BYTE_TO_BIT 3 /* 2^3 bits/byte */ +#define BYTE_TO_BIT 3 /* 2^3 bits/byte */ #define ALL_SET ((uint32) ~0) /* @@ -423,4 +422,4 @@ extern void hashbucketcleanup(Relation rel, Bucket cur_bucket, bool bucket_has_garbage, IndexBulkDeleteCallback callback, void *callback_state); -#endif /* HASH_H */ +#endif /* HASH_H */ diff --git a/src/include/access/hash_xlog.h b/src/include/access/hash_xlog.h index b78672f4dc..c778fdc8df 100644 --- a/src/include/access/hash_xlog.h +++ b/src/include/access/hash_xlog.h @@ -24,14 +24,13 @@ /* * XLOG records for hash operations */ -#define XLOG_HASH_INIT_META_PAGE 0x00 /* initialize the meta page */ -#define XLOG_HASH_INIT_BITMAP_PAGE 0x10 /* initialize the bitmap page */ +#define XLOG_HASH_INIT_META_PAGE 0x00 /* initialize the meta page */ +#define XLOG_HASH_INIT_BITMAP_PAGE 0x10 /* initialize the bitmap page */ #define XLOG_HASH_INSERT 0x20 /* add index tuple without split */ #define XLOG_HASH_ADD_OVFL_PAGE 0x30 /* add overflow page */ #define XLOG_HASH_SPLIT_ALLOCATE_PAGE 0x40 /* allocate new page for split */ #define XLOG_HASH_SPLIT_PAGE 0x50 /* split page */ -#define XLOG_HASH_SPLIT_COMPLETE 0x60 /* completion of split - * operation */ +#define XLOG_HASH_SPLIT_COMPLETE 0x60 /* completion of split operation */ #define XLOG_HASH_MOVE_PAGE_CONTENTS 0x70 /* remove tuples from one page * and add to another page */ #define XLOG_HASH_SQUEEZE_PAGE 0x80 /* add tuples to one of the previous @@ -41,11 +40,10 @@ #define XLOG_HASH_SPLIT_CLEANUP 0xA0 /* clear split-cleanup flag in primary * bucket page after deleting tuples * that are moved due to split */ -#define XLOG_HASH_UPDATE_META_PAGE 0xB0 /* update meta page after - * vacuum */ +#define XLOG_HASH_UPDATE_META_PAGE 0xB0 /* update meta page after vacuum */ -#define XLOG_HASH_VACUUM_ONE_PAGE 0xC0 /* remove dead tuples from - * index page */ +#define XLOG_HASH_VACUUM_ONE_PAGE 0xC0 /* remove dead tuples from index + * page */ /* * xl_hash_split_allocate_page flag values, 8 bits are available. @@ -151,9 +149,9 @@ typedef struct xl_hash_split_complete typedef struct xl_hash_move_page_contents { uint16 ntups; - bool is_prim_bucket_same_wrt; /* TRUE if the page to which - * tuples are moved is same as - * primary bucket page */ + bool is_prim_bucket_same_wrt; /* TRUE if the page to which + * tuples are moved is same as + * primary bucket page */ } xl_hash_move_page_contents; #define SizeOfHashMovePageContents \ @@ -176,13 +174,13 @@ typedef struct xl_hash_squeeze_page BlockNumber prevblkno; BlockNumber nextblkno; uint16 ntups; - bool is_prim_bucket_same_wrt; /* TRUE if the page to which - * tuples are moved is same as - * primary bucket page */ - bool is_prev_bucket_same_wrt; /* TRUE if the page to which - * tuples are moved is the - * page previous to the freed - * overflow page */ + bool is_prim_bucket_same_wrt; /* TRUE if the page to which + * tuples are moved is same as + * primary bucket page */ + bool is_prev_bucket_same_wrt; /* TRUE if the page to which + * tuples are moved is the page + * previous to the freed overflow + * page */ } xl_hash_squeeze_page; #define SizeOfHashSqueezePage \ @@ -198,8 +196,8 @@ typedef struct xl_hash_squeeze_page */ typedef struct xl_hash_delete { - bool clear_dead_marking; /* TRUE if this operation clears - * LH_PAGE_HAS_DEAD_TUPLES flag */ + bool clear_dead_marking; /* TRUE if this operation clears + * LH_PAGE_HAS_DEAD_TUPLES flag */ bool is_primary_bucket_page; /* TRUE if the operation is for * primary bucket page */ } xl_hash_delete; @@ -279,4 +277,4 @@ extern void hash_desc(StringInfo buf, XLogReaderState *record); extern const char *hash_identify(uint8 info); extern void hash_mask(char *pagedata, BlockNumber blkno); -#endif /* HASH_XLOG_H */ +#endif /* HASH_XLOG_H */ diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 7e85510d2f..8196587a3a 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -198,4 +198,4 @@ extern BlockNumber ss_get_location(Relation rel, BlockNumber relnblocks); extern void SyncScanShmemInit(void); extern Size SyncScanShmemSize(void); -#endif /* HEAPAM_H */ +#endif /* HEAPAM_H */ diff --git a/src/include/access/heapam_xlog.h b/src/include/access/heapam_xlog.h index b285f172aa..81a6a395c4 100644 --- a/src/include/access/heapam_xlog.h +++ b/src/include/access/heapam_xlog.h @@ -189,7 +189,7 @@ typedef struct xl_heap_update { TransactionId old_xmax; /* xmax of the old tuple */ OffsetNumber old_offnum; /* old tuple's offset */ - uint8 old_infobits_set; /* infomask bits to set on old tuple */ + uint8 old_infobits_set; /* infomask bits to set on old tuple */ uint8 flags; TransactionId new_xmax; /* xmax of the new tuple */ OffsetNumber new_offnum; /* new tuple's offset */ @@ -399,4 +399,4 @@ extern void heap_execute_freeze_tuple(HeapTupleHeader tuple, extern XLogRecPtr log_heap_visible(RelFileNode rnode, Buffer heap_buffer, Buffer vm_buffer, TransactionId cutoff_xid, uint8 flags); -#endif /* HEAPAM_XLOG_H */ +#endif /* HEAPAM_XLOG_H */ diff --git a/src/include/access/hio.h b/src/include/access/hio.h index 6dfa8d5891..4a8beb63a6 100644 --- a/src/include/access/hio.h +++ b/src/include/access/hio.h @@ -30,7 +30,7 @@ */ typedef struct BulkInsertStateData { - BufferAccessStrategy strategy; /* our BULKWRITE strategy object */ + BufferAccessStrategy strategy; /* our BULKWRITE strategy object */ Buffer current_buf; /* current insertion target page */ } BulkInsertStateData; @@ -42,4 +42,4 @@ extern Buffer RelationGetBufferForTuple(Relation relation, Size len, BulkInsertState bistate, Buffer *vmbuffer, Buffer *vmbuffer_other); -#endif /* HIO_H */ +#endif /* HIO_H */ diff --git a/src/include/access/htup.h b/src/include/access/htup.h index 870adf4f77..61b3e68639 100644 --- a/src/include/access/htup.h +++ b/src/include/access/htup.h @@ -85,4 +85,4 @@ extern void HeapTupleHeaderAdjustCmax(HeapTupleHeader tup, /* Prototype for HeapTupleHeader accessors in heapam.c */ extern TransactionId HeapTupleGetUpdateXid(HeapTupleHeader tuple); -#endif /* HTUP_H */ +#endif /* HTUP_H */ diff --git a/src/include/access/htup_details.h b/src/include/access/htup_details.h index e365f4f2b4..3e1676c7e6 100644 --- a/src/include/access/htup_details.h +++ b/src/include/access/htup_details.h @@ -748,7 +748,7 @@ struct MinimalTupleData extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull); -#endif /* defined(DISABLE_COMPLEX_MACRO) */ +#endif /* defined(DISABLE_COMPLEX_MACRO) */ /* ---------------- @@ -821,4 +821,4 @@ extern MinimalTuple heap_copy_minimal_tuple(MinimalTuple mtup); extern HeapTuple heap_tuple_from_minimal_tuple(MinimalTuple mtup); extern MinimalTuple minimal_tuple_from_heap_tuple(HeapTuple htup); -#endif /* HTUP_DETAILS_H */ +#endif /* HTUP_DETAILS_H */ diff --git a/src/include/access/itup.h b/src/include/access/itup.h index ecd7c5c208..a94e7948b4 100644 --- a/src/include/access/itup.h +++ b/src/include/access/itup.h @@ -148,4 +148,4 @@ extern void index_deform_tuple(IndexTuple tup, TupleDesc tupleDescriptor, Datum *values, bool *isnull); extern IndexTuple CopyIndexTuple(IndexTuple source); -#endif /* ITUP_H */ +#endif /* ITUP_H */ diff --git a/src/include/access/multixact.h b/src/include/access/multixact.h index 85997a41fa..d5e18c6733 100644 --- a/src/include/access/multixact.h +++ b/src/include/access/multixact.h @@ -157,4 +157,4 @@ extern const char *multixact_identify(uint8 info); extern char *mxid_to_string(MultiXactId multi, int nmembers, MultiXactMember *members); -#endif /* MULTIXACT_H */ +#endif /* MULTIXACT_H */ diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index 15771ce9e0..e6abbec280 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -421,9 +421,9 @@ typedef BTScanOpaqueData *BTScanOpaque; * to use bits 16-31 (see skey.h). The uppermost bits are copied from the * index's indoption[] array entry for the index attribute. */ -#define SK_BT_REQFWD 0x00010000 /* required to continue forward scan */ -#define SK_BT_REQBKWD 0x00020000 /* required to continue backward scan */ -#define SK_BT_INDOPTION_SHIFT 24 /* must clear the above bits */ +#define SK_BT_REQFWD 0x00010000 /* required to continue forward scan */ +#define SK_BT_REQBKWD 0x00020000 /* required to continue backward scan */ +#define SK_BT_INDOPTION_SHIFT 24 /* must clear the above bits */ #define SK_BT_DESC (INDOPTION_DESC << SK_BT_INDOPTION_SHIFT) #define SK_BT_NULLS_FIRST (INDOPTION_NULLS_FIRST << SK_BT_INDOPTION_SHIFT) @@ -556,4 +556,4 @@ extern void _bt_spool(BTSpool *btspool, ItemPointer self, Datum *values, bool *isnull); extern void _bt_leafbuild(BTSpool *btspool, BTSpool *spool2); -#endif /* NBTREE_H */ +#endif /* NBTREE_H */ diff --git a/src/include/access/nbtxlog.h b/src/include/access/nbtxlog.h index d6a3085923..a46e9c36f3 100644 --- a/src/include/access/nbtxlog.h +++ b/src/include/access/nbtxlog.h @@ -32,9 +32,9 @@ #define XLOG_BTREE_SPLIT_R_ROOT 0x60 /* as above, new item on right */ #define XLOG_BTREE_DELETE 0x70 /* delete leaf index tuples for a page */ #define XLOG_BTREE_UNLINK_PAGE 0x80 /* delete a half-dead page */ -#define XLOG_BTREE_UNLINK_PAGE_META 0x90 /* same, and update metapage */ +#define XLOG_BTREE_UNLINK_PAGE_META 0x90 /* same, and update metapage */ #define XLOG_BTREE_NEWROOT 0xA0 /* new root page */ -#define XLOG_BTREE_MARK_PAGE_HALFDEAD 0xB0 /* mark a leaf as half-dead */ +#define XLOG_BTREE_MARK_PAGE_HALFDEAD 0xB0 /* mark a leaf as half-dead */ #define XLOG_BTREE_VACUUM 0xC0 /* delete entries on a page during * vacuum */ #define XLOG_BTREE_REUSE_PAGE 0xD0 /* old page is about to be reused from @@ -252,4 +252,4 @@ extern void btree_desc(StringInfo buf, XLogReaderState *record); extern const char *btree_identify(uint8 info); extern void btree_mask(char *pagedata, BlockNumber blkno); -#endif /* NBXLOG_H */ +#endif /* NBXLOG_H */ diff --git a/src/include/access/parallel.h b/src/include/access/parallel.h index 590e27a484..e3e0cecf1e 100644 --- a/src/include/access/parallel.h +++ b/src/include/access/parallel.h @@ -67,4 +67,4 @@ extern void ParallelWorkerReportLastRecEnd(XLogRecPtr last_xlog_end); extern void ParallelWorkerMain(Datum main_arg); -#endif /* PARALLEL_H */ +#endif /* PARALLEL_H */ diff --git a/src/include/access/printsimple.h b/src/include/access/printsimple.h index 3f3e7a3840..edf28cece9 100644 --- a/src/include/access/printsimple.h +++ b/src/include/access/printsimple.h @@ -20,4 +20,4 @@ extern bool printsimple(TupleTableSlot *slot, DestReceiver *self); extern void printsimple_startup(DestReceiver *self, int operation, TupleDesc tupdesc); -#endif /* PRINTSIMPLE_H */ +#endif /* PRINTSIMPLE_H */ diff --git a/src/include/access/printtup.h b/src/include/access/printtup.h index a828889c4f..641715e416 100644 --- a/src/include/access/printtup.h +++ b/src/include/access/printtup.h @@ -32,4 +32,4 @@ extern void spi_dest_startup(DestReceiver *self, int operation, TupleDesc typeinfo); extern bool spi_printtup(TupleTableSlot *slot, DestReceiver *self); -#endif /* PRINTTUP_H */ +#endif /* PRINTTUP_H */ diff --git a/src/include/access/reloptions.h b/src/include/access/reloptions.h index 91b2cd7bb2..5cdaa3bff1 100644 --- a/src/include/access/reloptions.h +++ b/src/include/access/reloptions.h @@ -280,4 +280,4 @@ extern bytea *attribute_reloptions(Datum reloptions, bool validate); extern bytea *tablespace_reloptions(Datum reloptions, bool validate); extern LOCKMODE AlterTableGetRelOptionsLockLevel(List *defList); -#endif /* RELOPTIONS_H */ +#endif /* RELOPTIONS_H */ diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h index 5247692d35..a20646b2b7 100644 --- a/src/include/access/relscan.h +++ b/src/include/access/relscan.h @@ -89,14 +89,14 @@ typedef struct IndexScanDescData Relation indexRelation; /* index relation descriptor */ Snapshot xs_snapshot; /* snapshot to see */ int numberOfKeys; /* number of index qualifier conditions */ - int numberOfOrderBys; /* number of ordering operators */ + int numberOfOrderBys; /* number of ordering operators */ ScanKey keyData; /* array of index qualifier descriptors */ ScanKey orderByData; /* array of ordering op descriptors */ bool xs_want_itup; /* caller requests index tuples */ bool xs_temp_snap; /* unregister snapshot at scan end? */ /* signaling to index AM about killing index tuples */ - bool kill_prior_tuple; /* last-returned tuple is dead */ + bool kill_prior_tuple; /* last-returned tuple is dead */ bool ignore_killed_tuples; /* do not return killed entries */ bool xactStartedInRecovery; /* prevents killing/seeing killed * tuples */ @@ -158,4 +158,4 @@ typedef struct SysScanDescData Snapshot snapshot; /* snapshot to unregister at end of scan */ } SysScanDescData; -#endif /* RELSCAN_H */ +#endif /* RELSCAN_H */ diff --git a/src/include/access/rewriteheap.h b/src/include/access/rewriteheap.h index 564c2ad0f5..91ff36707a 100644 --- a/src/include/access/rewriteheap.h +++ b/src/include/access/rewriteheap.h @@ -54,4 +54,4 @@ typedef struct LogicalRewriteMappingData #define LOGICAL_REWRITE_FORMAT "map-%x-%x-%X_%X-%x-%x" void CheckPointLogicalRewriteHeap(void); -#endif /* REWRITE_HEAP_H */ +#endif /* REWRITE_HEAP_H */ diff --git a/src/include/access/rmgr.h b/src/include/access/rmgr.h index 64b92ff33a..c9b5c56a4c 100644 --- a/src/include/access/rmgr.h +++ b/src/include/access/rmgr.h @@ -32,4 +32,4 @@ typedef enum RmgrIds #define RM_MAX_ID (RM_NEXT_ID - 1) -#endif /* RMGR_H */ +#endif /* RMGR_H */ diff --git a/src/include/access/sdir.h b/src/include/access/sdir.h index 347e910a41..65eab48551 100644 --- a/src/include/access/sdir.h +++ b/src/include/access/sdir.h @@ -55,4 +55,4 @@ typedef enum ScanDirection #define ScanDirectionIsForward(direction) \ ((bool) ((direction) == ForwardScanDirection)) -#endif /* SDIR_H */ +#endif /* SDIR_H */ diff --git a/src/include/access/skey.h b/src/include/access/skey.h index 01cc940363..2f4814f140 100644 --- a/src/include/access/skey.h +++ b/src/include/access/skey.h @@ -112,16 +112,15 @@ typedef ScanKeyData *ScanKey; * bits should be defined here). Bits 16-31 are reserved for use within * individual index access methods. */ -#define SK_ISNULL 0x0001 /* sk_argument is NULL */ -#define SK_UNARY 0x0002 /* unary operator (not supported!) */ -#define SK_ROW_HEADER 0x0004 /* row comparison header (see above) */ -#define SK_ROW_MEMBER 0x0008 /* row comparison member (see above) */ -#define SK_ROW_END 0x0010 /* last row comparison member */ -#define SK_SEARCHARRAY 0x0020 /* scankey represents ScalarArrayOp */ -#define SK_SEARCHNULL 0x0040 /* scankey represents "col IS NULL" */ -#define SK_SEARCHNOTNULL 0x0080 /* scankey represents "col IS NOT - * NULL" */ -#define SK_ORDER_BY 0x0100 /* scankey is for ORDER BY op */ +#define SK_ISNULL 0x0001 /* sk_argument is NULL */ +#define SK_UNARY 0x0002 /* unary operator (not supported!) */ +#define SK_ROW_HEADER 0x0004 /* row comparison header (see above) */ +#define SK_ROW_MEMBER 0x0008 /* row comparison member (see above) */ +#define SK_ROW_END 0x0010 /* last row comparison member */ +#define SK_SEARCHARRAY 0x0020 /* scankey represents ScalarArrayOp */ +#define SK_SEARCHNULL 0x0040 /* scankey represents "col IS NULL" */ +#define SK_SEARCHNOTNULL 0x0080 /* scankey represents "col IS NOT NULL" */ +#define SK_ORDER_BY 0x0100 /* scankey is for ORDER BY op */ /* @@ -149,4 +148,4 @@ extern void ScanKeyEntryInitializeWithInfo(ScanKey entry, FmgrInfo *finfo, Datum argument); -#endif /* SKEY_H */ +#endif /* SKEY_H */ diff --git a/src/include/access/slru.h b/src/include/access/slru.h index 42d0bb72ed..f1b4d6cc9d 100644 --- a/src/include/access/slru.h +++ b/src/include/access/slru.h @@ -165,4 +165,4 @@ extern bool SlruScanDirCbReportPresence(SlruCtl ctl, char *filename, extern bool SlruScanDirCbDeleteAll(SlruCtl ctl, char *filename, int segpage, void *data); -#endif /* SLRU_H */ +#endif /* SLRU_H */ diff --git a/src/include/access/spgist.h b/src/include/access/spgist.h index 9dca8fde7d..d1bc396e6d 100644 --- a/src/include/access/spgist.h +++ b/src/include/access/spgist.h @@ -74,33 +74,33 @@ typedef enum spgChooseResultType typedef struct spgChooseOut { - spgChooseResultType resultType; /* action code, see above */ + spgChooseResultType resultType; /* action code, see above */ union { struct /* results for spgMatchNode */ { int nodeN; /* descend to this node (index from 0) */ - int levelAdd; /* increment level by this much */ - Datum restDatum; /* new leaf datum */ + int levelAdd; /* increment level by this much */ + Datum restDatum; /* new leaf datum */ } matchNode; struct /* results for spgAddNode */ { - Datum nodeLabel; /* new node's label */ + Datum nodeLabel; /* new node's label */ int nodeN; /* where to insert it (index from 0) */ } addNode; struct /* results for spgSplitTuple */ { /* Info to form new upper-level inner tuple with one child tuple */ - bool prefixHasPrefix; /* tuple should have a prefix? */ - Datum prefixPrefixDatum; /* if so, its value */ + bool prefixHasPrefix; /* tuple should have a prefix? */ + Datum prefixPrefixDatum; /* if so, its value */ int prefixNNodes; /* number of nodes */ - Datum *prefixNodeLabels; /* their labels (or NULL for - * no labels) */ - int childNodeN; /* which node gets child tuple */ + Datum *prefixNodeLabels; /* their labels (or NULL for no + * labels) */ + int childNodeN; /* which node gets child tuple */ /* Info to form new lower-level inner tuple with all old nodes */ - bool postfixHasPrefix; /* tuple should have a prefix? */ - Datum postfixPrefixDatum; /* if so, its value */ + bool postfixHasPrefix; /* tuple should have a prefix? */ + Datum postfixPrefixDatum; /* if so, its value */ } splitTuple; } result; } spgChooseOut; @@ -123,7 +123,7 @@ typedef struct spgPickSplitOut int nNodes; /* number of nodes for new inner tuple */ Datum *nodeLabels; /* their labels (or NULL for no labels) */ - int *mapTuplesToNodes; /* node index for each leaf tuple */ + int *mapTuplesToNodes; /* node index for each leaf tuple */ Datum *leafTupleDatums; /* datum to store in each new leaf tuple */ } spgPickSplitOut; @@ -135,10 +135,9 @@ typedef struct spgInnerConsistentIn ScanKey scankeys; /* array of operators and comparison values */ int nkeys; /* length of array */ - Datum reconstructedValue; /* value reconstructed at parent */ + Datum reconstructedValue; /* value reconstructed at parent */ void *traversalValue; /* opclass-specific traverse value */ - MemoryContext traversalMemoryContext; /* put new traverse values - * here */ + MemoryContext traversalMemoryContext; /* put new traverse values here */ int level; /* current level (counting from zero) */ bool returnData; /* original data must be returned? */ @@ -167,7 +166,7 @@ typedef struct spgLeafConsistentIn ScanKey scankeys; /* array of operators and comparison values */ int nkeys; /* length of array */ - Datum reconstructedValue; /* value reconstructed at parent */ + Datum reconstructedValue; /* value reconstructed at parent */ void *traversalValue; /* opclass-specific traverse value */ int level; /* current level (counting from zero) */ bool returnData; /* original data must be returned? */ @@ -214,4 +213,4 @@ extern IndexBulkDeleteResult *spgvacuumcleanup(IndexVacuumInfo *info, /* spgvalidate.c */ extern bool spgvalidate(Oid opclassoid); -#endif /* SPGIST_H */ +#endif /* SPGIST_H */ diff --git a/src/include/access/spgist_private.h b/src/include/access/spgist_private.h index 4072c050de..1c4b321b6c 100644 --- a/src/include/access/spgist_private.h +++ b/src/include/access/spgist_private.h @@ -48,8 +48,8 @@ typedef SpGistPageOpaqueData *SpGistPageOpaque; /* Flag bits in page special space */ #define SPGIST_META (1<<0) -#define SPGIST_DELETED (1<<1) /* never set, but keep for backwards - * compatibility */ +#define SPGIST_DELETED (1<<1) /* never set, but keep for backwards + * compatibility */ #define SPGIST_LEAF (1<<2) #define SPGIST_NULLS (1<<3) @@ -94,7 +94,7 @@ typedef struct SpGistLUPCache typedef struct SpGistMetaPageData { uint32 magicNumber; /* for identity cross-check */ - SpGistLUPCache lastUsedPages; /* shared storage of last-used info */ + SpGistLUPCache lastUsedPages; /* shared storage of last-used info */ } SpGistMetaPageData; #define SPGIST_MAGIC_NUMBER (0xBA0BABEE) @@ -120,10 +120,10 @@ typedef struct SpGistState spgConfigOut config; /* filled in by opclass config method */ SpGistTypeDesc attType; /* type of input data and leaf values */ - SpGistTypeDesc attPrefixType; /* type of inner-tuple prefix values */ + SpGistTypeDesc attPrefixType; /* type of inner-tuple prefix values */ SpGistTypeDesc attLabelType; /* type of node label values */ - char *deadTupleStorage; /* workspace for spgFormDeadTuple */ + char *deadTupleStorage; /* workspace for spgFormDeadTuple */ TransactionId myXid; /* XID to use when creating a redirect tuple */ bool isBuild; /* true if doing index build */ @@ -159,7 +159,7 @@ typedef struct SpGistScanOpaqueData int iPtr; /* index for scanning through same */ ItemPointerData heapPtrs[MaxIndexTuplesPerPage]; /* TIDs from cur page */ bool recheck[MaxIndexTuplesPerPage]; /* their recheck flags */ - HeapTuple reconTups[MaxIndexTuplesPerPage]; /* reconstructed tuples */ + HeapTuple reconTups[MaxIndexTuplesPerPage]; /* reconstructed tuples */ /* * Note: using MaxIndexTuplesPerPage above is a bit hokey since @@ -179,10 +179,10 @@ typedef struct SpGistCache spgConfigOut config; /* filled in by opclass config method */ SpGistTypeDesc attType; /* type of input data and leaf values */ - SpGistTypeDesc attPrefixType; /* type of inner-tuple prefix values */ + SpGistTypeDesc attPrefixType; /* type of inner-tuple prefix values */ SpGistTypeDesc attLabelType; /* type of node label values */ - SpGistLUPCache lastUsedPages; /* local storage of last-used info */ + SpGistLUPCache lastUsedPages; /* local storage of last-used info */ } SpGistCache; @@ -418,4 +418,4 @@ extern void spgPageIndexMultiDelete(SpGistState *state, Page page, extern bool spgdoinsert(Relation index, SpGistState *state, ItemPointer heapPtr, Datum datum, bool isnull); -#endif /* SPGIST_PRIVATE_H */ +#endif /* SPGIST_PRIVATE_H */ diff --git a/src/include/access/spgxlog.h b/src/include/access/spgxlog.h index ff597f75db..cf4331be4a 100644 --- a/src/include/access/spgxlog.h +++ b/src/include/access/spgxlog.h @@ -238,7 +238,7 @@ typedef struct spgxlogVacuumRoot typedef struct spgxlogVacuumRedirect { uint16 nToPlaceholder; /* number of redirects to make placeholders */ - OffsetNumber firstPlaceholder; /* first placeholder tuple to remove */ + OffsetNumber firstPlaceholder; /* first placeholder tuple to remove */ TransactionId newestRedirectXid; /* newest XID of removed redirects */ /* offsets of redirect tuples to make placeholders follow */ @@ -254,4 +254,4 @@ extern void spg_xlog_startup(void); extern void spg_xlog_cleanup(void); extern void spg_mask(char *pagedata, BlockNumber blkno); -#endif /* SPGXLOG_H */ +#endif /* SPGXLOG_H */ diff --git a/src/include/access/stratnum.h b/src/include/access/stratnum.h index 489e5c595e..91d57605b2 100644 --- a/src/include/access/stratnum.h +++ b/src/include/access/stratnum.h @@ -41,35 +41,35 @@ typedef uint16 StrategyNumber; * The first few of these come from the R-Tree indexing method (hence the * names); the others have been added over time as they have been needed. */ -#define RTLeftStrategyNumber 1 /* for << */ -#define RTOverLeftStrategyNumber 2 /* for &< */ -#define RTOverlapStrategyNumber 3 /* for && */ -#define RTOverRightStrategyNumber 4 /* for &> */ -#define RTRightStrategyNumber 5 /* for >> */ -#define RTSameStrategyNumber 6 /* for ~= */ -#define RTContainsStrategyNumber 7 /* for @> */ -#define RTContainedByStrategyNumber 8 /* for <@ */ -#define RTOverBelowStrategyNumber 9 /* for &<| */ -#define RTBelowStrategyNumber 10 /* for <<| */ -#define RTAboveStrategyNumber 11 /* for |>> */ -#define RTOverAboveStrategyNumber 12 /* for |&> */ -#define RTOldContainsStrategyNumber 13 /* for old spelling of @> */ -#define RTOldContainedByStrategyNumber 14 /* for old spelling of <@ */ -#define RTKNNSearchStrategyNumber 15 /* for <-> (distance) */ -#define RTContainsElemStrategyNumber 16 /* for range types @> elem */ -#define RTAdjacentStrategyNumber 17 /* for -|- */ -#define RTEqualStrategyNumber 18 /* for = */ -#define RTNotEqualStrategyNumber 19 /* for != */ -#define RTLessStrategyNumber 20 /* for < */ -#define RTLessEqualStrategyNumber 21 /* for <= */ -#define RTGreaterStrategyNumber 22 /* for > */ -#define RTGreaterEqualStrategyNumber 23 /* for >= */ -#define RTSubStrategyNumber 24 /* for inet >> */ -#define RTSubEqualStrategyNumber 25 /* for inet <<= */ -#define RTSuperStrategyNumber 26 /* for inet << */ -#define RTSuperEqualStrategyNumber 27 /* for inet >>= */ +#define RTLeftStrategyNumber 1 /* for << */ +#define RTOverLeftStrategyNumber 2 /* for &< */ +#define RTOverlapStrategyNumber 3 /* for && */ +#define RTOverRightStrategyNumber 4 /* for &> */ +#define RTRightStrategyNumber 5 /* for >> */ +#define RTSameStrategyNumber 6 /* for ~= */ +#define RTContainsStrategyNumber 7 /* for @> */ +#define RTContainedByStrategyNumber 8 /* for <@ */ +#define RTOverBelowStrategyNumber 9 /* for &<| */ +#define RTBelowStrategyNumber 10 /* for <<| */ +#define RTAboveStrategyNumber 11 /* for |>> */ +#define RTOverAboveStrategyNumber 12 /* for |&> */ +#define RTOldContainsStrategyNumber 13 /* for old spelling of @> */ +#define RTOldContainedByStrategyNumber 14 /* for old spelling of <@ */ +#define RTKNNSearchStrategyNumber 15 /* for <-> (distance) */ +#define RTContainsElemStrategyNumber 16 /* for range types @> elem */ +#define RTAdjacentStrategyNumber 17 /* for -|- */ +#define RTEqualStrategyNumber 18 /* for = */ +#define RTNotEqualStrategyNumber 19 /* for != */ +#define RTLessStrategyNumber 20 /* for < */ +#define RTLessEqualStrategyNumber 21 /* for <= */ +#define RTGreaterStrategyNumber 22 /* for > */ +#define RTGreaterEqualStrategyNumber 23 /* for >= */ +#define RTSubStrategyNumber 24 /* for inet >> */ +#define RTSubEqualStrategyNumber 25 /* for inet <<= */ +#define RTSuperStrategyNumber 26 /* for inet << */ +#define RTSuperEqualStrategyNumber 27 /* for inet >>= */ #define RTMaxStrategyNumber 27 -#endif /* STRATNUM_H */ +#endif /* STRATNUM_H */ diff --git a/src/include/access/subtrans.h b/src/include/access/subtrans.h index 847359873a..41716d7b71 100644 --- a/src/include/access/subtrans.h +++ b/src/include/access/subtrans.h @@ -27,4 +27,4 @@ extern void CheckPointSUBTRANS(void); extern void ExtendSUBTRANS(TransactionId newestXact); extern void TruncateSUBTRANS(TransactionId oldestXact); -#endif /* SUBTRANS_H */ +#endif /* SUBTRANS_H */ diff --git a/src/include/access/sysattr.h b/src/include/access/sysattr.h index c03d3ffb43..b88c5e1141 100644 --- a/src/include/access/sysattr.h +++ b/src/include/access/sysattr.h @@ -27,4 +27,4 @@ #define TableOidAttributeNumber (-7) #define FirstLowInvalidHeapAttributeNumber (-8) -#endif /* SYSATTR_H */ +#endif /* SYSATTR_H */ diff --git a/src/include/access/timeline.h b/src/include/access/timeline.h index c1911feb16..4bdb0c1f4f 100644 --- a/src/include/access/timeline.h +++ b/src/include/access/timeline.h @@ -41,4 +41,4 @@ extern TimeLineID tliOfPointInHistory(XLogRecPtr ptr, List *history); extern XLogRecPtr tliSwitchPoint(TimeLineID tli, List *history, TimeLineID *nextTLI); -#endif /* TIMELINE_H */ +#endif /* TIMELINE_H */ diff --git a/src/include/access/transam.h b/src/include/access/transam.h index d25a2dd207..86076dede1 100644 --- a/src/include/access/transam.h +++ b/src/include/access/transam.h @@ -183,4 +183,4 @@ extern void AdvanceOldestClogXid(TransactionId oldest_datfrozenxid); extern bool ForceTransactionIdLimitUpdate(void); extern Oid GetNewObjectId(void); -#endif /* TRAMSAM_H */ +#endif /* TRAMSAM_H */ diff --git a/src/include/access/tsmapi.h b/src/include/access/tsmapi.h index 8ba750299f..3d94cc6466 100644 --- a/src/include/access/tsmapi.h +++ b/src/include/access/tsmapi.h @@ -67,15 +67,15 @@ typedef struct TsmRoutine SampleScanGetSampleSize_function SampleScanGetSampleSize; /* Functions for executing a SampleScan on a physical table */ - InitSampleScan_function InitSampleScan; /* can be NULL */ + InitSampleScan_function InitSampleScan; /* can be NULL */ BeginSampleScan_function BeginSampleScan; NextSampleBlock_function NextSampleBlock; /* can be NULL */ NextSampleTuple_function NextSampleTuple; - EndSampleScan_function EndSampleScan; /* can be NULL */ + EndSampleScan_function EndSampleScan; /* can be NULL */ } TsmRoutine; /* Functions in access/tablesample/tablesample.c */ extern TsmRoutine *GetTsmRoutine(Oid tsmhandler); -#endif /* TSMAPI_H */ +#endif /* TSMAPI_H */ diff --git a/src/include/access/tupconvert.h b/src/include/access/tupconvert.h index e86cfd56c8..173904adae 100644 --- a/src/include/access/tupconvert.h +++ b/src/include/access/tupconvert.h @@ -46,4 +46,4 @@ extern HeapTuple do_convert_tuple(HeapTuple tuple, TupleConversionMap *map); extern void free_conversion_map(TupleConversionMap *map); -#endif /* TUPCONVERT_H */ +#endif /* TUPCONVERT_H */ diff --git a/src/include/access/tupdesc.h b/src/include/access/tupdesc.h index 0d1e263013..e7065d70ba 100644 --- a/src/include/access/tupdesc.h +++ b/src/include/access/tupdesc.h @@ -134,4 +134,4 @@ extern TupleDesc BuildDescForRelation(List *schema); extern TupleDesc BuildDescFromLists(List *names, List *types, List *typmods, List *collations); -#endif /* TUPDESC_H */ +#endif /* TUPDESC_H */ diff --git a/src/include/access/tupmacs.h b/src/include/access/tupmacs.h index b5369108cc..6746203828 100644 --- a/src/include/access/tupmacs.h +++ b/src/include/access/tupmacs.h @@ -88,7 +88,7 @@ : \ PointerGetDatum((char *) (T)) \ ) -#endif /* SIZEOF_DATUM == 8 */ +#endif /* SIZEOF_DATUM == 8 */ /* * att_align_datum aligns the given offset as needed for a datum of alignment @@ -238,6 +238,6 @@ break; \ } \ } while (0) -#endif /* SIZEOF_DATUM == 8 */ +#endif /* SIZEOF_DATUM == 8 */ #endif diff --git a/src/include/access/tuptoaster.h b/src/include/access/tuptoaster.h index 6a5880e238..fd9f83ac44 100644 --- a/src/include/access/tuptoaster.h +++ b/src/include/access/tuptoaster.h @@ -84,7 +84,7 @@ * * NB: Changing TOAST_MAX_CHUNK_SIZE requires an initdb. */ -#define EXTERN_TUPLES_PER_PAGE 4 /* tweak only this */ +#define EXTERN_TUPLES_PER_PAGE 4 /* tweak only this */ #define EXTERN_TUPLE_MAX_SIZE MaximumBytesPerTuple(EXTERN_TUPLES_PER_PAGE) @@ -236,4 +236,4 @@ extern Size toast_datum_size(Datum value); */ extern Oid toast_get_valid_index(Oid toastoid, LOCKMODE lock); -#endif /* TUPTOASTER_H */ +#endif /* TUPTOASTER_H */ diff --git a/src/include/access/twophase.h b/src/include/access/twophase.h index 2aab1f93a6..54dec4eeaf 100644 --- a/src/include/access/twophase.h +++ b/src/include/access/twophase.h @@ -57,4 +57,4 @@ extern void PrepareRedoAdd(char *buf, XLogRecPtr start_lsn, XLogRecPtr end_lsn); extern void PrepareRedoRemove(TransactionId xid, bool giveWarning); extern void restoreTwoPhaseData(void); -#endif /* TWOPHASE_H */ +#endif /* TWOPHASE_H */ diff --git a/src/include/access/twophase_rmgr.h b/src/include/access/twophase_rmgr.h index ed2067b7fb..44cd6d202f 100644 --- a/src/include/access/twophase_rmgr.h +++ b/src/include/access/twophase_rmgr.h @@ -37,4 +37,4 @@ extern const TwoPhaseCallback twophase_standby_recover_callbacks[]; extern void RegisterTwoPhaseRecord(TwoPhaseRmgrId rmid, uint16 info, const void *data, uint32 len); -#endif /* TWOPHASE_RMGR_H */ +#endif /* TWOPHASE_RMGR_H */ diff --git a/src/include/access/valid.h b/src/include/access/valid.h index 72f2bb6ac2..53a7d0685a 100644 --- a/src/include/access/valid.h +++ b/src/include/access/valid.h @@ -66,4 +66,4 @@ do \ } \ } while (0) -#endif /* VALID_H */ +#endif /* VALID_H */ diff --git a/src/include/access/visibilitymap.h b/src/include/access/visibilitymap.h index a3796f2902..da0e76d6be 100644 --- a/src/include/access/visibilitymap.h +++ b/src/include/access/visibilitymap.h @@ -25,8 +25,8 @@ /* Flags for bit map */ #define VISIBILITYMAP_ALL_VISIBLE 0x01 #define VISIBILITYMAP_ALL_FROZEN 0x02 -#define VISIBILITYMAP_VALID_BITS 0x03 /* OR of all valid - * visibilitymap flags bits */ +#define VISIBILITYMAP_VALID_BITS 0x03 /* OR of all valid visibilitymap + * flags bits */ /* Macros for visibilitymap test */ #define VM_ALL_VISIBLE(r, b, v) \ @@ -46,4 +46,4 @@ extern uint8 visibilitymap_get_status(Relation rel, BlockNumber heapBlk, Buffer extern void visibilitymap_count(Relation rel, BlockNumber *all_visible, BlockNumber *all_frozen); extern void visibilitymap_truncate(Relation rel, BlockNumber nheapblocks); -#endif /* VISIBILITYMAP_H */ +#endif /* VISIBILITYMAP_H */ diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 50bace80de..ad5aad96df 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -57,12 +57,11 @@ extern bool XactDeferrable; typedef enum { SYNCHRONOUS_COMMIT_OFF, /* asynchronous commit */ - SYNCHRONOUS_COMMIT_LOCAL_FLUSH, /* wait for local flush only */ + SYNCHRONOUS_COMMIT_LOCAL_FLUSH, /* wait for local flush only */ SYNCHRONOUS_COMMIT_REMOTE_WRITE, /* wait for local flush and remote * write */ SYNCHRONOUS_COMMIT_REMOTE_FLUSH, /* wait for local and remote flush */ - SYNCHRONOUS_COMMIT_REMOTE_APPLY /* wait for local flush and remote - * apply */ + SYNCHRONOUS_COMMIT_REMOTE_APPLY /* wait for local flush and remote apply */ } SyncCommitLevel; /* Define the default setting for synchronous_commit */ @@ -405,4 +404,4 @@ extern void EnterParallelMode(void); extern void ExitParallelMode(void); extern bool IsInParallelMode(void); -#endif /* XACT_H */ +#endif /* XACT_H */ diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index e00ab12d2e..49afdfb374 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -24,9 +24,9 @@ /* Sync methods */ #define SYNC_METHOD_FSYNC 0 #define SYNC_METHOD_FDATASYNC 1 -#define SYNC_METHOD_OPEN 2 /* for O_SYNC */ +#define SYNC_METHOD_OPEN 2 /* for O_SYNC */ #define SYNC_METHOD_FSYNC_WRITETHROUGH 3 -#define SYNC_METHOD_OPEN_DSYNC 4 /* for O_DSYNC */ +#define SYNC_METHOD_OPEN_DSYNC 4 /* for O_DSYNC */ extern int sync_method; extern PGDLLIMPORT TimeLineID ThisTimeLineID; /* current TLI */ @@ -173,9 +173,8 @@ extern bool XLOG_DEBUG; /* These directly affect the behavior of CreateCheckPoint and subsidiaries */ #define CHECKPOINT_IS_SHUTDOWN 0x0001 /* Checkpoint is for shutdown */ -#define CHECKPOINT_END_OF_RECOVERY 0x0002 /* Like shutdown checkpoint, - * but issued at end of WAL - * recovery */ +#define CHECKPOINT_END_OF_RECOVERY 0x0002 /* Like shutdown checkpoint, but + * issued at end of WAL recovery */ #define CHECKPOINT_IMMEDIATE 0x0004 /* Do it without delays */ #define CHECKPOINT_FORCE 0x0008 /* Force even if no activity */ #define CHECKPOINT_FLUSH_ALL 0x0010 /* Flush all pages, including those @@ -202,18 +201,18 @@ typedef struct CheckpointStatsData TimestampTz ckpt_sync_end_t; /* end of fsyncs */ TimestampTz ckpt_end_t; /* end of checkpoint */ - int ckpt_bufs_written; /* # of buffers written */ + int ckpt_bufs_written; /* # of buffers written */ int ckpt_segs_added; /* # of new xlog segments created */ - int ckpt_segs_removed; /* # of xlog segments deleted */ - int ckpt_segs_recycled; /* # of xlog segments recycled */ + int ckpt_segs_removed; /* # of xlog segments deleted */ + int ckpt_segs_recycled; /* # of xlog segments recycled */ int ckpt_sync_rels; /* # of relations synced */ - uint64 ckpt_longest_sync; /* Longest sync for one relation */ - uint64 ckpt_agg_sync_time; /* The sum of all the individual sync - * times, which is not necessarily the - * same as the total elapsed time for - * the entire sync phase. */ + uint64 ckpt_longest_sync; /* Longest sync for one relation */ + uint64 ckpt_agg_sync_time; /* The sum of all the individual sync + * times, which is not necessarily the + * same as the total elapsed time for the + * entire sync phase. */ } CheckpointStatsData; extern CheckpointStatsData CheckpointStats; @@ -324,4 +323,4 @@ extern SessionBackupState get_backup_status(void); #define TABLESPACE_MAP "tablespace_map" #define TABLESPACE_MAP_OLD "tablespace_map.old" -#endif /* XLOG_H */ +#endif /* XLOG_H */ diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h index 6e2bfd0ad0..a661ec0180 100644 --- a/src/include/access/xlog_internal.h +++ b/src/include/access/xlog_internal.h @@ -319,4 +319,4 @@ extern bool XLogArchiveIsReady(const char *xlog); extern bool XLogArchiveIsReadyOrDone(const char *xlog); extern void XLogArchiveCleanup(const char *xlog); -#endif /* XLOG_INTERNAL_H */ +#endif /* XLOG_INTERNAL_H */ diff --git a/src/include/access/xlogdefs.h b/src/include/access/xlogdefs.h index 0f07bb2674..3a80d6be6f 100644 --- a/src/include/access/xlogdefs.h +++ b/src/include/access/xlogdefs.h @@ -99,4 +99,4 @@ typedef uint16 RepOriginId; #define DEFAULT_SYNC_METHOD SYNC_METHOD_FSYNC #endif -#endif /* XLOG_DEFS_H */ +#endif /* XLOG_DEFS_H */ diff --git a/src/include/access/xloginsert.h b/src/include/access/xloginsert.h index d0d005a557..174c88677f 100644 --- a/src/include/access/xloginsert.h +++ b/src/include/access/xloginsert.h @@ -29,9 +29,8 @@ /* flags for XLogRegisterBuffer */ #define REGBUF_FORCE_IMAGE 0x01 /* force a full-page image */ #define REGBUF_NO_IMAGE 0x02 /* don't take a full-page image */ -#define REGBUF_WILL_INIT (0x04 | 0x02) /* page will be re-initialized - * at replay (implies - * NO_IMAGE) */ +#define REGBUF_WILL_INIT (0x04 | 0x02) /* page will be re-initialized at + * replay (implies NO_IMAGE) */ #define REGBUF_STANDARD 0x08 /* page follows "standard" page layout, * (data between pd_lower and pd_upper * will be skipped) */ @@ -59,4 +58,4 @@ extern XLogRecPtr XLogSaveBufferForHint(Buffer buffer, bool buffer_std); extern void InitXLogInsert(void); -#endif /* XLOGINSERT_H */ +#endif /* XLOGINSERT_H */ diff --git a/src/include/access/xlogreader.h b/src/include/access/xlogreader.h index 51843a2807..7671598334 100644 --- a/src/include/access/xlogreader.h +++ b/src/include/access/xlogreader.h @@ -204,7 +204,7 @@ extern void XLogReaderInvalReadState(XLogReaderState *state); #ifdef FRONTEND extern XLogRecPtr XLogFindNextRecord(XLogReaderState *state, XLogRecPtr RecPtr); -#endif /* FRONTEND */ +#endif /* FRONTEND */ /* Functions for decoding an XLogRecord */ @@ -233,4 +233,4 @@ extern bool XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id, RelFileNode *rnode, ForkNumber *forknum, BlockNumber *blknum); -#endif /* XLOGREADER_H */ +#endif /* XLOGREADER_H */ diff --git a/src/include/access/xlogrecord.h b/src/include/access/xlogrecord.h index 1a8dcf2cce..b53960e112 100644 --- a/src/include/access/xlogrecord.h +++ b/src/include/access/xlogrecord.h @@ -145,7 +145,7 @@ typedef struct XLogRecordBlockImageHeader /* Information stored in bimg_info */ #define BKPIMAGE_HAS_HOLE 0x01 /* page image has "hole" */ -#define BKPIMAGE_IS_COMPRESSED 0x02 /* page image is compressed */ +#define BKPIMAGE_IS_COMPRESSED 0x02 /* page image is compressed */ #define BKPIMAGE_APPLY 0x04 /* page image should be restored during * replay */ @@ -225,4 +225,4 @@ typedef struct XLogRecordDataHeaderLong #define XLR_BLOCK_ID_DATA_LONG 254 #define XLR_BLOCK_ID_ORIGIN 253 -#endif /* XLOGRECORD_H */ +#endif /* XLOGRECORD_H */ diff --git a/src/include/bootstrap/bootstrap.h b/src/include/bootstrap/bootstrap.h index cb123e4d64..35eb9a4ff5 100644 --- a/src/include/bootstrap/bootstrap.h +++ b/src/include/bootstrap/bootstrap.h @@ -63,4 +63,4 @@ extern int boot_yyparse(void); extern int boot_yylex(void); extern void boot_yyerror(const char *str) pg_attribute_noreturn(); -#endif /* BOOTSTRAP_H */ +#endif /* BOOTSTRAP_H */ diff --git a/src/include/c.h b/src/include/c.h index c8e761d277..9066e3c578 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -62,7 +62,7 @@ #define WIN32 #endif -#if !defined(WIN32) && !defined(__CYGWIN__) /* win32 includes further down */ +#if !defined(WIN32) && !defined(__CYGWIN__) /* win32 includes further down */ #include "pg_config_os.h" /* must be before any system header files */ #endif @@ -209,7 +209,7 @@ typedef char bool; #ifndef false #define false ((bool) 0) #endif -#endif /* not C++ */ +#endif /* not C++ */ typedef bool *BoolPtr; @@ -254,7 +254,7 @@ typedef char *Pointer; typedef signed char int8; /* == 8 bits */ typedef signed short int16; /* == 16 bits */ typedef signed int int32; /* == 32 bits */ -#endif /* not HAVE_INT8 */ +#endif /* not HAVE_INT8 */ /* * uintN @@ -266,7 +266,7 @@ typedef signed int int32; /* == 32 bits */ typedef unsigned char uint8; /* == 8 bits */ typedef unsigned short uint16; /* == 16 bits */ typedef unsigned int uint32; /* == 32 bits */ -#endif /* not HAVE_UINT8 */ +#endif /* not HAVE_UINT8 */ /* * bitsN @@ -553,7 +553,7 @@ typedef NameData *Name; */ #ifndef offsetof #define offsetof(type, field) ((long) &((type *)0)->field) -#endif /* offsetof */ +#endif /* offsetof */ /* * lengthof @@ -732,7 +732,7 @@ typedef NameData *Name; Trap(TYPEALIGN(bndr, (uintptr_t)(ptr)) != (uintptr_t)(ptr), \ "UnalignedPointer") -#endif /* USE_ASSERT_CHECKING && !FRONTEND */ +#endif /* USE_ASSERT_CHECKING && !FRONTEND */ /* * Macros to support compile-time assertion checks. @@ -758,7 +758,7 @@ typedef NameData *Name; ((void) sizeof(struct { int static_assert_failure : (condition) ? 1 : -1; })) #define StaticAssertExpr(condition, errmessage) \ StaticAssertStmt(condition, errmessage) -#endif /* HAVE__STATIC_ASSERT */ +#endif /* HAVE__STATIC_ASSERT */ /* @@ -786,7 +786,7 @@ typedef NameData *Name; #define AssertVariableIsOfTypeMacro(varname, typename) \ ((void) StaticAssertExpr(sizeof(varname) == sizeof(typename), \ CppAsString(varname) " does not have type " CppAsString(typename))) -#endif /* HAVE__BUILTIN_TYPES_COMPATIBLE_P */ +#endif /* HAVE__BUILTIN_TYPES_COMPATIBLE_P */ /* ---------------------------------------------------------------- @@ -1124,4 +1124,4 @@ extern int fdatasync(int fildes); /* /port compatibility functions */ #include "port.h" -#endif /* C_H */ +#endif /* C_H */ diff --git a/src/include/catalog/binary_upgrade.h b/src/include/catalog/binary_upgrade.h index 98089e3c1a..5ff365fe53 100644 --- a/src/include/catalog/binary_upgrade.h +++ b/src/include/catalog/binary_upgrade.h @@ -27,4 +27,4 @@ extern PGDLLIMPORT Oid binary_upgrade_next_pg_authid_oid; extern PGDLLIMPORT bool binary_upgrade_record_init_privs; -#endif /* BINARY_UPGRADE_H */ +#endif /* BINARY_UPGRADE_H */ diff --git a/src/include/catalog/catalog.h b/src/include/catalog/catalog.h index d0a199afde..8ce9a9966a 100644 --- a/src/include/catalog/catalog.h +++ b/src/include/catalog/catalog.h @@ -48,4 +48,4 @@ extern Oid GetNewOidWithIndex(Relation relation, Oid indexId, extern Oid GetNewRelFileNode(Oid reltablespace, Relation pg_class, char relpersistence); -#endif /* CATALOG_H */ +#endif /* CATALOG_H */ diff --git a/src/include/catalog/dependency.h b/src/include/catalog/dependency.h index 8586b9d7a1..b9f98423cc 100644 --- a/src/include/catalog/dependency.h +++ b/src/include/catalog/dependency.h @@ -171,11 +171,11 @@ typedef enum ObjectClass #define LAST_OCLASS OCLASS_TRANSFORM /* flag bits for performDeletion/performMultipleDeletions: */ -#define PERFORM_DELETION_INTERNAL 0x0001 /* internal action */ -#define PERFORM_DELETION_CONCURRENTLY 0x0002 /* concurrent drop */ -#define PERFORM_DELETION_QUIETLY 0x0004 /* suppress notices */ -#define PERFORM_DELETION_SKIP_ORIGINAL 0x0008 /* keep original obj */ -#define PERFORM_DELETION_SKIP_EXTENSIONS 0x0010 /* keep extensions */ +#define PERFORM_DELETION_INTERNAL 0x0001 /* internal action */ +#define PERFORM_DELETION_CONCURRENTLY 0x0002 /* concurrent drop */ +#define PERFORM_DELETION_QUIETLY 0x0004 /* suppress notices */ +#define PERFORM_DELETION_SKIP_ORIGINAL 0x0008 /* keep original obj */ +#define PERFORM_DELETION_SKIP_EXTENSIONS 0x0010 /* keep extensions */ /* in dependency.c */ @@ -278,4 +278,4 @@ extern void shdepDropOwned(List *relids, DropBehavior behavior); extern void shdepReassignOwned(List *relids, Oid newrole); -#endif /* DEPENDENCY_H */ +#endif /* DEPENDENCY_H */ diff --git a/src/include/catalog/genbki.h b/src/include/catalog/genbki.h index a522b4cd82..a2cb313d4a 100644 --- a/src/include/catalog/genbki.h +++ b/src/include/catalog/genbki.h @@ -47,4 +47,4 @@ #define DESCR(x) extern int no_such_variable #define SHDESCR(x) extern int no_such_variable -#endif /* GENBKI_H */ +#endif /* GENBKI_H */ diff --git a/src/include/catalog/heap.h b/src/include/catalog/heap.h index aa49452836..cb1bc887f8 100644 --- a/src/include/catalog/heap.h +++ b/src/include/catalog/heap.h @@ -146,4 +146,4 @@ extern void RemovePartitionKeyByRelId(Oid relid); extern void StorePartitionBound(Relation rel, Relation parent, PartitionBoundSpec *bound); -#endif /* HEAP_H */ +#endif /* HEAP_H */ diff --git a/src/include/catalog/index.h b/src/include/catalog/index.h index 47c059cae4..1d4ec09f8f 100644 --- a/src/include/catalog/index.h +++ b/src/include/catalog/index.h @@ -131,4 +131,4 @@ extern bool ReindexIsProcessingHeap(Oid heapOid); extern bool ReindexIsProcessingIndex(Oid indexOid); extern Oid IndexGetRelation(Oid indexId, bool missing_ok); -#endif /* INDEX_H */ +#endif /* INDEX_H */ diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h index 07300f8a2b..ef8493674c 100644 --- a/src/include/catalog/indexing.h +++ b/src/include/catalog/indexing.h @@ -362,4 +362,4 @@ DECLARE_UNIQUE_INDEX(pg_subscription_rel_srrelid_srsubid_index, 6117, on pg_subs /* last step of initialization script: build the indexes declared above */ BUILD_INDICES -#endif /* INDEXING_H */ +#endif /* INDEXING_H */ diff --git a/src/include/catalog/namespace.h b/src/include/catalog/namespace.h index 9bec5d5685..f2ee935623 100644 --- a/src/include/catalog/namespace.h +++ b/src/include/catalog/namespace.h @@ -157,4 +157,4 @@ extern char *namespace_search_path; extern List *fetch_search_path(bool includeImplicit); extern int fetch_search_path_array(Oid *sarray, int sarray_len); -#endif /* NAMESPACE_H */ +#endif /* NAMESPACE_H */ diff --git a/src/include/catalog/objectaccess.h b/src/include/catalog/objectaccess.h index a53528bba0..251eb6fd88 100644 --- a/src/include/catalog/objectaccess.h +++ b/src/include/catalog/objectaccess.h @@ -182,4 +182,4 @@ extern void RunFunctionExecuteHook(Oid objectId); RunFunctionExecuteHook(objectId); \ } while(0) -#endif /* OBJECTACCESS_H */ +#endif /* OBJECTACCESS_H */ diff --git a/src/include/catalog/objectaddress.h b/src/include/catalog/objectaddress.h index 406c38bc73..5fc54d0e57 100644 --- a/src/include/catalog/objectaddress.h +++ b/src/include/catalog/objectaddress.h @@ -78,4 +78,4 @@ extern char *getObjectIdentityParts(const ObjectAddress *address, List **objname, List **objargs); extern ArrayType *strlist_to_textarray(List *list); -#endif /* OBJECTADDRESS_H */ +#endif /* OBJECTADDRESS_H */ diff --git a/src/include/catalog/opfam_internal.h b/src/include/catalog/opfam_internal.h index 448ad9708b..c4a010029a 100644 --- a/src/include/catalog/opfam_internal.h +++ b/src/include/catalog/opfam_internal.h @@ -25,4 +25,4 @@ typedef struct Oid sortfamily; /* ordering operator's sort opfamily, or 0 */ } OpFamilyMember; -#endif /* OPFAM_INTERNAL_H */ +#endif /* OPFAM_INTERNAL_H */ diff --git a/src/include/catalog/partition.h b/src/include/catalog/partition.h index 0a1e468898..f10879a162 100644 --- a/src/include/catalog/partition.h +++ b/src/include/catalog/partition.h @@ -34,7 +34,7 @@ typedef struct PartitionDescData { int nparts; /* Number of partitions */ Oid *oids; /* OIDs of partitions */ - PartitionBoundInfo boundinfo; /* collection of partition bounds */ + PartitionBoundInfo boundinfo; /* collection of partition bounds */ } PartitionDescData; typedef struct PartitionDescData *PartitionDesc; @@ -98,4 +98,4 @@ extern int get_partition_for_tuple(PartitionDispatch *pd, EState *estate, PartitionDispatchData **failed_at, TupleTableSlot **failed_slot); -#endif /* PARTITION_H */ +#endif /* PARTITION_H */ diff --git a/src/include/catalog/pg_aggregate.h b/src/include/catalog/pg_aggregate.h index 1ffde6cdc5..4d5b9bb9a6 100644 --- a/src/include/catalog/pg_aggregate.h +++ b/src/include/catalog/pg_aggregate.h @@ -348,4 +348,4 @@ extern ObjectAddress AggregateCreate(const char *aggName, const char *aggminitval, char proparallel); -#endif /* PG_AGGREGATE_H */ +#endif /* PG_AGGREGATE_H */ diff --git a/src/include/catalog/pg_am.h b/src/include/catalog/pg_am.h index 9b6dc38f64..e021f5b894 100644 --- a/src/include/catalog/pg_am.h +++ b/src/include/catalog/pg_am.h @@ -58,7 +58,7 @@ typedef FormData_pg_am *Form_pg_am; * compiler constant for amtype * ---------------- */ -#define AMTYPE_INDEX 'i' /* index access method */ +#define AMTYPE_INDEX 'i' /* index access method */ /* ---------------- * initial contents of pg_am @@ -84,4 +84,4 @@ DATA(insert OID = 3580 ( brin brinhandler i )); DESCR("block range index (BRIN) access method"); #define BRIN_AM_OID 3580 -#endif /* PG_AM_H */ +#endif /* PG_AM_H */ diff --git a/src/include/catalog/pg_amop.h b/src/include/catalog/pg_amop.h index da0228de6b..f850be490a 100644 --- a/src/include/catalog/pg_amop.h +++ b/src/include/catalog/pg_amop.h @@ -1162,4 +1162,4 @@ DATA(insert ( 4104 603 603 12 s 2572 3580 0 )); /* we could, but choose not to, supply entries for strategies 13 and 14 */ DATA(insert ( 4104 603 600 7 s 433 3580 0 )); -#endif /* PG_AMOP_H */ +#endif /* PG_AMOP_H */ diff --git a/src/include/catalog/pg_amproc.h b/src/include/catalog/pg_amproc.h index bcbb7a1617..7d245b1271 100644 --- a/src/include/catalog/pg_amproc.h +++ b/src/include/catalog/pg_amproc.h @@ -536,4 +536,4 @@ DATA(insert ( 4104 603 603 4 4108 )); DATA(insert ( 4104 603 603 11 4067 )); DATA(insert ( 4104 603 603 13 187 )); -#endif /* PG_AMPROC_H */ +#endif /* PG_AMPROC_H */ diff --git a/src/include/catalog/pg_attrdef.h b/src/include/catalog/pg_attrdef.h index ff1842f53c..b877f42a2d 100644 --- a/src/include/catalog/pg_attrdef.h +++ b/src/include/catalog/pg_attrdef.h @@ -56,4 +56,4 @@ typedef FormData_pg_attrdef *Form_pg_attrdef; #define Anum_pg_attrdef_adbin 3 #define Anum_pg_attrdef_adsrc 4 -#endif /* PG_ATTRDEF_H */ +#endif /* PG_ATTRDEF_H */ diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h index 753d45f2d1..bcf28e8f04 100644 --- a/src/include/catalog/pg_attribute.h +++ b/src/include/catalog/pg_attribute.h @@ -228,4 +228,4 @@ typedef FormData_pg_attribute *Form_pg_attribute; #define ATTRIBUTE_IDENTITY_ALWAYS 'a' #define ATTRIBUTE_IDENTITY_BY_DEFAULT 'd' -#endif /* PG_ATTRIBUTE_H */ +#endif /* PG_ATTRIBUTE_H */ diff --git a/src/include/catalog/pg_auth_members.h b/src/include/catalog/pg_auth_members.h index e34a4e80a4..6a954fff97 100644 --- a/src/include/catalog/pg_auth_members.h +++ b/src/include/catalog/pg_auth_members.h @@ -54,4 +54,4 @@ typedef FormData_pg_auth_members *Form_pg_auth_members; #define Anum_pg_auth_members_grantor 3 #define Anum_pg_auth_members_admin_option 4 -#endif /* PG_AUTH_MEMBERS_H */ +#endif /* PG_AUTH_MEMBERS_H */ diff --git a/src/include/catalog/pg_authid.h b/src/include/catalog/pg_authid.h index 39fea9f41a..9b6b52c9f9 100644 --- a/src/include/catalog/pg_authid.h +++ b/src/include/catalog/pg_authid.h @@ -111,4 +111,4 @@ DATA(insert OID = 3377 ( "pg_stat_scan_tables" f t f f f f f -1 _null_ _null_)); DATA(insert OID = 4200 ( "pg_signal_backend" f t f f f f f -1 _null_ _null_)); #define DEFAULT_ROLE_SIGNAL_BACKENDID 4200 -#endif /* PG_AUTHID_H */ +#endif /* PG_AUTHID_H */ diff --git a/src/include/catalog/pg_cast.h b/src/include/catalog/pg_cast.h index ccc6fb35a8..17827531ad 100644 --- a/src/include/catalog/pg_cast.h +++ b/src/include/catalog/pg_cast.h @@ -52,8 +52,8 @@ typedef FormData_pg_cast *Form_pg_cast; typedef enum CoercionCodes { - COERCION_CODE_IMPLICIT = 'i', /* coercion in context of expression */ - COERCION_CODE_ASSIGNMENT = 'a', /* coercion in context of assignment */ + COERCION_CODE_IMPLICIT = 'i', /* coercion in context of expression */ + COERCION_CODE_ASSIGNMENT = 'a', /* coercion in context of assignment */ COERCION_CODE_EXPLICIT = 'e' /* explicit cast operation */ } CoercionCodes; @@ -64,8 +64,8 @@ typedef enum CoercionCodes */ typedef enum CoercionMethod { - COERCION_METHOD_FUNCTION = 'f', /* use a function */ - COERCION_METHOD_BINARY = 'b', /* types are binary-compatible */ + COERCION_METHOD_FUNCTION = 'f', /* use a function */ + COERCION_METHOD_BINARY = 'b', /* types are binary-compatible */ COERCION_METHOD_INOUT = 'i' /* use input/output functions */ } CoercionMethod; @@ -392,4 +392,4 @@ DATA(insert ( 1700 1700 1703 i f )); DATA(insert ( 114 3802 0 a i )); DATA(insert ( 3802 114 0 a i )); -#endif /* PG_CAST_H */ +#endif /* PG_CAST_H */ diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h index 5a288830e8..b256657bda 100644 --- a/src/include/catalog/pg_class.h +++ b/src/include/catalog/pg_class.h @@ -157,19 +157,19 @@ DATA(insert OID = 1259 ( pg_class PGNSP 83 0 PGUID 0 0 0 0 0 0 0 f f p r 33 0 DESCR(""); -#define RELKIND_RELATION 'r' /* ordinary table */ -#define RELKIND_INDEX 'i' /* secondary index */ -#define RELKIND_SEQUENCE 'S' /* sequence object */ -#define RELKIND_TOASTVALUE 't' /* for out-of-line values */ -#define RELKIND_VIEW 'v' /* view */ -#define RELKIND_MATVIEW 'm' /* materialized view */ -#define RELKIND_COMPOSITE_TYPE 'c' /* composite type */ -#define RELKIND_FOREIGN_TABLE 'f' /* foreign table */ -#define RELKIND_PARTITIONED_TABLE 'p' /* partitioned table */ - -#define RELPERSISTENCE_PERMANENT 'p' /* regular table */ -#define RELPERSISTENCE_UNLOGGED 'u' /* unlogged permanent table */ -#define RELPERSISTENCE_TEMP 't' /* temporary table */ +#define RELKIND_RELATION 'r' /* ordinary table */ +#define RELKIND_INDEX 'i' /* secondary index */ +#define RELKIND_SEQUENCE 'S' /* sequence object */ +#define RELKIND_TOASTVALUE 't' /* for out-of-line values */ +#define RELKIND_VIEW 'v' /* view */ +#define RELKIND_MATVIEW 'm' /* materialized view */ +#define RELKIND_COMPOSITE_TYPE 'c' /* composite type */ +#define RELKIND_FOREIGN_TABLE 'f' /* foreign table */ +#define RELKIND_PARTITIONED_TABLE 'p' /* partitioned table */ + +#define RELPERSISTENCE_PERMANENT 'p' /* regular table */ +#define RELPERSISTENCE_UNLOGGED 'u' /* unlogged permanent table */ +#define RELPERSISTENCE_TEMP 't' /* temporary table */ /* default selection for replica identity (primary key or nothing) */ #define REPLICA_IDENTITY_DEFAULT 'd' @@ -184,4 +184,4 @@ DESCR(""); */ #define REPLICA_IDENTITY_INDEX 'i' -#endif /* PG_CLASS_H */ +#endif /* PG_CLASS_H */ diff --git a/src/include/catalog/pg_collation.h b/src/include/catalog/pg_collation.h index 901c0b5115..0cac7cae72 100644 --- a/src/include/catalog/pg_collation.h +++ b/src/include/catalog/pg_collation.h @@ -85,4 +85,4 @@ DESCR("standard POSIX collation"); #define COLLPROVIDER_ICU 'i' #define COLLPROVIDER_LIBC 'c' -#endif /* PG_COLLATION_H */ +#endif /* PG_COLLATION_H */ diff --git a/src/include/catalog/pg_collation_fn.h b/src/include/catalog/pg_collation_fn.h index dfebdbaa0b..26b8f0d3d1 100644 --- a/src/include/catalog/pg_collation_fn.h +++ b/src/include/catalog/pg_collation_fn.h @@ -23,4 +23,4 @@ extern Oid CollationCreate(const char *collname, Oid collnamespace, bool if_not_exists); extern void RemoveCollationById(Oid collationOid); -#endif /* PG_COLLATION_FN_H */ +#endif /* PG_COLLATION_FN_H */ diff --git a/src/include/catalog/pg_constraint.h b/src/include/catalog/pg_constraint.h index e959583364..ec035d8434 100644 --- a/src/include/catalog/pg_constraint.h +++ b/src/include/catalog/pg_constraint.h @@ -198,4 +198,4 @@ typedef FormData_pg_constraint *Form_pg_constraint; * the FKCONSTR_MATCH_xxx constants defined in parsenodes.h. */ -#endif /* PG_CONSTRAINT_H */ +#endif /* PG_CONSTRAINT_H */ diff --git a/src/include/catalog/pg_constraint_fn.h b/src/include/catalog/pg_constraint_fn.h index d2acb3a053..9ef481d15b 100644 --- a/src/include/catalog/pg_constraint_fn.h +++ b/src/include/catalog/pg_constraint_fn.h @@ -79,4 +79,4 @@ extern bool check_functional_grouping(Oid relid, List *grouping_columns, List **constraintDeps); -#endif /* PG_CONSTRAINT_FN_H */ +#endif /* PG_CONSTRAINT_FN_H */ diff --git a/src/include/catalog/pg_control.h b/src/include/catalog/pg_control.h index 3a25cc84b2..84327c9da6 100644 --- a/src/include/catalog/pg_control.h +++ b/src/include/catalog/pg_control.h @@ -121,8 +121,8 @@ typedef struct ControlFileData * example, WAL logs contain per-page magic numbers that can serve as * version cues for the WAL log. */ - uint32 pg_control_version; /* PG_CONTROL_VERSION */ - uint32 catalog_version_no; /* see catversion.h */ + uint32 pg_control_version; /* PG_CONTROL_VERSION */ + uint32 catalog_version_no; /* see catversion.h */ /* * System status data @@ -244,4 +244,4 @@ typedef struct ControlFileData */ #define PG_CONTROL_SIZE 8192 -#endif /* PG_CONTROL_H */ +#endif /* PG_CONTROL_H */ diff --git a/src/include/catalog/pg_conversion.h b/src/include/catalog/pg_conversion.h index 88174a620a..0682d7eb22 100644 --- a/src/include/catalog/pg_conversion.h +++ b/src/include/catalog/pg_conversion.h @@ -74,4 +74,4 @@ typedef FormData_pg_conversion *Form_pg_conversion; * --------------- */ -#endif /* PG_CONVERSION_H */ +#endif /* PG_CONVERSION_H */ diff --git a/src/include/catalog/pg_conversion_fn.h b/src/include/catalog/pg_conversion_fn.h index a2c1345f01..7074bcf13a 100644 --- a/src/include/catalog/pg_conversion_fn.h +++ b/src/include/catalog/pg_conversion_fn.h @@ -24,4 +24,4 @@ extern ObjectAddress ConversionCreate(const char *conname, Oid connamespace, extern void RemoveConversionById(Oid conversionOid); extern Oid FindDefaultConversion(Oid connamespace, int32 for_encoding, int32 to_encoding); -#endif /* PG_CONVERSION_FN_H */ +#endif /* PG_CONVERSION_FN_H */ diff --git a/src/include/catalog/pg_database.h b/src/include/catalog/pg_database.h index 55a1f6edab..e7cbca49cf 100644 --- a/src/include/catalog/pg_database.h +++ b/src/include/catalog/pg_database.h @@ -79,4 +79,4 @@ DATA(insert OID = 1 ( template1 PGUID ENCODING "LC_COLLATE" "LC_CTYPE" t t -1 0 SHDESCR("default template for new databases"); #define TemplateDbOid 1 -#endif /* PG_DATABASE_H */ +#endif /* PG_DATABASE_H */ diff --git a/src/include/catalog/pg_db_role_setting.h b/src/include/catalog/pg_db_role_setting.h index f09b5d7832..4a8e3370c9 100644 --- a/src/include/catalog/pg_db_role_setting.h +++ b/src/include/catalog/pg_db_role_setting.h @@ -66,4 +66,4 @@ extern void DropSetting(Oid databaseid, Oid roleid); extern void ApplySetting(Snapshot snapshot, Oid databaseid, Oid roleid, Relation relsetting, GucSource source); -#endif /* PG_DB_ROLE_SETTING_H */ +#endif /* PG_DB_ROLE_SETTING_H */ diff --git a/src/include/catalog/pg_default_acl.h b/src/include/catalog/pg_default_acl.h index 78bbeb64fe..09587abee6 100644 --- a/src/include/catalog/pg_default_acl.h +++ b/src/include/catalog/pg_default_acl.h @@ -66,10 +66,10 @@ typedef FormData_pg_default_acl *Form_pg_default_acl; * permissions through pg_default_acl. These codes are used in the * defaclobjtype column. */ -#define DEFACLOBJ_RELATION 'r' /* table, view */ -#define DEFACLOBJ_SEQUENCE 'S' /* sequence */ -#define DEFACLOBJ_FUNCTION 'f' /* function */ -#define DEFACLOBJ_TYPE 'T' /* type */ -#define DEFACLOBJ_NAMESPACE 'n' /* namespace */ +#define DEFACLOBJ_RELATION 'r' /* table, view */ +#define DEFACLOBJ_SEQUENCE 'S' /* sequence */ +#define DEFACLOBJ_FUNCTION 'f' /* function */ +#define DEFACLOBJ_TYPE 'T' /* type */ +#define DEFACLOBJ_NAMESPACE 'n' /* namespace */ -#endif /* PG_DEFAULT_ACL_H */ +#endif /* PG_DEFAULT_ACL_H */ diff --git a/src/include/catalog/pg_depend.h b/src/include/catalog/pg_depend.h index 6c480dd7dc..8bda78d9ef 100644 --- a/src/include/catalog/pg_depend.h +++ b/src/include/catalog/pg_depend.h @@ -87,4 +87,4 @@ typedef FormData_pg_depend *Form_pg_depend; * convenient to find from the contents of other catalogs. */ -#endif /* PG_DEPEND_H */ +#endif /* PG_DEPEND_H */ diff --git a/src/include/catalog/pg_description.h b/src/include/catalog/pg_description.h index 9e834fca1a..e0499ca2d6 100644 --- a/src/include/catalog/pg_description.h +++ b/src/include/catalog/pg_description.h @@ -84,4 +84,4 @@ typedef FormData_pg_description * Form_pg_description; * by genbki.pl and loaded during initdb. */ -#endif /* PG_DESCRIPTION_H */ +#endif /* PG_DESCRIPTION_H */ diff --git a/src/include/catalog/pg_enum.h b/src/include/catalog/pg_enum.h index faee5e6c3c..5938ba5cac 100644 --- a/src/include/catalog/pg_enum.h +++ b/src/include/catalog/pg_enum.h @@ -70,4 +70,4 @@ extern void AddEnumLabel(Oid enumTypeOid, const char *newVal, extern void RenameEnumLabel(Oid enumTypeOid, const char *oldVal, const char *newVal); -#endif /* PG_ENUM_H */ +#endif /* PG_ENUM_H */ diff --git a/src/include/catalog/pg_event_trigger.h b/src/include/catalog/pg_event_trigger.h index b41cc12602..f9f568b27b 100644 --- a/src/include/catalog/pg_event_trigger.h +++ b/src/include/catalog/pg_event_trigger.h @@ -61,4 +61,4 @@ typedef FormData_pg_event_trigger *Form_pg_event_trigger; #define Anum_pg_event_trigger_evtenabled 5 #define Anum_pg_event_trigger_evttags 6 -#endif /* PG_EVENT_TRIGGER_H */ +#endif /* PG_EVENT_TRIGGER_H */ diff --git a/src/include/catalog/pg_extension.h b/src/include/catalog/pg_extension.h index 56d117a78a..2ce575d17e 100644 --- a/src/include/catalog/pg_extension.h +++ b/src/include/catalog/pg_extension.h @@ -69,4 +69,4 @@ typedef FormData_pg_extension *Form_pg_extension; * ---------------- */ -#endif /* PG_EXTENSION_H */ +#endif /* PG_EXTENSION_H */ diff --git a/src/include/catalog/pg_foreign_data_wrapper.h b/src/include/catalog/pg_foreign_data_wrapper.h index 47df6799c9..af602c74ee 100644 --- a/src/include/catalog/pg_foreign_data_wrapper.h +++ b/src/include/catalog/pg_foreign_data_wrapper.h @@ -61,4 +61,4 @@ typedef FormData_pg_foreign_data_wrapper *Form_pg_foreign_data_wrapper; #define Anum_pg_foreign_data_wrapper_fdwacl 5 #define Anum_pg_foreign_data_wrapper_fdwoptions 6 -#endif /* PG_FOREIGN_DATA_WRAPPER_H */ +#endif /* PG_FOREIGN_DATA_WRAPPER_H */ diff --git a/src/include/catalog/pg_foreign_server.h b/src/include/catalog/pg_foreign_server.h index 629bfc389d..689dbbb4e7 100644 --- a/src/include/catalog/pg_foreign_server.h +++ b/src/include/catalog/pg_foreign_server.h @@ -61,4 +61,4 @@ typedef FormData_pg_foreign_server *Form_pg_foreign_server; #define Anum_pg_foreign_server_srvacl 6 #define Anum_pg_foreign_server_srvoptions 7 -#endif /* PG_FOREIGN_SERVER_H */ +#endif /* PG_FOREIGN_SERVER_H */ diff --git a/src/include/catalog/pg_foreign_table.h b/src/include/catalog/pg_foreign_table.h index b62d5e948b..c5dbcceef1 100644 --- a/src/include/catalog/pg_foreign_table.h +++ b/src/include/catalog/pg_foreign_table.h @@ -53,4 +53,4 @@ typedef FormData_pg_foreign_table *Form_pg_foreign_table; #define Anum_pg_foreign_table_ftserver 2 #define Anum_pg_foreign_table_ftoptions 3 -#endif /* PG_FOREIGN_TABLE_H */ +#endif /* PG_FOREIGN_TABLE_H */ diff --git a/src/include/catalog/pg_index.h b/src/include/catalog/pg_index.h index 7ca0fae707..8505c3be5f 100644 --- a/src/include/catalog/pg_index.h +++ b/src/include/catalog/pg_index.h @@ -108,4 +108,4 @@ typedef FormData_pg_index *Form_pg_index; #define IndexIsReady(indexForm) ((indexForm)->indisready) #define IndexIsLive(indexForm) ((indexForm)->indislive) -#endif /* PG_INDEX_H */ +#endif /* PG_INDEX_H */ diff --git a/src/include/catalog/pg_inherits.h b/src/include/catalog/pg_inherits.h index 434fa7c864..26bfab5db6 100644 --- a/src/include/catalog/pg_inherits.h +++ b/src/include/catalog/pg_inherits.h @@ -56,4 +56,4 @@ typedef FormData_pg_inherits *Form_pg_inherits; * ---------------- */ -#endif /* PG_INHERITS_H */ +#endif /* PG_INHERITS_H */ diff --git a/src/include/catalog/pg_inherits_fn.h b/src/include/catalog/pg_inherits_fn.h index e33b39e71e..abfa4766a1 100644 --- a/src/include/catalog/pg_inherits_fn.h +++ b/src/include/catalog/pg_inherits_fn.h @@ -23,4 +23,4 @@ extern List *find_all_inheritors(Oid parentrelId, LOCKMODE lockmode, extern bool has_subclass(Oid relationId); extern bool typeInheritsFrom(Oid subclassTypeId, Oid superclassTypeId); -#endif /* PG_INHERITS_FN_H */ +#endif /* PG_INHERITS_FN_H */ diff --git a/src/include/catalog/pg_init_privs.h b/src/include/catalog/pg_init_privs.h index b60c3f961c..5fca36334b 100644 --- a/src/include/catalog/pg_init_privs.h +++ b/src/include/catalog/pg_init_privs.h @@ -49,8 +49,7 @@ CATALOG(pg_init_privs,3394) BKI_WITHOUT_OIDS char privtype; /* from initdb or extension? */ #ifdef CATALOG_VARLEN /* variable-length fields start here */ - aclitem initprivs[1] BKI_FORCE_NOT_NULL; /* initial privs on - * object */ + aclitem initprivs[1] BKI_FORCE_NOT_NULL; /* initial privs on object */ #endif } FormData_pg_init_privs; @@ -98,4 +97,4 @@ typedef enum InitPrivsType * The initial contents are loaded near the end of initdb. */ -#endif /* PG_INIT_PRIVS_H */ +#endif /* PG_INIT_PRIVS_H */ diff --git a/src/include/catalog/pg_language.h b/src/include/catalog/pg_language.h index 46e4099485..ad244e839b 100644 --- a/src/include/catalog/pg_language.h +++ b/src/include/catalog/pg_language.h @@ -79,4 +79,4 @@ DATA(insert OID = 14 ( "sql" PGUID f t 0 0 2248 _null_ )); DESCR("SQL-language functions"); #define SQLlanguageId 14 -#endif /* PG_LANGUAGE_H */ +#endif /* PG_LANGUAGE_H */ diff --git a/src/include/catalog/pg_largeobject.h b/src/include/catalog/pg_largeobject.h index 2bdcf96be3..f2df67c35f 100644 --- a/src/include/catalog/pg_largeobject.h +++ b/src/include/catalog/pg_largeobject.h @@ -34,8 +34,8 @@ CATALOG(pg_largeobject,2613) BKI_WITHOUT_OIDS int32 pageno; /* Page number (starting from 0) */ /* data has variable length, but we allow direct access; see inv_api.c */ - bytea data BKI_FORCE_NOT_NULL; /* Data for page (may be - * zero-length) */ + bytea data BKI_FORCE_NOT_NULL; /* Data for page (may be + * zero-length) */ } FormData_pg_largeobject; /* ---------------- @@ -58,4 +58,4 @@ extern Oid LargeObjectCreate(Oid loid); extern void LargeObjectDrop(Oid loid); extern bool LargeObjectExists(Oid loid); -#endif /* PG_LARGEOBJECT_H */ +#endif /* PG_LARGEOBJECT_H */ diff --git a/src/include/catalog/pg_largeobject_metadata.h b/src/include/catalog/pg_largeobject_metadata.h index 16cb602a6c..7ae6d8c02b 100644 --- a/src/include/catalog/pg_largeobject_metadata.h +++ b/src/include/catalog/pg_largeobject_metadata.h @@ -52,4 +52,4 @@ typedef FormData_pg_largeobject_metadata *Form_pg_largeobject_metadata; #define Anum_pg_largeobject_metadata_lomowner 1 #define Anum_pg_largeobject_metadata_lomacl 2 -#endif /* PG_LARGEOBJECT_METADATA_H */ +#endif /* PG_LARGEOBJECT_METADATA_H */ diff --git a/src/include/catalog/pg_namespace.h b/src/include/catalog/pg_namespace.h index cb42abf5f8..a61a8635f6 100644 --- a/src/include/catalog/pg_namespace.h +++ b/src/include/catalog/pg_namespace.h @@ -82,4 +82,4 @@ DESCR("standard public schema"); */ extern Oid NamespaceCreate(const char *nspName, Oid ownerId, bool isTemp); -#endif /* PG_NAMESPACE_H */ +#endif /* PG_NAMESPACE_H */ diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h index 5819d5309f..28dbc747d5 100644 --- a/src/include/catalog/pg_opclass.h +++ b/src/include/catalog/pg_opclass.h @@ -247,4 +247,4 @@ DATA(insert ( 3580 pg_lsn_minmax_ops PGNSP PGUID 4082 3220 t 3220 )); DATA(insert ( 3580 box_inclusion_ops PGNSP PGUID 4104 603 t 603 )); /* no brin opclass for the geometric types except box */ -#endif /* PG_OPCLASS_H */ +#endif /* PG_OPCLASS_H */ diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h index ccbb17efec..ffabc2003b 100644 --- a/src/include/catalog/pg_operator.h +++ b/src/include/catalog/pg_operator.h @@ -1854,4 +1854,4 @@ DESCR("delete array element"); DATA(insert OID = 3287 ( "#-" PGNSP PGUID b f f 3802 1009 3802 0 0 jsonb_delete_path - - )); DESCR("delete path"); -#endif /* PG_OPERATOR_H */ +#endif /* PG_OPERATOR_H */ diff --git a/src/include/catalog/pg_operator_fn.h b/src/include/catalog/pg_operator_fn.h index d8ea390fdf..37f5c712fe 100644 --- a/src/include/catalog/pg_operator_fn.h +++ b/src/include/catalog/pg_operator_fn.h @@ -33,4 +33,4 @@ extern ObjectAddress makeOperatorDependencies(HeapTuple tuple, bool isUpdate); extern void OperatorUpd(Oid baseId, Oid commId, Oid negId, bool isDelete); -#endif /* PG_OPERATOR_FN_H */ +#endif /* PG_OPERATOR_FN_H */ diff --git a/src/include/catalog/pg_opfamily.h b/src/include/catalog/pg_opfamily.h index 546527aa8e..0d0ba7c66a 100644 --- a/src/include/catalog/pg_opfamily.h +++ b/src/include/catalog/pg_opfamily.h @@ -187,4 +187,4 @@ DATA(insert OID = 4082 ( 3580 pg_lsn_minmax_ops PGNSP PGUID )); DATA(insert OID = 4104 ( 3580 box_inclusion_ops PGNSP PGUID )); DATA(insert OID = 5000 ( 4000 box_ops PGNSP PGUID )); -#endif /* PG_OPFAMILY_H */ +#endif /* PG_OPFAMILY_H */ diff --git a/src/include/catalog/pg_partitioned_table.h b/src/include/catalog/pg_partitioned_table.h index bdff36a04b..38d64d6511 100644 --- a/src/include/catalog/pg_partitioned_table.h +++ b/src/include/catalog/pg_partitioned_table.h @@ -71,4 +71,4 @@ typedef FormData_pg_partitioned_table *Form_pg_partitioned_table; #define Anum_pg_partitioned_table_partcollation 6 #define Anum_pg_partitioned_table_partexprs 7 -#endif /* PG_PARTITIONED_TABLE_H */ +#endif /* PG_PARTITIONED_TABLE_H */ diff --git a/src/include/catalog/pg_pltemplate.h b/src/include/catalog/pg_pltemplate.h index 236291f28e..fbe71bd0c3 100644 --- a/src/include/catalog/pg_pltemplate.h +++ b/src/include/catalog/pg_pltemplate.h @@ -80,4 +80,4 @@ DATA(insert ( "plpythonu" f f "plpython_call_handler" "plpython_inline_handler" DATA(insert ( "plpython2u" f f "plpython2_call_handler" "plpython2_inline_handler" "plpython2_validator" "$libdir/plpython2" _null_ )); DATA(insert ( "plpython3u" f f "plpython3_call_handler" "plpython3_inline_handler" "plpython3_validator" "$libdir/plpython3" _null_ )); -#endif /* PG_PLTEMPLATE_H */ +#endif /* PG_PLTEMPLATE_H */ diff --git a/src/include/catalog/pg_policy.h b/src/include/catalog/pg_policy.h index 331584f5e0..86000737fa 100644 --- a/src/include/catalog/pg_policy.h +++ b/src/include/catalog/pg_policy.h @@ -52,4 +52,4 @@ typedef FormData_pg_policy *Form_pg_policy; #define Anum_pg_policy_polqual 6 #define Anum_pg_policy_polwithcheck 7 -#endif /* PG_POLICY_H */ +#endif /* PG_POLICY_H */ diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index 9eb7b377af..1191b4ab1b 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -62,13 +62,13 @@ CATALOG(pg_proc,1255) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81) BKI_SCHEMA_MACRO oidvector proargtypes; /* parameter types (excludes OUT params) */ #ifdef CATALOG_VARLEN - Oid proallargtypes[1]; /* all param types (NULL if IN only) */ + Oid proallargtypes[1]; /* all param types (NULL if IN only) */ char proargmodes[1]; /* parameter modes (NULL if IN only) */ text proargnames[1]; /* parameter names (NULL if no names) */ pg_node_tree proargdefaults; /* list of expression trees for argument * defaults (NULL if none) */ Oid protrftypes[1]; /* types for which to apply transforms */ - text prosrc BKI_FORCE_NOT_NULL; /* procedure source text */ + text prosrc BKI_FORCE_NOT_NULL; /* procedure source text */ text probin; /* secondary procedure info (can be NULL) */ text proconfig[1]; /* procedure-local GUC settings */ aclitem proacl[1]; /* access permissions */ @@ -5482,18 +5482,18 @@ DESCR("list of files in the WAL directory"); * must be labeled volatile to ensure they will not get optimized away, * even if the actual return value is not changeable. */ -#define PROVOLATILE_IMMUTABLE 'i' /* never changes for given input */ -#define PROVOLATILE_STABLE 's' /* does not change within a scan */ -#define PROVOLATILE_VOLATILE 'v' /* can change even within a scan */ +#define PROVOLATILE_IMMUTABLE 'i' /* never changes for given input */ +#define PROVOLATILE_STABLE 's' /* does not change within a scan */ +#define PROVOLATILE_VOLATILE 'v' /* can change even within a scan */ /* * Symbolic values for proparallel column: these indicate whether a function * can be safely be run in a parallel backend, during parallelism but * necessarily in the master, or only in non-parallel mode. */ -#define PROPARALLEL_SAFE 's' /* can run in worker or master */ -#define PROPARALLEL_RESTRICTED 'r' /* can run in parallel master only */ -#define PROPARALLEL_UNSAFE 'u' /* banned while in parallel mode */ +#define PROPARALLEL_SAFE 's' /* can run in worker or master */ +#define PROPARALLEL_RESTRICTED 'r' /* can run in parallel master only */ +#define PROPARALLEL_UNSAFE 'u' /* banned while in parallel mode */ /* * Symbolic values for proargmodes column. Note that these must agree with @@ -5506,4 +5506,4 @@ DESCR("list of files in the WAL directory"); #define PROARGMODE_VARIADIC 'v' #define PROARGMODE_TABLE 't' -#endif /* PG_PROC_H */ +#endif /* PG_PROC_H */ diff --git a/src/include/catalog/pg_proc_fn.h b/src/include/catalog/pg_proc_fn.h index 993278a91a..2c85f5d267 100644 --- a/src/include/catalog/pg_proc_fn.h +++ b/src/include/catalog/pg_proc_fn.h @@ -48,4 +48,4 @@ extern bool function_parse_error_transpose(const char *prosrc); extern List *oid_array_to_list(Datum datum); -#endif /* PG_PROC_FN_H */ +#endif /* PG_PROC_FN_H */ diff --git a/src/include/catalog/pg_publication.h b/src/include/catalog/pg_publication.h index c2086c1f42..aa148960cd 100644 --- a/src/include/catalog/pg_publication.h +++ b/src/include/catalog/pg_publication.h @@ -101,4 +101,4 @@ extern char *get_publication_name(Oid pubid); extern Datum pg_get_publication_tables(PG_FUNCTION_ARGS); -#endif /* PG_PUBLICATION_H */ +#endif /* PG_PUBLICATION_H */ diff --git a/src/include/catalog/pg_publication_rel.h b/src/include/catalog/pg_publication_rel.h index f889b6f4db..3729e5abdc 100644 --- a/src/include/catalog/pg_publication_rel.h +++ b/src/include/catalog/pg_publication_rel.h @@ -49,4 +49,4 @@ typedef FormData_pg_publication_rel *Form_pg_publication_rel; #define Anum_pg_publication_rel_prpubid 1 #define Anum_pg_publication_rel_prrelid 2 -#endif /* PG_PUBLICATION_REL_H */ +#endif /* PG_PUBLICATION_REL_H */ diff --git a/src/include/catalog/pg_range.h b/src/include/catalog/pg_range.h index 4ed57fe2e9..f12e82b2f2 100644 --- a/src/include/catalog/pg_range.h +++ b/src/include/catalog/pg_range.h @@ -82,4 +82,4 @@ extern void RangeCreate(Oid rangeTypeOid, Oid rangeSubType, Oid rangeCollation, RegProcedure rangeSubDiff); extern void RangeDelete(Oid rangeTypeOid); -#endif /* PG_RANGE_H */ +#endif /* PG_RANGE_H */ diff --git a/src/include/catalog/pg_replication_origin.h b/src/include/catalog/pg_replication_origin.h index f95725873b..24c8a8430c 100644 --- a/src/include/catalog/pg_replication_origin.h +++ b/src/include/catalog/pg_replication_origin.h @@ -67,4 +67,4 @@ typedef FormData_pg_replication_origin *Form_pg_replication_origin; * ---------------- */ -#endif /* PG_REPLICATION_ORIGIN_H */ +#endif /* PG_REPLICATION_ORIGIN_H */ diff --git a/src/include/catalog/pg_rewrite.h b/src/include/catalog/pg_rewrite.h index 425a336755..48b9333a9d 100644 --- a/src/include/catalog/pg_rewrite.h +++ b/src/include/catalog/pg_rewrite.h @@ -65,4 +65,4 @@ typedef FormData_pg_rewrite *Form_pg_rewrite; #define Anum_pg_rewrite_ev_qual 6 #define Anum_pg_rewrite_ev_action 7 -#endif /* PG_REWRITE_H */ +#endif /* PG_REWRITE_H */ diff --git a/src/include/catalog/pg_seclabel.h b/src/include/catalog/pg_seclabel.h index 60eec1d5c8..3db9612fc3 100644 --- a/src/include/catalog/pg_seclabel.h +++ b/src/include/catalog/pg_seclabel.h @@ -28,8 +28,7 @@ CATALOG(pg_seclabel,3596) BKI_WITHOUT_OIDS #ifdef CATALOG_VARLEN /* variable-length fields start here */ text provider BKI_FORCE_NOT_NULL; /* name of label provider */ - text label BKI_FORCE_NOT_NULL; /* security label of the - * object */ + text label BKI_FORCE_NOT_NULL; /* security label of the object */ #endif } FormData_pg_seclabel; @@ -44,4 +43,4 @@ CATALOG(pg_seclabel,3596) BKI_WITHOUT_OIDS #define Anum_pg_seclabel_provider 4 #define Anum_pg_seclabel_label 5 -#endif /* PG_SECLABEL_H */ +#endif /* PG_SECLABEL_H */ diff --git a/src/include/catalog/pg_sequence.h b/src/include/catalog/pg_sequence.h index 26d2993674..8ae6b7143d 100644 --- a/src/include/catalog/pg_sequence.h +++ b/src/include/catalog/pg_sequence.h @@ -29,4 +29,4 @@ typedef FormData_pg_sequence *Form_pg_sequence; #define Anum_pg_sequence_seqcache 7 #define Anum_pg_sequence_seqcycle 8 -#endif /* PG_SEQUENCE_H */ +#endif /* PG_SEQUENCE_H */ diff --git a/src/include/catalog/pg_shdepend.h b/src/include/catalog/pg_shdepend.h index ae1aa4f952..51b6588d3e 100644 --- a/src/include/catalog/pg_shdepend.h +++ b/src/include/catalog/pg_shdepend.h @@ -87,4 +87,4 @@ typedef FormData_pg_shdepend *Form_pg_shdepend; * are explicitly stored in pg_shdepend. */ -#endif /* PG_SHDEPEND_H */ +#endif /* PG_SHDEPEND_H */ diff --git a/src/include/catalog/pg_shdescription.h b/src/include/catalog/pg_shdescription.h index 728b0d2b07..154c48b584 100644 --- a/src/include/catalog/pg_shdescription.h +++ b/src/include/catalog/pg_shdescription.h @@ -75,4 +75,4 @@ typedef FormData_pg_shdescription * Form_pg_shdescription; * by genbki.pl and loaded during initdb. */ -#endif /* PG_SHDESCRIPTION_H */ +#endif /* PG_SHDESCRIPTION_H */ diff --git a/src/include/catalog/pg_shseclabel.h b/src/include/catalog/pg_shseclabel.h index e559b40935..f8a906bb12 100644 --- a/src/include/catalog/pg_shseclabel.h +++ b/src/include/catalog/pg_shseclabel.h @@ -28,8 +28,7 @@ CATALOG(pg_shseclabel,3592) BKI_SHARED_RELATION BKI_ROWTYPE_OID(4066) BKI_WITHOU #ifdef CATALOG_VARLEN /* variable-length fields start here */ text provider BKI_FORCE_NOT_NULL; /* name of label provider */ - text label BKI_FORCE_NOT_NULL; /* security label of the - * object */ + text label BKI_FORCE_NOT_NULL; /* security label of the object */ #endif } FormData_pg_shseclabel; @@ -45,4 +44,4 @@ typedef FormData_pg_shseclabel * Form_pg_shseclabel; #define Anum_pg_shseclabel_provider 3 #define Anum_pg_shseclabel_label 4 -#endif /* PG_SHSECLABEL_H */ +#endif /* PG_SHSECLABEL_H */ diff --git a/src/include/catalog/pg_statistic.h b/src/include/catalog/pg_statistic.h index 3576419a2f..3713a56bbd 100644 --- a/src/include/catalog/pg_statistic.h +++ b/src/include/catalog/pg_statistic.h @@ -291,4 +291,4 @@ typedef FormData_pg_statistic *Form_pg_statistic; */ #define STATISTIC_KIND_BOUNDS_HISTOGRAM 7 -#endif /* PG_STATISTIC_H */ +#endif /* PG_STATISTIC_H */ diff --git a/src/include/catalog/pg_statistic_ext.h b/src/include/catalog/pg_statistic_ext.h index d302b7fc01..78138026db 100644 --- a/src/include/catalog/pg_statistic_ext.h +++ b/src/include/catalog/pg_statistic_ext.h @@ -77,4 +77,4 @@ typedef FormData_pg_statistic_ext *Form_pg_statistic_ext; #define STATS_EXT_NDISTINCT 'd' #define STATS_EXT_DEPENDENCIES 'f' -#endif /* PG_STATISTIC_EXT_H */ +#endif /* PG_STATISTIC_EXT_H */ diff --git a/src/include/catalog/pg_subscription.h b/src/include/catalog/pg_subscription.h index 75963431a4..274ff6bc42 100644 --- a/src/include/catalog/pg_subscription.h +++ b/src/include/catalog/pg_subscription.h @@ -93,4 +93,4 @@ extern char *get_subscription_name(Oid subid); extern int CountDBSubscriptions(Oid dbid); -#endif /* PG_SUBSCRIPTION_H */ +#endif /* PG_SUBSCRIPTION_H */ diff --git a/src/include/catalog/pg_subscription_rel.h b/src/include/catalog/pg_subscription_rel.h index f5f6191676..991ca9d552 100644 --- a/src/include/catalog/pg_subscription_rel.h +++ b/src/include/catalog/pg_subscription_rel.h @@ -51,17 +51,17 @@ typedef FormData_pg_subscription_rel *Form_pg_subscription_rel; * substate constants * ---------------- */ -#define SUBREL_STATE_INIT 'i' /* initializing (sublsn NULL) */ -#define SUBREL_STATE_DATASYNC 'd' /* data is being synchronized (sublsn - * NULL) */ -#define SUBREL_STATE_SYNCDONE 's' /* synchronization finished in front - * of apply (sublsn set) */ -#define SUBREL_STATE_READY 'r' /* ready (sublsn set) */ +#define SUBREL_STATE_INIT 'i' /* initializing (sublsn NULL) */ +#define SUBREL_STATE_DATASYNC 'd' /* data is being synchronized (sublsn + * NULL) */ +#define SUBREL_STATE_SYNCDONE 's' /* synchronization finished in front of + * apply (sublsn set) */ +#define SUBREL_STATE_READY 'r' /* ready (sublsn set) */ /* These are never stored in the catalog, we only use them for IPC. */ #define SUBREL_STATE_UNKNOWN '\0' /* unknown state */ -#define SUBREL_STATE_SYNCWAIT 'w' /* waiting for sync */ -#define SUBREL_STATE_CATCHUP 'c' /* catching up with apply */ +#define SUBREL_STATE_SYNCWAIT 'w' /* waiting for sync */ +#define SUBREL_STATE_CATCHUP 'c' /* catching up with apply */ typedef struct SubscriptionRelState { @@ -79,4 +79,4 @@ extern void RemoveSubscriptionRel(Oid subid, Oid relid); extern List *GetSubscriptionRelations(Oid subid); extern List *GetSubscriptionNotReadyRelations(Oid subid); -#endif /* PG_SUBSCRIPTION_REL_H */ +#endif /* PG_SUBSCRIPTION_REL_H */ diff --git a/src/include/catalog/pg_tablespace.h b/src/include/catalog/pg_tablespace.h index d9ea4b7d63..b759d5cea4 100644 --- a/src/include/catalog/pg_tablespace.h +++ b/src/include/catalog/pg_tablespace.h @@ -63,4 +63,4 @@ DATA(insert OID = 1664 ( pg_global PGUID _null_ _null_ )); #define DEFAULTTABLESPACE_OID 1663 #define GLOBALTABLESPACE_OID 1664 -#endif /* PG_TABLESPACE_H */ +#endif /* PG_TABLESPACE_H */ diff --git a/src/include/catalog/pg_transform.h b/src/include/catalog/pg_transform.h index 3415db3bd6..8b1610bb83 100644 --- a/src/include/catalog/pg_transform.h +++ b/src/include/catalog/pg_transform.h @@ -44,4 +44,4 @@ typedef FormData_pg_transform *Form_pg_transform; #define Anum_pg_transform_trffromsql 3 #define Anum_pg_transform_trftosql 4 -#endif /* PG_TRANSFORM_H */ +#endif /* PG_TRANSFORM_H */ diff --git a/src/include/catalog/pg_trigger.h b/src/include/catalog/pg_trigger.h index 356bc48bf6..f413caf34f 100644 --- a/src/include/catalog/pg_trigger.h +++ b/src/include/catalog/pg_trigger.h @@ -57,7 +57,7 @@ CATALOG(pg_trigger,2620) int2vector tgattr; /* column numbers, if trigger is on columns */ #ifdef CATALOG_VARLEN - bytea tgargs BKI_FORCE_NOT_NULL; /* first\000second\000tgnargs\000 */ + bytea tgargs BKI_FORCE_NOT_NULL; /* first\000second\000tgnargs\000 */ pg_node_tree tgqual; /* WHEN expression, or NULL if none */ NameData tgoldtable; /* old transition table, or NULL if none */ NameData tgnewtable; /* new transition table, or NULL if none */ @@ -153,4 +153,4 @@ typedef FormData_pg_trigger *Form_pg_trigger; #define TRIGGER_USES_TRANSITION_TABLE(namepointer) \ ((namepointer) != (char *) NULL) -#endif /* PG_TRIGGER_H */ +#endif /* PG_TRIGGER_H */ diff --git a/src/include/catalog/pg_ts_config.h b/src/include/catalog/pg_ts_config.h index b61cf857d9..0ba79a596f 100644 --- a/src/include/catalog/pg_ts_config.h +++ b/src/include/catalog/pg_ts_config.h @@ -57,4 +57,4 @@ typedef FormData_pg_ts_config *Form_pg_ts_config; DATA(insert OID = 3748 ( "simple" PGNSP PGUID 3722 )); DESCR("simple configuration"); -#endif /* PG_TS_CONFIG_H */ +#endif /* PG_TS_CONFIG_H */ diff --git a/src/include/catalog/pg_ts_config_map.h b/src/include/catalog/pg_ts_config_map.h index fc9467fd9c..3df05195be 100644 --- a/src/include/catalog/pg_ts_config_map.h +++ b/src/include/catalog/pg_ts_config_map.h @@ -75,4 +75,4 @@ DATA(insert ( 3748 20 1 3765 )); DATA(insert ( 3748 21 1 3765 )); DATA(insert ( 3748 22 1 3765 )); -#endif /* PG_TS_CONFIG_MAP_H */ +#endif /* PG_TS_CONFIG_MAP_H */ diff --git a/src/include/catalog/pg_ts_dict.h b/src/include/catalog/pg_ts_dict.h index 28b7bb7c0d..634ea703e3 100644 --- a/src/include/catalog/pg_ts_dict.h +++ b/src/include/catalog/pg_ts_dict.h @@ -63,4 +63,4 @@ typedef FormData_pg_ts_dict *Form_pg_ts_dict; DATA(insert OID = 3765 ( "simple" PGNSP PGUID 3727 _null_)); DESCR("simple dictionary: just lower case and check for stopword"); -#endif /* PG_TS_DICT_H */ +#endif /* PG_TS_DICT_H */ diff --git a/src/include/catalog/pg_ts_parser.h b/src/include/catalog/pg_ts_parser.h index cfb87b4d56..96e09bdcd8 100644 --- a/src/include/catalog/pg_ts_parser.h +++ b/src/include/catalog/pg_ts_parser.h @@ -64,4 +64,4 @@ typedef FormData_pg_ts_parser *Form_pg_ts_parser; DATA(insert OID = 3722 ( "default" PGNSP prsd_start prsd_nexttoken prsd_end prsd_headline prsd_lextype )); DESCR("default word parser"); -#endif /* PG_TS_PARSER_H */ +#endif /* PG_TS_PARSER_H */ diff --git a/src/include/catalog/pg_ts_template.h b/src/include/catalog/pg_ts_template.h index 5fc6eea243..dc0148c68b 100644 --- a/src/include/catalog/pg_ts_template.h +++ b/src/include/catalog/pg_ts_template.h @@ -64,4 +64,4 @@ DESCR("ispell dictionary"); DATA(insert OID = 3742 ( "thesaurus" PGNSP thesaurus_init thesaurus_lexize )); DESCR("thesaurus dictionary: phrase by phrase substitution"); -#endif /* PG_TS_TEMPLATE_H */ +#endif /* PG_TS_TEMPLATE_H */ diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h index 345e916406..ffdb452b02 100644 --- a/src/include/catalog/pg_type.h +++ b/src/include/catalog/pg_type.h @@ -731,14 +731,14 @@ DATA(insert OID = 3831 ( anyrange PGNSP PGUID -1 f p P f t \054 0 0 0 anyrange #define TYPCATEGORY_DATETIME 'D' #define TYPCATEGORY_ENUM 'E' #define TYPCATEGORY_GEOMETRIC 'G' -#define TYPCATEGORY_NETWORK 'I' /* think INET */ +#define TYPCATEGORY_NETWORK 'I' /* think INET */ #define TYPCATEGORY_NUMERIC 'N' #define TYPCATEGORY_PSEUDOTYPE 'P' #define TYPCATEGORY_RANGE 'R' #define TYPCATEGORY_STRING 'S' #define TYPCATEGORY_TIMESPAN 'T' #define TYPCATEGORY_USER 'U' -#define TYPCATEGORY_BITSTRING 'V' /* er ... "varbit"? */ +#define TYPCATEGORY_BITSTRING 'V' /* er ... "varbit"? */ #define TYPCATEGORY_UNKNOWN 'X' /* Is a type OID a polymorphic pseudotype? (Beware of multiple evaluation) */ @@ -749,4 +749,4 @@ DATA(insert OID = 3831 ( anyrange PGNSP PGUID -1 f p P f t \054 0 0 0 anyrange (typid) == ANYENUMOID || \ (typid) == ANYRANGEOID) -#endif /* PG_TYPE_H */ +#endif /* PG_TYPE_H */ diff --git a/src/include/catalog/pg_type_fn.h b/src/include/catalog/pg_type_fn.h index 01f095612d..b570d3588f 100644 --- a/src/include/catalog/pg_type_fn.h +++ b/src/include/catalog/pg_type_fn.h @@ -81,4 +81,4 @@ extern char *makeArrayTypeName(const char *typeName, Oid typeNamespace); extern bool moveArrayTypeName(Oid typeOid, const char *typeName, Oid typeNamespace); -#endif /* PG_TYPE_FN_H */ +#endif /* PG_TYPE_FN_H */ diff --git a/src/include/catalog/pg_user_mapping.h b/src/include/catalog/pg_user_mapping.h index 1ebf4611df..f08e6a72ed 100644 --- a/src/include/catalog/pg_user_mapping.h +++ b/src/include/catalog/pg_user_mapping.h @@ -54,4 +54,4 @@ typedef FormData_pg_user_mapping *Form_pg_user_mapping; #define Anum_pg_user_mapping_umserver 2 #define Anum_pg_user_mapping_umoptions 3 -#endif /* PG_USER_MAPPING_H */ +#endif /* PG_USER_MAPPING_H */ diff --git a/src/include/catalog/storage.h b/src/include/catalog/storage.h index fea96deba3..a3a97db929 100644 --- a/src/include/catalog/storage.h +++ b/src/include/catalog/storage.h @@ -33,4 +33,4 @@ extern void AtSubCommit_smgr(void); extern void AtSubAbort_smgr(void); extern void PostPrepare_smgr(void); -#endif /* STORAGE_H */ +#endif /* STORAGE_H */ diff --git a/src/include/catalog/storage_xlog.h b/src/include/catalog/storage_xlog.h index fcdd0233b1..4c08005228 100644 --- a/src/include/catalog/storage_xlog.h +++ b/src/include/catalog/storage_xlog.h @@ -56,4 +56,4 @@ extern void smgr_redo(XLogReaderState *record); extern void smgr_desc(StringInfo buf, XLogReaderState *record); extern const char *smgr_identify(uint8 info); -#endif /* STORAGE_XLOG_H */ +#endif /* STORAGE_XLOG_H */ diff --git a/src/include/catalog/toasting.h b/src/include/catalog/toasting.h index 00d0a8326f..f82a799572 100644 --- a/src/include/catalog/toasting.h +++ b/src/include/catalog/toasting.h @@ -67,4 +67,4 @@ DECLARE_TOAST(pg_shseclabel, 4060, 4061); #define PgShseclabelToastTable 4060 #define PgShseclabelToastIndex 4061 -#endif /* TOASTING_H */ +#endif /* TOASTING_H */ diff --git a/src/include/commands/alter.h b/src/include/commands/alter.h index b7aa86cb57..4365357ab8 100644 --- a/src/include/commands/alter.h +++ b/src/include/commands/alter.h @@ -32,4 +32,4 @@ extern ObjectAddress ExecAlterOwnerStmt(AlterOwnerStmt *stmt); extern void AlterObjectOwner_internal(Relation catalog, Oid objectId, Oid new_ownerId); -#endif /* ALTER_H */ +#endif /* ALTER_H */ diff --git a/src/include/commands/async.h b/src/include/commands/async.h index b7842d1a0f..939711d8d9 100644 --- a/src/include/commands/async.h +++ b/src/include/commands/async.h @@ -54,4 +54,4 @@ extern void HandleNotifyInterrupt(void); /* process interrupts */ extern void ProcessNotifyInterrupt(void); -#endif /* ASYNC_H */ +#endif /* ASYNC_H */ diff --git a/src/include/commands/cluster.h b/src/include/commands/cluster.h index 7c9d4746d9..7bade9fad2 100644 --- a/src/include/commands/cluster.h +++ b/src/include/commands/cluster.h @@ -36,4 +36,4 @@ extern void finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap, MultiXactId minMulti, char newrelpersistence); -#endif /* CLUSTER_H */ +#endif /* CLUSTER_H */ diff --git a/src/include/commands/collationcmds.h b/src/include/commands/collationcmds.h index df5623ccb6..30e847432e 100644 --- a/src/include/commands/collationcmds.h +++ b/src/include/commands/collationcmds.h @@ -22,4 +22,4 @@ extern ObjectAddress DefineCollation(ParseState *pstate, List *names, List *para extern void IsThereCollationInNamespace(const char *collname, Oid nspOid); extern ObjectAddress AlterCollation(AlterCollationStmt *stmt); -#endif /* COLLATIONCMDS_H */ +#endif /* COLLATIONCMDS_H */ diff --git a/src/include/commands/comment.h b/src/include/commands/comment.h index 684ea8b697..85bd801513 100644 --- a/src/include/commands/comment.h +++ b/src/include/commands/comment.h @@ -42,4 +42,4 @@ extern void CreateSharedComments(Oid oid, Oid classoid, char *comment); extern char *GetComment(Oid oid, Oid classoid, int32 subid); -#endif /* COMMENT_H */ +#endif /* COMMENT_H */ diff --git a/src/include/commands/conversioncmds.h b/src/include/commands/conversioncmds.h index 20d7f0e9b1..7054505794 100644 --- a/src/include/commands/conversioncmds.h +++ b/src/include/commands/conversioncmds.h @@ -20,4 +20,4 @@ extern ObjectAddress CreateConversionCommand(CreateConversionStmt *parsetree); -#endif /* CONVERSIONCMDS_H */ +#endif /* CONVERSIONCMDS_H */ diff --git a/src/include/commands/copy.h b/src/include/commands/copy.h index f081f2219f..8b2971d287 100644 --- a/src/include/commands/copy.h +++ b/src/include/commands/copy.h @@ -41,4 +41,4 @@ extern uint64 CopyFrom(CopyState cstate); extern DestReceiver *CreateCopyDestReceiver(void); -#endif /* COPY_H */ +#endif /* COPY_H */ diff --git a/src/include/commands/createas.h b/src/include/commands/createas.h index c3c43f6b36..4e13f7deae 100644 --- a/src/include/commands/createas.h +++ b/src/include/commands/createas.h @@ -28,4 +28,4 @@ extern int GetIntoRelEFlags(IntoClause *intoClause); extern DestReceiver *CreateIntoRelDestReceiver(IntoClause *intoClause); -#endif /* CREATEAS_H */ +#endif /* CREATEAS_H */ diff --git a/src/include/commands/dbcommands.h b/src/include/commands/dbcommands.h index 52918a9f4b..f42c8cdbe3 100644 --- a/src/include/commands/dbcommands.h +++ b/src/include/commands/dbcommands.h @@ -31,4 +31,4 @@ extern char *get_database_name(Oid dbid); extern void check_encoding_locale_matches(int encoding, const char *collate, const char *ctype); -#endif /* DBCOMMANDS_H */ +#endif /* DBCOMMANDS_H */ diff --git a/src/include/commands/dbcommands_xlog.h b/src/include/commands/dbcommands_xlog.h index 6583d0d5bd..63b1a6470c 100644 --- a/src/include/commands/dbcommands_xlog.h +++ b/src/include/commands/dbcommands_xlog.h @@ -41,4 +41,4 @@ extern void dbase_redo(XLogReaderState *rptr); extern void dbase_desc(StringInfo buf, XLogReaderState *rptr); extern const char *dbase_identify(uint8 info); -#endif /* DBCOMMANDS_XLOG_H */ +#endif /* DBCOMMANDS_XLOG_H */ diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h index 5dd14b43d3..f7bb4a54f7 100644 --- a/src/include/commands/defrem.h +++ b/src/include/commands/defrem.h @@ -164,4 +164,4 @@ extern TypeName *defGetTypeName(DefElem *def); extern int defGetTypeLength(DefElem *def); extern List *defGetStringList(DefElem *def); -#endif /* DEFREM_H */ +#endif /* DEFREM_H */ diff --git a/src/include/commands/discard.h b/src/include/commands/discard.h index b960cab51f..8ea0b30ddf 100644 --- a/src/include/commands/discard.h +++ b/src/include/commands/discard.h @@ -17,4 +17,4 @@ extern void DiscardCommand(DiscardStmt *stmt, bool isTopLevel); -#endif /* DISCARD_H */ +#endif /* DISCARD_H */ diff --git a/src/include/commands/event_trigger.h b/src/include/commands/event_trigger.h index 0017bd0cd4..2ce528272c 100644 --- a/src/include/commands/event_trigger.h +++ b/src/include/commands/event_trigger.h @@ -86,4 +86,4 @@ extern void EventTriggerCollectAlterTSConfig(AlterTSConfigurationStmt *stmt, Oid cfgId, Oid *dictIds, int ndicts); extern void EventTriggerCollectAlterDefPrivs(AlterDefaultPrivilegesStmt *stmt); -#endif /* EVENT_TRIGGER_H */ +#endif /* EVENT_TRIGGER_H */ diff --git a/src/include/commands/explain.h b/src/include/commands/explain.h index 358bfd8482..4d356071de 100644 --- a/src/include/commands/explain.h +++ b/src/include/commands/explain.h @@ -44,7 +44,7 @@ typedef struct ExplainState List *rtable; /* range table */ List *rtable_names; /* alias names for RTEs */ List *deparse_cxt; /* context list for deparsing expressions */ - Bitmapset *printed_subplans; /* ids of SubPlans we've printed */ + Bitmapset *printed_subplans; /* ids of SubPlans we've printed */ } ExplainState; /* Hook for plugins to get control in ExplainOneQuery() */ @@ -101,4 +101,4 @@ extern void ExplainPropertyFloat(const char *qlabel, double value, int ndigits, extern void ExplainPropertyBool(const char *qlabel, bool value, ExplainState *es); -#endif /* EXPLAIN_H */ +#endif /* EXPLAIN_H */ diff --git a/src/include/commands/extension.h b/src/include/commands/extension.h index 7f027d9dc7..73bba3c784 100644 --- a/src/include/commands/extension.h +++ b/src/include/commands/extension.h @@ -53,4 +53,4 @@ extern ObjectAddress AlterExtensionNamespace(const char *extensionName, const ch extern void AlterExtensionOwner_oid(Oid extensionOid, Oid newOwnerId); -#endif /* EXTENSION_H */ +#endif /* EXTENSION_H */ diff --git a/src/include/commands/lockcmds.h b/src/include/commands/lockcmds.h index 45ed96d4d1..cdb5c62a52 100644 --- a/src/include/commands/lockcmds.h +++ b/src/include/commands/lockcmds.h @@ -21,4 +21,4 @@ */ extern void LockTableCommand(LockStmt *lockstmt); -#endif /* LOCKCMDS_H */ +#endif /* LOCKCMDS_H */ diff --git a/src/include/commands/matview.h b/src/include/commands/matview.h index 129fb92f59..3feb137ef4 100644 --- a/src/include/commands/matview.h +++ b/src/include/commands/matview.h @@ -30,4 +30,4 @@ extern DestReceiver *CreateTransientRelDestReceiver(Oid oid); extern bool MatViewIncrementalMaintenanceIsEnabled(void); -#endif /* MATVIEW_H */ +#endif /* MATVIEW_H */ diff --git a/src/include/commands/policy.h b/src/include/commands/policy.h index cff93a6cb0..d6a920ccef 100644 --- a/src/include/commands/policy.h +++ b/src/include/commands/policy.h @@ -35,4 +35,4 @@ extern ObjectAddress rename_policy(RenameStmt *stmt); extern bool relation_has_policies(Relation rel); -#endif /* POLICY_H */ +#endif /* POLICY_H */ diff --git a/src/include/commands/portalcmds.h b/src/include/commands/portalcmds.h index 8f0e6c48f4..488ce60cd6 100644 --- a/src/include/commands/portalcmds.h +++ b/src/include/commands/portalcmds.h @@ -30,4 +30,4 @@ extern void PortalCleanup(Portal portal); extern void PersistHoldablePortal(Portal portal); -#endif /* PORTALCMDS_H */ +#endif /* PORTALCMDS_H */ diff --git a/src/include/commands/prepare.h b/src/include/commands/prepare.h index c60e6f30b8..5ec1200e0a 100644 --- a/src/include/commands/prepare.h +++ b/src/include/commands/prepare.h @@ -28,7 +28,7 @@ typedef struct { /* dynahash.c requires key to be first field */ char stmt_name[NAMEDATALEN]; - CachedPlanSource *plansource; /* the actual cached plan */ + CachedPlanSource *plansource; /* the actual cached plan */ bool from_sql; /* prepared via SQL, not FE/BE protocol? */ TimestampTz prepare_time; /* the time when the stmt was prepared */ } PreparedStatement; @@ -57,4 +57,4 @@ extern List *FetchPreparedStatementTargetList(PreparedStatement *stmt); extern void DropAllPreparedStatements(void); -#endif /* PREPARE_H */ +#endif /* PREPARE_H */ diff --git a/src/include/commands/proclang.h b/src/include/commands/proclang.h index f056978805..9a4bc75d12 100644 --- a/src/include/commands/proclang.h +++ b/src/include/commands/proclang.h @@ -20,4 +20,4 @@ extern void DropProceduralLanguageById(Oid langOid); extern bool PLTemplateExists(const char *languageName); extern Oid get_language_oid(const char *langname, bool missing_ok); -#endif /* PROCLANG_H */ +#endif /* PROCLANG_H */ diff --git a/src/include/commands/publicationcmds.h b/src/include/commands/publicationcmds.h index 7f12ff0a1b..a2e0f4a21e 100644 --- a/src/include/commands/publicationcmds.h +++ b/src/include/commands/publicationcmds.h @@ -26,4 +26,4 @@ extern void RemovePublicationRelById(Oid proid); extern ObjectAddress AlterPublicationOwner(const char *name, Oid newOwnerId); extern void AlterPublicationOwner_oid(Oid pubid, Oid newOwnerId); -#endif /* PUBLICATIONCMDS_H */ +#endif /* PUBLICATIONCMDS_H */ diff --git a/src/include/commands/schemacmds.h b/src/include/commands/schemacmds.h index f07a389c7f..381e5b8dae 100644 --- a/src/include/commands/schemacmds.h +++ b/src/include/commands/schemacmds.h @@ -28,4 +28,4 @@ extern ObjectAddress RenameSchema(const char *oldname, const char *newname); extern ObjectAddress AlterSchemaOwner(const char *name, Oid newOwnerId); extern void AlterSchemaOwner_oid(Oid schemaOid, Oid newOwnerId); -#endif /* SCHEMACMDS_H */ +#endif /* SCHEMACMDS_H */ diff --git a/src/include/commands/seclabel.h b/src/include/commands/seclabel.h index 2e24801fc1..a97c3293b2 100644 --- a/src/include/commands/seclabel.h +++ b/src/include/commands/seclabel.h @@ -31,4 +31,4 @@ typedef void (*check_object_relabel_type) (const ObjectAddress *object, extern void register_label_provider(const char *provider, check_object_relabel_type hook); -#endif /* SECLABEL_H */ +#endif /* SECLABEL_H */ diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h index 304586e48e..caab195130 100644 --- a/src/include/commands/sequence.h +++ b/src/include/commands/sequence.h @@ -66,4 +66,4 @@ extern void seq_desc(StringInfo buf, XLogReaderState *rptr); extern const char *seq_identify(uint8 info); extern void seq_mask(char *pagedata, BlockNumber blkno); -#endif /* SEQUENCE_H */ +#endif /* SEQUENCE_H */ diff --git a/src/include/commands/subscriptioncmds.h b/src/include/commands/subscriptioncmds.h index 1e4428e617..3d92a682a1 100644 --- a/src/include/commands/subscriptioncmds.h +++ b/src/include/commands/subscriptioncmds.h @@ -26,4 +26,4 @@ extern void DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel); extern ObjectAddress AlterSubscriptionOwner(const char *name, Oid newOwnerId); extern void AlterSubscriptionOwner_oid(Oid subid, Oid newOwnerId); -#endif /* SUBSCRIPTIONCMDS_H */ +#endif /* SUBSCRIPTIONCMDS_H */ diff --git a/src/include/commands/tablecmds.h b/src/include/commands/tablecmds.h index f3a97016a1..abd31b68d4 100644 --- a/src/include/commands/tablecmds.h +++ b/src/include/commands/tablecmds.h @@ -87,4 +87,4 @@ extern void RangeVarCallbackOwnsTable(const RangeVar *relation, extern void RangeVarCallbackOwnsRelation(const RangeVar *relation, Oid relId, Oid oldRelId, void *noCatalogs); -#endif /* TABLECMDS_H */ +#endif /* TABLECMDS_H */ diff --git a/src/include/commands/tablespace.h b/src/include/commands/tablespace.h index 3ea13bdf14..ba8de32c7b 100644 --- a/src/include/commands/tablespace.h +++ b/src/include/commands/tablespace.h @@ -63,4 +63,4 @@ extern void tblspc_redo(XLogReaderState *rptr); extern void tblspc_desc(StringInfo buf, XLogReaderState *rptr); extern const char *tblspc_identify(uint8 info); -#endif /* TABLESPACE_H */ +#endif /* TABLESPACE_H */ diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h index d73969c874..10ac724feb 100644 --- a/src/include/commands/trigger.h +++ b/src/include/commands/trigger.h @@ -212,4 +212,4 @@ extern bool RI_Initial_Check(Trigger *trigger, extern int RI_FKey_trigger_type(Oid tgfoid); -#endif /* TRIGGER_H */ +#endif /* TRIGGER_H */ diff --git a/src/include/commands/typecmds.h b/src/include/commands/typecmds.h index c18f93adb2..34f6fe328f 100644 --- a/src/include/commands/typecmds.h +++ b/src/include/commands/typecmds.h @@ -54,4 +54,4 @@ extern Oid AlterTypeNamespaceInternal(Oid typeOid, Oid nspOid, bool errorOnTableType, ObjectAddresses *objsMoved); -#endif /* TYPECMDS_H */ +#endif /* TYPECMDS_H */ diff --git a/src/include/commands/user.h b/src/include/commands/user.h index 08037e0f81..028e0dde56 100644 --- a/src/include/commands/user.h +++ b/src/include/commands/user.h @@ -34,4 +34,4 @@ extern void DropOwnedObjects(DropOwnedStmt *stmt); extern void ReassignOwnedObjects(ReassignOwnedStmt *stmt); extern List *roleSpecsToIds(List *memberNames); -#endif /* USER_H */ +#endif /* USER_H */ diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h index 0fa585b091..a9035112e9 100644 --- a/src/include/commands/vacuum.h +++ b/src/include/commands/vacuum.h @@ -136,20 +136,19 @@ typedef struct VacAttrStats typedef struct VacuumParams { int freeze_min_age; /* min freeze age, -1 to use default */ - int freeze_table_age; /* age at which to scan whole table */ - int multixact_freeze_min_age; /* min multixact freeze age, - * -1 to use default */ - int multixact_freeze_table_age; /* multixact age at which to - * scan whole table */ + int freeze_table_age; /* age at which to scan whole table */ + int multixact_freeze_min_age; /* min multixact freeze age, -1 to + * use default */ + int multixact_freeze_table_age; /* multixact age at which to scan + * whole table */ bool is_wraparound; /* force a for-wraparound vacuum */ - int log_min_duration; /* minimum execution threshold in ms - * at which verbose logs are - * activated, -1 to use default */ + int log_min_duration; /* minimum execution threshold in ms at + * which verbose logs are activated, -1 + * to use default */ } VacuumParams; /* GUC parameters */ -extern PGDLLIMPORT int default_statistics_target; /* PGDLLIMPORT for - * PostGIS */ +extern PGDLLIMPORT int default_statistics_target; /* PGDLLIMPORT for PostGIS */ extern int vacuum_freeze_min_age; extern int vacuum_freeze_table_age; extern int vacuum_multixact_freeze_min_age; @@ -203,4 +202,4 @@ extern double anl_random_fract(void); extern double anl_init_selection_state(int n); extern double anl_get_next_S(double t, int n, double *stateptr); -#endif /* VACUUM_H */ +#endif /* VACUUM_H */ diff --git a/src/include/commands/variable.h b/src/include/commands/variable.h index 247423c6fb..575339a6d8 100644 --- a/src/include/commands/variable.h +++ b/src/include/commands/variable.h @@ -37,4 +37,4 @@ extern bool check_role(char **newval, void **extra, GucSource source); extern void assign_role(const char *newval, void *extra); extern const char *show_role(void); -#endif /* VARIABLE_H */ +#endif /* VARIABLE_H */ diff --git a/src/include/commands/view.h b/src/include/commands/view.h index 39763913c8..cf08ce2ac7 100644 --- a/src/include/commands/view.h +++ b/src/include/commands/view.h @@ -24,4 +24,4 @@ extern ObjectAddress DefineView(ViewStmt *stmt, const char *queryString, extern void StoreViewQuery(Oid viewOid, Query *viewParse, bool replace); -#endif /* VIEW_H */ +#endif /* VIEW_H */ diff --git a/src/include/common/base64.h b/src/include/common/base64.h index 09b69b1656..7fe19bb432 100644 --- a/src/include/common/base64.h +++ b/src/include/common/base64.h @@ -16,4 +16,4 @@ extern int pg_b64_decode(const char *src, int len, char *dst); extern int pg_b64_enc_len(int srclen); extern int pg_b64_dec_len(int srclen); -#endif /* BASE64_H */ +#endif /* BASE64_H */ diff --git a/src/include/common/config_info.h b/src/include/common/config_info.h index 656e26fdb0..f775327861 100644 --- a/src/include/common/config_info.h +++ b/src/include/common/config_info.h @@ -18,4 +18,4 @@ typedef struct ConfigData extern ConfigData *get_configdata(const char *my_exec_path, size_t *configdata_len); -#endif /* COMMON_CONFIG_INFO_H */ +#endif /* COMMON_CONFIG_INFO_H */ diff --git a/src/include/common/controldata_utils.h b/src/include/common/controldata_utils.h index 82ea426afe..e97abe6a51 100644 --- a/src/include/common/controldata_utils.h +++ b/src/include/common/controldata_utils.h @@ -14,4 +14,4 @@ extern ControlFileData *get_controlfile(const char *DataDir, const char *progname, bool *crc_ok_p); -#endif /* COMMON_CONTROLDATA_UTILS_H */ +#endif /* COMMON_CONTROLDATA_UTILS_H */ diff --git a/src/include/common/fe_memutils.h b/src/include/common/fe_memutils.h index cb381bd9f5..6708670b96 100644 --- a/src/include/common/fe_memutils.h +++ b/src/include/common/fe_memutils.h @@ -41,4 +41,4 @@ extern void pfree(void *pointer); extern char *psprintf(const char *fmt,...) pg_attribute_printf(1, 2); extern size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list args) pg_attribute_printf(3, 0); -#endif /* FE_MEMUTILS_H */ +#endif /* FE_MEMUTILS_H */ diff --git a/src/include/common/file_utils.h b/src/include/common/file_utils.h index 95c001905d..52af7f0baa 100644 --- a/src/include/common/file_utils.h +++ b/src/include/common/file_utils.h @@ -24,4 +24,4 @@ extern int durable_rename(const char *oldfile, const char *newfile, const char *progname); extern int fsync_parent_path(const char *fname, const char *progname); -#endif /* FILE_UTILS_H */ +#endif /* FILE_UTILS_H */ diff --git a/src/include/common/int128.h b/src/include/common/int128.h index 046f5b4903..af2c93da46 100644 --- a/src/include/common/int128.h +++ b/src/include/common/int128.h @@ -271,6 +271,6 @@ int128_to_int64(INT128 val) return (int64) val.lo; } -#endif /* USE_NATIVE_INT128 */ +#endif /* USE_NATIVE_INT128 */ -#endif /* INT128_H */ +#endif /* INT128_H */ diff --git a/src/include/common/ip.h b/src/include/common/ip.h index 41d1be86ad..f530139876 100644 --- a/src/include/common/ip.h +++ b/src/include/common/ip.h @@ -34,4 +34,4 @@ extern int pg_getnameinfo_all(const struct sockaddr_storage *addr, int salen, char *service, int servicelen, int flags); -#endif /* IP_H */ +#endif /* IP_H */ diff --git a/src/include/common/keywords.h b/src/include/common/keywords.h index 34e066be6b..60522715a8 100644 --- a/src/include/common/keywords.h +++ b/src/include/common/keywords.h @@ -41,4 +41,4 @@ extern const ScanKeyword *ScanKeywordLookup(const char *text, const ScanKeyword *keywords, int num_keywords); -#endif /* KEYWORDS_H */ +#endif /* KEYWORDS_H */ diff --git a/src/include/common/pg_lzcompress.h b/src/include/common/pg_lzcompress.h index dbd51d58ef..d4b2e8a53c 100644 --- a/src/include/common/pg_lzcompress.h +++ b/src/include/common/pg_lzcompress.h @@ -88,4 +88,4 @@ extern int32 pglz_compress(const char *source, int32 slen, char *dest, extern int32 pglz_decompress(const char *source, int32 slen, char *dest, int32 rawsize); -#endif /* _PG_LZCOMPRESS_H_ */ +#endif /* _PG_LZCOMPRESS_H_ */ diff --git a/src/include/common/relpath.h b/src/include/common/relpath.h index df090f2da4..ec5ef99451 100644 --- a/src/include/common/relpath.h +++ b/src/include/common/relpath.h @@ -71,4 +71,4 @@ extern char *GetRelationPath(Oid dbNode, Oid spcNode, Oid relNode, #define relpath(rnode, forknum) \ relpathbackend((rnode).node, (rnode).backend, forknum) -#endif /* RELPATH_H */ +#endif /* RELPATH_H */ diff --git a/src/include/common/restricted_token.h b/src/include/common/restricted_token.h index 7441a55119..51be5a760c 100644 --- a/src/include/common/restricted_token.h +++ b/src/include/common/restricted_token.h @@ -21,4 +21,4 @@ void get_restricted_token(const char *progname); HANDLE CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, const char *progname); #endif -#endif /* COMMON_RESTRICTED_TOKEN_H */ +#endif /* COMMON_RESTRICTED_TOKEN_H */ diff --git a/src/include/common/saslprep.h b/src/include/common/saslprep.h index ec5c8ce361..c7b620cf19 100644 --- a/src/include/common/saslprep.h +++ b/src/include/common/saslprep.h @@ -27,4 +27,4 @@ typedef enum extern pg_saslprep_rc pg_saslprep(const char *input, char **output); -#endif /* SASLPREP_H */ +#endif /* SASLPREP_H */ diff --git a/src/include/common/scram-common.h b/src/include/common/scram-common.h index 2ee51fbaec..ebb733df4b 100644 --- a/src/include/common/scram-common.h +++ b/src/include/common/scram-common.h @@ -56,4 +56,4 @@ extern void scram_ServerKey(const uint8 *salted_password, uint8 *result); extern char *scram_build_verifier(const char *salt, int saltlen, int iterations, const char *password); -#endif /* SCRAM_COMMON_H */ +#endif /* SCRAM_COMMON_H */ diff --git a/src/include/common/sha2.h b/src/include/common/sha2.h index 09107cfc3b..6358ca3c56 100644 --- a/src/include/common/sha2.h +++ b/src/include/common/sha2.h @@ -89,7 +89,7 @@ typedef struct pg_sha512_ctx } pg_sha512_ctx; typedef struct pg_sha256_ctx pg_sha224_ctx; typedef struct pg_sha512_ctx pg_sha384_ctx; -#endif /* USE_SSL */ +#endif /* USE_SSL */ /* Interface routines for SHA224/256/384/512 */ extern void pg_sha224_init(pg_sha224_ctx *ctx); @@ -112,4 +112,4 @@ extern void pg_sha512_update(pg_sha512_ctx *ctx, const uint8 *input0, size_t len); extern void pg_sha512_final(pg_sha512_ctx *ctx, uint8 *dest); -#endif /* _PG_SHA2_H_ */ +#endif /* _PG_SHA2_H_ */ diff --git a/src/include/common/string.h b/src/include/common/string.h index ec9ee9a740..5f3ea71d61 100644 --- a/src/include/common/string.h +++ b/src/include/common/string.h @@ -12,4 +12,4 @@ extern bool pg_str_endswith(const char *str, const char *end); -#endif /* COMMON_STRING_H */ +#endif /* COMMON_STRING_H */ diff --git a/src/include/common/unicode_norm.h b/src/include/common/unicode_norm.h index 488f964d2c..8741209751 100644 --- a/src/include/common/unicode_norm.h +++ b/src/include/common/unicode_norm.h @@ -18,4 +18,4 @@ extern pg_wchar *unicode_normalize_kc(const pg_wchar *input); -#endif /* UNICODE_NORM_H */ +#endif /* UNICODE_NORM_H */ diff --git a/src/include/common/unicode_norm_table.h b/src/include/common/unicode_norm_table.h index 095481ab7f..da08e487e3 100644 --- a/src/include/common/unicode_norm_table.h +++ b/src/include/common/unicode_norm_table.h @@ -37,14 +37,14 @@ typedef struct static const pg_unicode_decomposition UnicodeDecompMain[6532] = { {0x00A0, 0, 1 | DECOMP_INLINE, 0x0020}, - {0x00A8, 0, 2 | DECOMP_NO_COMPOSE, 0}, /* compatibility mapping */ + {0x00A8, 0, 2 | DECOMP_NO_COMPOSE, 0}, /* compatibility mapping */ {0x00AA, 0, 1 | DECOMP_INLINE, 0x0061}, - {0x00AF, 0, 2 | DECOMP_NO_COMPOSE, 2}, /* compatibility mapping */ + {0x00AF, 0, 2 | DECOMP_NO_COMPOSE, 2}, /* compatibility mapping */ {0x00B2, 0, 1 | DECOMP_INLINE, 0x0032}, {0x00B3, 0, 1 | DECOMP_INLINE, 0x0033}, - {0x00B4, 0, 2 | DECOMP_NO_COMPOSE, 4}, /* compatibility mapping */ + {0x00B4, 0, 2 | DECOMP_NO_COMPOSE, 4}, /* compatibility mapping */ {0x00B5, 0, 1 | DECOMP_INLINE, 0x03BC}, - {0x00B8, 0, 2 | DECOMP_NO_COMPOSE, 6}, /* compatibility mapping */ + {0x00B8, 0, 2 | DECOMP_NO_COMPOSE, 6}, /* compatibility mapping */ {0x00B9, 0, 1 | DECOMP_INLINE, 0x0031}, {0x00BA, 0, 1 | DECOMP_INLINE, 0x006F}, {0x00BC, 0, 3, 8}, diff --git a/src/include/common/username.h b/src/include/common/username.h index 114304f9e1..735572d382 100644 --- a/src/include/common/username.h +++ b/src/include/common/username.h @@ -12,4 +12,4 @@ extern const char *get_user_name(char **errstr); extern const char *get_user_name_or_exit(const char *progname); -#endif /* USERNAME_H */ +#endif /* USERNAME_H */ diff --git a/src/include/datatype/timestamp.h b/src/include/datatype/timestamp.h index 16e1b4c44d..6f48d1c71b 100644 --- a/src/include/datatype/timestamp.h +++ b/src/include/datatype/timestamp.h @@ -178,7 +178,7 @@ typedef struct /* First allowed date, and first disallowed date, in Julian-date form */ #define DATETIME_MIN_JULIAN (0) #define DATE_END_JULIAN (2147483494) /* == date2j(JULIAN_MAXYEAR, 1, 1) */ -#define TIMESTAMP_END_JULIAN (109203528) /* == date2j(294277, 1, 1) */ +#define TIMESTAMP_END_JULIAN (109203528) /* == date2j(294277, 1, 1) */ /* Timestamp limits */ #define MIN_TIMESTAMP INT64CONST(-211813488000000000) @@ -194,4 +194,4 @@ typedef struct /* Range-check a timestamp */ #define IS_VALID_TIMESTAMP(t) (MIN_TIMESTAMP <= (t) && (t) < END_TIMESTAMP) -#endif /* DATATYPE_TIMESTAMP_H */ +#endif /* DATATYPE_TIMESTAMP_H */ diff --git a/src/include/executor/execExpr.h b/src/include/executor/execExpr.h index 86fdb33cd3..7a65339f01 100644 --- a/src/include/executor/execExpr.h +++ b/src/include/executor/execExpr.h @@ -261,7 +261,7 @@ typedef struct ExprEvalStep bool first; /* first time through, need to initialize? */ bool slow; /* need runtime check for nulls? */ TupleDesc tupdesc; /* descriptor for resulting tuples */ - JunkFilter *junkFilter; /* JunkFilter to remove resjunk cols */ + JunkFilter *junkFilter; /* JunkFilter to remove resjunk cols */ } wholerow; /* for EEOP_ASSIGN_*_VAR */ @@ -292,7 +292,7 @@ typedef struct ExprEvalStep struct { FmgrInfo *finfo; /* function's lookup data */ - FunctionCallInfo fcinfo_data; /* arguments etc */ + FunctionCallInfo fcinfo_data; /* arguments etc */ /* faster to access without additional indirection: */ PGFunction fn_addr; /* actual call address */ int nargs; /* number of arguments */ @@ -302,19 +302,19 @@ typedef struct ExprEvalStep struct { bool *anynull; /* track if any input was NULL */ - int jumpdone; /* jump here if result determined */ + int jumpdone; /* jump here if result determined */ } boolexpr; /* for EEOP_QUAL */ struct { - int jumpdone; /* jump here on false or null */ + int jumpdone; /* jump here on false or null */ } qualexpr; /* for EEOP_JUMP[_CONDITION] */ struct { - int jumpdone; /* target instruction's index */ + int jumpdone; /* target instruction's index */ } jump; /* for EEOP_NULLTEST_ROWIS[NOT]NULL */ @@ -328,7 +328,7 @@ typedef struct ExprEvalStep struct { int paramid; /* numeric ID for parameter */ - Oid paramtype; /* OID of parameter's datatype */ + Oid paramtype; /* OID of parameter's datatype */ } param; /* for EEOP_CASE_TESTVAL/DOMAIN_TESTVAL */ @@ -372,14 +372,14 @@ typedef struct ExprEvalStep /* for EEOP_ARRAYEXPR */ struct { - Datum *elemvalues; /* element values get stored here */ + Datum *elemvalues; /* element values get stored here */ bool *elemnulls; int nelems; /* length of the above arrays */ - Oid elemtype; /* array element type */ - int16 elemlength; /* typlen of the array element type */ - bool elembyval; /* is the element type pass-by-value? */ - char elemalign; /* typalign of the element type */ - bool multidims; /* is array expression multi-D? */ + Oid elemtype; /* array element type */ + int16 elemlength; /* typlen of the array element type */ + bool elembyval; /* is the element type pass-by-value? */ + char elemalign; /* typalign of the element type */ + bool multidims; /* is array expression multi-D? */ } arrayexpr; /* for EEOP_ARRAYCOERCE */ @@ -387,9 +387,9 @@ typedef struct ExprEvalStep { ArrayCoerceExpr *coerceexpr; Oid resultelemtype; /* element type of result array */ - FmgrInfo *elemfunc; /* lookup info for element coercion - * function */ - struct ArrayMapState *amstate; /* workspace for array_map */ + FmgrInfo *elemfunc; /* lookup info for element coercion + * function */ + struct ArrayMapState *amstate; /* workspace for array_map */ } arraycoerce; /* for EEOP_ROW */ @@ -437,8 +437,8 @@ typedef struct ExprEvalStep /* for EEOP_FIELDSELECT */ struct { - AttrNumber fieldnum; /* field number to extract */ - Oid resulttype; /* field's type */ + AttrNumber fieldnum; /* field number to extract */ + Oid resulttype; /* field's type */ /* cached tupdesc pointer - filled at runtime */ TupleDesc argdesc; } fieldselect; @@ -466,7 +466,7 @@ typedef struct ExprEvalStep struct ArrayRefState *state; int off; /* 0-based index of this subscript */ bool isupper; /* is it upper or lower subscript? */ - int jumpdone; /* jump here on null */ + int jumpdone; /* jump here on null */ } arrayref_subscript; /* for EEOP_ARRAYREF_OLD / ASSIGN / FETCH */ @@ -491,7 +491,7 @@ typedef struct ExprEvalStep /* for EEOP_CONVERT_ROWTYPE */ struct { - ConvertRowtypeExpr *convert; /* original expression */ + ConvertRowtypeExpr *convert; /* original expression */ /* these three fields are filled at runtime: */ TupleDesc indesc; /* tupdesc for input type */ TupleDesc outdesc; /* tupdesc for output type */ @@ -509,7 +509,7 @@ typedef struct ExprEvalStep bool typbyval; char typalign; FmgrInfo *finfo; /* function's lookup data */ - FunctionCallInfo fcinfo_data; /* arguments etc */ + FunctionCallInfo fcinfo_data; /* arguments etc */ /* faster to access without additional indirection: */ PGFunction fn_addr; /* actual call address */ } scalararrayop; @@ -647,4 +647,4 @@ extern void ExecEvalAlternativeSubPlan(ExprState *state, ExprEvalStep *op, extern void ExecEvalWholeRowVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext); -#endif /* EXEC_EXPR_H */ +#endif /* EXEC_EXPR_H */ diff --git a/src/include/executor/execParallel.h b/src/include/executor/execParallel.h index 0b7ca59dca..bd0a87fa04 100644 --- a/src/include/executor/execParallel.h +++ b/src/include/executor/execParallel.h @@ -40,4 +40,4 @@ extern void ExecParallelReinitialize(ParallelExecutorInfo *pei); extern void ParallelQueryMain(dsm_segment *seg, shm_toc *toc); -#endif /* EXECPARALLEL_H */ +#endif /* EXECPARALLEL_H */ diff --git a/src/include/executor/execdebug.h b/src/include/executor/execdebug.h index 8b61520e18..cd04b60176 100644 --- a/src/include/executor/execdebug.h +++ b/src/include/executor/execdebug.h @@ -76,7 +76,7 @@ #define NL_printf(s) #define NL1_printf(s, a) #define ENL1_printf(message) -#endif /* EXEC_NESTLOOPDEBUG */ +#endif /* EXEC_NESTLOOPDEBUG */ /* ---------------- * sort node debugging defines @@ -90,7 +90,7 @@ #define SO_nodeDisplay(l) #define SO_printf(s) #define SO1_printf(s, p) -#endif /* EXEC_SORTDEBUG */ +#endif /* EXEC_SORTDEBUG */ /* ---------------- * merge join debugging defines @@ -123,6 +123,6 @@ #define MJ_DEBUG_COMPARE(res) #define MJ_DEBUG_QUAL(clause, res) #define MJ_DEBUG_PROC_NODE(slot) -#endif /* EXEC_MERGEJOINDEBUG */ +#endif /* EXEC_MERGEJOINDEBUG */ -#endif /* EXECDEBUG_H */ +#endif /* EXECDEBUG_H */ diff --git a/src/include/executor/execdesc.h b/src/include/executor/execdesc.h index 37de6f2011..8c09961e28 100644 --- a/src/include/executor/execdesc.h +++ b/src/include/executor/execdesc.h @@ -41,7 +41,7 @@ typedef struct QueryDesc DestReceiver *dest; /* the destination for tuple output */ ParamListInfo params; /* param values being passed in */ QueryEnvironment *queryEnv; /* query environment passed in */ - int instrument_options; /* OR of InstrumentOption flags */ + int instrument_options; /* OR of InstrumentOption flags */ /* These fields are set by ExecutorStart */ TupleDesc tupDesc; /* descriptor for result tuples */ @@ -49,7 +49,7 @@ typedef struct QueryDesc PlanState *planstate; /* tree of per-plan-node state */ /* This field is set by ExecutorRun */ - bool already_executed; /* true if previously executed */ + bool already_executed; /* true if previously executed */ /* This is always set NULL by the core system, but plugins can change it */ struct Instrumentation *totaltime; /* total time spent in ExecutorRun */ @@ -67,4 +67,4 @@ extern QueryDesc *CreateQueryDesc(PlannedStmt *plannedstmt, extern void FreeQueryDesc(QueryDesc *qdesc); -#endif /* EXECDESC_H */ +#endif /* EXECDESC_H */ diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index 6544be9602..3c4abd1098 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -538,4 +538,4 @@ extern void CheckCmdReplicaIdentity(Relation rel, CmdType cmd); extern void CheckSubscriptionRelkind(char relkind, const char *nspname, const char *relname); -#endif /* EXECUTOR_H */ +#endif /* EXECUTOR_H */ diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h index 7821a634f1..718d8947a3 100644 --- a/src/include/executor/functions.h +++ b/src/include/executor/functions.h @@ -36,4 +36,4 @@ extern bool check_sql_fn_retval(Oid func_id, Oid rettype, extern DestReceiver *CreateSQLFunctionDestReceiver(void); -#endif /* FUNCTIONS_H */ +#endif /* FUNCTIONS_H */ diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h index addcd09049..82acadf85b 100644 --- a/src/include/executor/hashjoin.h +++ b/src/include/executor/hashjoin.h @@ -63,7 +63,7 @@ typedef struct HashJoinTupleData { - struct HashJoinTupleData *next; /* link to next tuple in same bucket */ + struct HashJoinTupleData *next; /* link to next tuple in same bucket */ uint32 hashvalue; /* tuple's hash code */ /* Tuple data, in MinimalTuple format, follows on a MAXALIGN boundary */ } HashJoinTupleData; @@ -128,9 +128,8 @@ typedef struct HashJoinTableData int nbuckets; /* # buckets in the in-memory hash table */ int log2_nbuckets; /* its log2 (nbuckets must be a power of 2) */ - int nbuckets_original; /* # buckets when starting the first - * hash */ - int nbuckets_optimal; /* optimal # buckets (per batch) */ + int nbuckets_original; /* # buckets when starting the first hash */ + int nbuckets_optimal; /* optimal # buckets (per batch) */ int log2_nbuckets_optimal; /* log2(nbuckets_optimal) */ /* buckets[i] is head of list of tuples in i'th in-memory bucket */ @@ -179,7 +178,7 @@ typedef struct HashJoinTableData Size spaceAllowed; /* upper limit for space used */ Size spacePeak; /* peak space used */ Size spaceUsedSkew; /* skew hash table's current space usage */ - Size spaceAllowedSkew; /* upper limit for skew hashtable */ + Size spaceAllowedSkew; /* upper limit for skew hashtable */ MemoryContext hashCxt; /* context for whole-hash-join storage */ MemoryContext batchCxt; /* context for this-batch-only storage */ @@ -188,4 +187,4 @@ typedef struct HashJoinTableData HashMemoryChunk chunks; /* one list for the whole batch */ } HashJoinTableData; -#endif /* HASHJOIN_H */ +#endif /* HASHJOIN_H */ diff --git a/src/include/executor/instrument.h b/src/include/executor/instrument.h index c9e169c45c..31573145a9 100644 --- a/src/include/executor/instrument.h +++ b/src/include/executor/instrument.h @@ -19,15 +19,15 @@ typedef struct BufferUsage { long shared_blks_hit; /* # of shared buffer hits */ - long shared_blks_read; /* # of shared disk blocks read */ + long shared_blks_read; /* # of shared disk blocks read */ long shared_blks_dirtied; /* # of shared blocks dirtied */ long shared_blks_written; /* # of shared disk blocks written */ long local_blks_hit; /* # of local buffer hits */ long local_blks_read; /* # of local disk blocks read */ - long local_blks_dirtied; /* # of shared blocks dirtied */ - long local_blks_written; /* # of local disk blocks written */ + long local_blks_dirtied; /* # of shared blocks dirtied */ + long local_blks_written; /* # of local disk blocks written */ long temp_blks_read; /* # of temp blocks read */ - long temp_blks_written; /* # of temp blocks written */ + long temp_blks_written; /* # of temp blocks written */ instr_time blk_read_time; /* time spent reading */ instr_time blk_write_time; /* time spent writing */ } BufferUsage; @@ -81,4 +81,4 @@ extern void InstrStartParallelQuery(void); extern void InstrEndParallelQuery(BufferUsage *result); extern void InstrAccumParallelQuery(BufferUsage *result); -#endif /* INSTRUMENT_H */ +#endif /* INSTRUMENT_H */ diff --git a/src/include/executor/nodeAgg.h b/src/include/executor/nodeAgg.h index d2fee52e12..fa11ba93a6 100644 --- a/src/include/executor/nodeAgg.h +++ b/src/include/executor/nodeAgg.h @@ -25,4 +25,4 @@ extern Size hash_agg_entry_size(int numAggs); extern Datum aggregate_dummy(PG_FUNCTION_ARGS); -#endif /* NODEAGG_H */ +#endif /* NODEAGG_H */ diff --git a/src/include/executor/nodeAppend.h b/src/include/executor/nodeAppend.h index 6fb4662c88..ee0b6ad23d 100644 --- a/src/include/executor/nodeAppend.h +++ b/src/include/executor/nodeAppend.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecAppend(AppendState *node); extern void ExecEndAppend(AppendState *node); extern void ExecReScanAppend(AppendState *node); -#endif /* NODEAPPEND_H */ +#endif /* NODEAPPEND_H */ diff --git a/src/include/executor/nodeBitmapAnd.h b/src/include/executor/nodeBitmapAnd.h index 1cb3470bcb..5d848b61af 100644 --- a/src/include/executor/nodeBitmapAnd.h +++ b/src/include/executor/nodeBitmapAnd.h @@ -21,4 +21,4 @@ extern Node *MultiExecBitmapAnd(BitmapAndState *node); extern void ExecEndBitmapAnd(BitmapAndState *node); extern void ExecReScanBitmapAnd(BitmapAndState *node); -#endif /* NODEBITMAPAND_H */ +#endif /* NODEBITMAPAND_H */ diff --git a/src/include/executor/nodeBitmapHeapscan.h b/src/include/executor/nodeBitmapHeapscan.h index 465c58e6ee..f477d1c772 100644 --- a/src/include/executor/nodeBitmapHeapscan.h +++ b/src/include/executor/nodeBitmapHeapscan.h @@ -28,4 +28,4 @@ extern void ExecBitmapHeapInitializeDSM(BitmapHeapScanState *node, extern void ExecBitmapHeapInitializeWorker(BitmapHeapScanState *node, shm_toc *toc); -#endif /* NODEBITMAPHEAPSCAN_H */ +#endif /* NODEBITMAPHEAPSCAN_H */ diff --git a/src/include/executor/nodeBitmapIndexscan.h b/src/include/executor/nodeBitmapIndexscan.h index 1fb8da01cb..842193f4df 100644 --- a/src/include/executor/nodeBitmapIndexscan.h +++ b/src/include/executor/nodeBitmapIndexscan.h @@ -21,4 +21,4 @@ extern Node *MultiExecBitmapIndexScan(BitmapIndexScanState *node); extern void ExecEndBitmapIndexScan(BitmapIndexScanState *node); extern void ExecReScanBitmapIndexScan(BitmapIndexScanState *node); -#endif /* NODEBITMAPINDEXSCAN_H */ +#endif /* NODEBITMAPINDEXSCAN_H */ diff --git a/src/include/executor/nodeBitmapOr.h b/src/include/executor/nodeBitmapOr.h index a23bf77ff7..526904eb4d 100644 --- a/src/include/executor/nodeBitmapOr.h +++ b/src/include/executor/nodeBitmapOr.h @@ -21,4 +21,4 @@ extern Node *MultiExecBitmapOr(BitmapOrState *node); extern void ExecEndBitmapOr(BitmapOrState *node); extern void ExecReScanBitmapOr(BitmapOrState *node); -#endif /* NODEBITMAPOR_H */ +#endif /* NODEBITMAPOR_H */ diff --git a/src/include/executor/nodeCtescan.h b/src/include/executor/nodeCtescan.h index e8bcb88b35..397bdfdd1c 100644 --- a/src/include/executor/nodeCtescan.h +++ b/src/include/executor/nodeCtescan.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecCteScan(CteScanState *node); extern void ExecEndCteScan(CteScanState *node); extern void ExecReScanCteScan(CteScanState *node); -#endif /* NODECTESCAN_H */ +#endif /* NODECTESCAN_H */ diff --git a/src/include/executor/nodeCustom.h b/src/include/executor/nodeCustom.h index c2f2ca1eed..e81bcf7f21 100644 --- a/src/include/executor/nodeCustom.h +++ b/src/include/executor/nodeCustom.h @@ -39,4 +39,4 @@ extern void ExecCustomScanInitializeWorker(CustomScanState *node, shm_toc *toc); extern void ExecShutdownCustomScan(CustomScanState *node); -#endif /* NODECUSTOM_H */ +#endif /* NODECUSTOM_H */ diff --git a/src/include/executor/nodeForeignscan.h b/src/include/executor/nodeForeignscan.h index 1b167b8143..3ff4ecd8c9 100644 --- a/src/include/executor/nodeForeignscan.h +++ b/src/include/executor/nodeForeignscan.h @@ -30,4 +30,4 @@ extern void ExecForeignScanInitializeWorker(ForeignScanState *node, shm_toc *toc); extern void ExecShutdownForeignScan(ForeignScanState *node); -#endif /* NODEFOREIGNSCAN_H */ +#endif /* NODEFOREIGNSCAN_H */ diff --git a/src/include/executor/nodeFunctionscan.h b/src/include/executor/nodeFunctionscan.h index efff0deaee..5e830ebdea 100644 --- a/src/include/executor/nodeFunctionscan.h +++ b/src/include/executor/nodeFunctionscan.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecFunctionScan(FunctionScanState *node); extern void ExecEndFunctionScan(FunctionScanState *node); extern void ExecReScanFunctionScan(FunctionScanState *node); -#endif /* NODEFUNCTIONSCAN_H */ +#endif /* NODEFUNCTIONSCAN_H */ diff --git a/src/include/executor/nodeGather.h b/src/include/executor/nodeGather.h index e19bc9b20d..b0006934d4 100644 --- a/src/include/executor/nodeGather.h +++ b/src/include/executor/nodeGather.h @@ -22,4 +22,4 @@ extern void ExecEndGather(GatherState *node); extern void ExecShutdownGather(GatherState *node); extern void ExecReScanGather(GatherState *node); -#endif /* NODEGATHER_H */ +#endif /* NODEGATHER_H */ diff --git a/src/include/executor/nodeGatherMerge.h b/src/include/executor/nodeGatherMerge.h index f5ba353762..14b31a086c 100644 --- a/src/include/executor/nodeGatherMerge.h +++ b/src/include/executor/nodeGatherMerge.h @@ -24,4 +24,4 @@ extern void ExecEndGatherMerge(GatherMergeState *node); extern void ExecReScanGatherMerge(GatherMergeState *node); extern void ExecShutdownGatherMerge(GatherMergeState *node); -#endif /* NODEGATHERMERGE_H */ +#endif /* NODEGATHERMERGE_H */ diff --git a/src/include/executor/nodeGroup.h b/src/include/executor/nodeGroup.h index a9536a3c6f..7358b61707 100644 --- a/src/include/executor/nodeGroup.h +++ b/src/include/executor/nodeGroup.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecGroup(GroupState *node); extern void ExecEndGroup(GroupState *node); extern void ExecReScanGroup(GroupState *node); -#endif /* NODEGROUP_H */ +#endif /* NODEGROUP_H */ diff --git a/src/include/executor/nodeHash.h b/src/include/executor/nodeHash.h index fe5c2642d7..8052f27d0b 100644 --- a/src/include/executor/nodeHash.h +++ b/src/include/executor/nodeHash.h @@ -50,4 +50,4 @@ extern void ExecChooseHashTableSize(double ntuples, int tupwidth, bool useskew, int *num_skew_mcvs); extern int ExecHashGetSkewBucket(HashJoinTable hashtable, uint32 hashvalue); -#endif /* NODEHASH_H */ +#endif /* NODEHASH_H */ diff --git a/src/include/executor/nodeHashjoin.h b/src/include/executor/nodeHashjoin.h index ddc32b1de3..541c81edc7 100644 --- a/src/include/executor/nodeHashjoin.h +++ b/src/include/executor/nodeHashjoin.h @@ -25,4 +25,4 @@ extern void ExecReScanHashJoin(HashJoinState *node); extern void ExecHashJoinSaveTuple(MinimalTuple tuple, uint32 hashvalue, BufFile **fileptr); -#endif /* NODEHASHJOIN_H */ +#endif /* NODEHASHJOIN_H */ diff --git a/src/include/executor/nodeIndexonlyscan.h b/src/include/executor/nodeIndexonlyscan.h index 5d3c6bbc0d..cf227daae0 100644 --- a/src/include/executor/nodeIndexonlyscan.h +++ b/src/include/executor/nodeIndexonlyscan.h @@ -32,4 +32,4 @@ extern void ExecIndexOnlyScanInitializeDSM(IndexOnlyScanState *node, extern void ExecIndexOnlyScanInitializeWorker(IndexOnlyScanState *node, shm_toc *toc); -#endif /* NODEINDEXONLYSCAN_H */ +#endif /* NODEINDEXONLYSCAN_H */ diff --git a/src/include/executor/nodeIndexscan.h b/src/include/executor/nodeIndexscan.h index ea3f3a5cc4..a3518e03a4 100644 --- a/src/include/executor/nodeIndexscan.h +++ b/src/include/executor/nodeIndexscan.h @@ -42,4 +42,4 @@ extern bool ExecIndexEvalArrayKeys(ExprContext *econtext, IndexArrayKeyInfo *arrayKeys, int numArrayKeys); extern bool ExecIndexAdvanceArrayKeys(IndexArrayKeyInfo *arrayKeys, int numArrayKeys); -#endif /* NODEINDEXSCAN_H */ +#endif /* NODEINDEXSCAN_H */ diff --git a/src/include/executor/nodeLimit.h b/src/include/executor/nodeLimit.h index 6e4084b46d..7bb20d9978 100644 --- a/src/include/executor/nodeLimit.h +++ b/src/include/executor/nodeLimit.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecLimit(LimitState *node); extern void ExecEndLimit(LimitState *node); extern void ExecReScanLimit(LimitState *node); -#endif /* NODELIMIT_H */ +#endif /* NODELIMIT_H */ diff --git a/src/include/executor/nodeLockRows.h b/src/include/executor/nodeLockRows.h index c23954131b..6b90756e4c 100644 --- a/src/include/executor/nodeLockRows.h +++ b/src/include/executor/nodeLockRows.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecLockRows(LockRowsState *node); extern void ExecEndLockRows(LockRowsState *node); extern void ExecReScanLockRows(LockRowsState *node); -#endif /* NODELOCKROWS_H */ +#endif /* NODELOCKROWS_H */ diff --git a/src/include/executor/nodeMaterial.h b/src/include/executor/nodeMaterial.h index f6a7241ee7..f69abbca82 100644 --- a/src/include/executor/nodeMaterial.h +++ b/src/include/executor/nodeMaterial.h @@ -23,4 +23,4 @@ extern void ExecMaterialMarkPos(MaterialState *node); extern void ExecMaterialRestrPos(MaterialState *node); extern void ExecReScanMaterial(MaterialState *node); -#endif /* NODEMATERIAL_H */ +#endif /* NODEMATERIAL_H */ diff --git a/src/include/executor/nodeMergeAppend.h b/src/include/executor/nodeMergeAppend.h index eafa15445c..3cc6ef549b 100644 --- a/src/include/executor/nodeMergeAppend.h +++ b/src/include/executor/nodeMergeAppend.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecMergeAppend(MergeAppendState *node); extern void ExecEndMergeAppend(MergeAppendState *node); extern void ExecReScanMergeAppend(MergeAppendState *node); -#endif /* NODEMERGEAPPEND_H */ +#endif /* NODEMERGEAPPEND_H */ diff --git a/src/include/executor/nodeMergejoin.h b/src/include/executor/nodeMergejoin.h index ffaa3af908..32df25ae8b 100644 --- a/src/include/executor/nodeMergejoin.h +++ b/src/include/executor/nodeMergejoin.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecMergeJoin(MergeJoinState *node); extern void ExecEndMergeJoin(MergeJoinState *node); extern void ExecReScanMergeJoin(MergeJoinState *node); -#endif /* NODEMERGEJOIN_H */ +#endif /* NODEMERGEJOIN_H */ diff --git a/src/include/executor/nodeModifyTable.h b/src/include/executor/nodeModifyTable.h index 0c327768e1..5a406f236d 100644 --- a/src/include/executor/nodeModifyTable.h +++ b/src/include/executor/nodeModifyTable.h @@ -20,4 +20,4 @@ extern TupleTableSlot *ExecModifyTable(ModifyTableState *node); extern void ExecEndModifyTable(ModifyTableState *node); extern void ExecReScanModifyTable(ModifyTableState *node); -#endif /* NODEMODIFYTABLE_H */ +#endif /* NODEMODIFYTABLE_H */ diff --git a/src/include/executor/nodeNamedtuplestorescan.h b/src/include/executor/nodeNamedtuplestorescan.h index 9ef477e7ff..7f72fbe98a 100644 --- a/src/include/executor/nodeNamedtuplestorescan.h +++ b/src/include/executor/nodeNamedtuplestorescan.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecNamedTuplestoreScan(NamedTuplestoreScanState *node); extern void ExecEndNamedTuplestoreScan(NamedTuplestoreScanState *node); extern void ExecReScanNamedTuplestoreScan(NamedTuplestoreScanState *node); -#endif /* NODENAMEDTUPLESTORESCAN_H */ +#endif /* NODENAMEDTUPLESTORESCAN_H */ diff --git a/src/include/executor/nodeNestloop.h b/src/include/executor/nodeNestloop.h index 4b2bf59050..8e0fcc1922 100644 --- a/src/include/executor/nodeNestloop.h +++ b/src/include/executor/nodeNestloop.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecNestLoop(NestLoopState *node); extern void ExecEndNestLoop(NestLoopState *node); extern void ExecReScanNestLoop(NestLoopState *node); -#endif /* NODENESTLOOP_H */ +#endif /* NODENESTLOOP_H */ diff --git a/src/include/executor/nodeProjectSet.h b/src/include/executor/nodeProjectSet.h index 30b2b7cec9..2f6999e8db 100644 --- a/src/include/executor/nodeProjectSet.h +++ b/src/include/executor/nodeProjectSet.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecProjectSet(ProjectSetState *node); extern void ExecEndProjectSet(ProjectSetState *node); extern void ExecReScanProjectSet(ProjectSetState *node); -#endif /* NODEPROJECTSET_H */ +#endif /* NODEPROJECTSET_H */ diff --git a/src/include/executor/nodeRecursiveunion.h b/src/include/executor/nodeRecursiveunion.h index 066596f773..f0eba05bee 100644 --- a/src/include/executor/nodeRecursiveunion.h +++ b/src/include/executor/nodeRecursiveunion.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecRecursiveUnion(RecursiveUnionState *node); extern void ExecEndRecursiveUnion(RecursiveUnionState *node); extern void ExecReScanRecursiveUnion(RecursiveUnionState *node); -#endif /* NODERECURSIVEUNION_H */ +#endif /* NODERECURSIVEUNION_H */ diff --git a/src/include/executor/nodeResult.h b/src/include/executor/nodeResult.h index 8e547b77e9..61d3cb2cc2 100644 --- a/src/include/executor/nodeResult.h +++ b/src/include/executor/nodeResult.h @@ -23,4 +23,4 @@ extern void ExecResultMarkPos(ResultState *node); extern void ExecResultRestrPos(ResultState *node); extern void ExecReScanResult(ResultState *node); -#endif /* NODERESULT_H */ +#endif /* NODERESULT_H */ diff --git a/src/include/executor/nodeSamplescan.h b/src/include/executor/nodeSamplescan.h index 8baf3a355c..ed06e77e4e 100644 --- a/src/include/executor/nodeSamplescan.h +++ b/src/include/executor/nodeSamplescan.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecSampleScan(SampleScanState *node); extern void ExecEndSampleScan(SampleScanState *node); extern void ExecReScanSampleScan(SampleScanState *node); -#endif /* NODESAMPLESCAN_H */ +#endif /* NODESAMPLESCAN_H */ diff --git a/src/include/executor/nodeSeqscan.h b/src/include/executor/nodeSeqscan.h index 92b305e138..06e0686b0b 100644 --- a/src/include/executor/nodeSeqscan.h +++ b/src/include/executor/nodeSeqscan.h @@ -27,4 +27,4 @@ extern void ExecSeqScanEstimate(SeqScanState *node, ParallelContext *pcxt); extern void ExecSeqScanInitializeDSM(SeqScanState *node, ParallelContext *pcxt); extern void ExecSeqScanInitializeWorker(SeqScanState *node, shm_toc *toc); -#endif /* NODESEQSCAN_H */ +#endif /* NODESEQSCAN_H */ diff --git a/src/include/executor/nodeSetOp.h b/src/include/executor/nodeSetOp.h index 887bdc1a42..af85977183 100644 --- a/src/include/executor/nodeSetOp.h +++ b/src/include/executor/nodeSetOp.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecSetOp(SetOpState *node); extern void ExecEndSetOp(SetOpState *node); extern void ExecReScanSetOp(SetOpState *node); -#endif /* NODESETOP_H */ +#endif /* NODESETOP_H */ diff --git a/src/include/executor/nodeSort.h b/src/include/executor/nodeSort.h index 10d16b47b1..1d2b7130b3 100644 --- a/src/include/executor/nodeSort.h +++ b/src/include/executor/nodeSort.h @@ -23,4 +23,4 @@ extern void ExecSortMarkPos(SortState *node); extern void ExecSortRestrPos(SortState *node); extern void ExecReScanSort(SortState *node); -#endif /* NODESORT_H */ +#endif /* NODESORT_H */ diff --git a/src/include/executor/nodeSubplan.h b/src/include/executor/nodeSubplan.h index 0d3f52118b..5dbaeeb29a 100644 --- a/src/include/executor/nodeSubplan.h +++ b/src/include/executor/nodeSubplan.h @@ -28,4 +28,4 @@ extern void ExecReScanSetParamPlan(SubPlanState *node, PlanState *parent); extern void ExecSetParamPlan(SubPlanState *node, ExprContext *econtext); -#endif /* NODESUBPLAN_H */ +#endif /* NODESUBPLAN_H */ diff --git a/src/include/executor/nodeSubqueryscan.h b/src/include/executor/nodeSubqueryscan.h index c2a0f707a6..c852e2947f 100644 --- a/src/include/executor/nodeSubqueryscan.h +++ b/src/include/executor/nodeSubqueryscan.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecSubqueryScan(SubqueryScanState *node); extern void ExecEndSubqueryScan(SubqueryScanState *node); extern void ExecReScanSubqueryScan(SubqueryScanState *node); -#endif /* NODESUBQUERYSCAN_H */ +#endif /* NODESUBQUERYSCAN_H */ diff --git a/src/include/executor/nodeTableFuncscan.h b/src/include/executor/nodeTableFuncscan.h index 529c929993..c58156e99c 100644 --- a/src/include/executor/nodeTableFuncscan.h +++ b/src/include/executor/nodeTableFuncscan.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecTableFuncScan(TableFuncScanState *node); extern void ExecEndTableFuncScan(TableFuncScanState *node); extern void ExecReScanTableFuncScan(TableFuncScanState *node); -#endif /* NODETABLEFUNCSCAN_H */ +#endif /* NODETABLEFUNCSCAN_H */ diff --git a/src/include/executor/nodeTidscan.h b/src/include/executor/nodeTidscan.h index 3186ca8cff..d07ed7c864 100644 --- a/src/include/executor/nodeTidscan.h +++ b/src/include/executor/nodeTidscan.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecTidScan(TidScanState *node); extern void ExecEndTidScan(TidScanState *node); extern void ExecReScanTidScan(TidScanState *node); -#endif /* NODETIDSCAN_H */ +#endif /* NODETIDSCAN_H */ diff --git a/src/include/executor/nodeUnique.h b/src/include/executor/nodeUnique.h index 66ad898397..3d0ac9dde1 100644 --- a/src/include/executor/nodeUnique.h +++ b/src/include/executor/nodeUnique.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecUnique(UniqueState *node); extern void ExecEndUnique(UniqueState *node); extern void ExecReScanUnique(UniqueState *node); -#endif /* NODEUNIQUE_H */ +#endif /* NODEUNIQUE_H */ diff --git a/src/include/executor/nodeValuesscan.h b/src/include/executor/nodeValuesscan.h index 6c2af73b1f..c28bb1acce 100644 --- a/src/include/executor/nodeValuesscan.h +++ b/src/include/executor/nodeValuesscan.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecValuesScan(ValuesScanState *node); extern void ExecEndValuesScan(ValuesScanState *node); extern void ExecReScanValuesScan(ValuesScanState *node); -#endif /* NODEVALUESSCAN_H */ +#endif /* NODEVALUESSCAN_H */ diff --git a/src/include/executor/nodeWindowAgg.h b/src/include/executor/nodeWindowAgg.h index 11d2dba2c5..db1ad60677 100644 --- a/src/include/executor/nodeWindowAgg.h +++ b/src/include/executor/nodeWindowAgg.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecWindowAgg(WindowAggState *node); extern void ExecEndWindowAgg(WindowAggState *node); extern void ExecReScanWindowAgg(WindowAggState *node); -#endif /* NODEWINDOWAGG_H */ +#endif /* NODEWINDOWAGG_H */ diff --git a/src/include/executor/nodeWorktablescan.h b/src/include/executor/nodeWorktablescan.h index 7790ca2e1b..c222d9f6b4 100644 --- a/src/include/executor/nodeWorktablescan.h +++ b/src/include/executor/nodeWorktablescan.h @@ -21,4 +21,4 @@ extern TupleTableSlot *ExecWorkTableScan(WorkTableScanState *node); extern void ExecEndWorkTableScan(WorkTableScanState *node); extern void ExecReScanWorkTableScan(WorkTableScanState *node); -#endif /* NODEWORKTABLESCAN_H */ +#endif /* NODEWORKTABLESCAN_H */ diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h index ffb4c28ad1..acade7e92e 100644 --- a/src/include/executor/spi.h +++ b/src/include/executor/spi.h @@ -159,4 +159,4 @@ extern int SPI_register_trigger_data(TriggerData *tdata); extern void AtEOXact_SPI(bool isCommit); extern void AtEOSubXact_SPI(bool isCommit, SubTransactionId mySubid); -#endif /* SPI_H */ +#endif /* SPI_H */ diff --git a/src/include/executor/spi_priv.h b/src/include/executor/spi_priv.h index 49aa7c94e7..ba7fb98875 100644 --- a/src/include/executor/spi_priv.h +++ b/src/include/executor/spi_priv.h @@ -31,7 +31,7 @@ typedef struct MemoryContext procCxt; /* procedure context */ MemoryContext execCxt; /* executor context */ MemoryContext savedcxt; /* context of SPI_connect's caller */ - SubTransactionId connectSubid; /* ID of connecting subtransaction */ + SubTransactionId connectSubid; /* ID of connecting subtransaction */ QueryEnvironment *queryEnv; /* query environment setup for SPI level */ } _SPI_connection; @@ -88,4 +88,4 @@ typedef struct _SPI_plan void *parserSetupArg; } _SPI_plan; -#endif /* SPI_PRIV_H */ +#endif /* SPI_PRIV_H */ diff --git a/src/include/executor/tablefunc.h b/src/include/executor/tablefunc.h index 9c7b4808a8..a24a555b75 100644 --- a/src/include/executor/tablefunc.h +++ b/src/include/executor/tablefunc.h @@ -64,4 +64,4 @@ typedef struct TableFuncRoutine void (*DestroyOpaque) (struct TableFuncScanState *state); } TableFuncRoutine; -#endif /* _TABLEFUNC_H */ +#endif /* _TABLEFUNC_H */ diff --git a/src/include/executor/tqueue.h b/src/include/executor/tqueue.h index 892eec812e..a717ac6184 100644 --- a/src/include/executor/tqueue.h +++ b/src/include/executor/tqueue.h @@ -30,4 +30,4 @@ extern void DestroyTupleQueueReader(TupleQueueReader *reader); extern HeapTuple TupleQueueReaderNext(TupleQueueReader *reader, bool nowait, bool *done); -#endif /* TQUEUE_H */ +#endif /* TQUEUE_H */ diff --git a/src/include/executor/tstoreReceiver.h b/src/include/executor/tstoreReceiver.h index cd15e27821..ac4de3a663 100644 --- a/src/include/executor/tstoreReceiver.h +++ b/src/include/executor/tstoreReceiver.h @@ -26,4 +26,4 @@ extern void SetTuplestoreDestReceiverParams(DestReceiver *self, MemoryContext tContext, bool detoast); -#endif /* TSTORE_RECEIVER_H */ +#endif /* TSTORE_RECEIVER_H */ diff --git a/src/include/executor/tuptable.h b/src/include/executor/tuptable.h index 32489ef9bd..55f4cce4ee 100644 --- a/src/include/executor/tuptable.h +++ b/src/include/executor/tuptable.h @@ -115,7 +115,7 @@ typedef struct TupleTableSlot NodeTag type; bool tts_isempty; /* true = slot is empty */ bool tts_shouldFree; /* should pfree tts_tuple? */ - bool tts_shouldFreeMin; /* should pfree tts_mintuple? */ + bool tts_shouldFreeMin; /* should pfree tts_mintuple? */ bool tts_slow; /* saved state for slot_deform_tuple */ HeapTuple tts_tuple; /* physical tuple, or NULL if virtual */ TupleDesc tts_tupleDescriptor; /* slot's tuple descriptor */ @@ -170,4 +170,4 @@ extern void slot_getallattrs(TupleTableSlot *slot); extern void slot_getsomeattrs(TupleTableSlot *slot, int attnum); extern bool slot_attisnull(TupleTableSlot *slot, int attnum); -#endif /* TUPTABLE_H */ +#endif /* TUPTABLE_H */ diff --git a/src/include/fe_utils/mbprint.h b/src/include/fe_utils/mbprint.h index b5145726c5..e3cfaf3ddd 100644 --- a/src/include/fe_utils/mbprint.h +++ b/src/include/fe_utils/mbprint.h @@ -26,4 +26,4 @@ extern void pg_wcsformat(const unsigned char *pwcs, size_t len, int encoding, extern void pg_wcssize(const unsigned char *pwcs, size_t len, int encoding, int *width, int *height, int *format_size); -#endif /* MBPRINT_H */ +#endif /* MBPRINT_H */ diff --git a/src/include/fe_utils/print.h b/src/include/fe_utils/print.h index ce4d86ec54..36b89e7d57 100644 --- a/src/include/fe_utils/print.h +++ b/src/include/fe_utils/print.h @@ -67,7 +67,7 @@ typedef struct printTextFormat { /* A complete line style */ const char *name; /* for display purposes */ - printTextLineFormat lrule[4]; /* indexed by enum printTextRule */ + printTextLineFormat lrule[4]; /* indexed by enum printTextRule */ const char *midvrule_nl; /* vertical line for continue after newline */ const char *midvrule_wrap; /* vertical line for wrapped data */ const char *midvrule_blank; /* vertical line for blank data */ @@ -77,8 +77,8 @@ typedef struct printTextFormat const char *nl_right; /* right mark for newline */ const char *wrap_left; /* left mark after wrapped data */ const char *wrap_right; /* right mark for wrapped data */ - bool wrap_right_border; /* use right-hand border for wrap - * marks when border=0? */ + bool wrap_right_border; /* use right-hand border for wrap marks + * when border=0? */ } printTextFormat; typedef enum unicode_linestyle @@ -166,9 +166,9 @@ typedef struct printQueryOpt char *nullPrint; /* how to print null entities */ char *title; /* override title */ char **footers; /* override footer (default is "(xx rows)") */ - bool translate_header; /* do gettext on column headers */ - const bool *translate_columns; /* translate_columns[i-1] => do - * gettext on col i */ + bool translate_header; /* do gettext on column headers */ + const bool *translate_columns; /* translate_columns[i-1] => do gettext on + * col i */ int n_translate_columns; /* length of translate_columns[] */ } printQueryOpt; @@ -212,4 +212,4 @@ extern void setDecimalLocale(void); extern const printTextFormat *get_line_style(const printTableOpt *opt); extern void refresh_utf8format(const printTableOpt *opt); -#endif /* PRINT_H */ +#endif /* PRINT_H */ diff --git a/src/include/fe_utils/psqlscan.h b/src/include/fe_utils/psqlscan.h index 1eadf0b9c3..c199a2917e 100644 --- a/src/include/fe_utils/psqlscan.h +++ b/src/include/fe_utils/psqlscan.h @@ -94,4 +94,4 @@ extern void psql_scan_reselect_sql_lexer(PsqlScanState state); extern bool psql_scan_in_quote(PsqlScanState state); -#endif /* PSQLSCAN_H */ +#endif /* PSQLSCAN_H */ diff --git a/src/include/fe_utils/psqlscan_int.h b/src/include/fe_utils/psqlscan_int.h index af62f5ebdf..c70ff29f4e 100644 --- a/src/include/fe_utils/psqlscan_int.h +++ b/src/include/fe_utils/psqlscan_int.h @@ -143,4 +143,4 @@ extern void psqlscan_escape_variable(PsqlScanState state, const char *txt, int len, PsqlScanQuoteType quote); -#endif /* PSQLSCAN_INT_H */ +#endif /* PSQLSCAN_INT_H */ diff --git a/src/include/fe_utils/simple_list.h b/src/include/fe_utils/simple_list.h index b63f5dc061..97bb34f191 100644 --- a/src/include/fe_utils/simple_list.h +++ b/src/include/fe_utils/simple_list.h @@ -34,7 +34,7 @@ typedef struct SimpleStringListCell struct SimpleStringListCell *next; bool touched; /* true, when this string was searched and * touched */ - char val[FLEXIBLE_ARRAY_MEMBER]; /* null-terminated string here */ + char val[FLEXIBLE_ARRAY_MEMBER]; /* null-terminated string here */ } SimpleStringListCell; typedef struct SimpleStringList @@ -52,4 +52,4 @@ extern bool simple_string_list_member(SimpleStringList *list, const char *val); extern const char *simple_string_list_not_touched(SimpleStringList *list); -#endif /* SIMPLE_LIST_H */ +#endif /* SIMPLE_LIST_H */ diff --git a/src/include/fe_utils/string_utils.h b/src/include/fe_utils/string_utils.h index c68234335e..bc6b87d6f1 100644 --- a/src/include/fe_utils/string_utils.h +++ b/src/include/fe_utils/string_utils.h @@ -57,4 +57,4 @@ extern bool processSQLNamePattern(PGconn *conn, PQExpBuffer buf, const char *schemavar, const char *namevar, const char *altnamevar, const char *visibilityrule); -#endif /* STRING_UTILS_H */ +#endif /* STRING_UTILS_H */ diff --git a/src/include/fmgr.h b/src/include/fmgr.h index 45e09c8c53..0216965bfc 100644 --- a/src/include/fmgr.h +++ b/src/include/fmgr.h @@ -82,7 +82,7 @@ typedef struct FunctionCallInfoData Oid fncollation; /* collation for function to use */ bool isnull; /* function must set true if result is NULL */ short nargs; /* # arguments actually passed */ - Datum arg[FUNC_MAX_ARGS]; /* Arguments passed to function */ + Datum arg[FUNC_MAX_ARGS]; /* Arguments passed to function */ bool argnull[FUNC_MAX_ARGS]; /* T if arg[i] is actually NULL */ } FunctionCallInfoData; @@ -690,8 +690,8 @@ extern void RestoreLibraryState(char *start_address); */ /* AggCheckCallContext can return one of the following codes, or 0: */ -#define AGG_CONTEXT_AGGREGATE 1 /* regular aggregate */ -#define AGG_CONTEXT_WINDOW 2 /* window function */ +#define AGG_CONTEXT_AGGREGATE 1 /* regular aggregate */ +#define AGG_CONTEXT_WINDOW 2 /* window function */ extern int AggCheckCallContext(FunctionCallInfo fcinfo, MemoryContext *aggcontext); @@ -743,4 +743,4 @@ extern PGDLLIMPORT fmgr_hook_type fmgr_hook; */ extern char *fmgr(Oid procedureId,...); -#endif /* FMGR_H */ +#endif /* FMGR_H */ diff --git a/src/include/foreign/fdwapi.h b/src/include/foreign/fdwapi.h index 2ed7049a14..bb68f08b8e 100644 --- a/src/include/foreign/fdwapi.h +++ b/src/include/foreign/fdwapi.h @@ -239,4 +239,4 @@ extern bool IsImportableForeignTable(const char *tablename, ImportForeignSchemaStmt *stmt); extern Path *GetExistingLocalJoinPath(RelOptInfo *joinrel); -#endif /* FDWAPI_H */ +#endif /* FDWAPI_H */ diff --git a/src/include/foreign/foreign.h b/src/include/foreign/foreign.h index 446a071239..2f4c569d1d 100644 --- a/src/include/foreign/foreign.h +++ b/src/include/foreign/foreign.h @@ -82,4 +82,4 @@ extern List *GetForeignColumnOptions(Oid relid, AttrNumber attnum); extern Oid get_foreign_data_wrapper_oid(const char *fdwname, bool missing_ok); extern Oid get_foreign_server_oid(const char *servername, bool missing_ok); -#endif /* FOREIGN_H */ +#endif /* FOREIGN_H */ diff --git a/src/include/funcapi.h b/src/include/funcapi.h index 30e66b6335..951af2aad3 100644 --- a/src/include/funcapi.h +++ b/src/include/funcapi.h @@ -315,4 +315,4 @@ extern void end_MultiFuncCall(PG_FUNCTION_ARGS, FuncCallContext *funcctx); PG_RETURN_NULL(); \ } while (0) -#endif /* FUNCAPI_H */ +#endif /* FUNCAPI_H */ diff --git a/src/include/getaddrinfo.h b/src/include/getaddrinfo.h index e91128a339..3dcfc1fa25 100644 --- a/src/include/getaddrinfo.h +++ b/src/include/getaddrinfo.h @@ -55,8 +55,8 @@ #define EAI_NONAME WSAHOST_NOT_FOUND #define EAI_SERVICE WSATYPE_NOT_FOUND #define EAI_SOCKTYPE WSAESOCKTNOSUPPORT -#endif /* !WIN32 */ -#endif /* !EAI_FAIL */ +#endif /* !WIN32 */ +#endif /* !EAI_FAIL */ #ifndef AI_PASSIVE #define AI_PASSIVE 0x0001 @@ -124,7 +124,7 @@ struct addrinfo struct addrinfo *ai_next; }; #endif -#endif /* HAVE_STRUCT_ADDRINFO */ +#endif /* HAVE_STRUCT_ADDRINFO */ #ifndef HAVE_GETADDRINFO @@ -157,6 +157,6 @@ extern const char *gai_strerror(int errcode); extern int getnameinfo(const struct sockaddr *sa, int salen, char *node, int nodelen, char *service, int servicelen, int flags); -#endif /* HAVE_GETADDRINFO */ +#endif /* HAVE_GETADDRINFO */ -#endif /* GETADDRINFO_H */ +#endif /* GETADDRINFO_H */ diff --git a/src/include/getopt_long.h b/src/include/getopt_long.h index 00692bb616..c55d45348a 100644 --- a/src/include/getopt_long.h +++ b/src/include/getopt_long.h @@ -33,4 +33,4 @@ extern int getopt_long(int argc, char *const argv[], const struct option *longopts, int *longindex); #endif -#endif /* GETOPT_LONG_H */ +#endif /* GETOPT_LONG_H */ diff --git a/src/include/lib/binaryheap.h b/src/include/lib/binaryheap.h index a4bbb390ea..da7504bd55 100644 --- a/src/include/lib/binaryheap.h +++ b/src/include/lib/binaryheap.h @@ -51,4 +51,4 @@ extern void binaryheap_replace_first(binaryheap *heap, Datum d); #define binaryheap_empty(h) ((h)->bh_size == 0) -#endif /* BINARYHEAP_H */ +#endif /* BINARYHEAP_H */ diff --git a/src/include/lib/bipartite_match.h b/src/include/lib/bipartite_match.h index d662b3821e..8f580bbd97 100644 --- a/src/include/lib/bipartite_match.h +++ b/src/include/lib/bipartite_match.h @@ -43,4 +43,4 @@ extern BipartiteMatchState *BipartiteMatch(int u_size, int v_size, short **adjac extern void BipartiteMatchFree(BipartiteMatchState *state); -#endif /* BIPARTITE_MATCH_H */ +#endif /* BIPARTITE_MATCH_H */ diff --git a/src/include/lib/hyperloglog.h b/src/include/lib/hyperloglog.h index dd40fe9b00..7a249cd252 100644 --- a/src/include/lib/hyperloglog.h +++ b/src/include/lib/hyperloglog.h @@ -65,4 +65,4 @@ extern void addHyperLogLog(hyperLogLogState *cState, uint32 hash); extern double estimateHyperLogLog(hyperLogLogState *cState); extern void freeHyperLogLog(hyperLogLogState *cState); -#endif /* HYPERLOGLOG_H */ +#endif /* HYPERLOGLOG_H */ diff --git a/src/include/lib/ilist.h b/src/include/lib/ilist.h index 8a44c90c4f..e5ac5c218a 100644 --- a/src/include/lib/ilist.h +++ b/src/include/lib/ilist.h @@ -266,7 +266,7 @@ extern void slist_check(slist_head *head); */ #define dlist_check(head) ((void) (head)) #define slist_check(head) ((void) (head)) -#endif /* ILIST_DEBUG */ +#endif /* ILIST_DEBUG */ /* doubly linked list implementation */ @@ -724,4 +724,4 @@ slist_delete_current(slist_mutable_iter *iter) (iter).cur = (iter).next, \ (iter).next = (iter).next ? (iter).next->next : NULL) -#endif /* ILIST_H */ +#endif /* ILIST_H */ diff --git a/src/include/lib/knapsack.h b/src/include/lib/knapsack.h index 8d1e6d0aa0..4485738e2a 100644 --- a/src/include/lib/knapsack.h +++ b/src/include/lib/knapsack.h @@ -14,4 +14,4 @@ extern Bitmapset *DiscreteKnapsack(int max_weight, int num_items, int *item_weights, double *item_values); -#endif /* KNAPSACK_H */ +#endif /* KNAPSACK_H */ diff --git a/src/include/lib/pairingheap.h b/src/include/lib/pairingheap.h index 0b03a24fa1..c8dd60255f 100644 --- a/src/include/lib/pairingheap.h +++ b/src/include/lib/pairingheap.h @@ -99,4 +99,4 @@ extern char *pairingheap_dump(pairingheap *heap, #define pairingheap_is_singular(h) \ ((h)->ph_root && (h)->ph_root->first_child == NULL) -#endif /* PAIRINGHEAP_H */ +#endif /* PAIRINGHEAP_H */ diff --git a/src/include/lib/rbtree.h b/src/include/lib/rbtree.h index 7e2b7ae71b..a7183bb0b4 100644 --- a/src/include/lib/rbtree.h +++ b/src/include/lib/rbtree.h @@ -79,4 +79,4 @@ extern void rb_begin_iterate(RBTree *rb, RBOrderControl ctrl, RBTreeIterator *iter); extern RBNode *rb_iterate(RBTreeIterator *iter); -#endif /* RBTREE_H */ +#endif /* RBTREE_H */ diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h index 061d9c373f..c5af5b96a7 100644 --- a/src/include/lib/simplehash.h +++ b/src/include/lib/simplehash.h @@ -149,7 +149,7 @@ SH_SCOPE void SH_START_ITERATE_AT(SH_TYPE * tb, SH_ITERATOR * iter, uint32 at); SH_SCOPE SH_ELEMENT_TYPE *SH_ITERATE(SH_TYPE * tb, SH_ITERATOR * iter); SH_SCOPE void SH_STAT(SH_TYPE * tb); -#endif /* SH_DECLARE */ +#endif /* SH_DECLARE */ /* generate implementation of the hash table */ @@ -788,7 +788,7 @@ SH_START_ITERATE_AT(SH_TYPE * tb, SH_ITERATOR * iter, uint32 at) * Iterate backwards, that allows the current element to be deleted, even * if there are backward shifts. */ - iter->cur = at & tb->sizemask; /* ensure at is within a valid range */ + iter->cur = at & tb->sizemask; /* ensure at is within a valid range */ iter->end = iter->cur; iter->done = false; } @@ -899,7 +899,7 @@ SH_STAT(SH_TYPE * tb) total_collisions, max_collisions, avg_collisions); } -#endif /* SH_DEFINE */ +#endif /* SH_DEFINE */ /* undefine external parameters, so next hash table can be defined */ diff --git a/src/include/lib/stringinfo.h b/src/include/lib/stringinfo.h index 316c196565..9694ea3f21 100644 --- a/src/include/lib/stringinfo.h +++ b/src/include/lib/stringinfo.h @@ -149,4 +149,4 @@ extern void appendBinaryStringInfo(StringInfo str, */ extern void enlargeStringInfo(StringInfo str, int needed); -#endif /* STRINGINFO_H */ +#endif /* STRINGINFO_H */ diff --git a/src/include/libpq/auth.h b/src/include/libpq/auth.h index 601dc5d71a..871cc03add 100644 --- a/src/include/libpq/auth.h +++ b/src/include/libpq/auth.h @@ -26,4 +26,4 @@ extern void ClientAuthentication(Port *port); typedef void (*ClientAuthentication_hook_type) (Port *, int); extern PGDLLIMPORT ClientAuthentication_hook_type ClientAuthentication_hook; -#endif /* AUTH_H */ +#endif /* AUTH_H */ diff --git a/src/include/libpq/be-fsstubs.h b/src/include/libpq/be-fsstubs.h index 641124cd21..96bcaa0f08 100644 --- a/src/include/libpq/be-fsstubs.h +++ b/src/include/libpq/be-fsstubs.h @@ -34,4 +34,4 @@ extern void AtEOXact_LargeObject(bool isCommit); extern void AtEOSubXact_LargeObject(bool isCommit, SubTransactionId mySubid, SubTransactionId parentSubid); -#endif /* BE_FSSTUBS_H */ +#endif /* BE_FSSTUBS_H */ diff --git a/src/include/libpq/hba.h b/src/include/libpq/hba.h index f28b860877..07d92d4f9f 100644 --- a/src/include/libpq/hba.h +++ b/src/include/libpq/hba.h @@ -120,4 +120,4 @@ extern int check_usermap(const char *usermap_name, bool case_sensitive); extern bool pg_isblank(const char c); -#endif /* HBA_H */ +#endif /* HBA_H */ diff --git a/src/include/libpq/ifaddr.h b/src/include/libpq/ifaddr.h index f11bb4a073..be19ff8823 100644 --- a/src/include/libpq/ifaddr.h +++ b/src/include/libpq/ifaddr.h @@ -27,4 +27,4 @@ extern int pg_sockaddr_cidr_mask(struct sockaddr_storage *mask, extern int pg_foreach_ifaddr(PgIfAddrCallback callback, void *cb_data); -#endif /* IFADDR_H */ +#endif /* IFADDR_H */ diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h index 5774a6df3f..7bde744d51 100644 --- a/src/include/libpq/libpq-be.h +++ b/src/include/libpq/libpq-be.h @@ -32,7 +32,7 @@ #include #else #include -#endif /* HAVE_GSSAPI_H */ +#endif /* HAVE_GSSAPI_H */ /* * GSSAPI brings in headers that set a lot of things in the global namespace on win32, * that doesn't match the msvc build. It gives a bunch of compiler warnings that we ignore, @@ -41,7 +41,7 @@ #ifdef _MSC_VER #undef HAVE_GETADDRINFO #endif -#endif /* ENABLE_GSS */ +#endif /* ENABLE_GSS */ #ifdef ENABLE_SSPI #define SECURITY_WIN32 @@ -61,7 +61,7 @@ typedef struct int length; } gss_buffer_desc; #endif -#endif /* ENABLE_SSPI */ +#endif /* ENABLE_SSPI */ #include "datatype/timestamp.h" #include "libpq/hba.h" @@ -124,7 +124,7 @@ typedef struct Port char *remote_hostname; /* name (not ip addr) of remote host, if * available */ int remote_hostname_resolv; /* see above */ - int remote_hostname_errcode; /* see above */ + int remote_hostname_errcode; /* see above */ char *remote_port; /* text rep of remote port */ CAC_state canAcceptConnections; /* postmaster connection status */ @@ -148,7 +148,7 @@ typedef struct Port * but since it gets used by elog.c in the same way as database_name and * other members of this struct, we may as well keep it here. */ - TimestampTz SessionStartTime; /* backend start time */ + TimestampTz SessionStartTime; /* backend start time */ /* * TCP keepalive settings. @@ -223,4 +223,4 @@ extern int pq_setkeepalivesidle(int idle, Port *port); extern int pq_setkeepalivesinterval(int interval, Port *port); extern int pq_setkeepalivescount(int count, Port *port); -#endif /* LIBPQ_BE_H */ +#endif /* LIBPQ_BE_H */ diff --git a/src/include/libpq/libpq-fs.h b/src/include/libpq/libpq-fs.h index afe32706f4..ce4b2a1892 100644 --- a/src/include/libpq/libpq-fs.h +++ b/src/include/libpq/libpq-fs.h @@ -21,4 +21,4 @@ #define INV_WRITE 0x00020000 #define INV_READ 0x00040000 -#endif /* LIBPQ_FS_H */ +#endif /* LIBPQ_FS_H */ diff --git a/src/include/libpq/libpq.h b/src/include/libpq/libpq.h index d4885a5e28..78851b1060 100644 --- a/src/include/libpq/libpq.h +++ b/src/include/libpq/libpq.h @@ -99,4 +99,4 @@ extern char *SSLCipherSuites; extern char *SSLECDHCurve; extern bool SSLPreferServerCiphers; -#endif /* LIBPQ_H */ +#endif /* LIBPQ_H */ diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h index b6de569c5c..10c7434c41 100644 --- a/src/include/libpq/pqcomm.h +++ b/src/include/libpq/pqcomm.h @@ -57,7 +57,7 @@ struct sockaddr_storage #define ss_len ss_stuff.sa.sa_len #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1 #endif -#endif /* HAVE_STRUCT_SOCKADDR_STORAGE */ +#endif /* HAVE_STRUCT_SOCKADDR_STORAGE */ typedef struct { @@ -133,19 +133,19 @@ typedef uint32 PacketLen; #define SM_DATABASE 64 #define SM_USER 32 /* We append database name if db_user_namespace true. */ -#define SM_DATABASE_USER (SM_DATABASE+SM_USER+1) /* +1 for @ */ +#define SM_DATABASE_USER (SM_DATABASE+SM_USER+1) /* +1 for @ */ #define SM_OPTIONS 64 #define SM_UNUSED 64 #define SM_TTY 64 typedef struct StartupPacket { - ProtocolVersion protoVersion; /* Protocol version */ + ProtocolVersion protoVersion; /* Protocol version */ char database[SM_DATABASE]; /* Database name */ /* Db_user_namespace appends dbname */ char user[SM_USER]; /* User name */ char options[SM_OPTIONS]; /* Optional additional args */ - char unused[SM_UNUSED]; /* Unused */ + char unused[SM_UNUSED]; /* Unused */ char tty[SM_TTY]; /* Tty for debug output */ } StartupPacket; @@ -192,7 +192,7 @@ typedef uint32 AuthRequest; typedef struct CancelRequestPacket { /* Note that each field is stored in network byte order! */ - MsgType cancelRequestCode; /* code to identify a cancel request */ + MsgType cancelRequestCode; /* code to identify a cancel request */ uint32 backendPID; /* PID of client's backend */ uint32 cancelAuthCode; /* secret key to authorize cancel */ } CancelRequestPacket; @@ -204,4 +204,4 @@ typedef struct CancelRequestPacket */ #define NEGOTIATE_SSL_CODE PG_PROTOCOL(1234,5679) -#endif /* PQCOMM_H */ +#endif /* PQCOMM_H */ diff --git a/src/include/libpq/pqformat.h b/src/include/libpq/pqformat.h index 4df87ec8a2..32112547a0 100644 --- a/src/include/libpq/pqformat.h +++ b/src/include/libpq/pqformat.h @@ -47,4 +47,4 @@ extern const char *pq_getmsgstring(StringInfo msg); extern const char *pq_getmsgrawstring(StringInfo msg); extern void pq_getmsgend(StringInfo msg); -#endif /* PQFORMAT_H */ +#endif /* PQFORMAT_H */ diff --git a/src/include/libpq/pqmq.h b/src/include/libpq/pqmq.h index e356bd60f4..86436d6753 100644 --- a/src/include/libpq/pqmq.h +++ b/src/include/libpq/pqmq.h @@ -21,4 +21,4 @@ extern void pq_set_parallel_master(pid_t pid, BackendId backend_id); extern void pq_parse_errornotice(StringInfo str, ErrorData *edata); -#endif /* PQMQ_H */ +#endif /* PQMQ_H */ diff --git a/src/include/libpq/pqsignal.h b/src/include/libpq/pqsignal.h index a9dbce49d1..af4e61ba4d 100644 --- a/src/include/libpq/pqsignal.h +++ b/src/include/libpq/pqsignal.h @@ -28,7 +28,7 @@ extern int pqsigsetmask(int mask); #define sigfillset(set) (*(set) = ~0) #define sigaddset(set, signum) (*(set) |= (sigmask(signum))) #define sigdelset(set, signum) (*(set) &= ~(sigmask(signum))) -#endif /* WIN32 */ +#endif /* WIN32 */ extern sigset_t UnBlockSig, BlockSig, @@ -36,4 +36,4 @@ extern sigset_t UnBlockSig, extern void pqinitmask(void); -#endif /* PQSIGNAL_H */ +#endif /* PQSIGNAL_H */ diff --git a/src/include/libpq/scram.h b/src/include/libpq/scram.h index 14b48af12f..0166e1945d 100644 --- a/src/include/libpq/scram.h +++ b/src/include/libpq/scram.h @@ -31,4 +31,4 @@ extern char *pg_be_scram_build_verifier(const char *password); extern bool scram_verify_plain_password(const char *username, const char *password, const char *verifier); -#endif /* PG_SCRAM_H */ +#endif /* PG_SCRAM_H */ diff --git a/src/include/mb/pg_wchar.h b/src/include/mb/pg_wchar.h index 33f2c3018e..160dd931ee 100644 --- a/src/include/mb/pg_wchar.h +++ b/src/include/mb/pg_wchar.h @@ -361,12 +361,12 @@ typedef int (*mbverifier) (const unsigned char *mbstr, int len); typedef struct { - mb2wchar_with_len_converter mb2wchar_with_len; /* convert a multibyte - * string to a wchar */ - wchar2mb_with_len_converter wchar2mb_with_len; /* convert a wchar - * string to a multibyte */ + mb2wchar_with_len_converter mb2wchar_with_len; /* convert a multibyte + * string to a wchar */ + wchar2mb_with_len_converter wchar2mb_with_len; /* convert a wchar string + * to a multibyte */ mblen_converter mblen; /* get byte length of a char */ - mbdisplaylen_converter dsplen; /* get display width of a char */ + mbdisplaylen_converter dsplen; /* get display width of a char */ mbverifier mbverify; /* verify multibyte sequence */ int maxmblen; /* max bytes for a char in this encoding */ } pg_wchar_tbl; @@ -622,4 +622,4 @@ extern bool pg_utf8_islegal(const unsigned char *source, int length); extern WCHAR *pgwin32_message_to_UTF16(const char *str, int len, int *utf16len); #endif -#endif /* PG_WCHAR_H */ +#endif /* PG_WCHAR_H */ diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 35ac4f6194..21a77289f8 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -111,7 +111,7 @@ do { \ if (InterruptPending) \ ProcessInterrupts(); \ } while(0) -#endif /* WIN32 */ +#endif /* WIN32 */ #define HOLD_INTERRUPTS() (InterruptHoldoffCount++) @@ -472,4 +472,4 @@ extern bool has_rolreplication(Oid roleid); extern bool BackupInProgress(void); extern void CancelBackup(void); -#endif /* MISCADMIN_H */ +#endif /* MISCADMIN_H */ diff --git a/src/include/nodes/bitmapset.h b/src/include/nodes/bitmapset.h index 109f7b0c14..aa3fb253c2 100644 --- a/src/include/nodes/bitmapset.h +++ b/src/include/nodes/bitmapset.h @@ -101,4 +101,4 @@ extern int bms_next_member(const Bitmapset *a, int prevbit); /* support for hashtables using Bitmapsets as keys: */ extern uint32 bms_hash_value(const Bitmapset *a); -#endif /* BITMAPSET_H */ +#endif /* BITMAPSET_H */ diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 7cb3fc922c..d535f7a648 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -138,8 +138,8 @@ typedef struct IndexInfo List *ii_Predicate; /* list of Expr */ ExprState *ii_PredicateState; Oid *ii_ExclusionOps; /* array with one entry per column */ - Oid *ii_ExclusionProcs; /* array with one entry per column */ - uint16 *ii_ExclusionStrats; /* array with one entry per column */ + Oid *ii_ExclusionProcs; /* array with one entry per column */ + uint16 *ii_ExclusionStrats; /* array with one entry per column */ Oid *ii_UniqueOps; /* array with one entry per column */ Oid *ii_UniqueProcs; /* array with one entry per column */ uint16 *ii_UniqueStrats; /* array with one entry per column */ @@ -203,7 +203,7 @@ typedef struct ExprContext MemoryContext ecxt_per_tuple_memory; /* Values to substitute for Param nodes in expression */ - ParamExecData *ecxt_param_exec_vals; /* for PARAM_EXEC params */ + ParamExecData *ecxt_param_exec_vals; /* for PARAM_EXEC params */ ParamListInfo ecxt_param_list_info; /* for other param types */ /* @@ -249,7 +249,7 @@ typedef enum { SFRM_ValuePerCall = 0x01, /* one value returned per call */ SFRM_Materialize = 0x02, /* result set instantiated in Tuplestore */ - SFRM_Materialize_Random = 0x04, /* Tuplestore needs randomAccess */ + SFRM_Materialize_Random = 0x04, /* Tuplestore needs randomAccess */ SFRM_Materialize_Preferred = 0x08 /* caller prefers Tuplestore */ } SetFunctionReturnMode; @@ -419,8 +419,8 @@ typedef struct EState /* Info about target table(s) for insert/update/delete queries: */ ResultRelInfo *es_result_relations; /* array of ResultRelInfos */ - int es_num_result_relations; /* length of array */ - ResultRelInfo *es_result_relation_info; /* currently active array elt */ + int es_num_result_relations; /* length of array */ + ResultRelInfo *es_result_relation_info; /* currently active array elt */ /* * Info about the target partitioned target table root(s) for @@ -433,16 +433,16 @@ typedef struct EState int es_num_root_result_relations; /* length of the array */ /* Stuff used for firing triggers: */ - List *es_trig_target_relations; /* trigger-only ResultRelInfos */ + List *es_trig_target_relations; /* trigger-only ResultRelInfos */ TupleTableSlot *es_trig_tuple_slot; /* for trigger output tuples */ - TupleTableSlot *es_trig_oldtup_slot; /* for TriggerEnabled */ - TupleTableSlot *es_trig_newtup_slot; /* for TriggerEnabled */ + TupleTableSlot *es_trig_oldtup_slot; /* for TriggerEnabled */ + TupleTableSlot *es_trig_newtup_slot; /* for TriggerEnabled */ /* Parameter info: */ ParamListInfo es_param_list_info; /* values of external params */ ParamExecData *es_param_exec_vals; /* values of internal params */ - QueryEnvironment *es_queryEnv; /* query environment */ + QueryEnvironment *es_queryEnv; /* query environment */ /* Other working state: */ MemoryContext es_query_cxt; /* per-query context in which EState lives */ @@ -460,9 +460,9 @@ typedef struct EState List *es_exprcontexts; /* List of ExprContexts within EState */ - List *es_subplanstates; /* List of PlanState for SubPlans */ + List *es_subplanstates; /* List of PlanState for SubPlans */ - List *es_auxmodifytables; /* List of secondary ModifyTableStates */ + List *es_auxmodifytables; /* List of secondary ModifyTableStates */ /* * this ExprContext is for per-output-tuple operations, such as constraint @@ -691,8 +691,7 @@ typedef struct SetExprState * output. If so, it's stored here. */ TupleDesc funcResultDesc; - bool funcReturnsTuple; /* valid when funcResultDesc isn't - * NULL */ + bool funcReturnsTuple; /* valid when funcResultDesc isn't NULL */ /* * Remember whether the function is declared to return a set. This is set @@ -784,7 +783,7 @@ typedef enum DomainConstraintType typedef struct DomainConstraintState { NodeTag type; - DomainConstraintType constrainttype; /* constraint type */ + DomainConstraintType constrainttype; /* constraint type */ char *name; /* name of constraint (for error msgs) */ Expr *check_expr; /* for CHECK, a boolean expression */ ExprState *check_exprstate; /* check_expr's eval state, or NULL */ @@ -907,7 +906,7 @@ typedef struct ProjectSetState Node **elems; /* array of expression states */ ExprDoneCond *elemdone; /* array of per-SRF is-done states */ int nelems; /* length of elemdone[] array */ - bool pending_srf_tuples; /* still evaluating srfs in tlist? */ + bool pending_srf_tuples; /* still evaluating srfs in tlist? */ } ProjectSetState; /* ---------------- @@ -923,26 +922,24 @@ typedef struct ModifyTableState PlanState **mt_plans; /* subplans (one per target rel) */ int mt_nplans; /* number of plans in the array */ int mt_whichplan; /* which one is being executed (0..n-1) */ - ResultRelInfo *resultRelInfo; /* per-subplan target relations */ + ResultRelInfo *resultRelInfo; /* per-subplan target relations */ ResultRelInfo *rootResultRelInfo; /* root target relation (partitioned * table root) */ List **mt_arowmarks; /* per-subplan ExecAuxRowMark lists */ EPQState mt_epqstate; /* for evaluating EvalPlanQual rechecks */ bool fireBSTriggers; /* do we need to fire stmt triggers? */ - OnConflictAction mt_onconflict; /* ON CONFLICT type */ - List *mt_arbiterindexes; /* unique index OIDs to arbitrate - * taking alt path */ + OnConflictAction mt_onconflict; /* ON CONFLICT type */ + List *mt_arbiterindexes; /* unique index OIDs to arbitrate taking + * alt path */ TupleTableSlot *mt_existing; /* slot to store existing target tuple in */ - List *mt_excludedtlist; /* the excluded pseudo relation's - * tlist */ - TupleTableSlot *mt_conflproj; /* CONFLICT ... SET ... projection - * target */ + List *mt_excludedtlist; /* the excluded pseudo relation's tlist */ + TupleTableSlot *mt_conflproj; /* CONFLICT ... SET ... projection target */ struct PartitionDispatchData **mt_partition_dispatch_info; /* Tuple-routing support info */ int mt_num_dispatch; /* Number of entries in the above array */ - int mt_num_partitions; /* Number of members in the following - * arrays */ - ResultRelInfo *mt_partitions; /* Per partition result relation */ + int mt_num_partitions; /* Number of members in the following + * arrays */ + ResultRelInfo *mt_partitions; /* Per partition result relation */ TupleConversionMap **mt_partition_tupconv_maps; /* Per partition tuple conversion map */ TupleTableSlot *mt_partition_tuple_slot; @@ -1081,7 +1078,7 @@ typedef struct SampleScanState List *args; /* expr states for TABLESAMPLE params */ ExprState *repeatable; /* expr state for REPEATABLE expr */ /* use struct pointer to avoid including tsmapi.h here */ - struct TsmRoutine *tsmroutine; /* descriptor for tablesample method */ + struct TsmRoutine *tsmroutine; /* descriptor for tablesample method */ void *tsm_state; /* tablesample method can keep state here */ bool use_bulkread; /* use bulkread buffer access strategy? */ bool use_pagemode; /* use page-at-a-time visibility checking? */ @@ -1380,8 +1377,7 @@ typedef struct FunctionScanState bool simple; int64 ordinal; int nfuncs; - struct FunctionScanPerFuncState *funcstates; /* array of length - * nfuncs */ + struct FunctionScanPerFuncState *funcstates; /* array of length nfuncs */ MemoryContext argcontext; } FunctionScanState; @@ -1428,7 +1424,7 @@ typedef struct TableFuncScanState List *ns_uris; /* list of states of namespace uri exprs */ Bitmapset *notnulls; /* nullability flag for each output column */ void *opaque; /* table builder private space */ - const struct TableFuncRoutine *routine; /* table builder methods */ + const struct TableFuncRoutine *routine; /* table builder methods */ FmgrInfo *in_functions; /* input function for each column */ Oid *typioparams; /* typioparam for each column */ int64 ordinal; /* row number to be output next */ @@ -1500,7 +1496,7 @@ typedef struct WorkTableScanState typedef struct ForeignScanState { ScanState ss; /* its first field is NodeTag */ - ExprState *fdw_recheck_quals; /* original quals not in ss.ps.qual */ + ExprState *fdw_recheck_quals; /* original quals not in ss.ps.qual */ Size pscan_len; /* size of parallel coordination information */ /* use struct pointer to avoid including fdwapi.h here */ struct FdwRoutine *fdwroutine; @@ -1650,9 +1646,9 @@ typedef struct HashJoinState { JoinState js; /* its first field is NodeTag */ ExprState *hashclauses; - List *hj_OuterHashKeys; /* list of ExprState nodes */ - List *hj_InnerHashKeys; /* list of ExprState nodes */ - List *hj_HashOperators; /* list of operator OIDs */ + List *hj_OuterHashKeys; /* list of ExprState nodes */ + List *hj_InnerHashKeys; /* list of ExprState nodes */ + List *hj_HashOperators; /* list of operator OIDs */ HashJoinTable hj_HashTable; uint32 hj_CurHashValue; int hj_CurBucketNo; @@ -1754,14 +1750,13 @@ typedef struct AggState ExprContext **aggcontexts; /* econtexts for long-lived data (per GS) */ ExprContext *tmpcontext; /* econtext for input expressions */ ExprContext *curaggcontext; /* currently active aggcontext */ - AggStatePerTrans curpertrans; /* currently active trans state */ + AggStatePerTrans curpertrans; /* currently active trans state */ bool input_done; /* indicates end of input */ bool agg_done; /* indicates completion of Agg scan */ int projected_set; /* The last projected grouping set */ int current_set; /* The current grouping set being evaluated */ Bitmapset *grouped_cols; /* grouped cols in current projection */ - List *all_grouped_cols; /* list of all grouped cols in DESC - * order */ + List *all_grouped_cols; /* list of all grouped cols in DESC order */ /* These fields are for grouping set phase data */ int maxsets; /* The max number of sets in any phase */ AggStatePerPhase phases; /* array of all phases */ @@ -1810,15 +1805,14 @@ typedef struct WindowAggState int64 frameheadpos; /* current frame head position */ int64 frametailpos; /* current frame tail position */ /* use struct pointer to avoid including windowapi.h here */ - struct WindowObjectData *agg_winobj; /* winobj for aggregate - * fetches */ + struct WindowObjectData *agg_winobj; /* winobj for aggregate fetches */ int64 aggregatedbase; /* start row for current aggregates */ int64 aggregatedupto; /* rows before this one are aggregated */ int frameOptions; /* frame_clause options, see WindowDef */ ExprState *startOffset; /* expression for starting bound offset */ ExprState *endOffset; /* expression for ending bound offset */ - Datum startOffsetValue; /* result of startOffset evaluation */ + Datum startOffsetValue; /* result of startOffset evaluation */ Datum endOffsetValue; /* result of endOffset evaluation */ MemoryContext partcontext; /* context for partition-lifespan data */ @@ -1828,9 +1822,8 @@ typedef struct WindowAggState bool all_first; /* true if the scan is starting */ bool all_done; /* true if the scan is finished */ - bool partition_spooled; /* true if all tuples in current - * partition have been spooled into - * tuplestore */ + bool partition_spooled; /* true if all tuples in current partition + * have been spooled into tuplestore */ bool more_partitions; /* true if there's more partitions after * this one */ bool framehead_valid; /* true if frameheadpos is known up to @@ -1910,8 +1903,7 @@ typedef struct GatherMergeState bool need_to_scan_locally; int gm_nkeys; SortSupport gm_sortkeys; /* array of length ms_nkeys */ - struct GMReaderTupleBuffer *gm_tuple_buffers; /* tuple buffer per - * reader */ + struct GMReaderTupleBuffer *gm_tuple_buffers; /* tuple buffer per reader */ } GatherMergeState; /* ---------------- @@ -2007,4 +1999,4 @@ typedef struct LimitState TupleTableSlot *subSlot; /* tuple last obtained from subplan */ } LimitState; -#endif /* EXECNODES_H */ +#endif /* EXECNODES_H */ diff --git a/src/include/nodes/extensible.h b/src/include/nodes/extensible.h index 6ba7ad27a2..7325bf536a 100644 --- a/src/include/nodes/extensible.h +++ b/src/include/nodes/extensible.h @@ -151,4 +151,4 @@ extern void RegisterCustomScanMethods(const CustomScanMethods *methods); extern const CustomScanMethods *GetCustomScanMethods(const char *CustomName, bool missing_ok); -#endif /* EXTENSIBLE_H */ +#endif /* EXTENSIBLE_H */ diff --git a/src/include/nodes/lockoptions.h b/src/include/nodes/lockoptions.h index 4f8affd930..e0981dac6f 100644 --- a/src/include/nodes/lockoptions.h +++ b/src/include/nodes/lockoptions.h @@ -43,4 +43,4 @@ typedef enum LockWaitPolicy LockWaitError } LockWaitPolicy; -#endif /* LOCKOPTIONS_H */ +#endif /* LOCKOPTIONS_H */ diff --git a/src/include/nodes/makefuncs.h b/src/include/nodes/makefuncs.h index 53ea6598c8..46a79b1817 100644 --- a/src/include/nodes/makefuncs.h +++ b/src/include/nodes/makefuncs.h @@ -86,4 +86,4 @@ extern DefElem *makeDefElemExtended(char *nameSpace, char *name, Node *arg, extern GroupingSet *makeGroupingSet(GroupingSetKind kind, List *content, int location); -#endif /* MAKEFUNC_H */ +#endif /* MAKEFUNC_H */ diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h index bcf81304fd..7a0c6763df 100644 --- a/src/include/nodes/memnodes.h +++ b/src/include/nodes/memnodes.h @@ -75,8 +75,8 @@ typedef struct MemoryContextData NodeTag type; /* identifies exact kind of context */ /* these two fields are placed here to minimize alignment wastage: */ bool isReset; /* T = no space alloced since last reset */ - bool allowInCritSection; /* allow palloc in critical section */ - MemoryContextMethods *methods; /* virtual function table */ + bool allowInCritSection; /* allow palloc in critical section */ + MemoryContextMethods *methods; /* virtual function table */ MemoryContext parent; /* NULL if no parent (toplevel context) */ MemoryContext firstchild; /* head of linked list of children */ MemoryContext prevchild; /* previous child of same parent */ @@ -98,4 +98,4 @@ typedef struct MemoryContextData ((context) != NULL && \ (IsA((context), AllocSetContext) || IsA((context), SlabContext))) -#endif /* MEMNODES_H */ +#endif /* MEMNODES_H */ diff --git a/src/include/nodes/nodeFuncs.h b/src/include/nodes/nodeFuncs.h index cda925397b..3366983936 100644 --- a/src/include/nodes/nodeFuncs.h +++ b/src/include/nodes/nodeFuncs.h @@ -17,13 +17,13 @@ /* flags bits for query_tree_walker and query_tree_mutator */ -#define QTW_IGNORE_RT_SUBQUERIES 0x01 /* subqueries in rtable */ -#define QTW_IGNORE_CTE_SUBQUERIES 0x02 /* subqueries in cteList */ -#define QTW_IGNORE_RC_SUBQUERIES 0x03 /* both of above */ -#define QTW_IGNORE_JOINALIASES 0x04 /* JOIN alias var lists */ -#define QTW_IGNORE_RANGE_TABLE 0x08 /* skip rangetable entirely */ -#define QTW_EXAMINE_RTES 0x10 /* examine RTEs */ -#define QTW_DONT_COPY_QUERY 0x20 /* do not copy top Query */ +#define QTW_IGNORE_RT_SUBQUERIES 0x01 /* subqueries in rtable */ +#define QTW_IGNORE_CTE_SUBQUERIES 0x02 /* subqueries in cteList */ +#define QTW_IGNORE_RC_SUBQUERIES 0x03 /* both of above */ +#define QTW_IGNORE_JOINALIASES 0x04 /* JOIN alias var lists */ +#define QTW_IGNORE_RANGE_TABLE 0x08 /* skip rangetable entirely */ +#define QTW_EXAMINE_RTES 0x10 /* examine RTEs */ +#define QTW_DONT_COPY_QUERY 0x20 /* do not copy top Query */ /* callback function for check_functions_in_node */ typedef bool (*check_function_callback) (Oid func_id, void *context); @@ -77,4 +77,4 @@ struct PlanState; extern bool planstate_tree_walker(struct PlanState *planstate, bool (*walker) (), void *context); -#endif /* NODEFUNCS_H */ +#endif /* NODEFUNCS_H */ diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index 35c3c7db2a..01527399b8 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -551,7 +551,7 @@ extern PGDLLIMPORT Node *newNodeMacroHolder; newNodeMacroHolder->type = (tag), \ newNodeMacroHolder \ ) -#endif /* __GNUC__ */ +#endif /* __GNUC__ */ #define makeNode(_type_) ((_type_ *) newNode(sizeof(_type_),T_##_type_)) @@ -576,7 +576,7 @@ castNodeImpl(NodeTag type, void *ptr) #define castNode(_type_, nodeptr) ((_type_ *) castNodeImpl(T_##_type_, nodeptr)) #else #define castNode(_type_, nodeptr) ((_type_ *) (nodeptr)) -#endif /* USE_ASSERT_CHECKING */ +#endif /* USE_ASSERT_CHECKING */ /* ---------------------------------------------------------------- @@ -803,4 +803,4 @@ typedef enum OnConflictAction ONCONFLICT_UPDATE /* ON CONFLICT ... DO UPDATE */ } OnConflictAction; -#endif /* NODES_H */ +#endif /* NODES_H */ diff --git a/src/include/nodes/params.h b/src/include/nodes/params.h index bb1618c753..55219dab6e 100644 --- a/src/include/nodes/params.h +++ b/src/include/nodes/params.h @@ -49,7 +49,7 @@ struct ParseState; * ---------------- */ -#define PARAM_FLAG_CONST 0x0001 /* parameter is constant */ +#define PARAM_FLAG_CONST 0x0001 /* parameter is constant */ typedef struct ParamExternData { @@ -108,4 +108,4 @@ extern Size EstimateParamListSpace(ParamListInfo paramLI); extern void SerializeParamList(ParamListInfo paramLI, char **start_address); extern ParamListInfo RestoreParamList(char **start_address); -#endif /* PARAMS_H */ +#endif /* PARAMS_H */ diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 3864635f4c..1d96169d34 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -166,10 +166,9 @@ typedef struct Query List *constraintDeps; /* a list of pg_constraint OIDs that the query * depends on to be semantically valid */ - List *withCheckOptions; /* a list of WithCheckOption's, which - * are only added during rewrite and - * therefore are not written out as - * part of Query. */ + List *withCheckOptions; /* a list of WithCheckOption's, which are + * only added during rewrite and therefore + * are not written out as part of Query. */ /* * The following two fields identify the portion of the source text string @@ -351,7 +350,7 @@ typedef struct FuncCall List *args; /* the arguments (list of exprs) */ List *agg_order; /* ORDER BY (list of SortBy) */ Node *agg_filter; /* FILTER clause, if any */ - bool agg_within_group; /* ORDER BY appeared in WITHIN GROUP */ + bool agg_within_group; /* ORDER BY appeared in WITHIN GROUP */ bool agg_star; /* argument was really '*' */ bool agg_distinct; /* arguments were labeled DISTINCT */ bool func_variadic; /* last argument was labeled VARIADIC */ @@ -952,13 +951,13 @@ typedef struct RangeTblEntry */ Oid relid; /* OID of the relation */ char relkind; /* relation kind (see pg_class.relkind) */ - struct TableSampleClause *tablesample; /* sampling info, or NULL */ + struct TableSampleClause *tablesample; /* sampling info, or NULL */ /* * Fields valid for a subquery RTE (else NULL): */ Query *subquery; /* the sub-query */ - bool security_barrier; /* is from security_barrier view? */ + bool security_barrier; /* is from security_barrier view? */ /* * Fields valid for a join RTE (else NULL/zero): @@ -1071,7 +1070,7 @@ typedef struct RangeTblFunction List *funccolnames; /* column names (list of String) */ List *funccoltypes; /* OID list of column type OIDs */ List *funccoltypmods; /* integer list of column typmods */ - List *funccolcollations; /* OID list of column collation OIDs */ + List *funccolcollations; /* OID list of column collation OIDs */ /* This is set during planning for use by the executor: */ Bitmapset *funcparams; /* PARAM_EXEC Param IDs affecting this func */ } RangeTblFunction; @@ -1364,7 +1363,7 @@ typedef struct CommonTableExpr List *ctecolnames; /* list of output column names */ List *ctecoltypes; /* OID list of output column type OIDs */ List *ctecoltypmods; /* integer list of output column typmods */ - List *ctecolcollations; /* OID list of column collation OIDs */ + List *ctecolcollations; /* OID list of column collation OIDs */ } CommonTableExpr; /* Convenience macro to get the output tlist of a CTE's query */ @@ -1702,7 +1701,7 @@ typedef enum AlterTableType AT_ReAddConstraint, /* internal to commands/tablecmds.c */ AT_AlterConstraint, /* alter constraint */ AT_ValidateConstraint, /* validate constraint */ - AT_ValidateConstraintRecurse, /* internal to commands/tablecmds.c */ + AT_ValidateConstraintRecurse, /* internal to commands/tablecmds.c */ AT_ProcessedConstraint, /* pre-processed add constraint (local in * parser/parse_utilcmd.c) */ AT_AddIndexConstraint, /* add constraint using existing index */ @@ -1710,7 +1709,7 @@ typedef enum AlterTableType AT_DropConstraintRecurse, /* internal to commands/tablecmds.c */ AT_ReAddComment, /* internal to commands/tablecmds.c */ AT_AlterColumnType, /* alter column type */ - AT_AlterColumnGenericOptions, /* alter column OPTIONS (...) */ + AT_AlterColumnGenericOptions, /* alter column OPTIONS (...) */ AT_ChangeOwner, /* change owner */ AT_ClusterOn, /* CLUSTER ON */ AT_DropCluster, /* SET WITHOUT CLUSTER */ @@ -1863,9 +1862,9 @@ typedef struct ObjectWithArgs NodeTag type; List *objname; /* qualified name of function/operator */ List *objargs; /* list of Typename nodes */ - bool args_unspecified; /* argument list was omitted, so name - * must be unique (note that objargs - * == NIL means zero args) */ + bool args_unspecified; /* argument list was omitted, so name must + * be unique (note that objargs == NIL + * means zero args) */ } ObjectWithArgs; /* @@ -1989,7 +1988,7 @@ typedef struct CreateStmt List *tableElts; /* column definitions (list of ColumnDef) */ List *inhRelations; /* relations to inherit from (list of * inhRelation) */ - PartitionBoundSpec *partbound; /* FOR VALUES clause */ + PartitionBoundSpec *partbound; /* FOR VALUES clause */ PartitionSpec *partspec; /* PARTITION BY clause */ TypeName *ofTypename; /* OF typename */ List *constraints; /* constraints (list of Constraint nodes) */ @@ -2966,7 +2965,7 @@ typedef struct AlterEnumStmt char *newVal; /* new enum value's name */ char *newValNeighbor; /* neighboring enum value, if specified */ bool newValIsAfter; /* place new enum value after neighbor? */ - bool skipIfNewValExists; /* no error if new already exists? */ + bool skipIfNewValExists; /* no error if new already exists? */ } AlterEnumStmt; /* ---------------------- @@ -3080,7 +3079,7 @@ typedef enum VacuumOption VACOPT_FULL = 1 << 4, /* FULL (non-concurrent) vacuum */ VACOPT_NOWAIT = 1 << 5, /* don't wait to get lock (autovacuum only) */ VACOPT_SKIPTOAST = 1 << 6, /* don't process the TOAST table, if any */ - VACOPT_DISABLE_PAGE_SKIPPING = 1 << 7 /* don't skip any pages */ + VACOPT_DISABLE_PAGE_SKIPPING = 1 << 7 /* don't skip any pages */ } VacuumOption; typedef struct VacuumStmt @@ -3198,7 +3197,7 @@ typedef struct ConstraintsSetStmt */ /* Reindex options */ -#define REINDEXOPT_VERBOSE 1 << 0 /* print progress info */ +#define REINDEXOPT_VERBOSE 1 << 0 /* print progress info */ typedef enum ReindexObjectType { @@ -3227,8 +3226,8 @@ typedef struct CreateConversionStmt { NodeTag type; List *conversion_name; /* Name of the conversion */ - char *for_encoding_name; /* source encoding name */ - char *to_encoding_name; /* destination encoding name */ + char *for_encoding_name; /* source encoding name */ + char *to_encoding_name; /* destination encoding name */ List *func_name; /* qualified conversion function name */ bool def; /* is this a default conversion? */ } CreateConversionStmt; @@ -3417,4 +3416,4 @@ typedef struct DropSubscriptionStmt DropBehavior behavior; /* RESTRICT or CASCADE behavior */ } DropSubscriptionStmt; -#endif /* PARSENODES_H */ +#endif /* PARSENODES_H */ diff --git a/src/include/nodes/pg_list.h b/src/include/nodes/pg_list.h index 3313b051ce..667d5e269c 100644 --- a/src/include/nodes/pg_list.h +++ b/src/include/nodes/pg_list.h @@ -336,6 +336,6 @@ extern List *list_copy_tail(const List *list, int nskip); #define listCopy(list) list_copy(list) extern int length(List *list); -#endif /* ENABLE_LIST_COMPAT */ +#endif /* ENABLE_LIST_COMPAT */ -#endif /* PG_LIST_H */ +#endif /* PG_LIST_H */ diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index d84372da38..f1a1b24e67 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -56,7 +56,7 @@ typedef struct PlannedStmt bool dependsOnRole; /* is plan specific to current role? */ - bool parallelModeNeeded; /* parallel mode required to execute? */ + bool parallelModeNeeded; /* parallel mode required to execute? */ struct Plan *planTree; /* tree of Plan nodes */ @@ -221,7 +221,7 @@ typedef struct ModifyTable List *partitioned_rels; List *resultRelations; /* integer list of RT indexes */ int resultRelIndex; /* index of first resultRel in plan's list */ - int rootResultRelIndex; /* index of the partitioned table root */ + int rootResultRelIndex; /* index of the partitioned table root */ List *plans; /* plan(s) producing source data */ List *withCheckOptionLists; /* per-target-table WCO lists */ List *returningLists; /* per-target-table RETURNING tlists */ @@ -390,7 +390,7 @@ typedef struct IndexScan List *indexqual; /* list of index quals (usually OpExprs) */ List *indexqualorig; /* the same in original form */ List *indexorderby; /* list of index ORDER BY exprs */ - List *indexorderbyorig; /* the same in original form */ + List *indexorderbyorig; /* the same in original form */ List *indexorderbyops; /* OIDs of sort ops for ORDER BY exprs */ ScanDirection indexorderdir; /* forward or backward or don't care */ } IndexScan; @@ -600,8 +600,7 @@ typedef struct ForeignScan List *fdw_exprs; /* expressions that FDW may evaluate */ List *fdw_private; /* private data for FDW */ List *fdw_scan_tlist; /* optional tlist describing scan tuple */ - List *fdw_recheck_quals; /* original quals not in - * scan.plan.qual */ + List *fdw_recheck_quals; /* original quals not in scan.plan.qual */ Bitmapset *fs_relids; /* RTIs generated by this scan */ bool fsSystemCol; /* true if any "system column" is needed */ } ForeignScan; @@ -629,8 +628,7 @@ typedef struct CustomScan List *custom_plans; /* list of Plan nodes, if any */ List *custom_exprs; /* expressions that custom code may evaluate */ List *custom_private; /* private data for custom code */ - List *custom_scan_tlist; /* optional tlist describing scan - * tuple */ + List *custom_scan_tlist; /* optional tlist describing scan tuple */ Bitmapset *custom_relids; /* RTIs generated by this scan */ const struct CustomScanMethods *methods; } CustomScan; @@ -709,7 +707,7 @@ typedef struct NestLoopParam typedef struct MergeJoin { Join join; - bool skip_mark_restore; /* Can we skip mark/restore calls? */ + bool skip_mark_restore; /* Can we skip mark/restore calls? */ List *mergeclauses; /* mergeclauses as expression trees */ /* these are arrays, but have the same length as the mergeclauses list: */ Oid *mergeFamilies; /* per-clause OIDs of btree opfamilies */ @@ -1030,4 +1028,4 @@ typedef struct PlanInvalItem uint32 hashValue; /* hash value of object's cache lookup key */ } PlanInvalItem; -#endif /* PLANNODES_H */ +#endif /* PLANNODES_H */ diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index edca5d2816..38015ed540 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -150,9 +150,9 @@ typedef struct Expr * are very useful for debugging and interpreting completed plans, so we keep * them around. */ -#define INNER_VAR 65000 /* reference to inner subplan */ -#define OUTER_VAR 65001 /* reference to outer subplan */ -#define INDEX_VAR 65002 /* reference to index column */ +#define INNER_VAR 65000 /* reference to inner subplan */ +#define OUTER_VAR 65001 /* reference to outer subplan */ +#define INDEX_VAR 65002 /* reference to index column */ #define IS_SPECIAL_VARNO(varno) ((varno) >= INNER_VAR) @@ -692,8 +692,8 @@ typedef struct SubPlan /* Extra data useful for determining subplan's output type: */ Oid firstColType; /* Type of first column of subplan result */ int32 firstColTypmod; /* Typmod of first column of subplan result */ - Oid firstColCollation; /* Collation of first column of - * subplan result */ + Oid firstColCollation; /* Collation of first column of subplan + * result */ /* Information about execution strategy: */ bool useHashTable; /* TRUE to store subselect output in a hash * table (implies we are doing "IN") */ @@ -1499,4 +1499,4 @@ typedef struct OnConflictExpr List *exclRelTlist; /* tlist of the EXCLUDED pseudo relation */ } OnConflictExpr; -#endif /* PRIMNODES_H */ +#endif /* PRIMNODES_H */ diff --git a/src/include/nodes/print.h b/src/include/nodes/print.h index 4c94a3afe5..fa01c2ad84 100644 --- a/src/include/nodes/print.h +++ b/src/include/nodes/print.h @@ -31,4 +31,4 @@ extern void print_pathkeys(const List *pathkeys, const List *rtable); extern void print_tl(const List *tlist, const List *rtable); extern void print_slot(TupleTableSlot *slot); -#endif /* PRINT_H */ +#endif /* PRINT_H */ diff --git a/src/include/nodes/readfuncs.h b/src/include/nodes/readfuncs.h index ca540baf02..c80fae2311 100644 --- a/src/include/nodes/readfuncs.h +++ b/src/include/nodes/readfuncs.h @@ -28,4 +28,4 @@ extern void *nodeRead(char *token, int tok_len); */ extern Node *parseNodeString(void); -#endif /* READFUNCS_H */ +#endif /* READFUNCS_H */ diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 077e1ceedd..9bae3c6ab9 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -128,9 +128,9 @@ typedef struct PlannerGlobal bool parallelModeOK; /* parallel mode potentially OK? */ - bool parallelModeNeeded; /* parallel mode actually required? */ + bool parallelModeNeeded; /* parallel mode actually required? */ - char maxParallelHazard; /* worst PROPARALLEL hazard level */ + char maxParallelHazard; /* worst PROPARALLEL hazard level */ } PlannerGlobal; /* macro for fetching the Plan associated with a SubPlan node */ @@ -176,7 +176,7 @@ typedef struct PlannerInfo * does not correspond to a base relation, such as a join RTE or an * unreferenced view RTE; or if the RelOptInfo hasn't been made yet. */ - struct RelOptInfo **simple_rel_array; /* All 1-rel RelOptInfos */ + struct RelOptInfo **simple_rel_array; /* All 1-rel RelOptInfos */ int simple_rel_array_size; /* allocated size of array */ /* @@ -229,23 +229,23 @@ typedef struct PlannerInfo List *cte_plan_ids; /* per-CTE-item list of subplan IDs */ - List *multiexpr_params; /* List of Lists of Params for - * MULTIEXPR subquery outputs */ + List *multiexpr_params; /* List of Lists of Params for MULTIEXPR + * subquery outputs */ List *eq_classes; /* list of active EquivalenceClasses */ List *canon_pathkeys; /* list of "canonical" PathKeys */ - List *left_join_clauses; /* list of RestrictInfos for - * mergejoinable outer join clauses - * w/nonnullable var on left */ + List *left_join_clauses; /* list of RestrictInfos for mergejoinable + * outer join clauses w/nonnullable var on + * left */ - List *right_join_clauses; /* list of RestrictInfos for - * mergejoinable outer join clauses - * w/nonnullable var on right */ + List *right_join_clauses; /* list of RestrictInfos for mergejoinable + * outer join clauses w/nonnullable var on + * right */ - List *full_join_clauses; /* list of RestrictInfos for - * mergejoinable full join clauses */ + List *full_join_clauses; /* list of RestrictInfos for mergejoinable + * full join clauses */ List *join_info_list; /* list of SpecialJoinInfos */ @@ -255,7 +255,7 @@ typedef struct PlannerInfo List *rowMarks; /* list of PlanRowMarks */ - List *placeholder_list; /* list of PlaceHolderInfos */ + List *placeholder_list; /* list of PlaceHolderInfos */ List *fkey_list; /* list of ForeignKeyOptInfos */ @@ -263,7 +263,7 @@ typedef struct PlannerInfo List *group_pathkeys; /* groupClause pathkeys, if any */ List *window_pathkeys; /* pathkeys of bottom window, if any */ - List *distinct_pathkeys; /* distinctClause pathkeys, if any */ + List *distinct_pathkeys; /* distinctClause pathkeys, if any */ List *sort_pathkeys; /* sortClause pathkeys, if any */ List *initial_rels; /* RelOptInfos we are now trying to join */ @@ -286,7 +286,7 @@ typedef struct PlannerInfo MemoryContext planner_cxt; /* context holding PlannerInfo */ - double total_table_pages; /* # of pages in all tables of query */ + double total_table_pages; /* # of pages in all tables of query */ double tuple_fraction; /* tuple_fraction passed to query_planner */ double limit_tuples; /* limit_tuples passed to query_planner */ @@ -294,8 +294,8 @@ typedef struct PlannerInfo Index qual_security_level; /* minimum security_level for quals */ /* Note: qual_security_level is zero if there are no securityQuals */ - bool hasInheritedTarget; /* true if parse->resultRelation is an - * inheritance child rel */ + bool hasInheritedTarget; /* true if parse->resultRelation is an + * inheritance child rel */ bool hasJoinRTEs; /* true if any RTEs are RTE_JOIN kind */ bool hasLateralRTEs; /* true if any RTEs are marked LATERAL */ bool hasDeletedRTEs; /* true if any RTE was deleted from jointree */ @@ -528,17 +528,17 @@ typedef struct RelOptInfo double rows; /* estimated number of result tuples */ /* per-relation planner control flags */ - bool consider_startup; /* keep cheap-startup-cost paths? */ + bool consider_startup; /* keep cheap-startup-cost paths? */ bool consider_param_startup; /* ditto, for parameterized paths? */ - bool consider_parallel; /* consider parallel paths? */ + bool consider_parallel; /* consider parallel paths? */ /* default result targetlist for Paths scanning this relation */ - struct PathTarget *reltarget; /* list of Vars/Exprs, cost, width */ + struct PathTarget *reltarget; /* list of Vars/Exprs, cost, width */ /* materialization information */ List *pathlist; /* Path structures */ List *ppilist; /* ParamPathInfos used in pathlist */ - List *partial_pathlist; /* partial Paths */ + List *partial_pathlist; /* partial Paths */ struct Path *cheapest_startup_path; struct Path *cheapest_total_path; struct Path *cheapest_unique_path; @@ -582,17 +582,16 @@ typedef struct RelOptInfo List *non_unique_for_rels; /* known not unique for these set(s) */ /* used by various scans and joins: */ - List *baserestrictinfo; /* RestrictInfo structures (if base - * rel) */ - QualCost baserestrictcost; /* cost of evaluating the above */ - Index baserestrict_min_security; /* min security_level found in - * baserestrictinfo */ + List *baserestrictinfo; /* RestrictInfo structures (if base rel) */ + QualCost baserestrictcost; /* cost of evaluating the above */ + Index baserestrict_min_security; /* min security_level found in + * baserestrictinfo */ List *joininfo; /* RestrictInfo structures for join clauses * involving this rel */ - bool has_eclass_joins; /* T means joininfo is incomplete */ + bool has_eclass_joins; /* T means joininfo is incomplete */ /* used by "other" relations */ - Relids top_parent_relids; /* Relids of topmost parents */ + Relids top_parent_relids; /* Relids of topmost parents */ } RelOptInfo; /* @@ -696,8 +695,8 @@ typedef struct ForeignKeyOptInfo Index ref_relid; /* RT index of the referenced table */ int nkeys; /* number of columns in the foreign key */ AttrNumber conkey[INDEX_MAX_KEYS]; /* cols in referencing table */ - AttrNumber confkey[INDEX_MAX_KEYS]; /* cols in referenced table */ - Oid conpfeqop[INDEX_MAX_KEYS]; /* PK = FK operator OIDs */ + AttrNumber confkey[INDEX_MAX_KEYS]; /* cols in referenced table */ + Oid conpfeqop[INDEX_MAX_KEYS]; /* PK = FK operator OIDs */ /* Derived info about whether FK's equality conditions match the query: */ int nmatched_ec; /* # of FK cols matched by ECs */ @@ -822,7 +821,7 @@ typedef struct EquivalenceMember Expr *em_expr; /* the expression represented */ Relids em_relids; /* all relids appearing in em_expr */ - Relids em_nullable_relids; /* nullable by lower outer joins */ + Relids em_nullable_relids; /* nullable by lower outer joins */ bool em_is_const; /* expression is pseudoconstant? */ bool em_is_child; /* derived version for a child relation? */ Oid em_datatype; /* the "nominal type" used by the opfamily */ @@ -959,8 +958,7 @@ typedef struct Path bool parallel_aware; /* engage parallel-aware logic? */ bool parallel_safe; /* OK to use as part of parallel plan? */ - int parallel_workers; /* desired # of workers; 0 = not - * parallel */ + int parallel_workers; /* desired # of workers; 0 = not parallel */ /* estimated size/costs for path (see costsize.c for more info) */ double rows; /* estimated number of result tuples */ @@ -1298,7 +1296,7 @@ typedef struct JoinPath Path *outerjoinpath; /* path for the outer side of the join */ Path *innerjoinpath; /* path for the inner side of the join */ - List *joinrestrictinfo; /* RestrictInfos to apply to join */ + List *joinrestrictinfo; /* RestrictInfos to apply to join */ /* * See the notes for RelOptInfo and ParamPathInfo to understand why @@ -1351,11 +1349,11 @@ typedef JoinPath NestPath; typedef struct MergePath { JoinPath jpath; - List *path_mergeclauses; /* join clauses to be used for merge */ + List *path_mergeclauses; /* join clauses to be used for merge */ List *outersortkeys; /* keys for explicit sort, if any */ List *innersortkeys; /* keys for explicit sort, if any */ - bool skip_mark_restore; /* can executor skip mark/restore? */ - bool materialize_inner; /* add Materialize to inner? */ + bool skip_mark_restore; /* can executor skip mark/restore? */ + bool materialize_inner; /* add Materialize to inner? */ } MergePath; /* @@ -1370,7 +1368,7 @@ typedef struct MergePath typedef struct HashPath { JoinPath jpath; - List *path_hashclauses; /* join clauses used for hashing */ + List *path_hashclauses; /* join clauses used for hashing */ int num_batches; /* number of batches expected */ } HashPath; @@ -1750,7 +1748,7 @@ typedef struct RestrictInfo bool is_pushed_down; /* TRUE if clause was pushed down in level */ - bool outerjoin_delayed; /* TRUE if delayed by lower outer join */ + bool outerjoin_delayed; /* TRUE if delayed by lower outer join */ bool can_join; /* see comment above */ @@ -1804,11 +1802,11 @@ typedef struct RestrictInfo bool outer_is_left; /* T = outer var on left, F = on right */ /* valid if clause is hashjoinable, else InvalidOid: */ - Oid hashjoinoperator; /* copy of clause operator */ + Oid hashjoinoperator; /* copy of clause operator */ /* cache space for hashclause processing; -1 if not yet set */ Selectivity left_bucketsize; /* avg bucketsize of left side */ - Selectivity right_bucketsize; /* avg bucketsize of right side */ + Selectivity right_bucketsize; /* avg bucketsize of right side */ } RestrictInfo; /* @@ -1922,7 +1920,7 @@ typedef struct SpecialJoinInfo Relids syn_righthand; /* base relids syntactically within RHS */ JoinType jointype; /* always INNER, LEFT, FULL, SEMI, or ANTI */ bool lhs_strict; /* joinclause is strict for some LHS rel */ - bool delay_upper_joins; /* can't commute with upper RHS */ + bool delay_upper_joins; /* can't commute with upper RHS */ /* Remaining fields are set only for JOIN_SEMI jointype: */ bool semi_can_btree; /* true if semi_operators are all btree */ bool semi_can_hash; /* true if semi_operators are all hash */ @@ -2223,4 +2221,4 @@ typedef struct JoinCostWorkspace int numbatches; } JoinCostWorkspace; -#endif /* RELATION_H */ +#endif /* RELATION_H */ diff --git a/src/include/nodes/replnodes.h b/src/include/nodes/replnodes.h index 92ada41b6d..dea61e90e9 100644 --- a/src/include/nodes/replnodes.h +++ b/src/include/nodes/replnodes.h @@ -105,4 +105,4 @@ typedef struct SQLCmd NodeTag type; } SQLCmd; -#endif /* REPLNODES_H */ +#endif /* REPLNODES_H */ diff --git a/src/include/nodes/tidbitmap.h b/src/include/nodes/tidbitmap.h index 87f4bb7c91..f9a1902da8 100644 --- a/src/include/nodes/tidbitmap.h +++ b/src/include/nodes/tidbitmap.h @@ -71,4 +71,4 @@ extern void tbm_end_shared_iterate(TBMSharedIterator *iterator); extern TBMSharedIterator *tbm_attach_shared_iterate(dsa_area *dsa, dsa_pointer dp); -#endif /* TIDBITMAP_H */ +#endif /* TIDBITMAP_H */ diff --git a/src/include/nodes/value.h b/src/include/nodes/value.h index ede97b7bcd..83f5a19fe9 100644 --- a/src/include/nodes/value.h +++ b/src/include/nodes/value.h @@ -58,4 +58,4 @@ extern Value *makeFloat(char *numericStr); extern Value *makeString(char *str); extern Value *makeBitString(char *str); -#endif /* VALUE_H */ +#endif /* VALUE_H */ diff --git a/src/include/optimizer/clauses.h b/src/include/optimizer/clauses.h index cc0d7b0a26..e3672218f3 100644 --- a/src/include/optimizer/clauses.h +++ b/src/include/optimizer/clauses.h @@ -85,4 +85,4 @@ extern Node *estimate_expression_value(PlannerInfo *root, Node *node); extern Query *inline_set_returning_function(PlannerInfo *root, RangeTblEntry *rte); -#endif /* CLAUSES_H */ +#endif /* CLAUSES_H */ diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h index a8cedb8f78..8c0cccb054 100644 --- a/src/include/optimizer/cost.h +++ b/src/include/optimizer/cost.h @@ -35,7 +35,7 @@ typedef enum { CONSTRAINT_EXCLUSION_OFF, /* do not use c_e */ CONSTRAINT_EXCLUSION_ON, /* apply c_e to all rels */ - CONSTRAINT_EXCLUSION_PARTITION /* apply c_e to otherrels only */ + CONSTRAINT_EXCLUSION_PARTITION /* apply c_e to otherrels only */ } ConstraintExclusionType; @@ -210,4 +210,4 @@ extern void cost_gather_merge(GatherMergePath *path, PlannerInfo *root, Cost input_startup_cost, Cost input_total_cost, double *rows); -#endif /* COST_H */ +#endif /* COST_H */ diff --git a/src/include/optimizer/geqo.h b/src/include/optimizer/geqo.h index be65c054e1..d0158d7adf 100644 --- a/src/include/optimizer/geqo.h +++ b/src/include/optimizer/geqo.h @@ -73,7 +73,7 @@ extern double Geqo_seed; /* 0 .. 1 */ typedef struct { List *initial_rels; /* the base relations we are joining */ - unsigned short random_state[3]; /* state for pg_erand48() */ + unsigned short random_state[3]; /* state for pg_erand48() */ } GeqoPrivateData; @@ -85,4 +85,4 @@ extern RelOptInfo *geqo(PlannerInfo *root, extern Cost geqo_eval(PlannerInfo *root, Gene *tour, int num_gene); extern RelOptInfo *gimme_tree(PlannerInfo *root, Gene *tour, int num_gene); -#endif /* GEQO_H */ +#endif /* GEQO_H */ diff --git a/src/include/optimizer/geqo_copy.h b/src/include/optimizer/geqo_copy.h index 3cbaf3e4ca..4035b4ff13 100644 --- a/src/include/optimizer/geqo_copy.h +++ b/src/include/optimizer/geqo_copy.h @@ -27,4 +27,4 @@ extern void geqo_copy(PlannerInfo *root, Chromosome *chromo1, Chromosome *chromo2, int string_length); -#endif /* GEQO_COPY_H */ +#endif /* GEQO_COPY_H */ diff --git a/src/include/optimizer/geqo_gene.h b/src/include/optimizer/geqo_gene.h index f936ebdd89..3282193284 100644 --- a/src/include/optimizer/geqo_gene.h +++ b/src/include/optimizer/geqo_gene.h @@ -42,4 +42,4 @@ typedef struct Pool int string_length; } Pool; -#endif /* GEQO_GENE_H */ +#endif /* GEQO_GENE_H */ diff --git a/src/include/optimizer/geqo_misc.h b/src/include/optimizer/geqo_misc.h index 880bd0e140..89f91b3a4d 100644 --- a/src/include/optimizer/geqo_misc.h +++ b/src/include/optimizer/geqo_misc.h @@ -29,6 +29,6 @@ extern void print_pool(FILE *fp, Pool *pool, int start, int stop); extern void print_gen(FILE *fp, Pool *pool, int generation); extern void print_edge_table(FILE *fp, Edge *edge_table, int num_gene); -#endif /* GEQO_DEBUG */ +#endif /* GEQO_DEBUG */ -#endif /* GEQO_MISC_H */ +#endif /* GEQO_MISC_H */ diff --git a/src/include/optimizer/geqo_mutation.h b/src/include/optimizer/geqo_mutation.h index 85781c3c31..c5a94e03cf 100644 --- a/src/include/optimizer/geqo_mutation.h +++ b/src/include/optimizer/geqo_mutation.h @@ -27,4 +27,4 @@ extern void geqo_mutation(PlannerInfo *root, Gene *tour, int num_gene); -#endif /* GEQO_MUTATION_H */ +#endif /* GEQO_MUTATION_H */ diff --git a/src/include/optimizer/geqo_pool.h b/src/include/optimizer/geqo_pool.h index 7947b6e5bb..9fac307d69 100644 --- a/src/include/optimizer/geqo_pool.h +++ b/src/include/optimizer/geqo_pool.h @@ -37,4 +37,4 @@ extern void spread_chromo(PlannerInfo *root, Chromosome *chromo, Pool *pool); extern void sort_pool(PlannerInfo *root, Pool *pool); -#endif /* GEQO_POOL_H */ +#endif /* GEQO_POOL_H */ diff --git a/src/include/optimizer/geqo_random.h b/src/include/optimizer/geqo_random.h index 5312589387..2665a096b3 100644 --- a/src/include/optimizer/geqo_random.h +++ b/src/include/optimizer/geqo_random.h @@ -38,4 +38,4 @@ extern double geqo_rand(PlannerInfo *root); #define geqo_randint(root, upper, lower) \ ( (int) floor( geqo_rand(root)*(((upper)-(lower))+0.999999) ) + (lower) ) -#endif /* GEQO_RANDOM_H */ +#endif /* GEQO_RANDOM_H */ diff --git a/src/include/optimizer/geqo_recombination.h b/src/include/optimizer/geqo_recombination.h index 8ddde22296..8a436b9ec2 100644 --- a/src/include/optimizer/geqo_recombination.h +++ b/src/include/optimizer/geqo_recombination.h @@ -86,4 +86,4 @@ extern void ox1(PlannerInfo *root, Gene *mom, Gene *dad, Gene *offspring, extern void ox2(PlannerInfo *root, Gene *mom, Gene *dad, Gene *offspring, int num_gene, City *city_table); -#endif /* GEQO_RECOMBINATION_H */ +#endif /* GEQO_RECOMBINATION_H */ diff --git a/src/include/optimizer/geqo_selection.h b/src/include/optimizer/geqo_selection.h index 1aecf14ac1..69ce2b4b8a 100644 --- a/src/include/optimizer/geqo_selection.h +++ b/src/include/optimizer/geqo_selection.h @@ -30,4 +30,4 @@ extern void geqo_selection(PlannerInfo *root, Chromosome *momma, Chromosome *daddy, Pool *pool, double bias); -#endif /* GEQO_SELECTION_H */ +#endif /* GEQO_SELECTION_H */ diff --git a/src/include/optimizer/joininfo.h b/src/include/optimizer/joininfo.h index c9a8b53f1f..4450d81408 100644 --- a/src/include/optimizer/joininfo.h +++ b/src/include/optimizer/joininfo.h @@ -27,4 +27,4 @@ extern void remove_join_clause_from_rels(PlannerInfo *root, RestrictInfo *restrictinfo, Relids join_relids); -#endif /* JOININFO_H */ +#endif /* JOININFO_H */ diff --git a/src/include/optimizer/orclauses.h b/src/include/optimizer/orclauses.h index 2512ddee8f..a3d8e1d9f9 100644 --- a/src/include/optimizer/orclauses.h +++ b/src/include/optimizer/orclauses.h @@ -18,4 +18,4 @@ extern void extract_restriction_or_clauses(PlannerInfo *root); -#endif /* ORCLAUSES_H */ +#endif /* ORCLAUSES_H */ diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h index 245825c38b..0c0549db7f 100644 --- a/src/include/optimizer/pathnode.h +++ b/src/include/optimizer/pathnode.h @@ -286,4 +286,4 @@ extern ParamPathInfo *get_joinrel_parampathinfo(PlannerInfo *root, extern ParamPathInfo *get_appendrel_parampathinfo(RelOptInfo *appendrel, Relids required_outer); -#endif /* PATHNODE_H */ +#endif /* PATHNODE_H */ diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h index 807729c74a..4e06b2e299 100644 --- a/src/include/optimizer/paths.h +++ b/src/include/optimizer/paths.h @@ -228,4 +228,4 @@ extern PathKey *make_canonical_pathkey(PlannerInfo *root, EquivalenceClass *eclass, Oid opfamily, int strategy, bool nulls_first); -#endif /* PATHS_H */ +#endif /* PATHS_H */ diff --git a/src/include/optimizer/placeholder.h b/src/include/optimizer/placeholder.h index 11e6403aa3..5a4d46ba9d 100644 --- a/src/include/optimizer/placeholder.h +++ b/src/include/optimizer/placeholder.h @@ -29,4 +29,4 @@ extern void add_placeholders_to_base_rels(PlannerInfo *root); extern void add_placeholders_to_joinrel(PlannerInfo *root, RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel); -#endif /* PLACEHOLDER_H */ +#endif /* PLACEHOLDER_H */ diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h index 16960c2859..71f0faf938 100644 --- a/src/include/optimizer/plancat.h +++ b/src/include/optimizer/plancat.h @@ -57,4 +57,4 @@ extern Selectivity join_selectivity(PlannerInfo *root, extern bool has_row_triggers(PlannerInfo *root, Index rti, CmdType event); -#endif /* PLANCAT_H */ +#endif /* PLANCAT_H */ diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h index e3cde2595b..f1d16cffab 100644 --- a/src/include/optimizer/planmain.h +++ b/src/include/optimizer/planmain.h @@ -120,4 +120,4 @@ extern void extract_query_dependencies(Node *query, List **invalItems, bool *hasRowSecurity); -#endif /* PLANMAIN_H */ +#endif /* PLANMAIN_H */ diff --git a/src/include/optimizer/planner.h b/src/include/optimizer/planner.h index 41667f2c41..2a4cf71e10 100644 --- a/src/include/optimizer/planner.h +++ b/src/include/optimizer/planner.h @@ -59,4 +59,4 @@ extern bool plan_cluster_use_sort(Oid tableOid, Oid indexOid); extern List *get_partitioned_child_rels(PlannerInfo *root, Index rti); -#endif /* PLANNER_H */ +#endif /* PLANNER_H */ diff --git a/src/include/optimizer/predtest.h b/src/include/optimizer/predtest.h index 748cd35611..bccb8d63a9 100644 --- a/src/include/optimizer/predtest.h +++ b/src/include/optimizer/predtest.h @@ -22,4 +22,4 @@ extern bool predicate_implied_by(List *predicate_list, List *clause_list, extern bool predicate_refuted_by(List *predicate_list, List *clause_list, bool clause_is_check); -#endif /* PREDTEST_H */ +#endif /* PREDTEST_H */ diff --git a/src/include/optimizer/prep.h b/src/include/optimizer/prep.h index 2b20b36f74..faad46b5e4 100644 --- a/src/include/optimizer/prep.h +++ b/src/include/optimizer/prep.h @@ -58,4 +58,4 @@ extern Node *adjust_appendrel_attrs(PlannerInfo *root, Node *node, extern Node *adjust_appendrel_attrs_multilevel(PlannerInfo *root, Node *node, RelOptInfo *child_rel); -#endif /* PREP_H */ +#endif /* PREP_H */ diff --git a/src/include/optimizer/restrictinfo.h b/src/include/optimizer/restrictinfo.h index 31b9a79285..b2a69998fd 100644 --- a/src/include/optimizer/restrictinfo.h +++ b/src/include/optimizer/restrictinfo.h @@ -43,4 +43,4 @@ extern bool join_clause_is_movable_into(RestrictInfo *rinfo, Relids currentrelids, Relids current_and_outer); -#endif /* RESTRICTINFO_H */ +#endif /* RESTRICTINFO_H */ diff --git a/src/include/optimizer/subselect.h b/src/include/optimizer/subselect.h index 56dc237b51..ecd2011d54 100644 --- a/src/include/optimizer/subselect.h +++ b/src/include/optimizer/subselect.h @@ -40,4 +40,4 @@ extern Param *assign_nestloop_param_placeholdervar(PlannerInfo *root, PlaceHolderVar *phv); extern int SS_assign_special_param(PlannerInfo *root); -#endif /* SUBSELECT_H */ +#endif /* SUBSELECT_H */ diff --git a/src/include/optimizer/tlist.h b/src/include/optimizer/tlist.h index ccb93d8c80..0d3ec920dd 100644 --- a/src/include/optimizer/tlist.h +++ b/src/include/optimizer/tlist.h @@ -69,4 +69,4 @@ extern void split_pathtarget_at_srfs(PlannerInfo *root, #define create_pathtarget(root, tlist) \ set_pathtarget_cost_width(root, make_pathtarget_from_tlist(tlist)) -#endif /* TLIST_H */ +#endif /* TLIST_H */ diff --git a/src/include/optimizer/var.h b/src/include/optimizer/var.h index ae1f856933..61861528af 100644 --- a/src/include/optimizer/var.h +++ b/src/include/optimizer/var.h @@ -21,10 +21,10 @@ #define PVC_RECURSE_AGGREGATES 0x0002 /* recurse into Aggref arguments */ #define PVC_INCLUDE_WINDOWFUNCS 0x0004 /* include WindowFuncs in output list */ #define PVC_RECURSE_WINDOWFUNCS 0x0008 /* recurse into WindowFunc arguments */ -#define PVC_INCLUDE_PLACEHOLDERS 0x0010 /* include PlaceHolderVars in - * output list */ -#define PVC_RECURSE_PLACEHOLDERS 0x0020 /* recurse into PlaceHolderVar - * arguments */ +#define PVC_INCLUDE_PLACEHOLDERS 0x0010 /* include PlaceHolderVars in + * output list */ +#define PVC_RECURSE_PLACEHOLDERS 0x0020 /* recurse into PlaceHolderVar + * arguments */ extern Relids pull_varnos(Node *node); @@ -37,4 +37,4 @@ extern int locate_var_of_level(Node *node, int levelsup); extern List *pull_var_clause(Node *node, int flags); extern Node *flatten_join_alias_vars(PlannerInfo *root, Node *node); -#endif /* VAR_H */ +#endif /* VAR_H */ diff --git a/src/include/parser/analyze.h b/src/include/parser/analyze.h index 4d7d06a162..40f22339f1 100644 --- a/src/include/parser/analyze.h +++ b/src/include/parser/analyze.h @@ -43,4 +43,4 @@ extern void applyLockingClause(Query *qry, Index rtindex, LockClauseStrength strength, LockWaitPolicy waitPolicy, bool pushedDown); -#endif /* ANALYZE_H */ +#endif /* ANALYZE_H */ diff --git a/src/include/parser/gramparse.h b/src/include/parser/gramparse.h index 2da98f67f3..b6b67fb92c 100644 --- a/src/include/parser/gramparse.h +++ b/src/include/parser/gramparse.h @@ -44,8 +44,8 @@ typedef struct base_yy_extra_type */ bool have_lookahead; /* is lookahead info valid? */ int lookahead_token; /* one-token lookahead */ - core_YYSTYPE lookahead_yylval; /* yylval for lookahead token */ - YYLTYPE lookahead_yylloc; /* yylloc for lookahead token */ + core_YYSTYPE lookahead_yylval; /* yylval for lookahead token */ + YYLTYPE lookahead_yylloc; /* yylloc for lookahead token */ char *lookahead_end; /* end of current token */ char lookahead_hold_char; /* to be put back at *lookahead_end */ @@ -72,4 +72,4 @@ extern int base_yylex(YYSTYPE *lvalp, YYLTYPE *llocp, extern void parser_init(base_yy_extra_type *yyext); extern int base_yyparse(core_yyscan_t yyscanner); -#endif /* GRAMPARSE_H */ +#endif /* GRAMPARSE_H */ diff --git a/src/include/parser/parse_agg.h b/src/include/parser/parse_agg.h index 8a54d59d6f..6947a0186e 100644 --- a/src/include/parser/parse_agg.h +++ b/src/include/parser/parse_agg.h @@ -65,4 +65,4 @@ extern void build_aggregate_finalfn_expr(Oid *agg_input_types, Oid finalfn_oid, Expr **finalfnexpr); -#endif /* PARSE_AGG_H */ +#endif /* PARSE_AGG_H */ diff --git a/src/include/parser/parse_clause.h b/src/include/parser/parse_clause.h index 823138f6c0..1d205c6327 100644 --- a/src/include/parser/parse_clause.h +++ b/src/include/parser/parse_clause.h @@ -51,4 +51,4 @@ extern List *addTargetToSortList(ParseState *pstate, TargetEntry *tle, extern Index assignSortGroupRef(TargetEntry *tle, List *tlist); extern bool targetIsInSortList(TargetEntry *tle, Oid sortop, List *sortList); -#endif /* PARSE_CLAUSE_H */ +#endif /* PARSE_CLAUSE_H */ diff --git a/src/include/parser/parse_coerce.h b/src/include/parser/parse_coerce.h index 3eed81966d..06f65293cb 100644 --- a/src/include/parser/parse_coerce.h +++ b/src/include/parser/parse_coerce.h @@ -91,4 +91,4 @@ extern CoercionPathType find_coercion_pathway(Oid targetTypeId, extern CoercionPathType find_typmod_coercion_function(Oid typeId, Oid *funcid); -#endif /* PARSE_COERCE_H */ +#endif /* PARSE_COERCE_H */ diff --git a/src/include/parser/parse_collate.h b/src/include/parser/parse_collate.h index e42971dfde..7279fa4e7c 100644 --- a/src/include/parser/parse_collate.h +++ b/src/include/parser/parse_collate.h @@ -24,4 +24,4 @@ extern void assign_expr_collations(ParseState *pstate, Node *expr); extern Oid select_common_collation(ParseState *pstate, List *exprs, bool none_ok); -#endif /* PARSE_COLLATE_H */ +#endif /* PARSE_COLLATE_H */ diff --git a/src/include/parser/parse_cte.h b/src/include/parser/parse_cte.h index 9130612312..695e88c7ed 100644 --- a/src/include/parser/parse_cte.h +++ b/src/include/parser/parse_cte.h @@ -21,4 +21,4 @@ extern List *transformWithClause(ParseState *pstate, WithClause *withClause); extern void analyzeCTETargetList(ParseState *pstate, CommonTableExpr *cte, List *tlist); -#endif /* PARSE_CTE_H */ +#endif /* PARSE_CTE_H */ diff --git a/src/include/parser/parse_enr.h b/src/include/parser/parse_enr.h index 48a7576f2c..9c68ddbb04 100644 --- a/src/include/parser/parse_enr.h +++ b/src/include/parser/parse_enr.h @@ -19,4 +19,4 @@ extern bool name_matches_visible_ENR(ParseState *pstate, const char *refname); extern EphemeralNamedRelationMetadata get_visible_ENR(ParseState *pstate, const char *refname); -#endif /* PARSE_ENR_H */ +#endif /* PARSE_ENR_H */ diff --git a/src/include/parser/parse_expr.h b/src/include/parser/parse_expr.h index 2101eaefda..3af09b0056 100644 --- a/src/include/parser/parse_expr.h +++ b/src/include/parser/parse_expr.h @@ -23,4 +23,4 @@ extern Node *transformExpr(ParseState *pstate, Node *expr, ParseExprKind exprKin extern const char *ParseExprKindName(ParseExprKind exprKind); -#endif /* PARSE_EXPR_H */ +#endif /* PARSE_EXPR_H */ diff --git a/src/include/parser/parse_func.h b/src/include/parser/parse_func.h index 68572e9d2a..b4b6084b1b 100644 --- a/src/include/parser/parse_func.h +++ b/src/include/parser/parse_func.h @@ -70,4 +70,4 @@ extern Oid LookupAggWithArgs(ObjectWithArgs *agg, extern void check_srf_call_placement(ParseState *pstate, Node *last_srf, int location); -#endif /* PARSE_FUNC_H */ +#endif /* PARSE_FUNC_H */ diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h index cc424ece03..68930c1f4a 100644 --- a/src/include/parser/parse_node.h +++ b/src/include/parser/parse_node.h @@ -43,7 +43,7 @@ typedef enum ParseExprKind EXPR_KIND_FILTER, /* FILTER */ EXPR_KIND_WINDOW_PARTITION, /* window definition PARTITION BY */ EXPR_KIND_WINDOW_ORDER, /* window definition ORDER BY */ - EXPR_KIND_WINDOW_FRAME_RANGE, /* window frame clause with RANGE */ + EXPR_KIND_WINDOW_FRAME_RANGE, /* window frame clause with RANGE */ EXPR_KIND_WINDOW_FRAME_ROWS, /* window frame clause with ROWS */ EXPR_KIND_SELECT_TARGET, /* SELECT target list item */ EXPR_KIND_INSERT_TARGET, /* INSERT target list item */ @@ -63,11 +63,11 @@ typedef enum ParseExprKind EXPR_KIND_FUNCTION_DEFAULT, /* default parameter value for function */ EXPR_KIND_INDEX_EXPRESSION, /* index expression */ EXPR_KIND_INDEX_PREDICATE, /* index predicate */ - EXPR_KIND_ALTER_COL_TRANSFORM, /* transform expr in ALTER COLUMN TYPE */ + EXPR_KIND_ALTER_COL_TRANSFORM, /* transform expr in ALTER COLUMN TYPE */ EXPR_KIND_EXECUTE_PARAMETER, /* parameter value in EXECUTE */ EXPR_KIND_TRIGGER_WHEN, /* WHEN condition in CREATE TRIGGER */ EXPR_KIND_POLICY, /* USING or WITH CHECK expr in policy */ - EXPR_KIND_PARTITION_EXPRESSION /* PARTITION BY expression */ + EXPR_KIND_PARTITION_EXPRESSION /* PARTITION BY expression */ } ParseExprKind; @@ -167,7 +167,7 @@ typedef Node *(*CoerceParamHook) (ParseState *pstate, Param *param, */ struct ParseState { - struct ParseState *parentParseState; /* stack link */ + struct ParseState *parentParseState; /* stack link */ const char *p_sourcetext; /* source text, or NULL if not available */ List *p_rtable; /* range table so far */ List *p_joinexprs; /* JoinExprs for RTE_JOIN p_rtable entries */ @@ -175,25 +175,24 @@ struct ParseState * node's fromlist) */ List *p_namespace; /* currently-referenceable RTEs (List of * ParseNamespaceItem) */ - bool p_lateral_active; /* p_lateral_only items visible? */ + bool p_lateral_active; /* p_lateral_only items visible? */ List *p_ctenamespace; /* current namespace for common table exprs */ List *p_future_ctes; /* common table exprs not yet in namespace */ - CommonTableExpr *p_parent_cte; /* this query's containing CTE */ - Relation p_target_relation; /* INSERT/UPDATE/DELETE target rel */ - RangeTblEntry *p_target_rangetblentry; /* target rel's RTE */ + CommonTableExpr *p_parent_cte; /* this query's containing CTE */ + Relation p_target_relation; /* INSERT/UPDATE/DELETE target rel */ + RangeTblEntry *p_target_rangetblentry; /* target rel's RTE */ bool p_is_insert; /* process assignment like INSERT not UPDATE */ List *p_windowdefs; /* raw representations of window clauses */ ParseExprKind p_expr_kind; /* what kind of expression we're parsing */ int p_next_resno; /* next targetlist resno to assign */ List *p_multiassign_exprs; /* junk tlist entries for multiassign */ - List *p_locking_clause; /* raw FOR UPDATE/FOR SHARE info */ + List *p_locking_clause; /* raw FOR UPDATE/FOR SHARE info */ bool p_locked_from_parent; /* parent has marked this subquery * with FOR UPDATE/FOR SHARE */ - bool p_resolve_unknowns; /* resolve unknown-type SELECT outputs - * as type text */ + bool p_resolve_unknowns; /* resolve unknown-type SELECT outputs as + * type text */ - QueryEnvironment *p_queryEnv; /* curr env, incl refs to enclosing - * env */ + QueryEnvironment *p_queryEnv; /* curr env, incl refs to enclosing env */ /* Flags telling about things found in the query: */ bool p_hasAggs; @@ -212,7 +211,7 @@ struct ParseState PostParseColumnRefHook p_post_columnref_hook; ParseParamRefHook p_paramref_hook; CoerceParamHook p_coerce_param_hook; - void *p_ref_hook_state; /* common passthrough link for above */ + void *p_ref_hook_state; /* common passthrough link for above */ }; /* @@ -280,4 +279,4 @@ extern ArrayRef *transformArraySubscripts(ParseState *pstate, Node *assignFrom); extern Const *make_const(ParseState *pstate, Value *value, int location); -#endif /* PARSE_NODE_H */ +#endif /* PARSE_NODE_H */ diff --git a/src/include/parser/parse_oper.h b/src/include/parser/parse_oper.h index ab3c4aa62f..3cab732b1f 100644 --- a/src/include/parser/parse_oper.h +++ b/src/include/parser/parse_oper.h @@ -64,4 +64,4 @@ extern Expr *make_scalar_array_op(ParseState *pstate, List *opname, bool useOr, Node *ltree, Node *rtree, int location); -#endif /* PARSE_OPER_H */ +#endif /* PARSE_OPER_H */ diff --git a/src/include/parser/parse_param.h b/src/include/parser/parse_param.h index 68f3ddaffa..50c21cfc9d 100644 --- a/src/include/parser/parse_param.h +++ b/src/include/parser/parse_param.h @@ -22,4 +22,4 @@ extern void parse_variable_parameters(ParseState *pstate, extern void check_variable_parameters(ParseState *pstate, Query *query); extern bool query_contains_extern_params(Query *query); -#endif /* PARSE_PARAM_H */ +#endif /* PARSE_PARAM_H */ diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h index 2f42cc8ef0..6aa4ee69e6 100644 --- a/src/include/parser/parse_relation.h +++ b/src/include/parser/parse_relation.h @@ -129,4 +129,4 @@ extern Oid attnumTypeId(Relation rd, int attid); extern Oid attnumCollationId(Relation rd, int attid); extern bool isQueryUsingTempRelation(Query *query); -#endif /* PARSE_RELATION_H */ +#endif /* PARSE_RELATION_H */ diff --git a/src/include/parser/parse_target.h b/src/include/parser/parse_target.h index d06a235df0..44af46b1aa 100644 --- a/src/include/parser/parse_target.h +++ b/src/include/parser/parse_target.h @@ -43,4 +43,4 @@ extern TupleDesc expandRecordVariable(ParseState *pstate, Var *var, extern char *FigureColname(Node *node); extern char *FigureIndexColname(Node *node); -#endif /* PARSE_TARGET_H */ +#endif /* PARSE_TARGET_H */ diff --git a/src/include/parser/parse_type.h b/src/include/parser/parse_type.h index db0cd56ecc..7b843d0b9d 100644 --- a/src/include/parser/parse_type.h +++ b/src/include/parser/parse_type.h @@ -52,4 +52,4 @@ extern void parseTypeString(const char *str, Oid *typeid_p, int32 *typmod_p, boo #define ISCOMPLEX(typeid) (typeidTypeRelid(typeid) != InvalidOid) -#endif /* PARSE_TYPE_H */ +#endif /* PARSE_TYPE_H */ diff --git a/src/include/parser/parse_utilcmd.h b/src/include/parser/parse_utilcmd.h index 8d0d17f857..e749432ef0 100644 --- a/src/include/parser/parse_utilcmd.h +++ b/src/include/parser/parse_utilcmd.h @@ -28,4 +28,4 @@ extern List *transformCreateSchemaStmt(CreateSchemaStmt *stmt); extern PartitionBoundSpec *transformPartitionBound(ParseState *pstate, Relation parent, PartitionBoundSpec *spec); -#endif /* PARSE_UTILCMD_H */ +#endif /* PARSE_UTILCMD_H */ diff --git a/src/include/parser/parser.h b/src/include/parser/parser.h index 3895e03c6c..8370df6bbb 100644 --- a/src/include/parser/parser.h +++ b/src/include/parser/parser.h @@ -38,4 +38,4 @@ extern List *raw_parser(const char *str); extern List *SystemFuncName(char *name); extern TypeName *SystemTypeName(char *name); -#endif /* PARSER_H */ +#endif /* PARSER_H */ diff --git a/src/include/parser/parsetree.h b/src/include/parser/parsetree.h index 951ff0a254..96cb2e2f67 100644 --- a/src/include/parser/parsetree.h +++ b/src/include/parser/parsetree.h @@ -76,4 +76,4 @@ extern TargetEntry *get_tle_by_resno(List *tlist, AttrNumber resno); extern RowMarkClause *get_parse_rowmark(Query *qry, Index rtindex); -#endif /* PARSETREE_H */ +#endif /* PARSETREE_H */ diff --git a/src/include/parser/scanner.h b/src/include/parser/scanner.h index 74f1cc897f..bb95de730b 100644 --- a/src/include/parser/scanner.h +++ b/src/include/parser/scanner.h @@ -127,4 +127,4 @@ extern int core_yylex(core_YYSTYPE *lvalp, YYLTYPE *llocp, extern int scanner_errposition(int location, core_yyscan_t yyscanner); extern void scanner_yyerror(const char *message, core_yyscan_t yyscanner) pg_attribute_noreturn(); -#endif /* SCANNER_H */ +#endif /* SCANNER_H */ diff --git a/src/include/parser/scansup.h b/src/include/parser/scansup.h index 3464eb4c0e..f9a36b5cbd 100644 --- a/src/include/parser/scansup.h +++ b/src/include/parser/scansup.h @@ -27,4 +27,4 @@ extern void truncate_identifier(char *ident, int len, bool warn); extern bool scanner_isspace(char ch); -#endif /* SCANSUP_H */ +#endif /* SCANSUP_H */ diff --git a/src/include/pg_getopt.h b/src/include/pg_getopt.h index c356ba197e..16d5a326f9 100644 --- a/src/include/pg_getopt.h +++ b/src/include/pg_getopt.h @@ -29,7 +29,7 @@ extern int optind; extern int opterr; extern int optopt; -#endif /* HAVE_GETOPT_H */ +#endif /* HAVE_GETOPT_H */ /* * Some platforms have optreset but fail to declare it in , so cope. @@ -43,4 +43,4 @@ extern int optreset; extern int getopt(int nargc, char *const *nargv, const char *ostr); #endif -#endif /* PG_GETOPT_H */ +#endif /* PG_GETOPT_H */ diff --git a/src/include/pg_trace.h b/src/include/pg_trace.h index 1fe95e6403..29bc95d0d3 100644 --- a/src/include/pg_trace.h +++ b/src/include/pg_trace.h @@ -14,4 +14,4 @@ #include "utils/probes.h" /* pgrminclude ignore */ -#endif /* PG_TRACE_H */ +#endif /* PG_TRACE_H */ diff --git a/src/include/pgstat.h b/src/include/pgstat.h index bcf20ced59..6bffe63ad6 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -154,7 +154,7 @@ typedef struct PgStat_TableStatus { Oid t_id; /* table's OID */ bool t_shared; /* is it a shared catalog? */ - struct PgStat_TableXactStatus *trans; /* lowest subxact's counts */ + struct PgStat_TableXactStatus *trans; /* lowest subxact's counts */ PgStat_TableCounts t_counts; /* event counts to be sent */ } PgStat_TableStatus; @@ -164,19 +164,19 @@ typedef struct PgStat_TableStatus */ typedef struct PgStat_TableXactStatus { - PgStat_Counter tuples_inserted; /* tuples inserted in (sub)xact */ - PgStat_Counter tuples_updated; /* tuples updated in (sub)xact */ - PgStat_Counter tuples_deleted; /* tuples deleted in (sub)xact */ + PgStat_Counter tuples_inserted; /* tuples inserted in (sub)xact */ + PgStat_Counter tuples_updated; /* tuples updated in (sub)xact */ + PgStat_Counter tuples_deleted; /* tuples deleted in (sub)xact */ bool truncated; /* relation truncated in this (sub)xact */ PgStat_Counter inserted_pre_trunc; /* tuples inserted prior to truncate */ PgStat_Counter updated_pre_trunc; /* tuples updated prior to truncate */ PgStat_Counter deleted_pre_trunc; /* tuples deleted prior to truncate */ int nest_level; /* subtransaction nest level */ /* links to other structs for same relation: */ - struct PgStat_TableXactStatus *upper; /* next higher subxact if any */ + struct PgStat_TableXactStatus *upper; /* next higher subxact if any */ PgStat_TableStatus *parent; /* per-table status */ /* structs of same subxact level are linked here: */ - struct PgStat_TableXactStatus *next; /* next of same subxact */ + struct PgStat_TableXactStatus *next; /* next of same subxact */ } PgStat_TableXactStatus; @@ -418,7 +418,7 @@ typedef struct PgStat_MsgBgWriter PgStat_Counter m_buf_written_backend; PgStat_Counter m_buf_fsync_backend; PgStat_Counter m_buf_alloc; - PgStat_Counter m_checkpoint_write_time; /* times in milliseconds */ + PgStat_Counter m_checkpoint_write_time; /* times in milliseconds */ PgStat_Counter m_checkpoint_sync_time; } PgStat_MsgBgWriter; @@ -633,13 +633,13 @@ typedef struct PgStat_StatTabEntry PgStat_Counter blocks_fetched; PgStat_Counter blocks_hit; - TimestampTz vacuum_timestamp; /* user initiated vacuum */ + TimestampTz vacuum_timestamp; /* user initiated vacuum */ PgStat_Counter vacuum_count; - TimestampTz autovac_vacuum_timestamp; /* autovacuum initiated */ + TimestampTz autovac_vacuum_timestamp; /* autovacuum initiated */ PgStat_Counter autovac_vacuum_count; - TimestampTz analyze_timestamp; /* user initiated */ + TimestampTz analyze_timestamp; /* user initiated */ PgStat_Counter analyze_count; - TimestampTz autovac_analyze_timestamp; /* autovacuum initiated */ + TimestampTz autovac_analyze_timestamp; /* autovacuum initiated */ PgStat_Counter autovac_analyze_count; } PgStat_StatTabEntry; @@ -664,13 +664,13 @@ typedef struct PgStat_StatFuncEntry */ typedef struct PgStat_ArchiverStats { - PgStat_Counter archived_count; /* archival successes */ + PgStat_Counter archived_count; /* archival successes */ char last_archived_wal[MAX_XFN_CHARS + 1]; /* last WAL file * archived */ - TimestampTz last_archived_timestamp; /* last archival success time */ + TimestampTz last_archived_timestamp; /* last archival success time */ PgStat_Counter failed_count; /* failed archival attempts */ - char last_failed_wal[MAX_XFN_CHARS + 1]; /* WAL file involved in - * last failure */ + char last_failed_wal[MAX_XFN_CHARS + 1]; /* WAL file involved in + * last failure */ TimestampTz last_failed_timestamp; /* last archival failure time */ TimestampTz stat_reset_timestamp; } PgStat_ArchiverStats; @@ -683,7 +683,7 @@ typedef struct PgStat_GlobalStats TimestampTz stats_timestamp; /* time of stats file update */ PgStat_Counter timed_checkpoints; PgStat_Counter requested_checkpoints; - PgStat_Counter checkpoint_write_time; /* times in milliseconds */ + PgStat_Counter checkpoint_write_time; /* times in milliseconds */ PgStat_Counter checkpoint_sync_time; PgStat_Counter buf_written_checkpoints; PgStat_Counter buf_written_clean; @@ -934,9 +934,9 @@ typedef struct PgBackendSSLStatus /* Information about SSL connection */ int ssl_bits; bool ssl_compression; - char ssl_version[NAMEDATALEN]; /* MUST be null-terminated */ - char ssl_cipher[NAMEDATALEN]; /* MUST be null-terminated */ - char ssl_clientdn[NAMEDATALEN]; /* MUST be null-terminated */ + char ssl_version[NAMEDATALEN]; /* MUST be null-terminated */ + char ssl_cipher[NAMEDATALEN]; /* MUST be null-terminated */ + char ssl_clientdn[NAMEDATALEN]; /* MUST be null-terminated */ } PgBackendSSLStatus; @@ -987,7 +987,7 @@ typedef struct PgBackendStatus Oid st_databaseid; Oid st_userid; SockAddr st_clientaddr; - char *st_clienthostname; /* MUST be null-terminated */ + char *st_clienthostname; /* MUST be null-terminated */ /* Information about SSL connection */ bool st_ssl; @@ -1324,4 +1324,4 @@ extern int pgstat_fetch_stat_numbackends(void); extern PgStat_ArchiverStats *pgstat_fetch_stat_archiver(void); extern PgStat_GlobalStats *pgstat_fetch_global(void); -#endif /* PGSTAT_H */ +#endif /* PGSTAT_H */ diff --git a/src/include/pgtime.h b/src/include/pgtime.h index 3624dbdf42..4fd8f75ef9 100644 --- a/src/include/pgtime.h +++ b/src/include/pgtime.h @@ -81,4 +81,4 @@ extern pg_tzenum *pg_tzenumerate_start(void); extern pg_tz *pg_tzenumerate_next(pg_tzenum *dir); extern void pg_tzenumerate_end(pg_tzenum *dir); -#endif /* _PGTIME_H */ +#endif /* _PGTIME_H */ diff --git a/src/include/port.h b/src/include/port.h index 0fa030ea81..c2462167e4 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -180,7 +180,7 @@ extern int pg_printf(const char *fmt,...) pg_attribute_printf(1, 2); #define fprintf pg_fprintf #define printf pg_printf #endif -#endif /* USE_REPL_SNPRINTF */ +#endif /* USE_REPL_SNPRINTF */ #if defined(WIN32) /* @@ -200,7 +200,7 @@ extern int pg_printf(const char *fmt,...) pg_attribute_printf(1, 2); extern char *pgwin32_setlocale(int category, const char *locale); #define setlocale(a,b) pgwin32_setlocale(a,b) -#endif /* WIN32 */ +#endif /* WIN32 */ /* Portable prompt handling */ extern void simple_prompt(const char *prompt, char *destination, size_t destlen, @@ -237,7 +237,7 @@ extern int pgunlink(const char *path); #define rename(from, to) pgrename(from, to) #define unlink(path) pgunlink(path) -#endif /* defined(WIN32) || defined(__CYGWIN__) */ +#endif /* defined(WIN32) || defined(__CYGWIN__) */ /* * Win32 also doesn't have symlinks, but we can emulate them with @@ -326,7 +326,7 @@ extern int gettimeofday(struct timeval *tp, struct timezone *tzp); * close() does them all. */ #define closesocket close -#endif /* WIN32 */ +#endif /* WIN32 */ /* * On Windows, setvbuf() does not support _IOLBF mode, and interprets that @@ -481,4 +481,4 @@ extern char *escape_single_quotes_ascii(const char *src); /* port/wait_error.c */ extern char *wait_result_to_str(int exit_status); -#endif /* PG_PORT_H */ +#endif /* PG_PORT_H */ diff --git a/src/include/port/atomics.h b/src/include/port/atomics.h index 89eb522637..2bfd1ed728 100644 --- a/src/include/port/atomics.h +++ b/src/include/port/atomics.h @@ -532,4 +532,4 @@ pg_atomic_sub_fetch_u64(volatile pg_atomic_uint64 *ptr, int64 sub_) #undef INSIDE_ATOMICS_H -#endif /* ATOMICS_H */ +#endif /* ATOMICS_H */ diff --git a/src/include/port/pg_bswap.h b/src/include/port/pg_bswap.h index 18859a6ea3..50a6bd106b 100644 --- a/src/include/port/pg_bswap.h +++ b/src/include/port/pg_bswap.h @@ -29,7 +29,7 @@ (((x) << 8) & 0x00ff0000) | \ (((x) >> 8) & 0x0000ff00) | \ (((x) >> 24) & 0x000000ff)) -#endif /* HAVE__BUILTIN_BSWAP32 */ +#endif /* HAVE__BUILTIN_BSWAP32 */ #ifdef HAVE__BUILTIN_BSWAP64 #define BSWAP64(x) __builtin_bswap64(x) @@ -42,7 +42,7 @@ (((x) >> 24) & UINT64CONST(0x0000000000ff0000)) | \ (((x) >> 40) & UINT64CONST(0x000000000000ff00)) | \ (((x) >> 56) & UINT64CONST(0x00000000000000ff))) -#endif /* HAVE__BUILTIN_BSWAP64 */ +#endif /* HAVE__BUILTIN_BSWAP64 */ /* * Rearrange the bytes of a Datum from big-endian order into the native byte @@ -63,7 +63,7 @@ #define DatumBigEndianToNative(x) BSWAP64(x) #else /* SIZEOF_DATUM != 8 */ #define DatumBigEndianToNative(x) BSWAP32(x) -#endif /* SIZEOF_DATUM == 8 */ -#endif /* WORDS_BIGENDIAN */ +#endif /* SIZEOF_DATUM == 8 */ +#endif /* WORDS_BIGENDIAN */ -#endif /* PG_BSWAP_H */ +#endif /* PG_BSWAP_H */ diff --git a/src/include/port/pg_crc32c.h b/src/include/port/pg_crc32c.h index aa35fa89d2..cd58ecc988 100644 --- a/src/include/port/pg_crc32c.h +++ b/src/include/port/pg_crc32c.h @@ -82,4 +82,4 @@ extern pg_crc32c pg_comp_crc32c_sb8(pg_crc32c crc, const void *data, size_t len) #endif -#endif /* PG_CRC32C_H */ +#endif /* PG_CRC32C_H */ diff --git a/src/include/port/win32.h b/src/include/port/win32.h index 43505f23e0..23f89748ac 100644 --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -442,7 +442,7 @@ typedef unsigned short mode_t; /* Pulled from Makefile.port in mingw */ #define DLSUFFIX ".dll" -#endif /* _MSC_VER */ +#endif /* _MSC_VER */ /* These aren't provided by either MingW or MSVC */ #define S_IRGRP 0 diff --git a/src/include/port/win32/sys/socket.h b/src/include/port/win32/sys/socket.h index edaee6a894..9b2cdf3b9b 100644 --- a/src/include/port/win32/sys/socket.h +++ b/src/include/port/win32/sys/socket.h @@ -30,4 +30,4 @@ */ #undef gai_strerror -#endif /* WIN32_SYS_SOCKET_H */ +#endif /* WIN32_SYS_SOCKET_H */ diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h index 9eb4bb7eac..b6e8c58d44 100644 --- a/src/include/portability/instr_time.h +++ b/src/include/portability/instr_time.h @@ -202,7 +202,7 @@ typedef struct timeval instr_time; #define INSTR_TIME_GET_MICROSEC(t) \ (((uint64) (t).tv_sec * (uint64) 1000000) + (uint64) (t).tv_usec) -#endif /* HAVE_CLOCK_GETTIME */ +#endif /* HAVE_CLOCK_GETTIME */ #else /* WIN32 */ @@ -243,6 +243,6 @@ GetTimerFrequency(void) return (double) f.QuadPart; } -#endif /* WIN32 */ +#endif /* WIN32 */ -#endif /* INSTR_TIME_H */ +#endif /* INSTR_TIME_H */ diff --git a/src/include/portability/mem.h b/src/include/portability/mem.h index d560c3ce56..fa507c2581 100644 --- a/src/include/portability/mem.h +++ b/src/include/portability/mem.h @@ -45,4 +45,4 @@ #define MAP_FAILED ((void *) -1) #endif -#endif /* MEM_H */ +#endif /* MEM_H */ diff --git a/src/include/postgres.h b/src/include/postgres.h index 70ffdc6e17..ae01ef86ad 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -147,7 +147,7 @@ typedef union { uint32 va_header; uint32 va_rawsize; /* Original data size (excludes header) */ - char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */ + char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */ } va_compressed; } varattrib_4b; @@ -264,7 +264,7 @@ typedef struct #define SET_VARTAG_1B_E(PTR,tag) \ (((varattrib_1b_e *) (PTR))->va_header = 0x01, \ ((varattrib_1b_e *) (PTR))->va_tag = (tag)) -#endif /* WORDS_BIGENDIAN */ +#endif /* WORDS_BIGENDIAN */ #define VARHDRSZ_SHORT offsetof(varattrib_1b, va_data) #define VARATT_SHORT_MAX 0x7F @@ -803,4 +803,4 @@ extern void ExceptionalCondition(const char *conditionName, const char *errorType, const char *fileName, int lineNumber) pg_attribute_noreturn(); -#endif /* POSTGRES_H */ +#endif /* POSTGRES_H */ diff --git a/src/include/postgres_ext.h b/src/include/postgres_ext.h index 452eae9935..fdb61b7cf5 100644 --- a/src/include/postgres_ext.h +++ b/src/include/postgres_ext.h @@ -71,4 +71,4 @@ typedef PG_INT64_TYPE pg_int64; #define PG_DIAG_SOURCE_LINE 'L' #define PG_DIAG_SOURCE_FUNCTION 'R' -#endif /* POSTGRES_EXT_H */ +#endif /* POSTGRES_EXT_H */ diff --git a/src/include/postgres_fe.h b/src/include/postgres_fe.h index f49e33bc35..1dd01d0283 100644 --- a/src/include/postgres_fe.h +++ b/src/include/postgres_fe.h @@ -26,4 +26,4 @@ #include "common/fe_memutils.h" -#endif /* POSTGRES_FE_H */ +#endif /* POSTGRES_FE_H */ diff --git a/src/include/postmaster/autovacuum.h b/src/include/postmaster/autovacuum.h index d383fd3926..3469915ae2 100644 --- a/src/include/postmaster/autovacuum.h +++ b/src/include/postmaster/autovacuum.h @@ -78,4 +78,4 @@ extern void AutoVacuumRequestWork(AutoVacuumWorkItemType type, extern Size AutoVacuumShmemSize(void); extern void AutoVacuumShmemInit(void); -#endif /* AUTOVACUUM_H */ +#endif /* AUTOVACUUM_H */ diff --git a/src/include/postmaster/bgworker.h b/src/include/postmaster/bgworker.h index be4d3d27da..e2ecd3c9eb 100644 --- a/src/include/postmaster/bgworker.h +++ b/src/include/postmaster/bgworker.h @@ -90,7 +90,7 @@ typedef struct BackgroundWorker char bgw_name[BGW_MAXLEN]; int bgw_flags; BgWorkerStartTime bgw_start_time; - int bgw_restart_time; /* in seconds, or BGW_NEVER_RESTART */ + int bgw_restart_time; /* in seconds, or BGW_NEVER_RESTART */ char bgw_library_name[BGW_MAXLEN]; char bgw_function_name[BGW_MAXLEN]; Datum bgw_main_arg; @@ -147,4 +147,4 @@ extern void BackgroundWorkerInitializeConnectionByOid(Oid dboid, Oid useroid); extern void BackgroundWorkerBlockSignals(void); extern void BackgroundWorkerUnblockSignals(void); -#endif /* BGWORKER_H */ +#endif /* BGWORKER_H */ diff --git a/src/include/postmaster/bgworker_internals.h b/src/include/postmaster/bgworker_internals.h index 9e0b0621cf..bff10ba53c 100644 --- a/src/include/postmaster/bgworker_internals.h +++ b/src/include/postmaster/bgworker_internals.h @@ -60,4 +60,4 @@ extern void StartBackgroundWorker(void) pg_attribute_noreturn(); extern BackgroundWorker *BackgroundWorkerEntry(int slotno); #endif -#endif /* BGWORKER_INTERNALS_H */ +#endif /* BGWORKER_INTERNALS_H */ diff --git a/src/include/postmaster/bgwriter.h b/src/include/postmaster/bgwriter.h index 359b3ef5a5..a9b8bc7e8e 100644 --- a/src/include/postmaster/bgwriter.h +++ b/src/include/postmaster/bgwriter.h @@ -40,4 +40,4 @@ extern void CheckpointerShmemInit(void); extern bool FirstCallSinceLastCheckpoint(void); -#endif /* _BGWRITER_H */ +#endif /* _BGWRITER_H */ diff --git a/src/include/postmaster/fork_process.h b/src/include/postmaster/fork_process.h index c2bfd44ea0..9d5b97aca7 100644 --- a/src/include/postmaster/fork_process.h +++ b/src/include/postmaster/fork_process.h @@ -14,4 +14,4 @@ extern pid_t fork_process(void); -#endif /* FORK_PROCESS_H */ +#endif /* FORK_PROCESS_H */ diff --git a/src/include/postmaster/pgarch.h b/src/include/postmaster/pgarch.h index 6a4e0f43b8..ab1ddcf52c 100644 --- a/src/include/postmaster/pgarch.h +++ b/src/include/postmaster/pgarch.h @@ -36,4 +36,4 @@ extern int pgarch_start(void); extern void PgArchiverMain(int argc, char *argv[]) pg_attribute_noreturn(); #endif -#endif /* _PGARCH_H */ +#endif /* _PGARCH_H */ diff --git a/src/include/postmaster/postmaster.h b/src/include/postmaster/postmaster.h index 95231bf768..0f85908b09 100644 --- a/src/include/postmaster/postmaster.h +++ b/src/include/postmaster/postmaster.h @@ -39,9 +39,9 @@ extern int postmaster_alive_fds[2]; * Constants that represent which of postmaster_alive_fds is held by * postmaster, and which is used in children to check for postmaster death. */ -#define POSTMASTER_FD_WATCH 0 /* used in children to check for - * postmaster death */ -#define POSTMASTER_FD_OWN 1 /* kept open by postmaster only */ +#define POSTMASTER_FD_WATCH 0 /* used in children to check for + * postmaster death */ +#define POSTMASTER_FD_OWN 1 /* kept open by postmaster only */ #endif extern const char *progname; @@ -74,4 +74,4 @@ extern void ShmemBackendArrayAllocation(void); */ #define MAX_BACKENDS 0x3FFFF -#endif /* _POSTMASTER_H */ +#endif /* _POSTMASTER_H */ diff --git a/src/include/postmaster/startup.h b/src/include/postmaster/startup.h index ce76d94991..883bd395bd 100644 --- a/src/include/postmaster/startup.h +++ b/src/include/postmaster/startup.h @@ -19,4 +19,4 @@ extern void PostRestoreCommand(void); extern bool IsPromoteTriggered(void); extern void ResetPromoteTriggered(void); -#endif /* _STARTUP_H */ +#endif /* _STARTUP_H */ diff --git a/src/include/postmaster/syslogger.h b/src/include/postmaster/syslogger.h index 94d7eac347..f4248ef5d4 100644 --- a/src/include/postmaster/syslogger.h +++ b/src/include/postmaster/syslogger.h @@ -94,4 +94,4 @@ extern void SysLoggerMain(int argc, char *argv[]) pg_attribute_noreturn(); #define LOG_METAINFO_DATAFILE "current_logfiles" #define LOG_METAINFO_DATAFILE_TMP LOG_METAINFO_DATAFILE ".tmp" -#endif /* _SYSLOGGER_H */ +#endif /* _SYSLOGGER_H */ diff --git a/src/include/postmaster/walwriter.h b/src/include/postmaster/walwriter.h index fb91385e0b..f0eb425802 100644 --- a/src/include/postmaster/walwriter.h +++ b/src/include/postmaster/walwriter.h @@ -18,4 +18,4 @@ extern int WalWriterFlushAfter; extern void WalWriterMain(void) pg_attribute_noreturn(); -#endif /* _WALWRITER_H */ +#endif /* _WALWRITER_H */ diff --git a/src/include/regex/regex.h b/src/include/regex/regex.h index cc73db2547..27fdc09040 100644 --- a/src/include/regex/regex.h +++ b/src/include/regex/regex.h @@ -173,4 +173,4 @@ extern int pg_regprefix(regex_t *, pg_wchar **, size_t *); extern void pg_regfree(regex_t *); extern size_t pg_regerror(int, const regex_t *, char *, size_t); -#endif /* _REGEX_H_ */ +#endif /* _REGEX_H_ */ diff --git a/src/include/regex/regexport.h b/src/include/regex/regexport.h index 091c568e63..1c84d15d55 100644 --- a/src/include/regex/regexport.h +++ b/src/include/regex/regexport.h @@ -54,4 +54,4 @@ extern int pg_reg_getnumcharacters(const regex_t *regex, int co); extern void pg_reg_getcharacters(const regex_t *regex, int co, pg_wchar *chars, int chars_len); -#endif /* _REGEXPORT_H_ */ +#endif /* _REGEXPORT_H_ */ diff --git a/src/include/regex/regguts.h b/src/include/regex/regguts.h index 8d3221e4a4..5d0e7a961c 100644 --- a/src/include/regex/regguts.h +++ b/src/include/regex/regguts.h @@ -218,7 +218,7 @@ struct colormap color *locolormap; /* simple array indexed by chr code */ /* mapping data for chrs > MAX_SIMPLE_CHR: */ - int classbits[NUM_CCLASSES]; /* see comment above */ + int classbits[NUM_CCLASSES]; /* see comment above */ int numcmranges; /* number of colormapranges */ colormaprange *cmranges; /* ranges of high chrs */ color *hicolormap; /* 2-D array of color entries */ diff --git a/src/include/replication/basebackup.h b/src/include/replication/basebackup.h index bbd446904f..1a165c860b 100644 --- a/src/include/replication/basebackup.h +++ b/src/include/replication/basebackup.h @@ -33,4 +33,4 @@ extern void SendBaseBackup(BaseBackupCmd *cmd); extern int64 sendTablespace(char *path, bool sizeonly); -#endif /* _BASEBACKUP_H */ +#endif /* _BASEBACKUP_H */ diff --git a/src/include/replication/logicallauncher.h b/src/include/replication/logicallauncher.h index 4f3e89e061..aac7d326e2 100644 --- a/src/include/replication/logicallauncher.h +++ b/src/include/replication/logicallauncher.h @@ -26,4 +26,4 @@ extern void AtEOXact_ApplyLauncher(bool isCommit); extern bool IsLogicalLauncher(void); -#endif /* LOGICALLAUNCHER_H */ +#endif /* LOGICALLAUNCHER_H */ diff --git a/src/include/replication/logicalproto.h b/src/include/replication/logicalproto.h index e7679e29ed..191b03772f 100644 --- a/src/include/replication/logicalproto.h +++ b/src/include/replication/logicalproto.h @@ -103,4 +103,4 @@ extern LogicalRepRelation *logicalrep_read_rel(StringInfo in); extern void logicalrep_write_typ(StringInfo out, Oid typoid); extern void logicalrep_read_typ(StringInfo out, LogicalRepTyp *ltyp); -#endif /* LOGICALREP_PROTO_H */ +#endif /* LOGICALREP_PROTO_H */ diff --git a/src/include/replication/logicalrelation.h b/src/include/replication/logicalrelation.h index 3b814d3b2b..8352705650 100644 --- a/src/include/replication/logicalrelation.h +++ b/src/include/replication/logicalrelation.h @@ -16,7 +16,7 @@ typedef struct LogicalRepRelMapEntry { - LogicalRepRelation remoterel; /* key is remoterel.remoteid */ + LogicalRepRelation remoterel; /* key is remoterel.remoteid */ /* Mapping to local relation, filled as needed. */ Oid localreloid; /* local relation id */ @@ -39,4 +39,4 @@ extern void logicalrep_rel_close(LogicalRepRelMapEntry *rel, extern void logicalrep_typmap_update(LogicalRepTyp *remotetyp); extern Oid logicalrep_typmap_getid(Oid remoteid); -#endif /* LOGICALRELATION_H */ +#endif /* LOGICALRELATION_H */ diff --git a/src/include/replication/logicalworker.h b/src/include/replication/logicalworker.h index 5877a930f6..2557d5a23b 100644 --- a/src/include/replication/logicalworker.h +++ b/src/include/replication/logicalworker.h @@ -16,4 +16,4 @@ extern void ApplyWorkerMain(Datum main_arg); extern bool IsLogicalWorker(void); -#endif /* LOGICALWORKER_H */ +#endif /* LOGICALWORKER_H */ diff --git a/src/include/replication/message.h b/src/include/replication/message.h index b016af7bd7..1f2d0bb535 100644 --- a/src/include/replication/message.h +++ b/src/include/replication/message.h @@ -39,4 +39,4 @@ void logicalmsg_redo(XLogReaderState *record); void logicalmsg_desc(StringInfo buf, XLogReaderState *record); const char *logicalmsg_identify(uint8 info); -#endif /* PG_LOGICAL_MESSAGE_H */ +#endif /* PG_LOGICAL_MESSAGE_H */ diff --git a/src/include/replication/origin.h b/src/include/replication/origin.h index d6b8eb9d80..ca56c01469 100644 --- a/src/include/replication/origin.h +++ b/src/include/replication/origin.h @@ -71,4 +71,4 @@ const char *replorigin_identify(uint8 info); extern Size ReplicationOriginShmemSize(void); extern void ReplicationOriginShmemInit(void); -#endif /* PG_ORIGIN_H */ +#endif /* PG_ORIGIN_H */ diff --git a/src/include/replication/output_plugin.h b/src/include/replication/output_plugin.h index 511216a295..26ff024882 100644 --- a/src/include/replication/output_plugin.h +++ b/src/include/replication/output_plugin.h @@ -108,4 +108,4 @@ extern void OutputPluginPrepareWrite(struct LogicalDecodingContext *ctx, bool la extern void OutputPluginWrite(struct LogicalDecodingContext *ctx, bool last_write); extern void OutputPluginUpdateProgress(struct LogicalDecodingContext *ctx); -#endif /* OUTPUT_PLUGIN_H */ +#endif /* OUTPUT_PLUGIN_H */ diff --git a/src/include/replication/pgoutput.h b/src/include/replication/pgoutput.h index 8cd29ab164..bfe8448ba9 100644 --- a/src/include/replication/pgoutput.h +++ b/src/include/replication/pgoutput.h @@ -27,4 +27,4 @@ typedef struct PGOutputData List *publications; } PGOutputData; -#endif /* PGOUTPUT_H */ +#endif /* PGOUTPUT_H */ diff --git a/src/include/replication/slot.h b/src/include/replication/slot.h index 9a2dbd7b61..a283f4e2b8 100644 --- a/src/include/replication/slot.h +++ b/src/include/replication/slot.h @@ -184,4 +184,4 @@ extern void CheckPointReplicationSlots(void); extern void CheckSlotRequirements(void); -#endif /* SLOT_H */ +#endif /* SLOT_H */ diff --git a/src/include/replication/snapbuild.h b/src/include/replication/snapbuild.h index dc676a0ce2..7653717f83 100644 --- a/src/include/replication/snapbuild.h +++ b/src/include/replication/snapbuild.h @@ -87,4 +87,4 @@ extern void SnapBuildProcessRunningXacts(SnapBuild *builder, XLogRecPtr lsn, struct xl_running_xacts *running); extern void SnapBuildSerializationPoint(SnapBuild *builder, XLogRecPtr lsn); -#endif /* SNAPBUILD_H */ +#endif /* SNAPBUILD_H */ diff --git a/src/include/replication/syncrep.h b/src/include/replication/syncrep.h index 1676ea0952..ceafe2cbea 100644 --- a/src/include/replication/syncrep.h +++ b/src/include/replication/syncrep.h @@ -94,4 +94,4 @@ extern void syncrep_yyerror(const char *str); extern void syncrep_scanner_init(const char *query_string); extern void syncrep_scanner_finish(void); -#endif /* _SYNCREP_H */ +#endif /* _SYNCREP_H */ diff --git a/src/include/replication/walreceiver.h b/src/include/replication/walreceiver.h index 68a813895b..c8652dbd48 100644 --- a/src/include/replication/walreceiver.h +++ b/src/include/replication/walreceiver.h @@ -153,7 +153,7 @@ typedef struct struct { uint32 proto_version; /* Logical protocol version */ - List *publication_names; /* String list of publications */ + List *publication_names; /* String list of publications */ } logical; } proto; } WalRcvStreamOptions; @@ -298,4 +298,4 @@ extern int GetReplicationApplyDelay(void); extern int GetReplicationTransferLatency(void); extern void WalRcvForceReply(void); -#endif /* _WALRECEIVER_H */ +#endif /* _WALRECEIVER_H */ diff --git a/src/include/replication/walsender.h b/src/include/replication/walsender.h index c50e450ec2..1f20db827a 100644 --- a/src/include/replication/walsender.h +++ b/src/include/replication/walsender.h @@ -72,4 +72,4 @@ extern void WalSndRqstFileReload(void); } \ } while (0) -#endif /* _WALSENDER_H */ +#endif /* _WALSENDER_H */ diff --git a/src/include/replication/walsender_private.h b/src/include/replication/walsender_private.h index 36311e124c..0aa80d5c3e 100644 --- a/src/include/replication/walsender_private.h +++ b/src/include/replication/walsender_private.h @@ -114,4 +114,4 @@ extern void replication_scanner_finish(void); extern Node *replication_parse_result; -#endif /* _WALSENDER_PRIVATE_H */ +#endif /* _WALSENDER_PRIVATE_H */ diff --git a/src/include/replication/worker_internal.h b/src/include/replication/worker_internal.h index 2bfff5c120..494a3a3d08 100644 --- a/src/include/replication/worker_internal.h +++ b/src/include/replication/worker_internal.h @@ -90,4 +90,4 @@ am_tablesync_worker(void) return OidIsValid(MyLogicalRepWorker->relid); } -#endif /* WORKER_INTERNAL_H */ +#endif /* WORKER_INTERNAL_H */ diff --git a/src/include/rewrite/prs2lock.h b/src/include/rewrite/prs2lock.h index 36dca02a7e..419d140bd5 100644 --- a/src/include/rewrite/prs2lock.h +++ b/src/include/rewrite/prs2lock.h @@ -43,4 +43,4 @@ typedef struct RuleLock RewriteRule **rules; } RuleLock; -#endif /* REWRITE_H */ +#endif /* REWRITE_H */ diff --git a/src/include/rewrite/rewriteDefine.h b/src/include/rewrite/rewriteDefine.h index 5495700970..2e25288bb4 100644 --- a/src/include/rewrite/rewriteDefine.h +++ b/src/include/rewrite/rewriteDefine.h @@ -41,4 +41,4 @@ extern void setRuleCheckAsUser(Node *node, Oid userid); extern void EnableDisableRule(Relation rel, const char *rulename, char fires_when); -#endif /* REWRITEDEFINE_H */ +#endif /* REWRITEDEFINE_H */ diff --git a/src/include/rewrite/rewriteHandler.h b/src/include/rewrite/rewriteHandler.h index 9857b4823b..494fa29f10 100644 --- a/src/include/rewrite/rewriteHandler.h +++ b/src/include/rewrite/rewriteHandler.h @@ -30,4 +30,4 @@ extern int relation_is_updatable(Oid reloid, bool include_triggers, Bitmapset *include_cols); -#endif /* REWRITEHANDLER_H */ +#endif /* REWRITEHANDLER_H */ diff --git a/src/include/rewrite/rewriteManip.h b/src/include/rewrite/rewriteManip.h index 3910bceb2a..c76538c133 100644 --- a/src/include/rewrite/rewriteManip.h +++ b/src/include/rewrite/rewriteManip.h @@ -28,7 +28,7 @@ struct replace_rte_variables_context void *callback_arg; /* context data for callback function */ int target_varno; /* RTE index to search for */ int sublevels_up; /* (current) nesting depth */ - bool inserted_sublink; /* have we inserted a SubLink? */ + bool inserted_sublink; /* have we inserted a SubLink? */ }; typedef enum ReplaceVarsNoMatchOption @@ -82,4 +82,4 @@ extern Node *ReplaceVarsFromTargetList(Node *node, int nomatch_varno, bool *outer_hasSubLinks); -#endif /* REWRITEMANIP_H */ +#endif /* REWRITEMANIP_H */ diff --git a/src/include/rewrite/rewriteRemove.h b/src/include/rewrite/rewriteRemove.h index 28c9be72db..d7d53b0137 100644 --- a/src/include/rewrite/rewriteRemove.h +++ b/src/include/rewrite/rewriteRemove.h @@ -18,4 +18,4 @@ extern void RemoveRewriteRuleById(Oid ruleOid); -#endif /* REWRITEREMOVE_H */ +#endif /* REWRITEREMOVE_H */ diff --git a/src/include/rewrite/rewriteSupport.h b/src/include/rewrite/rewriteSupport.h index d287bbda78..60800aae25 100644 --- a/src/include/rewrite/rewriteSupport.h +++ b/src/include/rewrite/rewriteSupport.h @@ -23,4 +23,4 @@ extern void SetRelationRuleStatus(Oid relationId, bool relHasRules); extern Oid get_rewrite_oid(Oid relid, const char *rulename, bool missing_ok); -#endif /* REWRITESUPPORT_H */ +#endif /* REWRITESUPPORT_H */ diff --git a/src/include/rewrite/rowsecurity.h b/src/include/rewrite/rowsecurity.h index 260a79c3d2..0dbc1a4bee 100644 --- a/src/include/rewrite/rowsecurity.h +++ b/src/include/rewrite/rowsecurity.h @@ -46,4 +46,4 @@ extern void get_row_security_policies(Query *root, List **securityQuals, List **withCheckOptions, bool *hasRowSecurity, bool *hasSubLinks); -#endif /* ROWSECURITY_H */ +#endif /* ROWSECURITY_H */ diff --git a/src/include/rusagestub.h b/src/include/rusagestub.h index 9027b89bf0..f54f66e6f3 100644 --- a/src/include/rusagestub.h +++ b/src/include/rusagestub.h @@ -31,4 +31,4 @@ struct rusage extern int getrusage(int who, struct rusage *rusage); -#endif /* RUSAGESTUB_H */ +#endif /* RUSAGESTUB_H */ diff --git a/src/include/snowball/header.h b/src/include/snowball/header.h index d8be02ee60..10acf4c53d 100644 --- a/src/include/snowball/header.h +++ b/src/include/snowball/header.h @@ -64,4 +64,4 @@ #endif #define free(a) pfree(a) -#endif /* SNOWBALL_HEADR_H */ +#endif /* SNOWBALL_HEADR_H */ diff --git a/src/include/statistics/extended_stats_internal.h b/src/include/statistics/extended_stats_internal.h index dc72e2f479..738ff3fadc 100644 --- a/src/include/statistics/extended_stats_internal.h +++ b/src/include/statistics/extended_stats_internal.h @@ -66,4 +66,4 @@ extern int multi_sort_compare_dim(int dim, const SortItem *a, extern int multi_sort_compare_dims(int start, int end, const SortItem *a, const SortItem *b, MultiSortSupport mss); -#endif /* EXTENDED_STATS_INTERNAL_H */ +#endif /* EXTENDED_STATS_INTERNAL_H */ diff --git a/src/include/statistics/statistics.h b/src/include/statistics/statistics.h index 87bf3d82ca..1d68c39df0 100644 --- a/src/include/statistics/statistics.h +++ b/src/include/statistics/statistics.h @@ -16,7 +16,7 @@ #include "commands/vacuum.h" #include "nodes/relation.h" -#define STATS_MAX_DIMENSIONS 8 /* max number of attributes */ +#define STATS_MAX_DIMENSIONS 8 /* max number of attributes */ /* Multivariate distinct coefficients */ #define STATS_NDISTINCT_MAGIC 0xA352BFA4 /* struct identifier */ @@ -49,8 +49,8 @@ typedef struct MVNDistinct /* size of the struct excluding the items array */ #define SizeOfMVNDistinct (offsetof(MVNDistinct, nitems) + sizeof(uint32)) -#define STATS_DEPS_MAGIC 0xB4549A2C /* marks serialized bytea */ -#define STATS_DEPS_TYPE_BASIC 1 /* basic dependencies type */ +#define STATS_DEPS_MAGIC 0xB4549A2C /* marks serialized bytea */ +#define STATS_DEPS_TYPE_BASIC 1 /* basic dependencies type */ /* * Functional dependencies, tracking column-level relationships (values @@ -60,7 +60,7 @@ typedef struct MVDependency { double degree; /* degree of validity (0-1) */ AttrNumber nattributes; /* number of attributes */ - AttrNumber attributes[FLEXIBLE_ARRAY_MEMBER]; /* attribute numbers */ + AttrNumber attributes[FLEXIBLE_ARRAY_MEMBER]; /* attribute numbers */ } MVDependency; /* size of the struct excluding the deps array */ @@ -96,4 +96,4 @@ extern bool has_stats_of_kind(List *stats, char requiredkind); extern StatisticExtInfo *choose_best_statistics(List *stats, Bitmapset *attnums, char requiredkind); -#endif /* STATISTICS_H */ +#endif /* STATISTICS_H */ diff --git a/src/include/storage/backendid.h b/src/include/storage/backendid.h index 9d1fc50082..bf31ba4f48 100644 --- a/src/include/storage/backendid.h +++ b/src/include/storage/backendid.h @@ -22,7 +22,7 @@ typedef int BackendId; /* unique currently active backend identifier */ #define InvalidBackendId (-1) -extern PGDLLIMPORT BackendId MyBackendId; /* backend id of this backend */ +extern PGDLLIMPORT BackendId MyBackendId; /* backend id of this backend */ /* backend id of our parallel session leader, or InvalidBackendId if none */ extern PGDLLIMPORT BackendId ParallelMasterBackendId; @@ -34,4 +34,4 @@ extern PGDLLIMPORT BackendId ParallelMasterBackendId; #define BackendIdForTempRelations() \ (ParallelMasterBackendId == InvalidBackendId ? MyBackendId : ParallelMasterBackendId) -#endif /* BACKENDID_H */ +#endif /* BACKENDID_H */ diff --git a/src/include/storage/block.h b/src/include/storage/block.h index ec847bbb7a..33840798a8 100644 --- a/src/include/storage/block.h +++ b/src/include/storage/block.h @@ -118,4 +118,4 @@ typedef BlockIdData *BlockId; /* block identifier */ (BlockNumber) (((blockId)->bi_hi << 16) | ((uint16) (blockId)->bi_lo)) \ ) -#endif /* BLOCK_H */ +#endif /* BLOCK_H */ diff --git a/src/include/storage/buf.h b/src/include/storage/buf.h index ac33b83b4b..054f482bd7 100644 --- a/src/include/storage/buf.h +++ b/src/include/storage/buf.h @@ -43,4 +43,4 @@ typedef int Buffer; */ typedef struct BufferAccessStrategyData *BufferAccessStrategy; -#endif /* BUF_H */ +#endif /* BUF_H */ diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h index ff99f6b5e2..b768b6fc96 100644 --- a/src/include/storage/buf_internals.h +++ b/src/include/storage/buf_internals.h @@ -55,17 +55,17 @@ * Note: TAG_VALID essentially means that there is a buffer hashtable * entry associated with the buffer's tag. */ -#define BM_LOCKED (1U << 22) /* buffer header is locked */ -#define BM_DIRTY (1U << 23) /* data needs writing */ -#define BM_VALID (1U << 24) /* data is valid */ -#define BM_TAG_VALID (1U << 25) /* tag is assigned */ -#define BM_IO_IN_PROGRESS (1U << 26) /* read or write in progress */ -#define BM_IO_ERROR (1U << 27) /* previous I/O failed */ -#define BM_JUST_DIRTIED (1U << 28) /* dirtied since write started */ -#define BM_PIN_COUNT_WAITER (1U << 29) /* have waiter for sole pin */ -#define BM_CHECKPOINT_NEEDED (1U << 30) /* must write for checkpoint */ -#define BM_PERMANENT (1U << 31) /* permanent buffer (not - * unlogged, or init fork) */ +#define BM_LOCKED (1U << 22) /* buffer header is locked */ +#define BM_DIRTY (1U << 23) /* data needs writing */ +#define BM_VALID (1U << 24) /* data is valid */ +#define BM_TAG_VALID (1U << 25) /* tag is assigned */ +#define BM_IO_IN_PROGRESS (1U << 26) /* read or write in progress */ +#define BM_IO_ERROR (1U << 27) /* previous I/O failed */ +#define BM_JUST_DIRTIED (1U << 28) /* dirtied since write started */ +#define BM_PIN_COUNT_WAITER (1U << 29) /* have waiter for sole pin */ +#define BM_CHECKPOINT_NEEDED (1U << 30) /* must write for checkpoint */ +#define BM_PERMANENT (1U << 31) /* permanent buffer (not unlogged, + * or init fork) */ /* * The maximum allowed value of usage_count represents a tradeoff between * accuracy and speed of the clock-sweep buffer management algorithm. A @@ -183,7 +183,7 @@ typedef struct BufferDesc /* state of the tag, containing flags, refcount and usagecount */ pg_atomic_uint32 state; - int wait_backend_pid; /* backend PID of pin-count waiter */ + int wait_backend_pid; /* backend PID of pin-count waiter */ int freeNext; /* link in freelist chain */ LWLock content_lock; /* to lock access to buffer contents */ @@ -337,4 +337,4 @@ extern void DropRelFileNodeLocalBuffers(RelFileNode rnode, ForkNumber forkNum, extern void DropRelFileNodeAllLocalBuffers(RelFileNode rnode); extern void AtEOXact_LocalBuffers(bool isCommit); -#endif /* BUFMGR_INTERNALS_H */ +#endif /* BUFMGR_INTERNALS_H */ diff --git a/src/include/storage/buffile.h b/src/include/storage/buffile.h index fe00bf0c31..fafcb3f089 100644 --- a/src/include/storage/buffile.h +++ b/src/include/storage/buffile.h @@ -42,4 +42,4 @@ extern int BufFileSeek(BufFile *file, int fileno, off_t offset, int whence); extern void BufFileTell(BufFile *file, int *fileno, off_t *offset); extern int BufFileSeekBlock(BufFile *file, long blknum); -#endif /* BUFFILE_H */ +#endif /* BUFFILE_H */ diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index 07a32d6dfc..98b63fc5ba 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -79,7 +79,7 @@ extern PGDLLIMPORT int32 *LocalRefCount; #define MAX_IO_CONCURRENCY 1000 /* special block number for ReadBuffer() */ -#define P_NEW InvalidBlockNumber /* grow the file to get a new page */ +#define P_NEW InvalidBlockNumber /* grow the file to get a new page */ /* * Buffer content lock modes (mode argument for LockBuffer()) @@ -275,6 +275,6 @@ TestForOldSnapshot(Snapshot snapshot, Relation relation, Page page) TestForOldSnapshot_impl(snapshot, relation); } -#endif /* FRONTEND */ +#endif /* FRONTEND */ -#endif /* BUFMGR_H */ +#endif /* BUFMGR_H */ diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h index e956dc3386..50c72a3c8d 100644 --- a/src/include/storage/bufpage.h +++ b/src/include/storage/bufpage.h @@ -173,13 +173,12 @@ typedef PageHeaderData *PageHeader; * page for its new tuple version; this suggests that a prune is needed. * Again, this is just a hint. */ -#define PD_HAS_FREE_LINES 0x0001 /* are there any unused line pointers? */ -#define PD_PAGE_FULL 0x0002 /* not enough free space for new - * tuple? */ -#define PD_ALL_VISIBLE 0x0004 /* all tuples on page are visible to - * everyone */ +#define PD_HAS_FREE_LINES 0x0001 /* are there any unused line pointers? */ +#define PD_PAGE_FULL 0x0002 /* not enough free space for new tuple? */ +#define PD_ALL_VISIBLE 0x0004 /* all tuples on page are visible to + * everyone */ -#define PD_VALID_FLAG_BITS 0x0007 /* OR of all valid pd_flags bits */ +#define PD_VALID_FLAG_BITS 0x0007 /* OR of all valid pd_flags bits */ /* * Page layout version number 0 is for pre-7.3 Postgres releases. @@ -436,4 +435,4 @@ extern bool PageIndexTupleOverwrite(Page page, OffsetNumber offnum, extern char *PageSetChecksumCopy(Page page, BlockNumber blkno); extern void PageSetChecksumInplace(Page page, BlockNumber blkno); -#endif /* BUFPAGE_H */ +#endif /* BUFPAGE_H */ diff --git a/src/include/storage/checksum.h b/src/include/storage/checksum.h index 682043f8e7..b85f714712 100644 --- a/src/include/storage/checksum.h +++ b/src/include/storage/checksum.h @@ -21,4 +21,4 @@ */ extern uint16 pg_checksum_page(char *page, BlockNumber blkno); -#endif /* CHECKSUM_H */ +#endif /* CHECKSUM_H */ diff --git a/src/include/storage/condition_variable.h b/src/include/storage/condition_variable.h index 89f5d5804b..f77c0b22ad 100644 --- a/src/include/storage/condition_variable.h +++ b/src/include/storage/condition_variable.h @@ -56,4 +56,4 @@ extern void ConditionVariablePrepareToSleep(ConditionVariable *); extern bool ConditionVariableSignal(ConditionVariable *); extern int ConditionVariableBroadcast(ConditionVariable *); -#endif /* CONDITION_VARIABLE_H */ +#endif /* CONDITION_VARIABLE_H */ diff --git a/src/include/storage/copydir.h b/src/include/storage/copydir.h index c3722b4033..f88a044509 100644 --- a/src/include/storage/copydir.h +++ b/src/include/storage/copydir.h @@ -16,4 +16,4 @@ extern void copydir(char *fromdir, char *todir, bool recurse); extern void copy_file(char *fromfile, char *tofile); -#endif /* COPYDIR_H */ +#endif /* COPYDIR_H */ diff --git a/src/include/storage/dsm.h b/src/include/storage/dsm.h index 7d1250c1e0..31b1f4da9c 100644 --- a/src/include/storage/dsm.h +++ b/src/include/storage/dsm.h @@ -60,4 +60,4 @@ extern void cancel_on_dsm_detach(dsm_segment *seg, on_dsm_detach_callback function, Datum arg); extern void reset_on_dsm_detach(void); -#endif /* DSM_H */ +#endif /* DSM_H */ diff --git a/src/include/storage/dsm_impl.h b/src/include/storage/dsm_impl.h index 51c217899d..c2060431ba 100644 --- a/src/include/storage/dsm_impl.h +++ b/src/include/storage/dsm_impl.h @@ -77,4 +77,4 @@ extern void dsm_impl_pin_segment(dsm_handle handle, void *impl_private, void **impl_private_pm_handle); extern void dsm_impl_unpin_segment(dsm_handle handle, void **impl_private); -#endif /* DSM_IMPL_H */ +#endif /* DSM_IMPL_H */ diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h index 05680499e4..faef39e78d 100644 --- a/src/include/storage/fd.h +++ b/src/include/storage/fd.h @@ -127,4 +127,4 @@ extern void SyncDataDirectory(void); #define PG_TEMP_FILES_DIR "pgsql_tmp" #define PG_TEMP_FILE_PREFIX "pgsql_tmp" -#endif /* FD_H */ +#endif /* FD_H */ diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h index 9a5c9f4be4..d110f006af 100644 --- a/src/include/storage/freespace.h +++ b/src/include/storage/freespace.h @@ -37,4 +37,4 @@ extern void UpdateFreeSpaceMap(Relation rel, BlockNumber endBlkNum, Size freespace); -#endif /* FREESPACE_H_ */ +#endif /* FREESPACE_H_ */ diff --git a/src/include/storage/fsm_internals.h b/src/include/storage/fsm_internals.h index 4eb3fc12b1..722e649123 100644 --- a/src/include/storage/fsm_internals.h +++ b/src/include/storage/fsm_internals.h @@ -69,4 +69,4 @@ extern bool fsm_set_avail(Page page, int slot, uint8 value); extern bool fsm_truncate_avail(Page page, int nslots); extern bool fsm_rebuild_page(Page page); -#endif /* FSM_INTERNALS_H */ +#endif /* FSM_INTERNALS_H */ diff --git a/src/include/storage/indexfsm.h b/src/include/storage/indexfsm.h index b256ee6aef..f8045f0df8 100644 --- a/src/include/storage/indexfsm.h +++ b/src/include/storage/indexfsm.h @@ -23,4 +23,4 @@ extern void RecordUsedIndexPage(Relation rel, BlockNumber page); extern void IndexFreeSpaceMapVacuum(Relation rel); -#endif /* INDEXFSM_H_ */ +#endif /* INDEXFSM_H_ */ diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h index 8d5a6b2698..bde635f502 100644 --- a/src/include/storage/ipc.h +++ b/src/include/storage/ipc.h @@ -77,4 +77,4 @@ extern PGDLLIMPORT shmem_startup_hook_type shmem_startup_hook; extern void CreateSharedMemoryAndSemaphores(bool makePrivate, int port); -#endif /* IPC_H */ +#endif /* IPC_H */ diff --git a/src/include/storage/item.h b/src/include/storage/item.h index d19e19e01b..72426a2d48 100644 --- a/src/include/storage/item.h +++ b/src/include/storage/item.h @@ -16,4 +16,4 @@ typedef Pointer Item; -#endif /* ITEM_H */ +#endif /* ITEM_H */ diff --git a/src/include/storage/itemid.h b/src/include/storage/itemid.h index af77852cc0..2ec86b57fc 100644 --- a/src/include/storage/itemid.h +++ b/src/include/storage/itemid.h @@ -180,4 +180,4 @@ typedef uint16 ItemLength; (itemId)->lp_flags = LP_DEAD \ ) -#endif /* ITEMID_H */ +#endif /* ITEMID_H */ diff --git a/src/include/storage/itemptr.h b/src/include/storage/itemptr.h index 74b2f3cbf2..8f8e22444a 100644 --- a/src/include/storage/itemptr.h +++ b/src/include/storage/itemptr.h @@ -162,4 +162,4 @@ typedef ItemPointerData *ItemPointer; extern bool ItemPointerEquals(ItemPointer pointer1, ItemPointer pointer2); extern int32 ItemPointerCompare(ItemPointer arg1, ItemPointer arg2); -#endif /* ITEMPTR_H */ +#endif /* ITEMPTR_H */ diff --git a/src/include/storage/large_object.h b/src/include/storage/large_object.h index fc55019b98..796a8fdeea 100644 --- a/src/include/storage/large_object.h +++ b/src/include/storage/large_object.h @@ -94,4 +94,4 @@ extern int inv_read(LargeObjectDesc *obj_desc, char *buf, int nbytes); extern int inv_write(LargeObjectDesc *obj_desc, const char *buf, int nbytes); extern void inv_truncate(LargeObjectDesc *obj_desc, int64 len); -#endif /* LARGE_OBJECT_H */ +#endif /* LARGE_OBJECT_H */ diff --git a/src/include/storage/latch.h b/src/include/storage/latch.h index 3158d7bec6..73abfafec5 100644 --- a/src/include/storage/latch.h +++ b/src/include/storage/latch.h @@ -176,4 +176,4 @@ extern void latch_sigusr1_handler(void); #define latch_sigusr1_handler() ((void) 0) #endif -#endif /* LATCH_H */ +#endif /* LATCH_H */ diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h index 2a1244c836..0b923227a2 100644 --- a/src/include/storage/lmgr.h +++ b/src/include/storage/lmgr.h @@ -106,4 +106,4 @@ extern void DescribeLockTag(StringInfo buf, const LOCKTAG *tag); extern const char *GetLockNameFromTagType(uint16 locktag_type); -#endif /* LMGR_H */ +#endif /* LMGR_H */ diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index ad257be950..765431e299 100644 --- a/src/include/storage/lock.h +++ b/src/include/storage/lock.h @@ -42,7 +42,7 @@ extern bool Trace_locks; extern bool Trace_userlocks; extern int Trace_lock_table; extern bool Debug_deadlocks; -#endif /* LOCK_DEBUG */ +#endif /* LOCK_DEBUG */ /* @@ -63,8 +63,7 @@ extern bool Debug_deadlocks; typedef struct { BackendId backendId; /* determined at backend startup */ - LocalTransactionId localTransactionId; /* backend-local transaction - * id */ + LocalTransactionId localTransactionId; /* backend-local transaction id */ } VirtualTransactionId; #define InvalidLocalTransactionId 0 @@ -292,7 +291,7 @@ typedef struct LOCK LOCKMASK waitMask; /* bitmask for lock types awaited */ SHM_QUEUE procLocks; /* list of PROCLOCK objects assoc. with lock */ PROC_QUEUE waitProcs; /* list of PGPROC objects waiting on lock */ - int requested[MAX_LOCKMODES]; /* counts of requested locks */ + int requested[MAX_LOCKMODES]; /* counts of requested locks */ int nRequested; /* total of requested[] array */ int granted[MAX_LOCKMODES]; /* counts of granted locks */ int nGranted; /* total of granted[] array */ @@ -586,4 +585,4 @@ extern void VirtualXactLockTableInsert(VirtualTransactionId vxid); extern void VirtualXactLockTableCleanup(void); extern bool VirtualXactLock(VirtualTransactionId vxid, bool wait); -#endif /* LOCK_H */ +#endif /* LOCK_H */ diff --git a/src/include/storage/lockdefs.h b/src/include/storage/lockdefs.h index bfeb8779f7..fe9f7cb310 100644 --- a/src/include/storage/lockdefs.h +++ b/src/include/storage/lockdefs.h @@ -33,18 +33,17 @@ typedef int LOCKMODE; /* NoLock is not a lock mode, but a flag value meaning "don't get a lock" */ #define NoLock 0 -#define AccessShareLock 1 /* SELECT */ -#define RowShareLock 2 /* SELECT FOR UPDATE/FOR SHARE */ -#define RowExclusiveLock 3 /* INSERT, UPDATE, DELETE */ -#define ShareUpdateExclusiveLock 4 /* VACUUM (non-FULL),ANALYZE, CREATE - * INDEX CONCURRENTLY */ -#define ShareLock 5 /* CREATE INDEX (WITHOUT CONCURRENTLY) */ -#define ShareRowExclusiveLock 6 /* like EXCLUSIVE MODE, but allows ROW - * SHARE */ -#define ExclusiveLock 7 /* blocks ROW SHARE/SELECT...FOR - * UPDATE */ -#define AccessExclusiveLock 8 /* ALTER TABLE, DROP TABLE, VACUUM - * FULL, and unqualified LOCK TABLE */ +#define AccessShareLock 1 /* SELECT */ +#define RowShareLock 2 /* SELECT FOR UPDATE/FOR SHARE */ +#define RowExclusiveLock 3 /* INSERT, UPDATE, DELETE */ +#define ShareUpdateExclusiveLock 4 /* VACUUM (non-FULL),ANALYZE, CREATE INDEX + * CONCURRENTLY */ +#define ShareLock 5 /* CREATE INDEX (WITHOUT CONCURRENTLY) */ +#define ShareRowExclusiveLock 6 /* like EXCLUSIVE MODE, but allows ROW + * SHARE */ +#define ExclusiveLock 7 /* blocks ROW SHARE/SELECT...FOR UPDATE */ +#define AccessExclusiveLock 8 /* ALTER TABLE, DROP TABLE, VACUUM FULL, + * and unqualified LOCK TABLE */ typedef struct xl_standby_lock { @@ -53,4 +52,4 @@ typedef struct xl_standby_lock Oid relOid; } xl_standby_lock; -#endif /* LOCKDEF_H_ */ +#endif /* LOCKDEF_H_ */ diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h index c53488800c..3d16132c88 100644 --- a/src/include/storage/lwlock.h +++ b/src/include/storage/lwlock.h @@ -223,4 +223,4 @@ typedef enum BuiltinTrancheIds */ typedef LWLock *LWLockId; -#endif /* LWLOCK_H */ +#endif /* LWLOCK_H */ diff --git a/src/include/storage/off.h b/src/include/storage/off.h index fe8638fe15..7228808b94 100644 --- a/src/include/storage/off.h +++ b/src/include/storage/off.h @@ -26,7 +26,7 @@ typedef uint16 OffsetNumber; #define InvalidOffsetNumber ((OffsetNumber) 0) #define FirstOffsetNumber ((OffsetNumber) 1) #define MaxOffsetNumber ((OffsetNumber) (BLCKSZ / sizeof(ItemIdData))) -#define OffsetNumberMask (0xffff) /* valid uint16 bits */ +#define OffsetNumberMask (0xffff) /* valid uint16 bits */ /* ---------------- * support macros @@ -55,4 +55,4 @@ typedef uint16 OffsetNumber; #define OffsetNumberPrev(offsetNumber) \ ((OffsetNumber) (-1 + (offsetNumber))) -#endif /* OFF_H */ +#endif /* OFF_H */ diff --git a/src/include/storage/pg_sema.h b/src/include/storage/pg_sema.h index b819f41d19..65db86f578 100644 --- a/src/include/storage/pg_sema.h +++ b/src/include/storage/pg_sema.h @@ -58,4 +58,4 @@ extern void PGSemaphoreUnlock(PGSemaphore sema); /* Lock a semaphore only if able to do so without blocking */ extern bool PGSemaphoreTryLock(PGSemaphore sema); -#endif /* PG_SEMA_H */ +#endif /* PG_SEMA_H */ diff --git a/src/include/storage/pg_shmem.h b/src/include/storage/pg_shmem.h index 7a76c08787..e3ee096229 100644 --- a/src/include/storage/pg_shmem.h +++ b/src/include/storage/pg_shmem.h @@ -69,4 +69,4 @@ extern PGShmemHeader *PGSharedMemoryCreate(Size size, bool makePrivate, extern bool PGSharedMemoryIsInUse(unsigned long id1, unsigned long id2); extern void PGSharedMemoryDetach(void); -#endif /* PG_SHMEM_H */ +#endif /* PG_SHMEM_H */ diff --git a/src/include/storage/pmsignal.h b/src/include/storage/pmsignal.h index 90ddfa3b31..4b954d7614 100644 --- a/src/include/storage/pmsignal.h +++ b/src/include/storage/pmsignal.h @@ -27,10 +27,10 @@ typedef enum PMSIGNAL_WAKEN_ARCHIVER, /* send a NOTIFY signal to xlog archiver */ PMSIGNAL_ROTATE_LOGFILE, /* send SIGUSR1 to syslogger to rotate logfile */ PMSIGNAL_START_AUTOVAC_LAUNCHER, /* start an autovacuum launcher */ - PMSIGNAL_START_AUTOVAC_WORKER, /* start an autovacuum worker */ + PMSIGNAL_START_AUTOVAC_WORKER, /* start an autovacuum worker */ PMSIGNAL_BACKGROUND_WORKER_CHANGE, /* background worker state change */ PMSIGNAL_START_WALRECEIVER, /* start a walreceiver */ - PMSIGNAL_ADVANCE_STATE_MACHINE, /* advance postmaster's state machine */ + PMSIGNAL_ADVANCE_STATE_MACHINE, /* advance postmaster's state machine */ NUM_PMSIGNALS /* Must be last value of enum! */ } PMSignalReason; @@ -53,4 +53,4 @@ extern void MarkPostmasterChildInactive(void); extern void MarkPostmasterChildWalSender(void); extern bool PostmasterIsAlive(void); -#endif /* PMSIGNAL_H */ +#endif /* PMSIGNAL_H */ diff --git a/src/include/storage/predicate.h b/src/include/storage/predicate.h index 941ba7119e..06bcbf2471 100644 --- a/src/include/storage/predicate.h +++ b/src/include/storage/predicate.h @@ -74,4 +74,4 @@ extern void PredicateLockTwoPhaseFinish(TransactionId xid, bool isCommit); extern void predicatelock_twophase_recover(TransactionId xid, uint16 info, void *recdata, uint32 len); -#endif /* PREDICATE_H */ +#endif /* PREDICATE_H */ diff --git a/src/include/storage/predicate_internals.h b/src/include/storage/predicate_internals.h index 48e6471ddc..89874a5c3b 100644 --- a/src/include/storage/predicate_internals.h +++ b/src/include/storage/predicate_internals.h @@ -78,10 +78,10 @@ typedef struct SERIALIZABLEXACT /* these values are not both interesting at the same time */ union { - SerCommitSeqNo earliestOutConflictCommit; /* when committed with - * conflict out */ - SerCommitSeqNo lastCommitBeforeSnapshot; /* when not committed or - * no conflict out */ + SerCommitSeqNo earliestOutConflictCommit; /* when committed with + * conflict out */ + SerCommitSeqNo lastCommitBeforeSnapshot; /* when not committed or + * no conflict out */ } SeqNo; SHM_QUEUE outConflicts; /* list of write transactions whose data we * couldn't read. */ @@ -99,18 +99,18 @@ typedef struct SERIALIZABLEXACT TransactionId topXid; /* top level xid for the transaction, if one * exists; else invalid */ - TransactionId finishedBefore; /* invalid means still running; else - * the struct expires when no - * serializable xids are before this. */ + TransactionId finishedBefore; /* invalid means still running; else the + * struct expires when no serializable + * xids are before this. */ TransactionId xmin; /* the transaction's snapshot xmin */ uint32 flags; /* OR'd combination of values defined below */ int pid; /* pid of associated process */ } SERIALIZABLEXACT; -#define SXACT_FLAG_COMMITTED 0x00000001 /* already committed */ -#define SXACT_FLAG_PREPARED 0x00000002 /* about to commit */ -#define SXACT_FLAG_ROLLED_BACK 0x00000004 /* already rolled back */ -#define SXACT_FLAG_DOOMED 0x00000008 /* will roll back */ +#define SXACT_FLAG_COMMITTED 0x00000001 /* already committed */ +#define SXACT_FLAG_PREPARED 0x00000002 /* about to commit */ +#define SXACT_FLAG_ROLLED_BACK 0x00000004 /* already rolled back */ +#define SXACT_FLAG_DOOMED 0x00000008 /* will roll back */ /* * The following flag actually means that the flagged transaction has a * conflict out *to a transaction which committed ahead of it*. It's hard @@ -153,25 +153,24 @@ typedef struct PredXactListData * but are not needed outside the predicate.c source file. Protected by * SerializableXactHashLock. */ - TransactionId SxactGlobalXmin; /* global xmin for active serializable - * transactions */ + TransactionId SxactGlobalXmin; /* global xmin for active serializable + * transactions */ int SxactGlobalXminCount; /* how many active serializable * transactions have this xmin */ - int WritableSxactCount; /* how many non-read-only serializable - * transactions are active */ - SerCommitSeqNo LastSxactCommitSeqNo; /* a strictly monotonically - * increasing number for - * commits of serializable - * transactions */ + int WritableSxactCount; /* how many non-read-only serializable + * transactions are active */ + SerCommitSeqNo LastSxactCommitSeqNo; /* a strictly monotonically + * increasing number for commits + * of serializable transactions */ /* Protected by SerializableXactHashLock. */ - SerCommitSeqNo CanPartialClearThrough; /* can clear predicate locks - * and inConflicts for - * committed transactions - * through this seq no */ + SerCommitSeqNo CanPartialClearThrough; /* can clear predicate locks and + * inConflicts for committed + * transactions through this seq + * no */ /* Protected by SerializableFinishedListLock. */ SerCommitSeqNo HavePartialClearedThrough; /* have cleared through this * seq no */ - SERIALIZABLEXACT *OldCommittedSxact; /* shared copy of dummy sxact */ + SERIALIZABLEXACT *OldCommittedSxact; /* shared copy of dummy sxact */ PredXactListElement element; } PredXactListData; @@ -477,4 +476,4 @@ extern PredicateLockData *GetPredicateLockStatusData(void); extern int GetSafeSnapshotBlockingPids(int blocked_pid, int *output, int output_size); -#endif /* PREDICATE_INTERNALS_H */ +#endif /* PREDICATE_INTERNALS_H */ diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 2fbde36dad..7dbaa81a8f 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -113,7 +113,7 @@ struct PGPROC Oid databaseId; /* OID of database this backend is using */ Oid roleId; /* OID of role using this backend */ - bool isBackgroundWorker; /* true if background worker. */ + bool isBackgroundWorker; /* true if background worker. */ /* * While in hot standby mode, shows that a conflict signal has been sent @@ -176,7 +176,7 @@ struct PGPROC /* Lock manager data, recording fast-path locks taken by this backend. */ uint64 fpLockBits; /* lock modes held for each fast-path slot */ - Oid fpRelId[FP_LOCK_SLOTS_PER_BACKEND]; /* slots for rel oids */ + Oid fpRelId[FP_LOCK_SLOTS_PER_BACKEND]; /* slots for rel oids */ bool fpVXIDLock; /* are we holding a fast-path VXID lock? */ LocalTransactionId fpLocalTransactionId; /* lxid for fast-path VXID * lock */ @@ -186,7 +186,7 @@ struct PGPROC * leader to get the LWLock protecting these fields. */ PGPROC *lockGroupLeader; /* lock group leader, if I'm a member */ - dlist_head lockGroupMembers; /* list of members, if I'm a leader */ + dlist_head lockGroupMembers; /* list of members, if I'm a leader */ dlist_node lockGroupLink; /* my member link, if I'm a member */ }; @@ -313,4 +313,4 @@ extern PGPROC *AuxiliaryPidGetProc(int pid); extern void BecomeLockGroupLeader(void); extern bool BecomeLockGroupMember(PGPROC *leader, int pid); -#endif /* PROC_H */ +#endif /* PROC_H */ diff --git a/src/include/storage/procarray.h b/src/include/storage/procarray.h index 5cf8ff7538..8fa76eefb3 100644 --- a/src/include/storage/procarray.h +++ b/src/include/storage/procarray.h @@ -27,16 +27,15 @@ * to avoid forcing to include proc.h when including procarray.h. So if you modify * PROC_XXX flags, you need to modify these flags. */ -#define PROCARRAY_VACUUM_FLAG 0x02 /* currently running - * lazy vacuum */ -#define PROCARRAY_ANALYZE_FLAG 0x04 /* currently running - * analyze */ -#define PROCARRAY_LOGICAL_DECODING_FLAG 0x10 /* currently doing - * logical decoding - * outside xact */ - -#define PROCARRAY_SLOTS_XMIN 0x20 /* replication slot - * xmin, catalog_xmin */ +#define PROCARRAY_VACUUM_FLAG 0x02 /* currently running lazy + * vacuum */ +#define PROCARRAY_ANALYZE_FLAG 0x04 /* currently running + * analyze */ +#define PROCARRAY_LOGICAL_DECODING_FLAG 0x10 /* currently doing logical + * decoding outside xact */ + +#define PROCARRAY_SLOTS_XMIN 0x20 /* replication slot xmin, + * catalog_xmin */ /* * Only flags in PROCARRAY_PROC_FLAGS_MASK are considered when matching * PGXACT->vacuumFlags. Other flags are used for different purposes and @@ -125,4 +124,4 @@ extern void ProcArraySetReplicationSlotXmin(TransactionId xmin, extern void ProcArrayGetReplicationSlotXmin(TransactionId *xmin, TransactionId *catalog_xmin); -#endif /* PROCARRAY_H */ +#endif /* PROCARRAY_H */ diff --git a/src/include/storage/procsignal.h b/src/include/storage/procsignal.h index 8f0161bf77..20bb05b177 100644 --- a/src/include/storage/procsignal.h +++ b/src/include/storage/procsignal.h @@ -32,8 +32,7 @@ typedef enum PROCSIG_CATCHUP_INTERRUPT, /* sinval catchup interrupt */ PROCSIG_NOTIFY_INTERRUPT, /* listen/notify interrupt */ PROCSIG_PARALLEL_MESSAGE, /* message from cooperating parallel backend */ - PROCSIG_WALSND_INIT_STOPPING, /* ask walsenders to prepare for - * shutdown */ + PROCSIG_WALSND_INIT_STOPPING, /* ask walsenders to prepare for shutdown */ /* Recovery conflict reasons */ PROCSIG_RECOVERY_CONFLICT_DATABASE, @@ -58,4 +57,4 @@ extern int SendProcSignal(pid_t pid, ProcSignalReason reason, extern void procsignal_sigusr1_handler(SIGNAL_ARGS); -#endif /* PROCSIGNAL_H */ +#endif /* PROCSIGNAL_H */ diff --git a/src/include/storage/reinit.h b/src/include/storage/reinit.h index 8c1b178de4..90e494e933 100644 --- a/src/include/storage/reinit.h +++ b/src/include/storage/reinit.h @@ -20,4 +20,4 @@ extern void ResetUnloggedRelations(int op); #define UNLOGGED_RELATION_CLEANUP 0x0001 #define UNLOGGED_RELATION_INIT 0x0002 -#endif /* REINIT_H */ +#endif /* REINIT_H */ diff --git a/src/include/storage/relfilenode.h b/src/include/storage/relfilenode.h index 4dc04092d7..fb596e2ee7 100644 --- a/src/include/storage/relfilenode.h +++ b/src/include/storage/relfilenode.h @@ -96,4 +96,4 @@ typedef struct RelFileNodeBackend (node1).backend == (node2).backend && \ (node1).node.spcNode == (node2).node.spcNode) -#endif /* RELFILENODE_H */ +#endif /* RELFILENODE_H */ diff --git a/src/include/storage/shm_mq.h b/src/include/storage/shm_mq.h index 7a37535ab3..02a93e0222 100644 --- a/src/include/storage/shm_mq.h +++ b/src/include/storage/shm_mq.h @@ -82,4 +82,4 @@ extern shm_mq_result shm_mq_wait_for_attach(shm_mq_handle *mqh); /* Smallest possible queue. */ extern PGDLLIMPORT const Size shm_mq_minimum_size; -#endif /* SHM_MQ_H */ +#endif /* SHM_MQ_H */ diff --git a/src/include/storage/shm_toc.h b/src/include/storage/shm_toc.h index 9175a472d8..8ccd35d96b 100644 --- a/src/include/storage/shm_toc.h +++ b/src/include/storage/shm_toc.h @@ -55,4 +55,4 @@ typedef struct extern Size shm_toc_estimate(shm_toc_estimator *e); -#endif /* SHM_TOC_H */ +#endif /* SHM_TOC_H */ diff --git a/src/include/storage/shmem.h b/src/include/storage/shmem.h index 1961832c0f..c6993387ff 100644 --- a/src/include/storage/shmem.h +++ b/src/include/storage/shmem.h @@ -57,7 +57,7 @@ extern void RequestAddinShmemSpace(Size size); /* this is a hash bucket in the shmem index table */ typedef struct { - char key[SHMEM_INDEX_KEYSIZE]; /* string name */ + char key[SHMEM_INDEX_KEYSIZE]; /* string name */ void *location; /* location in shared mem */ Size size; /* # bytes allocated for the structure */ } ShmemIndexEnt; @@ -77,4 +77,4 @@ extern Pointer SHMQueuePrev(const SHM_QUEUE *queue, const SHM_QUEUE *curElem, extern bool SHMQueueEmpty(const SHM_QUEUE *queue); extern bool SHMQueueIsDetached(const SHM_QUEUE *queue); -#endif /* SHMEM_H */ +#endif /* SHMEM_H */ diff --git a/src/include/storage/sinval.h b/src/include/storage/sinval.h index 6a3db9580f..4e72c52d21 100644 --- a/src/include/storage/sinval.h +++ b/src/include/storage/sinval.h @@ -151,4 +151,4 @@ extern void ProcessCommittedInvalidationMessages(SharedInvalidationMessage *msgs extern void LocalExecuteInvalidationMessage(SharedInvalidationMessage *msg); -#endif /* SINVAL_H */ +#endif /* SINVAL_H */ diff --git a/src/include/storage/sinvaladt.h b/src/include/storage/sinvaladt.h index 07ac2f8c85..751735fc9a 100644 --- a/src/include/storage/sinvaladt.h +++ b/src/include/storage/sinvaladt.h @@ -40,4 +40,4 @@ extern void SICleanupQueue(bool callerHasWriteLock, int minFree); extern LocalTransactionId GetNextLocalTransactionId(void); -#endif /* SINVALADT_H */ +#endif /* SINVALADT_H */ diff --git a/src/include/storage/smgr.h b/src/include/storage/smgr.h index 9ce6829655..2279134588 100644 --- a/src/include/storage/smgr.h +++ b/src/include/storage/smgr.h @@ -40,7 +40,7 @@ typedef struct SMgrRelationData { /* rnode is the hashtable lookup key, so it must be first! */ - RelFileNodeBackend smgr_rnode; /* relation physical identifier */ + RelFileNodeBackend smgr_rnode; /* relation physical identifier */ /* pointer to owning pointer, or NULL if none */ struct SMgrRelationData **smgr_owner; @@ -53,7 +53,7 @@ typedef struct SMgrRelationData * happens. In all three cases, InvalidBlockNumber means "unknown". */ BlockNumber smgr_targblock; /* current insertion target block */ - BlockNumber smgr_fsm_nblocks; /* last known size of fsm fork */ + BlockNumber smgr_fsm_nblocks; /* last known size of fsm fork */ BlockNumber smgr_vm_nblocks; /* last known size of vm fork */ /* additional public fields may someday exist here */ @@ -144,4 +144,4 @@ extern void RememberFsyncRequest(RelFileNode rnode, ForkNumber forknum, extern void ForgetRelationFsyncRequests(RelFileNode rnode, ForkNumber forknum); extern void ForgetDatabaseFsyncRequests(Oid dbid); -#endif /* SMGR_H */ +#endif /* SMGR_H */ diff --git a/src/include/storage/spin.h b/src/include/storage/spin.h index 8987c90537..66698645c2 100644 --- a/src/include/storage/spin.h +++ b/src/include/storage/spin.h @@ -74,4 +74,4 @@ extern void SpinlockSemaInit(void); extern PGSemaphore *SpinlockSemaArray; #endif -#endif /* SPIN_H */ +#endif /* SPIN_H */ diff --git a/src/include/storage/standby.h b/src/include/storage/standby.h index 3ecc446083..f5404b4c1f 100644 --- a/src/include/storage/standby.h +++ b/src/include/storage/standby.h @@ -73,7 +73,7 @@ typedef struct RunningTransactionsData int subxcnt; /* # of subxact ids in xids[] */ bool subxid_overflow; /* snapshot overflowed, subxids missing */ TransactionId nextXid; /* copy of ShmemVariableCache->nextXid */ - TransactionId oldestRunningXid; /* *not* oldestXmin */ + TransactionId oldestRunningXid; /* *not* oldestXmin */ TransactionId latestCompletedXid; /* so we can set xmax */ TransactionId *xids; /* array of (sub)xids still running */ @@ -88,4 +88,4 @@ extern XLogRecPtr LogStandbySnapshot(void); extern void LogStandbyInvalidations(int nmsgs, SharedInvalidationMessage *msgs, bool relcacheInitFileInval); -#endif /* STANDBY_H */ +#endif /* STANDBY_H */ diff --git a/src/include/storage/standbydefs.h b/src/include/storage/standbydefs.h index f8444c787a..a0af6788e9 100644 --- a/src/include/storage/standbydefs.h +++ b/src/include/storage/standbydefs.h @@ -50,7 +50,7 @@ typedef struct xl_running_xacts int subxcnt; /* # of subxact ids in xids[] */ bool subxid_overflow; /* snapshot overflowed, subxids missing */ TransactionId nextXid; /* copy of ShmemVariableCache->nextXid */ - TransactionId oldestRunningXid; /* *not* oldestXmin */ + TransactionId oldestRunningXid; /* *not* oldestXmin */ TransactionId latestCompletedXid; /* so we can set xmax */ TransactionId xids[FLEXIBLE_ARRAY_MEMBER]; @@ -71,4 +71,4 @@ typedef struct xl_invalidations #define MinSizeOfInvalidations offsetof(xl_invalidations, msgs) -#endif /* STANDBYDEFS_H */ +#endif /* STANDBYDEFS_H */ diff --git a/src/include/tcop/deparse_utility.h b/src/include/tcop/deparse_utility.h index f0b25bea90..9c4e608934 100644 --- a/src/include/tcop/deparse_utility.h +++ b/src/include/tcop/deparse_utility.h @@ -102,4 +102,4 @@ typedef struct CollectedCommand } d; } CollectedCommand; -#endif /* DEPARSE_UTILITY_H */ +#endif /* DEPARSE_UTILITY_H */ diff --git a/src/include/tcop/dest.h b/src/include/tcop/dest.h index a11cd92c01..c990544a16 100644 --- a/src/include/tcop/dest.h +++ b/src/include/tcop/dest.h @@ -129,7 +129,7 @@ struct _DestReceiver /* Private fields might appear beyond this point... */ }; -extern DestReceiver *None_Receiver; /* permanent receiver for DestNone */ +extern DestReceiver *None_Receiver; /* permanent receiver for DestNone */ /* The primary destination management functions */ @@ -142,4 +142,4 @@ extern void EndCommand(const char *commandTag, CommandDest dest); extern void NullCommand(CommandDest dest); extern void ReadyForQuery(CommandDest dest); -#endif /* DEST_H */ +#endif /* DEST_H */ diff --git a/src/include/tcop/fastpath.h b/src/include/tcop/fastpath.h index 81d94913db..4a7c35f1a9 100644 --- a/src/include/tcop/fastpath.h +++ b/src/include/tcop/fastpath.h @@ -18,4 +18,4 @@ extern int GetOldFunctionMessage(StringInfo buf); extern void HandleFunctionRequest(StringInfo msgBuf); -#endif /* FASTPATH_H */ +#endif /* FASTPATH_H */ diff --git a/src/include/tcop/pquery.h b/src/include/tcop/pquery.h index 12ff4588c6..6abfe7b282 100644 --- a/src/include/tcop/pquery.h +++ b/src/include/tcop/pquery.h @@ -42,4 +42,4 @@ extern uint64 PortalRunFetch(Portal portal, long count, DestReceiver *dest); -#endif /* PQUERY_H */ +#endif /* PQUERY_H */ diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h index f1a34a1c72..f8c535c91e 100644 --- a/src/include/tcop/tcopprot.h +++ b/src/include/tcop/tcopprot.h @@ -89,4 +89,4 @@ extern bool set_plan_disabling_options(const char *arg, GucContext context, GucSource source); extern const char *get_stats_option_name(const char *arg); -#endif /* TCOPPROT_H */ +#endif /* TCOPPROT_H */ diff --git a/src/include/tcop/utility.h b/src/include/tcop/utility.h index 850d09b9f0..56d04dd1c6 100644 --- a/src/include/tcop/utility.h +++ b/src/include/tcop/utility.h @@ -52,4 +52,4 @@ extern LogStmtLevel GetCommandLogLevel(Node *parsetree); extern bool CommandIsReadOnly(PlannedStmt *pstmt); -#endif /* UTILITY_H */ +#endif /* UTILITY_H */ diff --git a/src/include/tsearch/ts_cache.h b/src/include/tsearch/ts_cache.h index 80b8a079ed..abff0fdfcc 100644 --- a/src/include/tsearch/ts_cache.h +++ b/src/include/tsearch/ts_cache.h @@ -95,4 +95,4 @@ extern Oid getTSCurrentConfig(bool emitError); extern bool check_TSCurrentConfig(char **newval, void **extra, GucSource source); extern void assign_TSCurrentConfig(const char *newval, void *extra); -#endif /* TS_CACHE_H */ +#endif /* TS_CACHE_H */ diff --git a/src/include/tsearch/ts_locale.h b/src/include/tsearch/ts_locale.h index afcf2b93de..c32f0743aa 100644 --- a/src/include/tsearch/ts_locale.h +++ b/src/include/tsearch/ts_locale.h @@ -61,7 +61,7 @@ extern int t_isprint(const char *ptr); #define t_iseq(x,c) (TOUCHAR(x) == (unsigned char) (c)) #define COPYCHAR(d,s) (*((unsigned char *) (d)) = TOUCHAR(s)) -#endif /* USE_WIDE_UPPER_LOWER */ +#endif /* USE_WIDE_UPPER_LOWER */ extern char *lowerstr(const char *str); extern char *lowerstr_with_len(const char *str, int len); @@ -73,4 +73,4 @@ extern void tsearch_readline_end(tsearch_readline_state *stp); extern char *t_readline(FILE *fp); -#endif /* __TSLOCALE_H__ */ +#endif /* __TSLOCALE_H__ */ diff --git a/src/include/tsearch/ts_public.h b/src/include/tsearch/ts_public.h index 4c190b22e8..94ba7fcb20 100644 --- a/src/include/tsearch/ts_public.h +++ b/src/include/tsearch/ts_public.h @@ -129,4 +129,4 @@ typedef struct * getnext == true */ } DictSubState; -#endif /* _PG_TS_PUBLIC_H_ */ +#endif /* _PG_TS_PUBLIC_H_ */ diff --git a/src/include/tsearch/ts_type.h b/src/include/tsearch/ts_type.h index 873e2e1856..2885bc0153 100644 --- a/src/include/tsearch/ts_type.h +++ b/src/include/tsearch/ts_type.h @@ -248,4 +248,4 @@ typedef TSQueryData *TSQuery; #define PG_GETARG_TSQUERY_COPY(n) DatumGetTSQueryCopy(PG_GETARG_DATUM(n)) #define PG_RETURN_TSQUERY(x) return TSQueryGetDatum(x) -#endif /* _PG_TSTYPE_H_ */ +#endif /* _PG_TSTYPE_H_ */ diff --git a/src/include/tsearch/ts_utils.h b/src/include/tsearch/ts_utils.h index f44f683f27..3312353026 100644 --- a/src/include/tsearch/ts_utils.h +++ b/src/include/tsearch/ts_utils.h @@ -42,9 +42,8 @@ typedef struct TSQueryParserStateData *TSQueryParserState; typedef void (*PushFunction) (Datum opaque, TSQueryParserState state, char *token, int tokenlen, - int16 tokenweights, /* bitmap as described - * in QueryOperand - * struct */ + int16 tokenweights, /* bitmap as described in + * QueryOperand struct */ bool prefix); extern TSQuery parse_tsquery(char *buf, @@ -237,4 +236,4 @@ extern TSQuerySign makeTSQuerySign(TSQuery a); extern QTNode *findsubquery(QTNode *root, QTNode *ex, QTNode *subs, bool *isfind); -#endif /* _PG_TS_UTILS_H_ */ +#endif /* _PG_TS_UTILS_H_ */ diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h index 2487020ec1..ab630a80a4 100644 --- a/src/include/utils/acl.h +++ b/src/include/utils/acl.h @@ -127,11 +127,11 @@ typedef ArrayType Acl; * External representations of the privilege bits --- aclitemin/aclitemout * represent each possible privilege bit with a distinct 1-character code */ -#define ACL_INSERT_CHR 'a' /* formerly known as "append" */ -#define ACL_SELECT_CHR 'r' /* formerly known as "read" */ -#define ACL_UPDATE_CHR 'w' /* formerly known as "write" */ +#define ACL_INSERT_CHR 'a' /* formerly known as "append" */ +#define ACL_SELECT_CHR 'r' /* formerly known as "read" */ +#define ACL_UPDATE_CHR 'w' /* formerly known as "write" */ #define ACL_DELETE_CHR 'd' -#define ACL_TRUNCATE_CHR 'D' /* super-delete, as it were */ +#define ACL_TRUNCATE_CHR 'D' /* super-delete, as it were */ #define ACL_REFERENCES_CHR 'x' #define ACL_TRIGGER_CHR 't' #define ACL_EXECUTE_CHR 'X' @@ -331,4 +331,4 @@ extern bool pg_statistics_object_ownercheck(Oid stat_oid, Oid roleid); extern bool has_createrole_privilege(Oid roleid); extern bool has_bypassrls_privilege(Oid roleid); -#endif /* ACL_H */ +#endif /* ACL_H */ diff --git a/src/include/utils/aclchk_internal.h b/src/include/utils/aclchk_internal.h index 0e50f73aab..3374edb638 100644 --- a/src/include/utils/aclchk_internal.h +++ b/src/include/utils/aclchk_internal.h @@ -42,4 +42,4 @@ typedef struct } InternalGrant; -#endif /* ACLCHK_INTERNAL_H */ +#endif /* ACLCHK_INTERNAL_H */ diff --git a/src/include/utils/array.h b/src/include/utils/array.h index 552c08f0d5..61a67a21e3 100644 --- a/src/include/utils/array.h +++ b/src/include/utils/array.h @@ -443,4 +443,4 @@ extern ExpandedArrayHeader *DatumGetExpandedArrayX(Datum d, extern AnyArrayType *DatumGetAnyArray(Datum d); extern void deconstruct_expanded_array(ExpandedArrayHeader *eah); -#endif /* ARRAY_H */ +#endif /* ARRAY_H */ diff --git a/src/include/utils/arrayaccess.h b/src/include/utils/arrayaccess.h index 6148bdf834..7655c80bed 100644 --- a/src/include/utils/arrayaccess.h +++ b/src/include/utils/arrayaccess.h @@ -115,4 +115,4 @@ array_iter_next(array_iter *it, bool *isnull, int i, return ret; } -#endif /* ARRAYACCESS_H */ +#endif /* ARRAYACCESS_H */ diff --git a/src/include/utils/ascii.h b/src/include/utils/ascii.h index 3771e1acab..d3b183f11f 100644 --- a/src/include/utils/ascii.h +++ b/src/include/utils/ascii.h @@ -13,4 +13,4 @@ extern void ascii_safe_strlcpy(char *dest, const char *src, size_t destsiz); -#endif /* _ASCII_H_ */ +#endif /* _ASCII_H_ */ diff --git a/src/include/utils/attoptcache.h b/src/include/utils/attoptcache.h index 7f2334b4cd..4eef793181 100644 --- a/src/include/utils/attoptcache.h +++ b/src/include/utils/attoptcache.h @@ -25,4 +25,4 @@ typedef struct AttributeOpts AttributeOpts *get_attribute_options(Oid spcid, int attnum); -#endif /* ATTOPTCACHE_H */ +#endif /* ATTOPTCACHE_H */ diff --git a/src/include/utils/backend_random.h b/src/include/utils/backend_random.h index 31602f250d..9781aea0ac 100644 --- a/src/include/utils/backend_random.h +++ b/src/include/utils/backend_random.h @@ -16,4 +16,4 @@ extern Size BackendRandomShmemSize(void); extern void BackendRandomShmemInit(void); extern bool pg_backend_random(char *dst, int len); -#endif /* BACKEND_RANDOM_H */ +#endif /* BACKEND_RANDOM_H */ diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 1435a7b57a..762532f636 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -121,4 +121,4 @@ extern int32 type_maximum_size(Oid type_oid, int32 typemod); /* quote.c */ extern char *quote_literal_cstr(const char *rawstr); -#endif /* BUILTINS_H */ +#endif /* BUILTINS_H */ diff --git a/src/include/utils/bytea.h b/src/include/utils/bytea.h index 0cc5438328..d7bd30842e 100644 --- a/src/include/utils/bytea.h +++ b/src/include/utils/bytea.h @@ -25,4 +25,4 @@ typedef enum extern int bytea_output; /* ByteaOutputType, but int for GUC enum */ -#endif /* BYTEA_H */ +#endif /* BYTEA_H */ diff --git a/src/include/utils/cash.h b/src/include/utils/cash.h index 84083677e1..2e332d83b1 100644 --- a/src/include/utils/cash.h +++ b/src/include/utils/cash.h @@ -22,4 +22,4 @@ typedef int64 Cash; #define PG_GETARG_CASH(n) DatumGetCash(PG_GETARG_DATUM(n)) #define PG_RETURN_CASH(x) return CashGetDatum(x) -#endif /* CASH_H */ +#endif /* CASH_H */ diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h index 5add424e5e..f8ebc903d3 100644 --- a/src/include/utils/catcache.h +++ b/src/include/utils/catcache.h @@ -46,10 +46,10 @@ typedef struct catcache int cc_ntup; /* # of tuples currently in this cache */ int cc_nbuckets; /* # of hash buckets in this cache */ int cc_nkeys; /* # of keys (1..CATCACHE_MAXKEYS) */ - int cc_key[CATCACHE_MAXKEYS]; /* AttrNumber of each key */ + int cc_key[CATCACHE_MAXKEYS]; /* AttrNumber of each key */ PGFunction cc_hashfunc[CATCACHE_MAXKEYS]; /* hash function for each key */ - ScanKeyData cc_skey[CATCACHE_MAXKEYS]; /* precomputed key info for - * heap scans */ + ScanKeyData cc_skey[CATCACHE_MAXKEYS]; /* precomputed key info for heap + * scans */ bool cc_isname[CATCACHE_MAXKEYS]; /* flag "name" key columns */ dlist_head cc_lists; /* list of CatCList structs */ dlist_head *cc_bucket; /* hash buckets */ @@ -199,4 +199,4 @@ extern void PrepareToInvalidateCacheTuple(Relation relation, extern void PrintCatCacheLeakWarning(HeapTuple tuple); extern void PrintCatCacheListLeakWarning(CatCList *list); -#endif /* CATCACHE_H */ +#endif /* CATCACHE_H */ diff --git a/src/include/utils/combocid.h b/src/include/utils/combocid.h index 1cb0e74275..6d8be8bf0f 100644 --- a/src/include/utils/combocid.h +++ b/src/include/utils/combocid.h @@ -25,4 +25,4 @@ extern void RestoreComboCIDState(char *comboCIDstate); extern void SerializeComboCIDState(Size maxsize, char *start_address); extern Size EstimateComboCIDStateSpace(void); -#endif /* COMBOCID_H */ +#endif /* COMBOCID_H */ diff --git a/src/include/utils/date.h b/src/include/utils/date.h index 309a581853..0736a72946 100644 --- a/src/include/utils/date.h +++ b/src/include/utils/date.h @@ -74,4 +74,4 @@ extern DateADT GetSQLCurrentDate(void); extern TimeTzADT *GetSQLCurrentTime(int32 typmod); extern TimeADT GetSQLLocalTime(int32 typmod); -#endif /* DATE_H */ +#endif /* DATE_H */ diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h index 15b558c639..7968569fda 100644 --- a/src/include/utils/datetime.h +++ b/src/include/utils/datetime.h @@ -259,7 +259,7 @@ do { \ * Include check for leap year. */ -extern const char *const months[]; /* months (3-char abbreviations) */ +extern const char *const months[]; /* months (3-char abbreviations) */ extern const char *const days[]; /* days (full names) */ extern const int day_tab[2][13]; @@ -338,4 +338,4 @@ extern TimeZoneAbbrevTable *ConvertTimeZoneAbbrevs(struct tzEntry *abbrevs, int n); extern void InstallTimeZoneAbbrevs(TimeZoneAbbrevTable *tbl); -#endif /* DATETIME_H */ +#endif /* DATETIME_H */ diff --git a/src/include/utils/datum.h b/src/include/utils/datum.h index a8a9ea6d19..d2f0f9ed51 100644 --- a/src/include/utils/datum.h +++ b/src/include/utils/datum.h @@ -56,4 +56,4 @@ extern void datumSerialize(Datum value, bool isnull, bool typByVal, int typLen, char **start_address); extern Datum datumRestore(char **start_address, bool *isnull); -#endif /* DATUM_H */ +#endif /* DATUM_H */ diff --git a/src/include/utils/dsa.h b/src/include/utils/dsa.h index f084443409..516ef610f0 100644 --- a/src/include/utils/dsa.h +++ b/src/include/utils/dsa.h @@ -122,4 +122,4 @@ extern void *dsa_get_address(dsa_area *area, dsa_pointer dp); extern void dsa_trim(dsa_area *area); extern void dsa_dump(dsa_area *area); -#endif /* DSA_H */ +#endif /* DSA_H */ diff --git a/src/include/utils/dynahash.h b/src/include/utils/dynahash.h index eee5cce928..8e03245a03 100644 --- a/src/include/utils/dynahash.h +++ b/src/include/utils/dynahash.h @@ -16,4 +16,4 @@ extern int my_log2(long num); -#endif /* DYNAHASH_H */ +#endif /* DYNAHASH_H */ diff --git a/src/include/utils/dynamic_loader.h b/src/include/utils/dynamic_loader.h index 987f21a362..6c9287b611 100644 --- a/src/include/utils/dynamic_loader.h +++ b/src/include/utils/dynamic_loader.h @@ -22,4 +22,4 @@ extern PGFunction pg_dlsym(void *handle, char *funcname); extern void pg_dlclose(void *handle); extern char *pg_dlerror(void); -#endif /* DYNAMIC_LOADER_H */ +#endif /* DYNAMIC_LOADER_H */ diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h index 58dc92ee5d..3492bafa5e 100644 --- a/src/include/utils/elog.h +++ b/src/include/utils/elog.h @@ -27,9 +27,9 @@ * server log by default. */ #define LOG_SERVER_ONLY 16 /* Same as LOG for server reporting, but never * sent to client. */ -#define COMMERROR LOG_SERVER_ONLY /* Client communication problems; same - * as LOG for server reporting, but - * never sent to client. */ +#define COMMERROR LOG_SERVER_ONLY /* Client communication problems; same as + * LOG for server reporting, but never + * sent to client. */ #define INFO 17 /* Messages specifically requested by user (eg * VACUUM VERBOSE output); always sent to * client regardless of client_min_messages, @@ -117,7 +117,7 @@ if (elevel_ >= ERROR) \ pg_unreachable(); \ } while(0) -#endif /* HAVE__BUILTIN_CONSTANT_P */ +#endif /* HAVE__BUILTIN_CONSTANT_P */ #define ereport(elevel, rest) \ ereport_domain(elevel, TEXTDOMAIN, rest) @@ -214,12 +214,12 @@ extern int getinternalerrposition(void); pg_unreachable(); \ } \ } while(0) -#endif /* HAVE__BUILTIN_CONSTANT_P */ +#endif /* HAVE__BUILTIN_CONSTANT_P */ #else /* !HAVE__VA_ARGS */ #define elog \ elog_start(__FILE__, __LINE__, PG_FUNCNAME_MACRO), \ elog_finish -#endif /* HAVE__VA_ARGS */ +#endif /* HAVE__VA_ARGS */ extern void elog_start(const char *filename, int lineno, const char *funcname); extern void elog_finish(int elevel, const char *fmt,...) pg_attribute_printf(2, 3); @@ -329,8 +329,8 @@ extern PGDLLIMPORT sigjmp_buf *PG_exception_stack; typedef struct ErrorData { int elevel; /* error level */ - bool output_to_server; /* will report to server log? */ - bool output_to_client; /* will report to client? */ + bool output_to_server; /* will report to server log? */ + bool output_to_client; /* will report to client? */ bool show_funcname; /* true to force funcname inclusion */ bool hide_stmt; /* true to prevent STATEMENT: inclusion */ bool hide_ctx; /* true to prevent CONTEXT: inclusion */ @@ -413,4 +413,4 @@ extern void set_syslog_parameters(const char *ident, int facility); */ extern void write_stderr(const char *fmt,...) pg_attribute_printf(1, 2); -#endif /* ELOG_H */ +#endif /* ELOG_H */ diff --git a/src/include/utils/evtcache.h b/src/include/utils/evtcache.h index f6ea163df3..9774eac5a6 100644 --- a/src/include/utils/evtcache.h +++ b/src/include/utils/evtcache.h @@ -34,4 +34,4 @@ typedef struct extern List *EventCacheLookup(EventTriggerEvent event); -#endif /* EVTCACHE_H */ +#endif /* EVTCACHE_H */ diff --git a/src/include/utils/expandeddatum.h b/src/include/utils/expandeddatum.h index d9b598591a..7116b860cc 100644 --- a/src/include/utils/expandeddatum.h +++ b/src/include/utils/expandeddatum.h @@ -156,4 +156,4 @@ extern Datum MakeExpandedObjectReadOnlyInternal(Datum d); extern Datum TransferExpandedObject(Datum d, MemoryContext new_parent); extern void DeleteExpandedObject(Datum d); -#endif /* EXPANDEDDATUM_H */ +#endif /* EXPANDEDDATUM_H */ diff --git a/src/include/utils/fmgrtab.h b/src/include/utils/fmgrtab.h index 414cd03952..6130ef8f9c 100644 --- a/src/include/utils/fmgrtab.h +++ b/src/include/utils/fmgrtab.h @@ -36,4 +36,4 @@ extern const FmgrBuiltin fmgr_builtins[]; extern const int fmgr_nbuiltins; /* number of entries in table */ -#endif /* FMGRTAB_H */ +#endif /* FMGRTAB_H */ diff --git a/src/include/utils/freepage.h b/src/include/utils/freepage.h index 78caa5369b..c370c733ee 100644 --- a/src/include/utils/freepage.h +++ b/src/include/utils/freepage.h @@ -96,4 +96,4 @@ extern void FreePageManagerPut(FreePageManager *fpm, Size first_page, Size npages); extern char *FreePageManagerDump(FreePageManager *fpm); -#endif /* FREEPAGE_H */ +#endif /* FREEPAGE_H */ diff --git a/src/include/utils/geo_decls.h b/src/include/utils/geo_decls.h index 9b530dbe3d..44c6381b85 100644 --- a/src/include/utils/geo_decls.h +++ b/src/include/utils/geo_decls.h @@ -183,4 +183,4 @@ extern double point_dt(Point *pt1, Point *pt2); extern double point_sl(Point *pt1, Point *pt2); extern double pg_hypot(double x, double y); -#endif /* GEO_DECLS_H */ +#endif /* GEO_DECLS_H */ diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index ea11c83700..c1870d2130 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -212,8 +212,8 @@ typedef enum #define GUC_SUPERUSER_ONLY 0x0100 /* show only to superusers */ #define GUC_IS_NAME 0x0200 /* limit string to NAMEDATALEN-1 */ #define GUC_NOT_WHILE_SEC_REST 0x0400 /* can't set if security restricted */ -#define GUC_DISALLOW_IN_AUTO_FILE 0x0800 /* can't set in - * PG_AUTOCONF_FILENAME */ +#define GUC_DISALLOW_IN_AUTO_FILE 0x0800 /* can't set in + * PG_AUTOCONF_FILENAME */ #define GUC_UNIT_KB 0x1000 /* value is in kilobytes */ #define GUC_UNIT_BLOCKS 0x2000 /* value is in blocks */ @@ -432,4 +432,4 @@ extern void assign_search_path(const char *newval, void *extra); extern bool check_wal_buffers(int *newval, void **extra, GucSource source); extern void assign_xlog_sync_method(int new_sync_method, void *extra); -#endif /* GUC_H */ +#endif /* GUC_H */ diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h index f28578b335..042f7a0152 100644 --- a/src/include/utils/guc_tables.h +++ b/src/include/utils/guc_tables.h @@ -164,7 +164,7 @@ struct config_generic }; /* bit values in status field */ -#define GUC_IS_IN_FILE 0x0001 /* found it in config file */ +#define GUC_IS_IN_FILE 0x0001 /* found it in config file */ /* * Caution: the GUC_IS_IN_FILE bit is transient state for ProcessConfigFile. * Do not assume that its value represents useful information elsewhere. @@ -265,4 +265,4 @@ extern const char *config_enum_lookup_by_value(struct config_enum *record, int v extern bool config_enum_lookup_by_name(struct config_enum *record, const char *value, int *retval); -#endif /* GUC_TABLES_H */ +#endif /* GUC_TABLES_H */ diff --git a/src/include/utils/hsearch.h b/src/include/utils/hsearch.h index 9b4bd7c02b..bc5873ed20 100644 --- a/src/include/utils/hsearch.h +++ b/src/include/utils/hsearch.h @@ -157,4 +157,4 @@ extern int bitmap_match(const void *key1, const void *key2, Size keysize); #define oid_hash uint32_hash /* Remove me eventually */ -#endif /* HSEARCH_H */ +#endif /* HSEARCH_H */ diff --git a/src/include/utils/index_selfuncs.h b/src/include/utils/index_selfuncs.h index 17d165ca65..24f2f3a866 100644 --- a/src/include/utils/index_selfuncs.h +++ b/src/include/utils/index_selfuncs.h @@ -71,4 +71,4 @@ extern void gincostestimate(struct PlannerInfo *root, double *indexCorrelation, double *indexPages); -#endif /* INDEX_SELFUNCS_H */ +#endif /* INDEX_SELFUNCS_H */ diff --git a/src/include/utils/inet.h b/src/include/utils/inet.h index 7dc179e255..f2aa864a35 100644 --- a/src/include/utils/inet.h +++ b/src/include/utils/inet.h @@ -146,4 +146,4 @@ extern inet *cidr_set_masklen_internal(const inet *src, int bits); extern int bitncmp(const unsigned char *l, const unsigned char *r, int n); extern int bitncommon(const unsigned char *l, const unsigned char *r, int n); -#endif /* INET_H */ +#endif /* INET_H */ diff --git a/src/include/utils/int8.h b/src/include/utils/int8.h index c58ee048cf..8b78983fee 100644 --- a/src/include/utils/int8.h +++ b/src/include/utils/int8.h @@ -22,4 +22,4 @@ extern bool scanint8(const char *str, bool errorOK, int64 *result); -#endif /* INT8_H */ +#endif /* INT8_H */ diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h index afbe354b4d..361543f412 100644 --- a/src/include/utils/inval.h +++ b/src/include/utils/inval.h @@ -63,4 +63,4 @@ extern void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func, extern void CallSyscacheCallbacks(int cacheid, uint32 hashvalue); extern void InvalidateSystemCaches(void); -#endif /* INVAL_H */ +#endif /* INVAL_H */ diff --git a/src/include/utils/json.h b/src/include/utils/json.h index 0a749b90c8..e3ffe6fc44 100644 --- a/src/include/utils/json.h +++ b/src/include/utils/json.h @@ -19,4 +19,4 @@ /* functions in json.c */ extern void escape_json(StringInfo buf, const char *str); -#endif /* JSON_H */ +#endif /* JSON_H */ diff --git a/src/include/utils/jsonapi.h b/src/include/utils/jsonapi.h index 44ee36931e..2508b16b55 100644 --- a/src/include/utils/jsonapi.h +++ b/src/include/utils/jsonapi.h @@ -147,4 +147,4 @@ extern Jsonb *transform_jsonb_string_values(Jsonb *jsonb, void *action_state, extern text *transform_json_string_values(text *json, void *action_state, JsonTransformStringValuesAction transform_action); -#endif /* JSONAPI_H */ +#endif /* JSONAPI_H */ diff --git a/src/include/utils/jsonb.h b/src/include/utils/jsonb.h index 411e158d6c..ea9dd17540 100644 --- a/src/include/utils/jsonb.h +++ b/src/include/utils/jsonb.h @@ -148,7 +148,7 @@ typedef uint32 JEntry; #define JENTRY_ISBOOL_FALSE 0x20000000 #define JENTRY_ISBOOL_TRUE 0x30000000 #define JENTRY_ISNULL 0x40000000 -#define JENTRY_ISCONTAINER 0x50000000 /* array or object */ +#define JENTRY_ISCONTAINER 0x50000000 /* array or object */ /* Access macros. Note possible multiple evaluations */ #define JBE_OFFLENFLD(je_) ((je_) & JENTRY_OFFLENMASK) @@ -200,8 +200,8 @@ typedef struct JsonbContainer } JsonbContainer; /* flags for the header-field in JsonbContainer */ -#define JB_CMASK 0x0FFFFFFF /* mask for count field */ -#define JB_FSCALAR 0x10000000 /* flag bits */ +#define JB_CMASK 0x0FFFFFFF /* mask for count field */ +#define JB_FSCALAR 0x10000000 /* flag bits */ #define JB_FOBJECT 0x20000000 #define JB_FARRAY 0x40000000 @@ -263,7 +263,7 @@ struct JsonbValue { int nElems; JsonbValue *elems; - bool rawScalar; /* Top-level "raw scalar" array? */ + bool rawScalar; /* Top-level "raw scalar" array? */ } array; /* Array container type */ struct @@ -378,4 +378,4 @@ extern char *JsonbToCStringIndent(StringInfo out, JsonbContainer *in, int estimated_len); -#endif /* __JSONB_H__ */ +#endif /* __JSONB_H__ */ diff --git a/src/include/utils/logtape.h b/src/include/utils/logtape.h index e802c4b213..a1e869b80c 100644 --- a/src/include/utils/logtape.h +++ b/src/include/utils/logtape.h @@ -43,4 +43,4 @@ extern void LogicalTapeTell(LogicalTapeSet *lts, int tapenum, long *blocknum, int *offset); extern long LogicalTapeSetBlocks(LogicalTapeSet *lts); -#endif /* LOGTAPE_H */ +#endif /* LOGTAPE_H */ diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index 93588df9f7..07208b56ce 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -183,4 +183,4 @@ extern Oid get_range_subtype(Oid rangeOid); #define TypeIsToastable(typid) (get_typstorage(typid) != 'p') -#endif /* LSYSCACHE_H */ +#endif /* LSYSCACHE_H */ diff --git a/src/include/utils/memdebug.h b/src/include/utils/memdebug.h index 206e6ce002..a73d505be8 100644 --- a/src/include/utils/memdebug.h +++ b/src/include/utils/memdebug.h @@ -43,7 +43,7 @@ wipe_mem(void *ptr, size_t size) VALGRIND_MAKE_MEM_NOACCESS(ptr, size); } -#endif /* CLOBBER_FREED_MEMORY */ +#endif /* CLOBBER_FREED_MEMORY */ #ifdef MEMORY_CONTEXT_CHECKING @@ -70,13 +70,13 @@ sentinel_ok(const void *base, Size offset) return ret; } -#endif /* MEMORY_CONTEXT_CHECKING */ +#endif /* MEMORY_CONTEXT_CHECKING */ #ifdef RANDOMIZE_ALLOCATED_MEMORY void randomize_mem(char *ptr, size_t size); -#endif /* RANDOMIZE_ALLOCATED_MEMORY */ +#endif /* RANDOMIZE_ALLOCATED_MEMORY */ -#endif /* MEMDEBUG_H */ +#endif /* MEMDEBUG_H */ diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h index 58e816d8e9..c553349066 100644 --- a/src/include/utils/memutils.h +++ b/src/include/utils/memutils.h @@ -37,7 +37,7 @@ * MemoryContextAllocHuge(). Both limits permit code to assume that it may * compute twice an allocation's size without overflow. */ -#define MaxAllocSize ((Size) 0x3fffffff) /* 1 gigabyte - 1 */ +#define MaxAllocSize ((Size) 0x3fffffff) /* 1 gigabyte - 1 */ #define AllocSizeIsValid(size) ((Size) (size) <= MaxAllocSize) @@ -194,4 +194,4 @@ extern MemoryContext SlabContextCreate(MemoryContext parent, #define SLAB_DEFAULT_BLOCK_SIZE (8 * 1024) #define SLAB_LARGE_BLOCK_SIZE (8 * 1024 * 1024) -#endif /* MEMUTILS_H */ +#endif /* MEMUTILS_H */ diff --git a/src/include/utils/nabstime.h b/src/include/utils/nabstime.h index 994b197af0..69133952d1 100644 --- a/src/include/utils/nabstime.h +++ b/src/include/utils/nabstime.h @@ -73,11 +73,11 @@ typedef TimeIntervalData *TimeInterval; * These were chosen as special 32-bit bit patterns, * so redefine them explicitly using these bit patterns. - tgl 97/02/24 */ -#define INVALID_ABSTIME ((AbsoluteTime) 0x7FFFFFFE) /* 2147483647 (2^31 - 1) */ -#define NOEND_ABSTIME ((AbsoluteTime) 0x7FFFFFFC) /* 2147483645 (2^31 - 3) */ -#define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN) /* -2147483648 */ +#define INVALID_ABSTIME ((AbsoluteTime) 0x7FFFFFFE) /* 2147483647 (2^31 - 1) */ +#define NOEND_ABSTIME ((AbsoluteTime) 0x7FFFFFFC) /* 2147483645 (2^31 - 3) */ +#define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN) /* -2147483648 */ -#define INVALID_RELTIME ((RelativeTime) 0x7FFFFFFE) /* 2147483647 (2^31 - 1) */ +#define INVALID_RELTIME ((RelativeTime) 0x7FFFFFFE) /* 2147483647 (2^31 - 1) */ #define AbsoluteTimeIsValid(time) \ ((bool) ((time) != INVALID_ABSTIME)) @@ -100,4 +100,4 @@ typedef TimeIntervalData *TimeInterval; extern AbsoluteTime GetCurrentAbsoluteTime(void); extern void abstime2tm(AbsoluteTime time, int *tzp, struct pg_tm *tm, char **tzn); -#endif /* NABSTIME_H */ +#endif /* NABSTIME_H */ diff --git a/src/include/utils/numeric.h b/src/include/utils/numeric.h index 0ab57d7025..3aa7fef947 100644 --- a/src/include/utils/numeric.h +++ b/src/include/utils/numeric.h @@ -61,4 +61,4 @@ int32 numeric_maximum_size(int32 typmod); extern char *numeric_out_sci(Numeric num, int scale); extern char *numeric_normalize(Numeric num); -#endif /* _PG_NUMERIC_H_ */ +#endif /* _PG_NUMERIC_H_ */ diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h index 2e07bd57ad..a7dc837724 100644 --- a/src/include/utils/palloc.h +++ b/src/include/utils/palloc.h @@ -113,7 +113,7 @@ MemoryContextSwitchTo(MemoryContext context) CurrentMemoryContext = context; return old; } -#endif /* FRONTEND */ +#endif /* FRONTEND */ /* Registration of memory context reset/delete callbacks */ extern void MemoryContextRegisterResetCallback(MemoryContext context, @@ -133,4 +133,4 @@ extern char *pchomp(const char *in); extern char *psprintf(const char *fmt,...) pg_attribute_printf(1, 2); extern size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list args) pg_attribute_printf(3, 0); -#endif /* PALLOC_H */ +#endif /* PALLOC_H */ diff --git a/src/include/utils/pg_crc.h b/src/include/utils/pg_crc.h index 2fe083850a..9ea0622321 100644 --- a/src/include/utils/pg_crc.h +++ b/src/include/utils/pg_crc.h @@ -104,4 +104,4 @@ do { \ */ extern PGDLLIMPORT const uint32 pg_crc32_table[256]; -#endif /* PG_CRC_H */ +#endif /* PG_CRC_H */ diff --git a/src/include/utils/pg_locale.h b/src/include/utils/pg_locale.h index f0acc86b88..5e3711f008 100644 --- a/src/include/utils/pg_locale.h +++ b/src/include/utils/pg_locale.h @@ -104,4 +104,4 @@ extern size_t char2wchar(wchar_t *to, size_t tolen, const char *from, size_t fromlen, pg_locale_t locale); #endif -#endif /* _PG_LOCALE_ */ +#endif /* _PG_LOCALE_ */ diff --git a/src/include/utils/pg_lsn.h b/src/include/utils/pg_lsn.h index 6f038e9e14..cc51b2a078 100644 --- a/src/include/utils/pg_lsn.h +++ b/src/include/utils/pg_lsn.h @@ -24,4 +24,4 @@ #define PG_GETARG_LSN(n) DatumGetLSN(PG_GETARG_DATUM(n)) #define PG_RETURN_LSN(x) return LSNGetDatum(x) -#endif /* PG_LSN_H */ +#endif /* PG_LSN_H */ diff --git a/src/include/utils/pg_rusage.h b/src/include/utils/pg_rusage.h index 48a74e90ba..cea51f0cb2 100644 --- a/src/include/utils/pg_rusage.h +++ b/src/include/utils/pg_rusage.h @@ -34,4 +34,4 @@ typedef struct PGRUsage extern void pg_rusage_init(PGRUsage *ru0); extern const char *pg_rusage_show(const PGRUsage *ru0); -#endif /* PG_RUSAGE_H */ +#endif /* PG_RUSAGE_H */ diff --git a/src/include/utils/plancache.h b/src/include/utils/plancache.h index a129f2c652..87fab19f3c 100644 --- a/src/include/utils/plancache.h +++ b/src/include/utils/plancache.h @@ -80,7 +80,7 @@ struct RawStmt; typedef struct CachedPlanSource { int magic; /* should equal CACHEDPLANSOURCE_MAGIC */ - struct RawStmt *raw_parse_tree; /* output of raw_parser(), or NULL */ + struct RawStmt *raw_parse_tree; /* output of raw_parser(), or NULL */ const char *query_string; /* source text of query */ const char *commandTag; /* command tag (a constant!), or NULL */ Oid *param_types; /* array of parameter type OIDs, or NULL */ @@ -95,11 +95,11 @@ typedef struct CachedPlanSource List *query_list; /* list of Query nodes, or NIL if not valid */ List *relationOids; /* OIDs of relations the queries depend on */ List *invalItems; /* other dependencies, as PlanInvalItems */ - struct OverrideSearchPath *search_path; /* search_path used for - * parsing and planning */ + struct OverrideSearchPath *search_path; /* search_path used for parsing + * and planning */ MemoryContext query_context; /* context holding the above, or NULL */ Oid rewriteRoleId; /* Role ID we did rewriting for */ - bool rewriteRowSecurity; /* row_security used during rewrite */ + bool rewriteRowSecurity; /* row_security used during rewrite */ bool dependsOnRLS; /* is rewritten query specific to the above? */ /* If we have a generic plan, this is a reference-counted link to it: */ struct CachedPlan *gplan; /* generic plan, or NULL if not valid */ @@ -110,11 +110,11 @@ typedef struct CachedPlanSource bool is_valid; /* is the query_list currently valid? */ int generation; /* increments each time we create a plan */ /* If CachedPlanSource has been saved, it is a member of a global list */ - struct CachedPlanSource *next_saved; /* list link, if so */ + struct CachedPlanSource *next_saved; /* list link, if so */ /* State kept to help decide whether to use custom or generic plans: */ double generic_cost; /* cost of generic plan, or -1 if not known */ - double total_custom_cost; /* total cost of custom plans so far */ - int num_custom_plans; /* number of plans included in total */ + double total_custom_cost; /* total cost of custom plans so far */ + int num_custom_plans; /* number of plans included in total */ } CachedPlanSource; /* @@ -182,4 +182,4 @@ extern CachedPlan *GetCachedPlan(CachedPlanSource *plansource, QueryEnvironment *queryEnv); extern void ReleaseCachedPlan(CachedPlan *plan, bool useResOwner); -#endif /* PLANCACHE_H */ +#endif /* PLANCACHE_H */ diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h index 887e599032..cb6f00081d 100644 --- a/src/include/utils/portal.h +++ b/src/include/utils/portal.h @@ -118,7 +118,7 @@ typedef struct PortalData const char *prepStmtName; /* source prepared statement (NULL if none) */ MemoryContext heap; /* subsidiary memory for portal */ ResourceOwner resowner; /* resources owned by portal */ - void (*cleanup) (Portal portal); /* cleanup hook */ + void (*cleanup) (Portal portal); /* cleanup hook */ /* * State data for remembering which subtransaction(s) the portal was @@ -127,8 +127,8 @@ typedef struct PortalData * createSubid is the creating subxact and activeSubid is the last subxact * in which we ran the portal. */ - SubTransactionId createSubid; /* the creating subxact */ - SubTransactionId activeSubid; /* the last subxact with activity */ + SubTransactionId createSubid; /* the creating subxact */ + SubTransactionId activeSubid; /* the last subxact with activity */ /* The query or queries the portal will execute */ const char *sourceText; /* text of query (as of 8.4, never NULL) */ @@ -238,4 +238,4 @@ extern void PortalCreateHoldStore(Portal portal); extern void PortalHashTableDeleteAll(void); extern bool ThereAreNoReadyPortals(void); -#endif /* PORTAL_H */ +#endif /* PORTAL_H */ diff --git a/src/include/utils/ps_status.h b/src/include/utils/ps_status.h index 3f503cc187..2ba5a0ea2e 100644 --- a/src/include/utils/ps_status.h +++ b/src/include/utils/ps_status.h @@ -23,4 +23,4 @@ extern void set_ps_display(const char *activity, bool force); extern const char *get_ps_display(int *displen); -#endif /* PS_STATUS_H */ +#endif /* PS_STATUS_H */ diff --git a/src/include/utils/queryenvironment.h b/src/include/utils/queryenvironment.h index 291b6fdbc2..08e6051b4e 100644 --- a/src/include/utils/queryenvironment.h +++ b/src/include/utils/queryenvironment.h @@ -71,4 +71,4 @@ extern void unregister_ENR(QueryEnvironment *queryEnv, const char *name); extern EphemeralNamedRelation get_ENR(QueryEnvironment *queryEnv, const char *name); extern TupleDesc ENRMetadataGetTupDesc(EphemeralNamedRelationMetadata enrmd); -#endif /* QUERYENVIRONMENT_H */ +#endif /* QUERYENVIRONMENT_H */ diff --git a/src/include/utils/rangetypes.h b/src/include/utils/rangetypes.h index fcc014adc2..5544889317 100644 --- a/src/include/utils/rangetypes.h +++ b/src/include/utils/rangetypes.h @@ -136,4 +136,4 @@ extern bool bounds_adjacent(TypeCacheEntry *typcache, RangeBound bound1, RangeBound bound2); extern RangeType *make_empty_range(TypeCacheEntry *typcache); -#endif /* RANGETYPES_H */ +#endif /* RANGETYPES_H */ diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 895232e16e..4bc61e5380 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -126,9 +126,9 @@ typedef struct RelationData bool rd_fkeyvalid; /* true if list has been computed */ MemoryContext rd_partkeycxt; /* private memory cxt for the below */ - struct PartitionKeyData *rd_partkey; /* partition key, or NULL */ + struct PartitionKeyData *rd_partkey; /* partition key, or NULL */ MemoryContext rd_pdcxt; /* private context for partdesc */ - struct PartitionDescData *rd_partdesc; /* partitions, or NULL */ + struct PartitionDescData *rd_partdesc; /* partitions, or NULL */ List *rd_partcheck; /* partition CHECK quals */ /* data managed by RelationGetIndexList: */ @@ -158,7 +158,7 @@ typedef struct RelationData /* These are non-NULL only for an index relation: */ Form_pg_index rd_index; /* pg_index tuple describing this index */ /* use "struct" here to avoid needing to include htup.h: */ - struct HeapTupleData *rd_indextuple; /* all of pg_index tuple */ + struct HeapTupleData *rd_indextuple; /* all of pg_index tuple */ /* * index access support info (used only for an index relation) @@ -178,7 +178,7 @@ typedef struct RelationData Oid rd_amhandler; /* OID of index AM's handler function */ MemoryContext rd_indexcxt; /* private memory cxt for this stuff */ /* use "struct" here to avoid needing to include amapi.h: */ - struct IndexAmRoutine *rd_amroutine; /* index AM's API struct */ + struct IndexAmRoutine *rd_amroutine; /* index AM's API struct */ Oid *rd_opfamily; /* OIDs of op families for each index col */ Oid *rd_opcintype; /* OIDs of opclass declared input data types */ RegProcedure *rd_support; /* OIDs of support procedures */ @@ -215,7 +215,7 @@ typedef struct RelationData Oid rd_toastoid; /* Real TOAST table's OID, or InvalidOid */ /* use "struct" here to avoid needing to include pgstat.h: */ - struct PgStat_TableStatus *pgstat_info; /* statistics collection area */ + struct PgStat_TableStatus *pgstat_info; /* statistics collection area */ } RelationData; @@ -241,8 +241,8 @@ typedef struct ForeignKeyCacheInfo int nkeys; /* number of columns in the foreign key */ /* these arrays each have nkeys valid entries: */ AttrNumber conkey[INDEX_MAX_KEYS]; /* cols in referencing table */ - AttrNumber confkey[INDEX_MAX_KEYS]; /* cols in referenced table */ - Oid conpfeqop[INDEX_MAX_KEYS]; /* PK = FK operator OIDs */ + AttrNumber confkey[INDEX_MAX_KEYS]; /* cols in referenced table */ + Oid conpfeqop[INDEX_MAX_KEYS]; /* PK = FK operator OIDs */ } ForeignKeyCacheInfo; @@ -278,9 +278,8 @@ typedef struct StdRdOptions int32 vl_len_; /* varlena header (do not touch directly!) */ int fillfactor; /* page fill factor in percent (0..100) */ AutoVacOpts autovacuum; /* autovacuum-related options */ - bool user_catalog_table; /* use as an additional catalog - * relation */ - int parallel_workers; /* max number of parallel workers */ + bool user_catalog_table; /* use as an additional catalog relation */ + int parallel_workers; /* max number of parallel workers */ } StdRdOptions; #define HEAP_MIN_FILLFACTOR 10 @@ -638,4 +637,4 @@ extern void RelationDecrementReferenceCount(Relation rel); extern bool RelationHasUnloggedIndex(Relation rel); extern List *RelationGetRepsetList(Relation rel); -#endif /* REL_H */ +#endif /* REL_H */ diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h index 81af3aebb8..3c53cefe4b 100644 --- a/src/include/utils/relcache.h +++ b/src/include/utils/relcache.h @@ -135,4 +135,4 @@ extern bool criticalRelcachesBuilt; /* should be used only by relcache.c and postinit.c */ extern bool criticalSharedRelcachesBuilt; -#endif /* RELCACHE_H */ +#endif /* RELCACHE_H */ diff --git a/src/include/utils/relfilenodemap.h b/src/include/utils/relfilenodemap.h index 0827ff3db8..b3ee555fb7 100644 --- a/src/include/utils/relfilenodemap.h +++ b/src/include/utils/relfilenodemap.h @@ -15,4 +15,4 @@ extern Oid RelidByRelfilenode(Oid reltablespace, Oid relfilenode); -#endif /* RELFILENODEMAP_H */ +#endif /* RELFILENODEMAP_H */ diff --git a/src/include/utils/relmapper.h b/src/include/utils/relmapper.h index 8fb2879ff9..7af69ba6cf 100644 --- a/src/include/utils/relmapper.h +++ b/src/include/utils/relmapper.h @@ -63,4 +63,4 @@ extern void relmap_redo(XLogReaderState *record); extern void relmap_desc(StringInfo buf, XLogReaderState *record); extern const char *relmap_identify(uint8 info); -#endif /* RELMAPPER_H */ +#endif /* RELMAPPER_H */ diff --git a/src/include/utils/relptr.h b/src/include/utils/relptr.h index 1e5e622150..06e592e0c6 100644 --- a/src/include/utils/relptr.h +++ b/src/include/utils/relptr.h @@ -74,4 +74,4 @@ #define relptr_copy(rp1, rp2) \ ((rp1).relptr_off = (rp2).relptr_off) -#endif /* RELPTR_H */ +#endif /* RELPTR_H */ diff --git a/src/include/utils/reltrigger.h b/src/include/utils/reltrigger.h index 65d6ecb30a..2169b0306b 100644 --- a/src/include/utils/reltrigger.h +++ b/src/include/utils/reltrigger.h @@ -77,4 +77,4 @@ typedef struct TriggerDesc bool trig_delete_old_table; } TriggerDesc; -#endif /* RELTRIGGER_H */ +#endif /* RELTRIGGER_H */ diff --git a/src/include/utils/resowner.h b/src/include/utils/resowner.h index bd9adb71d1..07d30d93bc 100644 --- a/src/include/utils/resowner.h +++ b/src/include/utils/resowner.h @@ -79,4 +79,4 @@ extern void RegisterResourceReleaseCallback(ResourceReleaseCallback callback, extern void UnregisterResourceReleaseCallback(ResourceReleaseCallback callback, void *arg); -#endif /* RESOWNER_H */ +#endif /* RESOWNER_H */ diff --git a/src/include/utils/resowner_private.h b/src/include/utils/resowner_private.h index 411d08ff0b..2420b651b3 100644 --- a/src/include/utils/resowner_private.h +++ b/src/include/utils/resowner_private.h @@ -88,4 +88,4 @@ extern void ResourceOwnerRememberDSM(ResourceOwner owner, extern void ResourceOwnerForgetDSM(ResourceOwner owner, dsm_segment *); -#endif /* RESOWNER_PRIVATE_H */ +#endif /* RESOWNER_PRIVATE_H */ diff --git a/src/include/utils/rls.h b/src/include/utils/rls.h index fa2c44e160..f9780ad0c0 100644 --- a/src/include/utils/rls.h +++ b/src/include/utils/rls.h @@ -47,4 +47,4 @@ enum CheckEnableRlsResult extern int check_enable_rls(Oid relid, Oid checkAsUser, bool noError); -#endif /* RLS_H */ +#endif /* RLS_H */ diff --git a/src/include/utils/ruleutils.h b/src/include/utils/ruleutils.h index 42fc872c4a..a2206cb7cd 100644 --- a/src/include/utils/ruleutils.h +++ b/src/include/utils/ruleutils.h @@ -34,4 +34,4 @@ extern List *select_rtable_names_for_explain(List *rtable, Bitmapset *rels_used); extern char *generate_collation_name(Oid collid); -#endif /* RULEUTILS_H */ +#endif /* RULEUTILS_H */ diff --git a/src/include/utils/sampling.h b/src/include/utils/sampling.h index 7edfc4a44d..f566e0b866 100644 --- a/src/include/utils/sampling.h +++ b/src/include/utils/sampling.h @@ -32,7 +32,7 @@ typedef struct int n; /* desired sample size */ BlockNumber t; /* current block number */ int m; /* blocks selected so far */ - SamplerRandomState randstate; /* random generator state */ + SamplerRandomState randstate; /* random generator state */ } BlockSamplerData; typedef BlockSamplerData *BlockSampler; @@ -47,7 +47,7 @@ extern BlockNumber BlockSampler_Next(BlockSampler bs); typedef struct { double W; - SamplerRandomState randstate; /* random generator state */ + SamplerRandomState randstate; /* random generator state */ } ReservoirStateData; typedef ReservoirStateData *ReservoirState; @@ -62,4 +62,4 @@ extern double anl_random_fract(void); extern double anl_init_selection_state(int n); extern double anl_get_next_S(double t, int n, double *stateptr); -#endif /* SAMPLING_H */ +#endif /* SAMPLING_H */ diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h index d89a6e0e90..c7fdd540e8 100644 --- a/src/include/utils/selfuncs.h +++ b/src/include/utils/selfuncs.h @@ -126,10 +126,10 @@ typedef struct typedef struct { /* These are the values the cost estimator must return to the planner */ - Cost indexStartupCost; /* index-related startup cost */ + Cost indexStartupCost; /* index-related startup cost */ Cost indexTotalCost; /* total index-related scan cost */ - Selectivity indexSelectivity; /* selectivity of index */ - double indexCorrelation; /* order correlation of index */ + Selectivity indexSelectivity; /* selectivity of index */ + double indexCorrelation; /* order correlation of index */ /* Intermediate values we obtain along the way */ double numIndexPages; /* number of leaf pages visited */ @@ -222,4 +222,4 @@ extern Selectivity scalararraysel_containment(PlannerInfo *root, Oid elemtype, bool isEquality, bool useOr, int varRelid); -#endif /* SELFUNCS_H */ +#endif /* SELFUNCS_H */ diff --git a/src/include/utils/snapmgr.h b/src/include/utils/snapmgr.h index 2a3f8eca34..fc64153780 100644 --- a/src/include/utils/snapmgr.h +++ b/src/include/utils/snapmgr.h @@ -110,4 +110,4 @@ extern void SerializeSnapshot(Snapshot snapshot, char *start_address); extern Snapshot RestoreSnapshot(char *start_address); extern void RestoreTransactionSnapshot(Snapshot snapshot, void *master_pgproc); -#endif /* SNAPMGR_H */ +#endif /* SNAPMGR_H */ diff --git a/src/include/utils/snapshot.h b/src/include/utils/snapshot.h index d996049d11..074cc81864 100644 --- a/src/include/utils/snapshot.h +++ b/src/include/utils/snapshot.h @@ -126,4 +126,4 @@ typedef enum HeapTupleWouldBlock /* can be returned by heap_tuple_lock */ } HTSU_Result; -#endif /* SNAPSHOT_H */ +#endif /* SNAPSHOT_H */ diff --git a/src/include/utils/sortsupport.h b/src/include/utils/sortsupport.h index 9ca8fe86ae..6e8444b4ff 100644 --- a/src/include/utils/sortsupport.h +++ b/src/include/utils/sortsupport.h @@ -72,7 +72,7 @@ typedef struct SortSupportData * sort support functions. */ bool ssup_reverse; /* descending-order sort? */ - bool ssup_nulls_first; /* sort nulls first? */ + bool ssup_nulls_first; /* sort nulls first? */ /* * These fields are workspace for callers, and should not be touched by @@ -274,4 +274,4 @@ extern void PrepareSortSupportFromOrderingOp(Oid orderingOp, SortSupport ssup); extern void PrepareSortSupportFromIndexRel(Relation indexRel, int16 strategy, SortSupport ssup); -#endif /* SORTSUPPORT_H */ +#endif /* SORTSUPPORT_H */ diff --git a/src/include/utils/spccache.h b/src/include/utils/spccache.h index 26f88da0b2..7c45bb11eb 100644 --- a/src/include/utils/spccache.h +++ b/src/include/utils/spccache.h @@ -17,4 +17,4 @@ void get_tablespace_page_costs(Oid spcid, float8 *spc_random_page_cost, float8 *spc_seq_page_cost); int get_tablespace_io_concurrency(Oid spcid); -#endif /* SPCCACHE_H */ +#endif /* SPCCACHE_H */ diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h index 246601c90d..8352b40f4e 100644 --- a/src/include/utils/syscache.h +++ b/src/include/utils/syscache.h @@ -209,4 +209,4 @@ extern bool RelationSupportsSysCache(Oid relid); #define ReleaseSysCacheList(x) ReleaseCatCacheList(x) -#endif /* SYSCACHE_H */ +#endif /* SYSCACHE_H */ diff --git a/src/include/utils/timeout.h b/src/include/utils/timeout.h index aa816334c0..5a2efc0dd9 100644 --- a/src/include/utils/timeout.h +++ b/src/include/utils/timeout.h @@ -84,4 +84,4 @@ extern bool get_timeout_indicator(TimeoutId id, bool reset_indicator); extern TimestampTz get_timeout_start_time(TimeoutId id); extern TimestampTz get_timeout_finish_time(TimeoutId id); -#endif /* TIMEOUT_H */ +#endif /* TIMEOUT_H */ diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h index c15850445e..3f2d31dec8 100644 --- a/src/include/utils/timestamp.h +++ b/src/include/utils/timestamp.h @@ -104,4 +104,4 @@ extern int date2isoweek(int year, int mon, int mday); extern int date2isoyear(int year, int mon, int mday); extern int date2isoyearday(int year, int mon, int mday); -#endif /* TIMESTAMP_H */ +#endif /* TIMESTAMP_H */ diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h index f39f21bb64..036d9898d6 100644 --- a/src/include/utils/tqual.h +++ b/src/include/utils/tqual.h @@ -51,7 +51,7 @@ typedef enum HEAPTUPLE_DEAD, /* tuple is dead and deletable */ HEAPTUPLE_LIVE, /* tuple is live (committed, no deleter) */ HEAPTUPLE_RECENTLY_DEAD, /* tuple is dead, but not deletable yet */ - HEAPTUPLE_INSERT_IN_PROGRESS, /* inserting xact is still in progress */ + HEAPTUPLE_INSERT_IN_PROGRESS, /* inserting xact is still in progress */ HEAPTUPLE_DELETE_IN_PROGRESS /* deleting xact is still in progress */ } HTSV_Result; @@ -109,4 +109,4 @@ extern bool ResolveCminCmaxDuringDecoding(struct HTAB *tuplecid_data, (snapshotdata).lsn = (l), \ (snapshotdata).whenTaken = (w)) -#endif /* TQUAL_H */ +#endif /* TQUAL_H */ diff --git a/src/include/utils/tuplesort.h b/src/include/utils/tuplesort.h index 14b9026fb7..28c168a801 100644 --- a/src/include/utils/tuplesort.h +++ b/src/include/utils/tuplesort.h @@ -123,4 +123,4 @@ extern void tuplesort_rescan(Tuplesortstate *state); extern void tuplesort_markpos(Tuplesortstate *state); extern void tuplesort_restorepos(Tuplesortstate *state); -#endif /* TUPLESORT_H */ +#endif /* TUPLESORT_H */ diff --git a/src/include/utils/tuplestore.h b/src/include/utils/tuplestore.h index b31ede882b..7f4e1e318f 100644 --- a/src/include/utils/tuplestore.h +++ b/src/include/utils/tuplestore.h @@ -88,4 +88,4 @@ extern void tuplestore_clear(Tuplestorestate *state); extern void tuplestore_end(Tuplestorestate *state); -#endif /* TUPLESTORE_H */ +#endif /* TUPLESTORE_H */ diff --git a/src/include/utils/typcache.h b/src/include/utils/typcache.h index 1bf94e2548..c12631dafe 100644 --- a/src/include/utils/typcache.h +++ b/src/include/utils/typcache.h @@ -83,9 +83,9 @@ typedef struct TypeCacheEntry */ struct TypeCacheEntry *rngelemtype; /* range's element type */ Oid rng_collation; /* collation for comparisons, if any */ - FmgrInfo rng_cmp_proc_finfo; /* comparison function */ + FmgrInfo rng_cmp_proc_finfo; /* comparison function */ FmgrInfo rng_canonical_finfo; /* canonicalization function, if any */ - FmgrInfo rng_subdiff_finfo; /* difference function, if any */ + FmgrInfo rng_subdiff_finfo; /* difference function, if any */ /* * Domain constraint data if it's a domain type. NULL if not domain, or @@ -136,7 +136,7 @@ typedef struct DomainConstraintRef /* Management data --- treat these fields as private to typcache.c */ DomainConstraintCache *dcc; /* current constraints, or NULL if none */ - MemoryContextCallback callback; /* used to release refcount when done */ + MemoryContextCallback callback; /* used to release refcount when done */ } DomainConstraintRef; @@ -160,4 +160,4 @@ extern void assign_record_type_typmod(TupleDesc tupDesc); extern int compare_values_of_enum(TypeCacheEntry *tcache, Oid arg1, Oid arg2); -#endif /* TYPCACHE_H */ +#endif /* TYPCACHE_H */ diff --git a/src/include/utils/tzparser.h b/src/include/utils/tzparser.h index c22467de1a..1e444e1159 100644 --- a/src/include/utils/tzparser.h +++ b/src/include/utils/tzparser.h @@ -36,4 +36,4 @@ typedef struct tzEntry extern TimeZoneAbbrevTable *load_tzoffsets(const char *filename); -#endif /* TZPARSER_H */ +#endif /* TZPARSER_H */ diff --git a/src/include/utils/uuid.h b/src/include/utils/uuid.h index 9e62d81c3d..ed3ec28959 100644 --- a/src/include/utils/uuid.h +++ b/src/include/utils/uuid.h @@ -28,4 +28,4 @@ typedef struct pg_uuid_t #define DatumGetUUIDP(X) ((pg_uuid_t *) DatumGetPointer(X)) #define PG_GETARG_UUID_P(X) DatumGetUUIDP(PG_GETARG_DATUM(X)) -#endif /* UUID_H */ +#endif /* UUID_H */ diff --git a/src/include/utils/xml.h b/src/include/utils/xml.h index fd3a3fba01..e6fa0e2051 100644 --- a/src/include/utils/xml.h +++ b/src/include/utils/xml.h @@ -40,7 +40,7 @@ typedef enum { PG_XML_STRICTNESS_LEGACY, /* ignore errors unless function result * indicates error condition */ - PG_XML_STRICTNESS_WELLFORMED, /* ignore non-parser messages */ + PG_XML_STRICTNESS_WELLFORMED, /* ignore non-parser messages */ PG_XML_STRICTNESS_ALL /* report all notices/warnings/errors */ } PgXmlStrictness; @@ -81,4 +81,4 @@ extern int xmloption; /* XmlOptionType, but int for guc enum */ extern const TableFuncRoutine XmlTableRoutine; -#endif /* XML_H */ +#endif /* XML_H */ diff --git a/src/include/windowapi.h b/src/include/windowapi.h index 481ebe06cf..0aa23ef2f5 100644 --- a/src/include/windowapi.h +++ b/src/include/windowapi.h @@ -61,4 +61,4 @@ extern Datum WinGetFuncArgInFrame(WindowObject winobj, int argno, extern Datum WinGetFuncArgCurrent(WindowObject winobj, int argno, bool *isnull); -#endif /* WINDOWAPI_H */ +#endif /* WINDOWAPI_H */ diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index 499a4c1780..b80e1d4c5b 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -187,7 +187,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, case ECPGt_unsigned_long_long: *((long long int *) (ind + ind_offset * act_tuple)) = value_for_indicator; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_NO_INDICATOR: if (value_for_indicator == -1) { @@ -275,7 +275,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, case ECPGt_unsigned_long_long: *((long long int *) (ind + ind_offset * act_tuple)) = size; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ default: break; } @@ -369,7 +369,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, pval = scan_length; break; -#endif /* HAVE_STRTOLL */ +#endif /* HAVE_STRTOLL */ #ifdef HAVE_STRTOULL case ECPGt_unsigned_long_long: *((unsigned long long int *) (var + offset * act_tuple)) = strtoull(pval, &scan_length, 10); @@ -381,8 +381,8 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, pval = scan_length; break; -#endif /* HAVE_STRTOULL */ -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_STRTOULL */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_float: case ECPGt_double: @@ -496,7 +496,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, case ECPGt_unsigned_long_long: *((long long int *) (ind + ind_offset * act_tuple)) = size; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ default: break; } @@ -541,7 +541,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, case ECPGt_unsigned_long_long: *((long long int *) (ind + ind_offset * act_tuple)) = variable->len; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ default: break; } diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c index 1baa3ed175..1fa00b892f 100644 --- a/src/interfaces/ecpg/ecpglib/descriptor.c +++ b/src/interfaces/ecpg/ecpglib/descriptor.c @@ -141,7 +141,7 @@ get_int_item(int lineno, void *var, enum ECPGttype vartype, int value) case ECPGt_unsigned_long_long: *(unsigned long long int *) var = (unsigned long long int) value; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_float: *(float *) var = (float) value; break; @@ -186,7 +186,7 @@ set_int_item(int lineno, int *target, const void *var, enum ECPGttype vartype) case ECPGt_unsigned_long_long: *target = *(const unsigned long long int *) var; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_float: *target = *(const float *) var; break; @@ -753,7 +753,7 @@ descriptor_deallocate_all(struct descriptor *list) list = next; } } -#endif /* ENABLE_THREAD_SAFETY */ +#endif /* ENABLE_THREAD_SAFETY */ bool ECPGallocate_desc(int line, const char *name) @@ -855,7 +855,7 @@ ECPGdescribe(int line, int compat, bool input, const char *connection_name, cons /* rest of variable parameters */ ptr = va_arg(args, void *); - (void) va_arg(args, long); /* skip args */ + (void) va_arg(args, long); /* skip args */ (void) va_arg(args, long); (void) va_arg(args, long); diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index 3c4cc74c31..92b74f432c 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -364,7 +364,7 @@ ecpg_store_result(const PGresult *results, int act_field, /* special mode for handling char**foo=0 */ for (act_tuple = 0; act_tuple < ntuples; act_tuple++) len += strlen(PQgetvalue(results, act_tuple, act_field)) + 1; - len *= var->offset; /* should be 1, but YMNK */ + len *= var->offset; /* should be 1, but YMNK */ len += (ntuples + 1) * sizeof(char *); } else @@ -534,7 +534,7 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari if (*(long long int *) var->ind_value < (long long) 0) *tobeinserted_p = NULL; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_NO_INDICATOR: if (force_indicator == false) { @@ -704,7 +704,7 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari *tobeinserted_p = mallocedval; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_float: if (!(mallocedval = ecpg_alloc(asize * 25, lineno))) return false; @@ -1361,8 +1361,8 @@ ecpg_build_params(struct statement *stmt) if (stmt->command[position] == '?') { /* yes, replace with new style */ - int buffersize = sizeof(int) * CHAR_BIT * 10 / 3; /* a rough guess of the - * size we need */ + int buffersize = sizeof(int) * CHAR_BIT * 10 / 3; /* a rough guess of the + * size we need */ if (!(tobeinserted = (char *) ecpg_alloc(buffersize, stmt->lineno))) { diff --git a/src/interfaces/ecpg/ecpglib/extern.h b/src/interfaces/ecpg/ecpglib/extern.h index 2040bc163e..94810c07b7 100644 --- a/src/interfaces/ecpg/ecpglib/extern.h +++ b/src/interfaces/ecpg/ecpglib/extern.h @@ -220,4 +220,4 @@ void ecpg_set_native_sqlda(int, struct sqlda_struct **, const PGresult *, int, #define ECPG_SQLSTATE_ECPG_INTERNAL_ERROR "YE000" #define ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY "YE001" -#endif /* _ECPG_LIB_EXTERN_H */ +#endif /* _ECPG_LIB_EXTERN_H */ diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c index f8ad5d733c..edd7302d54 100644 --- a/src/interfaces/ecpg/ecpglib/misc.c +++ b/src/interfaces/ecpg/ecpglib/misc.c @@ -23,9 +23,9 @@ #define LONG_LONG_MIN LLONG_MIN #else #define LONG_LONG_MIN LONGLONG_MIN -#endif /* LLONG_MIN */ -#endif /* LONG_LONG_MIN */ -#endif /* HAVE_LONG_LONG_INT */ +#endif /* LLONG_MIN */ +#endif /* LONG_LONG_MIN */ +#endif /* HAVE_LONG_LONG_INT */ bool ecpg_internal_regression_mode = false; @@ -344,7 +344,7 @@ ECPGset_noind_null(enum ECPGttype type, void *ptr) case ECPGt_unsigned_long_long: *((long long *) ptr) = LONG_LONG_MIN; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_float: memset((char *) ptr, 0xff, sizeof(float)); break; @@ -417,7 +417,7 @@ ECPGis_noind_null(enum ECPGttype type, void *ptr) if (*((long long *) ptr) == LONG_LONG_MIN) return true; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_float: return (_check(ptr, sizeof(float))); break; @@ -481,8 +481,8 @@ win32_pthread_once(volatile pthread_once_t *once, void (*fn) (void)) pthread_mutex_unlock(&win32_pthread_once_lock); } } -#endif /* ENABLE_THREAD_SAFETY */ -#endif /* WIN32 */ +#endif /* ENABLE_THREAD_SAFETY */ +#endif /* WIN32 */ #ifdef ENABLE_NLS @@ -516,7 +516,7 @@ ecpg_gettext(const char *msgid) return dgettext(PG_TEXTDOMAIN("ecpglib"), msgid); } -#endif /* ENABLE_NLS */ +#endif /* ENABLE_NLS */ struct var_list *ivlist = NULL; diff --git a/src/interfaces/ecpg/ecpglib/pg_type.h b/src/interfaces/ecpg/ecpglib/pg_type.h index 48ae480129..94d2d9287b 100644 --- a/src/interfaces/ecpg/ecpglib/pg_type.h +++ b/src/interfaces/ecpg/ecpglib/pg_type.h @@ -76,4 +76,4 @@ #define JSONBOID 3802 #define INT4RANGEOID 3904 -#endif /* PG_TYPE_H */ +#endif /* PG_TYPE_H */ diff --git a/src/interfaces/ecpg/ecpglib/prepare.c b/src/interfaces/ecpg/ecpglib/prepare.c index e26ab3532f..f05d0c0dc4 100644 --- a/src/interfaces/ecpg/ecpglib/prepare.c +++ b/src/interfaces/ecpg/ecpglib/prepare.c @@ -23,8 +23,8 @@ typedef struct } stmtCacheEntry; static int nextStmtID = 1; -static const int stmtCacheNBuckets = 2039; /* # buckets - a prime # */ -static const int stmtCacheEntPerBucket = 8; /* # entries/bucket */ +static const int stmtCacheNBuckets = 2039; /* # buckets - a prime # */ +static const int stmtCacheEntPerBucket = 8; /* # entries/bucket */ static stmtCacheEntry stmtCacheEntries[16384] = {{0, {0}, 0, 0, 0}}; static bool deallocate_one(int lineno, enum COMPAT_MODE c, struct connection *con, @@ -380,7 +380,7 @@ SearchStmtCache(const char *ecpgQuery) * OR negative error code */ static int -ecpg_freeStmtCacheEntry(int lineno, int compat, int entNo) /* entry # to free */ +ecpg_freeStmtCacheEntry(int lineno, int compat, int entNo) /* entry # to free */ { stmtCacheEntry *entry; struct connection *con; @@ -416,7 +416,7 @@ ecpg_freeStmtCacheEntry(int lineno, int compat, int entNo) /* entry # to free * */ static int AddStmtToCache(int lineno, /* line # of statement */ - const char *stmtID, /* statement ID */ + const char *stmtID, /* statement ID */ const char *connection, /* connection */ int compat, /* compatibility level */ const char *ecpgQuery) /* query */ diff --git a/src/interfaces/ecpg/ecpglib/typename.c b/src/interfaces/ecpg/ecpglib/typename.c index f90279cf81..48587e49c7 100644 --- a/src/interfaces/ecpg/ecpglib/typename.c +++ b/src/interfaces/ecpg/ecpglib/typename.c @@ -75,19 +75,19 @@ ecpg_dynamic_type(Oid type) case BOOLOID: return SQL3_BOOLEAN; /* bool */ case INT2OID: - return SQL3_SMALLINT; /* int2 */ + return SQL3_SMALLINT; /* int2 */ case INT4OID: return SQL3_INTEGER; /* int4 */ case TEXTOID: - return SQL3_CHARACTER; /* text */ + return SQL3_CHARACTER; /* text */ case FLOAT4OID: return SQL3_REAL; /* float4 */ case FLOAT8OID: - return SQL3_DOUBLE_PRECISION; /* float8 */ + return SQL3_DOUBLE_PRECISION; /* float8 */ case BPCHAROID: - return SQL3_CHARACTER; /* bpchar */ + return SQL3_CHARACTER; /* bpchar */ case VARCHAROID: - return SQL3_CHARACTER_VARYING; /* varchar */ + return SQL3_CHARACTER_VARYING; /* varchar */ case DATEOID: return SQL3_DATE_TIME_TIMESTAMP; /* date */ case TIMEOID: diff --git a/src/interfaces/ecpg/include/datetime.h b/src/interfaces/ecpg/include/datetime.h index 9394a129f1..44b24227e5 100644 --- a/src/interfaces/ecpg/include/datetime.h +++ b/src/interfaces/ecpg/include/datetime.h @@ -9,6 +9,6 @@ #ifndef _ECPGLIB_H typedef timestamp dtime_t; typedef interval intrvl_t; -#endif /* ndef _ECPGLIB_H */ +#endif /* ndef _ECPGLIB_H */ -#endif /* ndef _ECPG_DATETIME_H */ +#endif /* ndef _ECPG_DATETIME_H */ diff --git a/src/interfaces/ecpg/include/decimal.h b/src/interfaces/ecpg/include/decimal.h index 11b02de8ae..6ac2962530 100644 --- a/src/interfaces/ecpg/include/decimal.h +++ b/src/interfaces/ecpg/include/decimal.h @@ -8,6 +8,6 @@ /* source created by ecpg which defines this */ #ifndef _ECPGLIB_H typedef decimal dec_t; -#endif /* ndef _ECPGLIB_H */ +#endif /* ndef _ECPGLIB_H */ -#endif /* ndef _ECPG_DECIMAL_H */ +#endif /* ndef _ECPG_DECIMAL_H */ diff --git a/src/interfaces/ecpg/include/ecpg-pthread-win32.h b/src/interfaces/ecpg/include/ecpg-pthread-win32.h index 7e59357a38..33c897b633 100644 --- a/src/interfaces/ecpg/include/ecpg-pthread-win32.h +++ b/src/interfaces/ecpg/include/ecpg-pthread-win32.h @@ -52,7 +52,7 @@ void win32_pthread_once(volatile pthread_once_t *once, void (*fn) (void)); if (!*(once)) \ win32_pthread_once((once), (fn)); \ } while(0) -#endif /* WIN32 */ -#endif /* ENABLE_THREAD_SAFETY */ +#endif /* WIN32 */ +#endif /* ENABLE_THREAD_SAFETY */ -#endif /* _ECPG_PTHREAD_WIN32_H */ +#endif /* _ECPG_PTHREAD_WIN32_H */ diff --git a/src/interfaces/ecpg/include/ecpg_informix.h b/src/interfaces/ecpg/include/ecpg_informix.h index c3c847d854..dd6258152a 100644 --- a/src/interfaces/ecpg/include/ecpg_informix.h +++ b/src/interfaces/ecpg/include/ecpg_informix.h @@ -87,4 +87,4 @@ extern int dtcvfmtasc(char *, char *, timestamp *); } #endif -#endif /* ndef _ECPG_INFORMIX_H */ +#endif /* ndef _ECPG_INFORMIX_H */ diff --git a/src/interfaces/ecpg/include/ecpgerrno.h b/src/interfaces/ecpg/include/ecpgerrno.h index 36b15b7a61..c4bc526463 100644 --- a/src/interfaces/ecpg/include/ecpgerrno.h +++ b/src/interfaces/ecpg/include/ecpgerrno.h @@ -76,4 +76,4 @@ /* WARNING: BlankPortalAssignName: portal * already exists */ #define ECPG_WARNING_PORTAL_EXISTS -605 -#endif /* !_ECPG_ERRNO_H */ +#endif /* !_ECPG_ERRNO_H */ diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h index 755fdaaf0c..536b7506ff 100644 --- a/src/interfaces/ecpg/include/ecpglib.h +++ b/src/interfaces/ecpg/include/ecpglib.h @@ -21,23 +21,23 @@ extern char *ecpg_gettext(const char *msgid) pg_attribute_format_arg(1); #ifndef __cplusplus #ifndef bool #define bool char -#endif /* ndef bool */ +#endif /* ndef bool */ #ifndef true #define true ((bool) 1) -#endif /* ndef true */ +#endif /* ndef true */ #ifndef false #define false ((bool) 0) -#endif /* ndef false */ -#endif /* not C++ */ +#endif /* ndef false */ +#endif /* not C++ */ #ifndef TRUE #define TRUE 1 -#endif /* TRUE */ +#endif /* TRUE */ #ifndef FALSE #define FALSE 0 -#endif /* FALSE */ +#endif /* FALSE */ #ifdef __cplusplus extern "C" @@ -97,4 +97,4 @@ void ecpg_pthreads_init(void); } #endif -#endif /* _ECPGLIB_H */ +#endif /* _ECPGLIB_H */ diff --git a/src/interfaces/ecpg/include/ecpgtype.h b/src/interfaces/ecpg/include/ecpgtype.h index 236d028154..38fb3b6eaf 100644 --- a/src/interfaces/ecpg/include/ecpgtype.h +++ b/src/interfaces/ecpg/include/ecpgtype.h @@ -103,4 +103,4 @@ enum ECPG_statement_type } #endif -#endif /* _ECPGTYPE_H */ +#endif /* _ECPGTYPE_H */ diff --git a/src/interfaces/ecpg/include/pgtypes_date.h b/src/interfaces/ecpg/include/pgtypes_date.h index 463cf769a7..3d1a181b2b 100644 --- a/src/interfaces/ecpg/include/pgtypes_date.h +++ b/src/interfaces/ecpg/include/pgtypes_date.h @@ -28,4 +28,4 @@ extern int PGTYPESdate_fmt_asc(date, const char *, char *); } #endif -#endif /* PGTYPES_DATETIME */ +#endif /* PGTYPES_DATETIME */ diff --git a/src/interfaces/ecpg/include/pgtypes_interval.h b/src/interfaces/ecpg/include/pgtypes_interval.h index e1b089d862..5747736fe1 100644 --- a/src/interfaces/ecpg/include/pgtypes_interval.h +++ b/src/interfaces/ecpg/include/pgtypes_interval.h @@ -21,7 +21,7 @@ typedef long long int int64; #endif #define HAVE_INT64_TIMESTAMP -#endif /* C_H */ +#endif /* C_H */ typedef struct { @@ -44,4 +44,4 @@ extern int PGTYPESinterval_copy(interval *, interval *); } #endif -#endif /* PGTYPES_INTERVAL */ +#endif /* PGTYPES_INTERVAL */ diff --git a/src/interfaces/ecpg/include/pgtypes_numeric.h b/src/interfaces/ecpg/include/pgtypes_numeric.h index 38b8fdcc4b..56c46ea272 100644 --- a/src/interfaces/ecpg/include/pgtypes_numeric.h +++ b/src/interfaces/ecpg/include/pgtypes_numeric.h @@ -31,7 +31,7 @@ typedef struct int rscale; /* result scale */ int dscale; /* display scale */ int sign; /* NUMERIC_POS, NUMERIC_NEG, or NUMERIC_NAN */ - NumericDigit digits[DECSIZE]; /* decimal digits */ + NumericDigit digits[DECSIZE]; /* decimal digits */ } decimal; #ifdef __cplusplus @@ -64,4 +64,4 @@ int PGTYPESnumeric_from_decimal(decimal *, numeric *); } #endif -#endif /* PGTYPES_NUMERIC */ +#endif /* PGTYPES_NUMERIC */ diff --git a/src/interfaces/ecpg/include/pgtypes_timestamp.h b/src/interfaces/ecpg/include/pgtypes_timestamp.h index 9d185f21fe..283ecca25e 100644 --- a/src/interfaces/ecpg/include/pgtypes_timestamp.h +++ b/src/interfaces/ecpg/include/pgtypes_timestamp.h @@ -27,4 +27,4 @@ extern int PGTYPEStimestamp_sub_interval(timestamp * tin, interval * span, times } #endif -#endif /* PGTYPES_TIMESTAMP */ +#endif /* PGTYPES_TIMESTAMP */ diff --git a/src/interfaces/ecpg/include/sql3types.h b/src/interfaces/ecpg/include/sql3types.h index b9db452dac..644b616cf8 100644 --- a/src/interfaces/ecpg/include/sql3types.h +++ b/src/interfaces/ecpg/include/sql3types.h @@ -40,4 +40,4 @@ enum * standard) */ }; -#endif /* !_ECPG_SQL3TYPES_H */ +#endif /* !_ECPG_SQL3TYPES_H */ diff --git a/src/interfaces/ecpg/include/sqlca.h b/src/interfaces/ecpg/include/sqlca.h index b4ab93fa3b..c5f107dd33 100644 --- a/src/interfaces/ecpg/include/sqlca.h +++ b/src/interfaces/ecpg/include/sqlca.h @@ -6,8 +6,8 @@ #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/ecpg/include/sqlda-compat.h b/src/interfaces/ecpg/include/sqlda-compat.h index 2c4e07c5f1..7393182aa9 100644 --- a/src/interfaces/ecpg/include/sqlda-compat.h +++ b/src/interfaces/ecpg/include/sqlda-compat.h @@ -40,8 +40,8 @@ struct sqlda_compat struct sqlvar_compat *sqlvar; char desc_name[19]; /* descriptor name */ short desc_occ; /* size of sqlda structure */ - struct sqlda_compat *desc_next; /* pointer to next sqlda struct */ + struct sqlda_compat *desc_next; /* pointer to next sqlda struct */ void *reserved; /* reserved for future use */ }; -#endif /* ECPG_SQLDA_COMPAT_H */ +#endif /* ECPG_SQLDA_COMPAT_H */ diff --git a/src/interfaces/ecpg/include/sqlda-native.h b/src/interfaces/ecpg/include/sqlda-native.h index acb314cd17..67d3c7b4e4 100644 --- a/src/interfaces/ecpg/include/sqlda-native.h +++ b/src/interfaces/ecpg/include/sqlda-native.h @@ -40,4 +40,4 @@ struct sqlda_struct struct sqlvar_struct sqlvar[1]; }; -#endif /* ECPG_SQLDA_NATIVE_H */ +#endif /* ECPG_SQLDA_NATIVE_H */ diff --git a/src/interfaces/ecpg/include/sqlda.h b/src/interfaces/ecpg/include/sqlda.h index c265beb66c..d810e739e2 100644 --- a/src/interfaces/ecpg/include/sqlda.h +++ b/src/interfaces/ecpg/include/sqlda.h @@ -15,4 +15,4 @@ typedef struct sqlda_struct sqlda_t; #endif -#endif /* ECPG_SQLDA_H */ +#endif /* ECPG_SQLDA_H */ diff --git a/src/interfaces/ecpg/include/sqltypes.h b/src/interfaces/ecpg/include/sqltypes.h index 797cb5b1be..e7cbfa4795 100644 --- a/src/interfaces/ecpg/include/sqltypes.h +++ b/src/interfaces/ecpg/include/sqltypes.h @@ -54,4 +54,4 @@ #define SQLSERIAL8 ECPGt_long #endif -#endif /* ndef ECPG_SQLTYPES_H */ +#endif /* ndef ECPG_SQLTYPES_H */ diff --git a/src/interfaces/ecpg/pgtypeslib/datetime.c b/src/interfaces/ecpg/pgtypeslib/datetime.c index 2a93eb6857..33c9011a71 100644 --- a/src/interfaces/ecpg/pgtypeslib/datetime.c +++ b/src/interfaces/ecpg/pgtypeslib/datetime.c @@ -156,8 +156,8 @@ PGTYPESdate_today(date * d) return; } -#define PGTYPES_DATE_NUM_MAX_DIGITS 20 /* should suffice for most - * years... */ +#define PGTYPES_DATE_NUM_MAX_DIGITS 20 /* should suffice for most + * years... */ #define PGTYPES_FMTDATE_DAY_DIGITS_LZ 1 /* LZ means "leading zeroes" */ #define PGTYPES_FMTDATE_DOW_LITERAL_SHORT 2 diff --git a/src/interfaces/ecpg/pgtypeslib/dt.h b/src/interfaces/ecpg/pgtypeslib/dt.h index f70181380b..5a192ddc45 100644 --- a/src/interfaces/ecpg/pgtypeslib/dt.h +++ b/src/interfaces/ecpg/pgtypeslib/dt.h @@ -338,4 +338,4 @@ extern char *months[]; extern char *days[]; extern int day_tab[2][13]; -#endif /* DT_H */ +#endif /* DT_H */ diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c index a88e1b94ab..9bbe5c501b 100644 --- a/src/interfaces/ecpg/pgtypeslib/dt_common.c +++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c @@ -30,7 +30,7 @@ static datetkn datetktbl[] = { {"ahst", TZ, -36000}, /* Alaska-Hawaii Std Time */ {"akdt", DTZ, -28800}, /* Alaska Daylight Time */ {"akst", DTZ, -32400}, /* Alaska Standard Time */ - {"allballs", RESERV, DTK_ZULU}, /* 00:00:00 */ + {"allballs", RESERV, DTK_ZULU}, /* 00:00:00 */ {"almst", TZ, 25200}, /* Almaty Savings Time */ {"almt", TZ, 21600}, /* Almaty Time */ {"am", AMPM, AM}, @@ -201,12 +201,12 @@ static datetkn datetktbl[] = { idt /* Israeli, Iran, Indian Daylight Time */ #endif {LATE, RESERV, DTK_LATE}, /* "infinity" reserved for "late time" */ - {INVALID, RESERV, DTK_INVALID}, /* "invalid" reserved for bad time */ + {INVALID, RESERV, DTK_INVALID}, /* "invalid" reserved for bad time */ {"iot", TZ, 18000}, /* Indian Chagos Time */ {"irkst", DTZ, 32400}, /* Irkutsk Summer Time */ {"irkt", TZ, 28800}, /* Irkutsk Time */ {"irt", TZ, 12600}, /* Iran Time */ - {"isodow", UNITS, DTK_ISODOW}, /* ISO day of week, Sunday == 7 */ + {"isodow", UNITS, DTK_ISODOW}, /* ISO day of week, Sunday == 7 */ #if 0 isst #endif @@ -425,33 +425,33 @@ static datetkn deltatktbl[] = { {"@", IGNORE_DTF, 0}, /* postgres relative prefix */ {DAGO, AGO, 0}, /* "ago" indicates negative time offset */ {"c", UNITS, DTK_CENTURY}, /* "century" relative */ - {"cent", UNITS, DTK_CENTURY}, /* "century" relative */ + {"cent", UNITS, DTK_CENTURY}, /* "century" relative */ {"centuries", UNITS, DTK_CENTURY}, /* "centuries" relative */ - {DCENTURY, UNITS, DTK_CENTURY}, /* "century" relative */ + {DCENTURY, UNITS, DTK_CENTURY}, /* "century" relative */ {"d", UNITS, DTK_DAY}, /* "day" relative */ {DDAY, UNITS, DTK_DAY}, /* "day" relative */ {"days", UNITS, DTK_DAY}, /* "days" relative */ {"dec", UNITS, DTK_DECADE}, /* "decade" relative */ - {DDECADE, UNITS, DTK_DECADE}, /* "decade" relative */ - {"decades", UNITS, DTK_DECADE}, /* "decades" relative */ + {DDECADE, UNITS, DTK_DECADE}, /* "decade" relative */ + {"decades", UNITS, DTK_DECADE}, /* "decades" relative */ {"decs", UNITS, DTK_DECADE}, /* "decades" relative */ {"h", UNITS, DTK_HOUR}, /* "hour" relative */ {DHOUR, UNITS, DTK_HOUR}, /* "hour" relative */ {"hours", UNITS, DTK_HOUR}, /* "hours" relative */ {"hr", UNITS, DTK_HOUR}, /* "hour" relative */ {"hrs", UNITS, DTK_HOUR}, /* "hours" relative */ - {INVALID, RESERV, DTK_INVALID}, /* reserved for invalid time */ + {INVALID, RESERV, DTK_INVALID}, /* reserved for invalid time */ {"m", UNITS, DTK_MINUTE}, /* "minute" relative */ - {"microsecon", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ - {"mil", UNITS, DTK_MILLENNIUM}, /* "millennium" relative */ - {"millennia", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */ - {DMILLENNIUM, UNITS, DTK_MILLENNIUM}, /* "millennium" relative */ - {"millisecon", UNITS, DTK_MILLISEC}, /* relative */ + {"microsecon", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ + {"mil", UNITS, DTK_MILLENNIUM}, /* "millennium" relative */ + {"millennia", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */ + {DMILLENNIUM, UNITS, DTK_MILLENNIUM}, /* "millennium" relative */ + {"millisecon", UNITS, DTK_MILLISEC}, /* relative */ {"mils", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */ {"min", UNITS, DTK_MINUTE}, /* "minute" relative */ {"mins", UNITS, DTK_MINUTE}, /* "minutes" relative */ - {DMINUTE, UNITS, DTK_MINUTE}, /* "minute" relative */ - {"minutes", UNITS, DTK_MINUTE}, /* "minutes" relative */ + {DMINUTE, UNITS, DTK_MINUTE}, /* "minute" relative */ + {"minutes", UNITS, DTK_MINUTE}, /* "minutes" relative */ {"mon", UNITS, DTK_MONTH}, /* "months" relative */ {"mons", UNITS, DTK_MONTH}, /* "months" relative */ {DMONTH, UNITS, DTK_MONTH}, /* "month" relative */ @@ -462,7 +462,7 @@ static datetkn deltatktbl[] = { {"mseconds", UNITS, DTK_MILLISEC}, {"msecs", UNITS, DTK_MILLISEC}, {"qtr", UNITS, DTK_QUARTER}, /* "quarter" relative */ - {DQUARTER, UNITS, DTK_QUARTER}, /* "quarter" relative */ + {DQUARTER, UNITS, DTK_QUARTER}, /* "quarter" relative */ {"s", UNITS, DTK_SECOND}, {"sec", UNITS, DTK_SECOND}, {DSECOND, UNITS, DTK_SECOND}, @@ -470,13 +470,13 @@ static datetkn deltatktbl[] = { {"secs", UNITS, DTK_SECOND}, {DTIMEZONE, UNITS, DTK_TZ}, /* "timezone" time offset */ {"timezone_h", UNITS, DTK_TZ_HOUR}, /* timezone hour units */ - {"timezone_m", UNITS, DTK_TZ_MINUTE}, /* timezone minutes units */ + {"timezone_m", UNITS, DTK_TZ_MINUTE}, /* timezone minutes units */ {"undefined", RESERV, DTK_INVALID}, /* pre-v6.1 invalid time */ {"us", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ - {"usec", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ + {"usec", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ {DMICROSEC, UNITS, DTK_MICROSEC}, /* "microsecond" relative */ {"useconds", UNITS, DTK_MICROSEC}, /* "microseconds" relative */ - {"usecs", UNITS, DTK_MICROSEC}, /* "microseconds" relative */ + {"usecs", UNITS, DTK_MICROSEC}, /* "microseconds" relative */ {"w", UNITS, DTK_WEEK}, /* "week" relative */ {DWEEK, UNITS, DTK_WEEK}, /* "week" relative */ {"weeks", UNITS, DTK_WEEK}, /* "weeks" relative */ diff --git a/src/interfaces/ecpg/pgtypeslib/extern.h b/src/interfaces/ecpg/pgtypeslib/extern.h index 88b2fb0775..9df800ea1d 100644 --- a/src/interfaces/ecpg/pgtypeslib/extern.h +++ b/src/interfaces/ecpg/pgtypeslib/extern.h @@ -11,13 +11,12 @@ #define PGTYPES_TYPE_STRING_MALLOCED 1 #define PGTYPES_TYPE_STRING_CONSTANT 2 #define PGTYPES_TYPE_CHAR 3 -#define PGTYPES_TYPE_DOUBLE_NF 4 /* no fractional part */ +#define PGTYPES_TYPE_DOUBLE_NF 4 /* no fractional part */ #define PGTYPES_TYPE_INT64 5 #define PGTYPES_TYPE_UINT 6 -#define PGTYPES_TYPE_UINT_2_LZ 7 /* 2 digits, pad with leading - * zero */ -#define PGTYPES_TYPE_UINT_2_LS 8 /* 2 digits, pad with leading - * space */ +#define PGTYPES_TYPE_UINT_2_LZ 7 /* 2 digits, pad with leading zero */ +#define PGTYPES_TYPE_UINT_2_LS 8 /* 2 digits, pad with leading + * space */ #define PGTYPES_TYPE_UINT_3_LZ 9 #define PGTYPES_TYPE_UINT_4_LZ 10 #define PGTYPES_TYPE_UINT_LONG 11 @@ -41,14 +40,14 @@ char *pgtypes_strdup(const char *); #ifndef bool #define bool char -#endif /* ndef bool */ +#endif /* ndef bool */ #ifndef FALSE #define FALSE 0 -#endif /* FALSE */ +#endif /* FALSE */ #ifndef TRUE #define TRUE 1 -#endif /* TRUE */ +#endif /* TRUE */ -#endif /* __PGTYPES_COMMON_H__ */ +#endif /* __PGTYPES_COMMON_H__ */ diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c index 4a740d159d..30f2ccbcb7 100644 --- a/src/interfaces/ecpg/pgtypeslib/interval.c +++ b/src/interfaces/ecpg/pgtypeslib/interval.c @@ -335,7 +335,7 @@ DecodeISO8601Interval(char *str, * * Assert wasn't available so removed it. */ int -DecodeInterval(char **field, int *ftype, int nf, /* int range, */ +DecodeInterval(char **field, int *ftype, int nf, /* int range, */ int *dtype, struct /* pg_ */ tm *tm, fsec_t *fsec) { int IntervalStyle = INTSTYLE_POSTGRES_VERBOSE; diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c index 4b4df9dfc6..78931399e6 100644 --- a/src/interfaces/ecpg/pgtypeslib/timestamp.c +++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c @@ -152,7 +152,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **t tm->tm_gmtoff = tx->tm_gmtoff; tm->tm_zone = tx->tm_zone; - *tzp = -tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */ + *tzp = -tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */ if (tzn != NULL) *tzn = tm->tm_zone; #elif defined(HAVE_INT_TIMEZONE) diff --git a/src/interfaces/ecpg/preproc/extern.h b/src/interfaces/ecpg/preproc/extern.h index 07d8311806..2c35426b7f 100644 --- a/src/interfaces/ecpg/preproc/extern.h +++ b/src/interfaces/ecpg/preproc/extern.h @@ -128,4 +128,4 @@ extern enum COMPAT_MODE compat; #define INFORMIX_MODE (compat == ECPG_COMPAT_INFORMIX || compat == ECPG_COMPAT_INFORMIX_SE) -#endif /* _ECPG_PREPROC_EXTERN_H */ +#endif /* _ECPG_PREPROC_EXTERN_H */ diff --git a/src/interfaces/ecpg/preproc/output.c b/src/interfaces/ecpg/preproc/output.c index 7cdded53db..0479c93c99 100644 --- a/src/interfaces/ecpg/preproc/output.c +++ b/src/interfaces/ecpg/preproc/output.c @@ -228,8 +228,8 @@ output_escaped_str(char *str, bool quoted) j++; } while (str[j] == ' ' || str[j] == '\t'); - if ((str[j] != '\n') && (str[j] != '\r' || str[j + 1] != '\n')) /* not followed by a - * newline */ + if ((str[j] != '\n') && (str[j] != '\r' || str[j + 1] != '\n')) /* not followed by a + * newline */ fputs("\\\\", base_yyout); } else if (str[i] == '\r' && str[i + 1] == '\n') diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c index 4ed822b8bb..0d240d9df4 100644 --- a/src/interfaces/ecpg/preproc/type.c +++ b/src/interfaces/ecpg/preproc/type.c @@ -178,7 +178,7 @@ get_type(enum ECPGttype type) case ECPGt_NO_INDICATOR: /* no indicator */ return ("ECPGt_NO_INDICATOR"); break; - case ECPGt_char_variable: /* string that should not be quoted */ + case ECPGt_char_variable: /* string that should not be quoted */ return ("ECPGt_char_variable"); break; case ECPGt_const: /* constant string quoted */ diff --git a/src/interfaces/ecpg/preproc/type.h b/src/interfaces/ecpg/preproc/type.h index cd0d1da8c4..4b93336480 100644 --- a/src/interfaces/ecpg/preproc/type.h +++ b/src/interfaces/ecpg/preproc/type.h @@ -25,10 +25,9 @@ struct ECPGtype * string */ union { - struct ECPGtype *element; /* For an array this is the type of - * the element */ - struct ECPGstruct_member *members; /* A pointer to a list of - * members. */ + struct ECPGtype *element; /* For an array this is the type of the + * element */ + struct ECPGstruct_member *members; /* A pointer to a list of members. */ } u; int counter; }; @@ -195,4 +194,4 @@ struct fetch_desc char *name; }; -#endif /* _ECPG_PREPROC_TYPE_H */ +#endif /* _ECPG_PREPROC_TYPE_H */ diff --git a/src/interfaces/ecpg/test/expected/compat_informix-describe.c b/src/interfaces/ecpg/test/expected/compat_informix-describe.c index d1632e280c..1b5aae0df7 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-describe.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-describe.c @@ -41,7 +41,7 @@ typedef struct sqlda_struct sqlda_t; #endif -#endif /* ECPG_SQLDA_H */ +#endif /* ECPG_SQLDA_H */ #line 5 "describe.pgc" diff --git a/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c index 1f316fbd7c..1df87f83ef 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c @@ -43,7 +43,7 @@ typedef struct sqlda_struct sqlda_t; #endif -#endif /* ECPG_SQLDA_H */ +#endif /* ECPG_SQLDA_H */ #line 7 "sqlda.pgc" @@ -105,7 +105,7 @@ typedef struct sqlda_struct sqlda_t; #define SQLSERIAL8 ECPGt_long #endif -#endif /* ndef ECPG_SQLTYPES_H */ +#endif /* ndef ECPG_SQLTYPES_H */ #line 8 "sqlda.pgc" diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c index 98246f4734..4e372a5799 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c @@ -23,8 +23,8 @@ #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/ecpg/test/expected/preproc-init.c b/src/interfaces/ecpg/test/expected/preproc-init.c index 6ca8d55901..ca23d348d6 100644 --- a/src/interfaces/ecpg/test/expected/preproc-init.c +++ b/src/interfaces/ecpg/test/expected/preproc-init.c @@ -17,8 +17,8 @@ #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/ecpg/test/expected/preproc-outofscope.c b/src/interfaces/ecpg/test/expected/preproc-outofscope.c index 70809c450d..b3deb221d7 100644 --- a/src/interfaces/ecpg/test/expected/preproc-outofscope.c +++ b/src/interfaces/ecpg/test/expected/preproc-outofscope.c @@ -58,7 +58,7 @@ typedef struct int rscale; /* result scale */ int dscale; /* display scale */ int sign; /* NUMERIC_POS, NUMERIC_NEG, or NUMERIC_NAN */ - NumericDigit digits[DECSIZE]; /* decimal digits */ + NumericDigit digits[DECSIZE]; /* decimal digits */ } decimal; #ifdef __cplusplus @@ -91,7 +91,7 @@ int PGTYPESnumeric_from_decimal(decimal *, numeric *); } #endif -#endif /* PGTYPES_NUMERIC */ +#endif /* PGTYPES_NUMERIC */ #line 8 "outofscope.pgc" diff --git a/src/interfaces/ecpg/test/expected/sql-array.c b/src/interfaces/ecpg/test/expected/sql-array.c index 4b0a0418f7..781c426771 100644 --- a/src/interfaces/ecpg/test/expected/sql-array.c +++ b/src/interfaces/ecpg/test/expected/sql-array.c @@ -30,8 +30,8 @@ #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/ecpg/test/expected/sql-code100.c b/src/interfaces/ecpg/test/expected/sql-code100.c index 4338f7ed2d..4c85530a17 100644 --- a/src/interfaces/ecpg/test/expected/sql-code100.c +++ b/src/interfaces/ecpg/test/expected/sql-code100.c @@ -17,8 +17,8 @@ #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/ecpg/test/expected/sql-copystdout.c b/src/interfaces/ecpg/test/expected/sql-copystdout.c index a1e7595873..d2599fb0e9 100644 --- a/src/interfaces/ecpg/test/expected/sql-copystdout.c +++ b/src/interfaces/ecpg/test/expected/sql-copystdout.c @@ -19,8 +19,8 @@ #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/ecpg/test/expected/sql-define.c b/src/interfaces/ecpg/test/expected/sql-define.c index 9c9931f443..29583ecd74 100644 --- a/src/interfaces/ecpg/test/expected/sql-define.c +++ b/src/interfaces/ecpg/test/expected/sql-define.c @@ -17,8 +17,8 @@ #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/ecpg/test/expected/sql-describe.c b/src/interfaces/ecpg/test/expected/sql-describe.c index b5e2d7427f..155e206f29 100644 --- a/src/interfaces/ecpg/test/expected/sql-describe.c +++ b/src/interfaces/ecpg/test/expected/sql-describe.c @@ -39,7 +39,7 @@ typedef struct sqlda_struct sqlda_t; #endif -#endif /* ECPG_SQLDA_H */ +#endif /* ECPG_SQLDA_H */ #line 5 "describe.pgc" diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc.c b/src/interfaces/ecpg/test/expected/sql-dynalloc.c index d2051e6996..a95dddf15d 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc.c +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc.c @@ -18,8 +18,8 @@ #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc2.c b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c index 2d25149cbb..711857706a 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc2.c +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c @@ -18,8 +18,8 @@ #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/ecpg/test/expected/sql-dyntest.c b/src/interfaces/ecpg/test/expected/sql-dyntest.c index ea0d859bd7..513d44c630 100644 --- a/src/interfaces/ecpg/test/expected/sql-dyntest.c +++ b/src/interfaces/ecpg/test/expected/sql-dyntest.c @@ -57,7 +57,7 @@ enum * standard) */ }; -#endif /* !_ECPG_SQL3TYPES_H */ +#endif /* !_ECPG_SQL3TYPES_H */ #line 7 "dyntest.pgc" @@ -71,8 +71,8 @@ enum #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/ecpg/test/expected/sql-indicators.c b/src/interfaces/ecpg/test/expected/sql-indicators.c index 454fba0dba..7cf43ad622 100644 --- a/src/interfaces/ecpg/test/expected/sql-indicators.c +++ b/src/interfaces/ecpg/test/expected/sql-indicators.c @@ -19,8 +19,8 @@ #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.c b/src/interfaces/ecpg/test/expected/sql-sqlda.c index b6c35ab1a3..15c81c6b12 100644 --- a/src/interfaces/ecpg/test/expected/sql-sqlda.c +++ b/src/interfaces/ecpg/test/expected/sql-sqlda.c @@ -41,7 +41,7 @@ typedef struct sqlda_struct sqlda_t; #endif -#endif /* ECPG_SQLDA_H */ +#endif /* ECPG_SQLDA_H */ #line 7 "sqlda.pgc" @@ -80,7 +80,7 @@ typedef struct int rscale; /* result scale */ int dscale; /* display scale */ int sign; /* NUMERIC_POS, NUMERIC_NEG, or NUMERIC_NAN */ - NumericDigit digits[DECSIZE]; /* decimal digits */ + NumericDigit digits[DECSIZE]; /* decimal digits */ } decimal; #ifdef __cplusplus @@ -113,7 +113,7 @@ int PGTYPESnumeric_from_decimal(decimal *, numeric *); } #endif -#endif /* PGTYPES_NUMERIC */ +#endif /* PGTYPES_NUMERIC */ #line 8 "sqlda.pgc" diff --git a/src/interfaces/ecpg/test/expected/thread-alloc.c b/src/interfaces/ecpg/test/expected/thread-alloc.c index 57ef2bcc63..9f8ac59430 100644 --- a/src/interfaces/ecpg/test/expected/thread-alloc.c +++ b/src/interfaces/ecpg/test/expected/thread-alloc.c @@ -40,8 +40,8 @@ main(void) #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/ecpg/test/expected/thread-descriptor.c b/src/interfaces/ecpg/test/expected/thread-descriptor.c index 50a7a31da4..607df7ce24 100644 --- a/src/interfaces/ecpg/test/expected/thread-descriptor.c +++ b/src/interfaces/ecpg/test/expected/thread-descriptor.c @@ -31,8 +31,8 @@ #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/ecpg/test/expected/thread-prep.c b/src/interfaces/ecpg/test/expected/thread-prep.c index 382e214879..72ca568151 100644 --- a/src/interfaces/ecpg/test/expected/thread-prep.c +++ b/src/interfaces/ecpg/test/expected/thread-prep.c @@ -40,8 +40,8 @@ main(void) #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index 181eeea835..92c289b9e8 100644 --- a/src/interfaces/libpq/fe-auth.c +++ b/src/interfaces/libpq/fe-auth.c @@ -251,7 +251,7 @@ pg_GSS_startup(PGconn *conn, int payloadlen) return pg_GSS_continue(conn, payloadlen); } -#endif /* ENABLE_GSS */ +#endif /* ENABLE_GSS */ #ifdef ENABLE_SSPI @@ -477,7 +477,7 @@ pg_SSPI_startup(PGconn *conn, int use_negotiate, int payloadlen) return pg_SSPI_continue(conn, payloadlen); } -#endif /* ENABLE_SSPI */ +#endif /* ENABLE_SSPI */ /* * Initialize SASL authentication exchange. @@ -901,7 +901,7 @@ pg_fe_sendauth(AuthRequest areq, int payloadlen, PGconn *conn) printfPQExpBuffer(&conn->errorMessage, libpq_gettext("GSSAPI authentication not supported\n")); return STATUS_ERROR; -#endif /* defined(ENABLE_GSS) || defined(ENABLE_SSPI) */ +#endif /* defined(ENABLE_GSS) || defined(ENABLE_SSPI) */ #ifdef ENABLE_SSPI case AUTH_REQ_SSPI: @@ -933,8 +933,8 @@ pg_fe_sendauth(AuthRequest areq, int payloadlen, PGconn *conn) printfPQExpBuffer(&conn->errorMessage, libpq_gettext("SSPI authentication not supported\n")); return STATUS_ERROR; -#endif /* !define(ENABLE_GSSAPI) */ -#endif /* ENABLE_SSPI */ +#endif /* !define(ENABLE_GSSAPI) */ +#endif /* ENABLE_SSPI */ case AUTH_REQ_CRYPT: diff --git a/src/interfaces/libpq/fe-auth.h b/src/interfaces/libpq/fe-auth.h index 9f4c2a50d8..5dc6bb5341 100644 --- a/src/interfaces/libpq/fe-auth.h +++ b/src/interfaces/libpq/fe-auth.h @@ -30,4 +30,4 @@ extern void pg_fe_scram_exchange(void *opaq, char *input, int inputlen, bool *done, bool *success, PQExpBuffer errorMessage); extern char *pg_fe_scram_build_verifier(const char *password); -#endif /* FE_AUTH_H */ +#endif /* FE_AUTH_H */ diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 3d5966586d..c6d17ed921 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -184,7 +184,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = { offsetof(struct pg_conn, pgpassfile)}, {"connect_timeout", "PGCONNECT_TIMEOUT", NULL, NULL, - "Connect-timeout", "", 10, /* strlen(INT32_MAX) == 10 */ + "Connect-timeout", "", 10, /* strlen(INT32_MAX) == 10 */ offsetof(struct pg_conn, connect_timeout)}, {"dbname", "PGDATABASE", NULL, NULL, @@ -236,7 +236,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = { offsetof(struct pg_conn, keepalives_idle)}, {"keepalives_interval", NULL, NULL, NULL, - "TCP-Keepalives-Interval", "", 10, /* strlen(INT32_MAX) == 10 */ + "TCP-Keepalives-Interval", "", 10, /* strlen(INT32_MAX) == 10 */ offsetof(struct pg_conn, keepalives_interval)}, {"keepalives_count", NULL, NULL, NULL, @@ -1369,7 +1369,7 @@ connectFailureMessage(PGconn *conn, int errorno) service); } else -#endif /* HAVE_UNIX_SOCKETS */ +#endif /* HAVE_UNIX_SOCKETS */ { char host_addr[NI_MAXHOST]; const char *displayed_host; @@ -1608,8 +1608,8 @@ setKeepalivesWin32(PGconn *conn) } return 1; } -#endif /* SIO_KEEPALIVE_VALS */ -#endif /* WIN32 */ +#endif /* SIO_KEEPALIVE_VALS */ +#endif /* WIN32 */ /* ---------- * connectDBStart - @@ -2086,7 +2086,7 @@ keep_going: /* We will come back to here until there is conn->addr_cur = addr_cur->ai_next; continue; } -#endif /* F_SETFD */ +#endif /* F_SETFD */ if (!IS_AF_UNIX(addr_cur->ai_family)) { @@ -2124,8 +2124,8 @@ keep_going: /* We will come back to here until there is #ifdef SIO_KEEPALIVE_VALS else if (!setKeepalivesWin32(conn)) err = 1; -#endif /* SIO_KEEPALIVE_VALS */ -#endif /* WIN32 */ +#endif /* SIO_KEEPALIVE_VALS */ +#endif /* WIN32 */ if (err) { @@ -2163,7 +2163,7 @@ keep_going: /* We will come back to here until there is conn->sigpipe_flag = true; #else conn->sigpipe_flag = false; -#endif /* MSG_NOSIGNAL */ +#endif /* MSG_NOSIGNAL */ #ifdef SO_NOSIGPIPE optval = 1; @@ -2173,7 +2173,7 @@ keep_going: /* We will come back to here until there is conn->sigpipe_so = true; conn->sigpipe_flag = false; } -#endif /* SO_NOSIGPIPE */ +#endif /* SO_NOSIGPIPE */ /* * Start/make connection. This should not block, since we @@ -2357,7 +2357,7 @@ keep_going: /* We will come back to here until there is goto error_return; } } -#endif /* HAVE_UNIX_SOCKETS */ +#endif /* HAVE_UNIX_SOCKETS */ #ifdef USE_SSL @@ -2394,7 +2394,7 @@ keep_going: /* We will come back to here until there is conn->status = CONNECTION_SSL_STARTUP; return PGRES_POLLING_READING; } -#endif /* USE_SSL */ +#endif /* USE_SSL */ /* * Build the startup packet. @@ -2559,7 +2559,7 @@ keep_going: /* We will come back to here until there is #else /* !USE_SSL */ /* can't get here */ goto error_return; -#endif /* USE_SSL */ +#endif /* USE_SSL */ } /* @@ -2962,11 +2962,11 @@ keep_going: /* We will come back to here until there is case PGRES_POLLING_OK: /* Success */ break; - case PGRES_POLLING_READING: /* Still going */ + case PGRES_POLLING_READING: /* Still going */ conn->status = CONNECTION_SETENV; return PGRES_POLLING_READING; - case PGRES_POLLING_WRITING: /* Still going */ + case PGRES_POLLING_WRITING: /* Still going */ conn->status = CONNECTION_SETENV; return PGRES_POLLING_WRITING; @@ -3510,8 +3510,7 @@ closePGconn(PGconn *conn) * Close the connection, reset all transient state, flush I/O buffers. */ pqDropConnection(conn, true); - conn->status = CONNECTION_BAD; /* Well, not really _bad_ - just - * absent */ + conn->status = CONNECTION_BAD; /* Well, not really _bad_ - just absent */ conn->asyncStatus = PGASYNC_IDLE; pqClearAsyncResult(conn); /* deallocate result */ resetPQExpBuffer(&conn->errorMessage); @@ -4158,7 +4157,7 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options, ldap_unbind(ld); return 3; } -#endif /* WIN32 */ +#endif /* WIN32 */ /* search */ res = NULL; @@ -4383,7 +4382,7 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options, return 0; } -#endif /* USE_LDAP */ +#endif /* USE_LDAP */ #define MAXBUFSIZE 256 @@ -5412,7 +5411,7 @@ conninfo_uri_parse_options(PQconninfoOption *options, const char *uri, if (prevchar == ':') { - const char *port = ++p; /* advance past host terminator */ + const char *port = ++p; /* advance past host terminator */ while (*p && *p != '/' && *p != '?' && *p != ',') ++p; @@ -5444,7 +5443,7 @@ conninfo_uri_parse_options(PQconninfoOption *options, const char *uri, if (prevchar && prevchar != '?') { - const char *dbname = ++p; /* advance past host terminator */ + const char *dbname = ++p; /* advance past host terminator */ /* Look for query parameters */ while (*p && *p != '?') diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index 4391d8c05b..e825e6b757 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -125,7 +125,7 @@ static int check_field_number(const PGresult *res, int field_num); */ #define PGRESULT_DATA_BLOCKSIZE 2048 -#define PGRESULT_ALIGN_BOUNDARY MAXIMUM_ALIGNOF /* from configure */ +#define PGRESULT_ALIGN_BOUNDARY MAXIMUM_ALIGNOF /* from configure */ #define PGRESULT_BLOCK_OVERHEAD Max(sizeof(PGresult_data), PGRESULT_ALIGN_BOUNDARY) #define PGRESULT_SEP_ALLOC_THRESHOLD (PGRESULT_DATA_BLOCKSIZE / 2) @@ -3026,7 +3026,7 @@ PQcmdTuples(PGresult *res) while (*p && *p != ' ') p++; if (*p == 0) - goto interpret_error; /* no space? */ + goto interpret_error; /* no space? */ p++; } else if (strncmp(res->cmdStatus, "SELECT ", 7) == 0 || diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index 1d6ea93a0a..c8fd1af750 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -814,7 +814,7 @@ definitelyEOF: definitelyFailed: /* Do *not* drop any already-read data; caller still wants it */ pqDropConnection(conn, false); - conn->status = CONNECTION_BAD; /* No more connection to backend */ + conn->status = CONNECTION_BAD; /* No more connection to backend */ return -1; } @@ -1165,7 +1165,7 @@ pqSocketPoll(int sock, int forRead, int forWrite, time_t end_time) return select(sock + 1, &input_mask, &output_mask, &except_mask, ptr_timeout); -#endif /* HAVE_POLL */ +#endif /* HAVE_POLL */ } @@ -1259,4 +1259,4 @@ libpq_ngettext(const char *msgid, const char *msgid_plural, unsigned long n) return dngettext(PG_TEXTDOMAIN("libpq"), msgid, msgid_plural, n); } -#endif /* ENABLE_NLS */ +#endif /* ENABLE_NLS */ diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c index d7a7414901..7e319eabe0 100644 --- a/src/interfaces/libpq/fe-print.c +++ b/src/interfaces/libpq/fe-print.c @@ -177,7 +177,7 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po) (1 + (po->standard != 0)) >= screen_size.ws_row - (po->header != 0) * (total_line_length / screen_size.ws_col + 1) * 2 - - (po->header != 0) * 2 /* row count and newline */ + - (po->header != 0) * 2 /* row count and newline */ ))) { fout = popen(pagerenv, "w"); @@ -190,8 +190,8 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po) sigpipe_masked = true; #else oldsigpipehandler = pqsignal(SIGPIPE, SIG_IGN); -#endif /* ENABLE_THREAD_SAFETY */ -#endif /* WIN32 */ +#endif /* ENABLE_THREAD_SAFETY */ +#endif /* WIN32 */ } else fout = stdout; @@ -313,8 +313,8 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po) pq_reset_sigpipe(&osigset, sigpipe_pending, true); #else pqsignal(SIGPIPE, oldsigpipehandler); -#endif /* ENABLE_THREAD_SAFETY */ -#endif /* WIN32 */ +#endif /* ENABLE_THREAD_SAFETY */ +#endif /* WIN32 */ } if (po->html3 && !po->expanded) fputs("\n", fout); diff --git a/src/interfaces/libpq/fe-protocol2.c b/src/interfaces/libpq/fe-protocol2.c index 3b0500fa52..af4ae9f937 100644 --- a/src/interfaces/libpq/fe-protocol2.c +++ b/src/interfaces/libpq/fe-protocol2.c @@ -1099,7 +1099,7 @@ checkXactStatus(PGconn *conn, const char *cmdTag) * However, if we see one of these tags then we know for sure the server * is in abort state ... */ - else if (strcmp(cmdTag, "*ABORT STATE*") == 0) /* pre-7.3 only */ + else if (strcmp(cmdTag, "*ABORT STATE*") == 0) /* pre-7.3 only */ conn->xactStatus = PQTRANS_INERROR; } @@ -1526,7 +1526,7 @@ pqFunctionCall2(PGconn *conn, Oid fnid, conn)) continue; } - if (pqGetc(&id, conn)) /* get the last '0' */ + if (pqGetc(&id, conn)) /* get the last '0' */ continue; } if (id == '0') diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c index 53776e27b5..92f1a00f3f 100644 --- a/src/interfaces/libpq/fe-protocol3.c +++ b/src/interfaces/libpq/fe-protocol3.c @@ -458,7 +458,7 @@ handleSyncLoss(PGconn *conn, char id, int msgLength) conn->asyncStatus = PGASYNC_READY; /* drop out of GetResult wait loop */ /* flush input data since we're giving up on processing it */ pqDropConnection(conn, true); - conn->status = CONNECTION_BAD; /* No more connection to backend */ + conn->status = CONNECTION_BAD; /* No more connection to backend */ } /* @@ -1679,7 +1679,7 @@ pqGetCopyData3(PGconn *conn, char **buffer, int async) return -2; } memcpy(*buffer, &conn->inBuffer[conn->inCursor], msgLength); - (*buffer)[msgLength] = '\0'; /* Add terminating null */ + (*buffer)[msgLength] = '\0'; /* Add terminating null */ /* Mark message consumed */ conn->inStart = conn->inCursor + msgLength; @@ -1915,8 +1915,8 @@ pqFunctionCall3(PGconn *conn, Oid fnid, if (pqPutMsgStart('F', false, conn) < 0 || /* function call msg */ pqPutInt(fnid, 4, conn) < 0 || /* function id */ - pqPutInt(1, 2, conn) < 0 || /* # of format codes */ - pqPutInt(1, 2, conn) < 0 || /* format code: BINARY */ + pqPutInt(1, 2, conn) < 0 || /* # of format codes */ + pqPutInt(1, 2, conn) < 0 || /* format code: BINARY */ pqPutInt(nargs, 2, conn) < 0) /* # of args */ { pqHandleSendFailure(conn); @@ -1951,7 +1951,7 @@ pqFunctionCall3(PGconn *conn, Oid fnid, } } - if (pqPutInt(1, 2, conn) < 0) /* result format code: BINARY */ + if (pqPutInt(1, 2, conn) < 0) /* result format code: BINARY */ { pqHandleSendFailure(conn); return NULL; diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c index e21bb5ad7d..7c078a9bae 100644 --- a/src/interfaces/libpq/fe-secure-openssl.c +++ b/src/interfaces/libpq/fe-secure-openssl.c @@ -91,7 +91,7 @@ static pthread_mutex_t ssl_config_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t ssl_config_mutex = NULL; static long win32_ssl_create_mutex = 0; #endif -#endif /* ENABLE_THREAD_SAFETY */ +#endif /* ENABLE_THREAD_SAFETY */ /* ------------------------------------------------------------ */ @@ -730,7 +730,7 @@ pq_lockingcallback(int mode, int n, const char *file, int line) PGTHREAD_ERROR("failed to unlock mutex"); } } -#endif /* ENABLE_THREAD_SAFETY && HAVE_CRYPTO_LOCK */ +#endif /* ENABLE_THREAD_SAFETY && HAVE_CRYPTO_LOCK */ /* * Initialize SSL library. @@ -809,8 +809,8 @@ pgtls_init(PGconn *conn) CRYPTO_set_locking_callback(pq_lockingcallback); } } -#endif /* HAVE_CRYPTO_LOCK */ -#endif /* ENABLE_THREAD_SAFETY */ +#endif /* HAVE_CRYPTO_LOCK */ +#endif /* ENABLE_THREAD_SAFETY */ if (!ssl_lib_initialized) { @@ -1142,7 +1142,7 @@ initialize_SSL(PGconn *conn) /* cannot return NULL because we already checked before strdup */ engine_colon = strchr(engine_str, ':'); - *engine_colon = '\0'; /* engine_str now has engine name */ + *engine_colon = '\0'; /* engine_str now has engine name */ engine_colon++; /* engine_colon now has key name */ conn->engine = ENGINE_by_id(engine_str); @@ -1209,7 +1209,7 @@ initialize_SSL(PGconn *conn) * file */ } else -#endif /* USE_SSL_ENGINE */ +#endif /* USE_SSL_ENGINE */ { /* PGSSLKEY is not an engine, treat it as a filename */ strlcpy(fnbuf, conn->sslkey, sizeof(fnbuf)); diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c index 8f0d892a34..24afaa60bc 100644 --- a/src/interfaces/libpq/fe-secure.c +++ b/src/interfaces/libpq/fe-secure.c @@ -115,14 +115,14 @@ struct sigpipe_info if (!SIGPIPE_MASKED(conn)) \ pqsignal(SIGPIPE, spinfo); \ } while (0) -#endif /* ENABLE_THREAD_SAFETY */ +#endif /* ENABLE_THREAD_SAFETY */ #else /* WIN32 */ #define DECLARE_SIGPIPE_INFO(spinfo) #define DISABLE_SIGPIPE(conn, spinfo, failaction) #define REMEMBER_EPIPE(spinfo, cond) #define RESTORE_SIGPIPE(conn, spinfo) -#endif /* WIN32 */ +#endif /* WIN32 */ /* ------------------------------------------------------------ */ /* Procedures common to all secure sessions */ @@ -312,7 +312,7 @@ pqsecure_raw_write(PGconn *conn, const void *ptr, size_t len) flags |= MSG_NOSIGNAL; retry_masked: -#endif /* MSG_NOSIGNAL */ +#endif /* MSG_NOSIGNAL */ DISABLE_SIGPIPE(conn, spinfo, return -1); @@ -334,7 +334,7 @@ retry_masked: flags = 0; goto retry_masked; } -#endif /* MSG_NOSIGNAL */ +#endif /* MSG_NOSIGNAL */ /* Set error message if appropriate */ switch (result_errno) @@ -415,7 +415,7 @@ PQsslAttributeNames(PGconn *conn) return result; } -#endif /* USE_SSL */ +#endif /* USE_SSL */ #if defined(ENABLE_THREAD_SAFETY) && !defined(WIN32) @@ -502,4 +502,4 @@ pq_reset_sigpipe(sigset_t *osigset, bool sigpipe_pending, bool got_epipe) SOCK_ERRNO_SET(save_errno); } -#endif /* ENABLE_THREAD_SAFETY && !WIN32 */ +#endif /* ENABLE_THREAD_SAFETY && !WIN32 */ diff --git a/src/interfaces/libpq/libpq-events.h b/src/interfaces/libpq/libpq-events.h index b08419a0f6..20af1ffe6d 100644 --- a/src/interfaces/libpq/libpq-events.h +++ b/src/interfaces/libpq/libpq-events.h @@ -91,4 +91,4 @@ extern int PQfireResultCreateEvents(PGconn *conn, PGresult *res); } #endif -#endif /* LIBPQ_EVENTS_H */ +#endif /* LIBPQ_EVENTS_H */ diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h index 3d55a3da29..1d915e7915 100644 --- a/src/interfaces/libpq/libpq-fe.h +++ b/src/interfaces/libpq/libpq-fe.h @@ -56,8 +56,8 @@ typedef enum */ CONNECTION_STARTED, /* Waiting for connection to be made. */ CONNECTION_MADE, /* Connection OK; waiting to send. */ - CONNECTION_AWAITING_RESPONSE, /* Waiting for a response from the - * postmaster. */ + CONNECTION_AWAITING_RESPONSE, /* Waiting for a response from the + * postmaster. */ CONNECTION_AUTH_OK, /* Received authentication; waiting for * backend startup. */ CONNECTION_SETENV, /* Negotiating environment. */ @@ -609,4 +609,4 @@ extern int pg_valid_server_encoding_id(int encoding); } #endif -#endif /* LIBPQ_FE_H */ +#endif /* LIBPQ_FE_H */ diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h index 335568b790..ff5020fc0c 100644 --- a/src/interfaces/libpq/libpq-int.h +++ b/src/interfaces/libpq/libpq-int.h @@ -69,7 +69,7 @@ typedef struct int length; } gss_buffer_desc; #endif -#endif /* ENABLE_SSPI */ +#endif /* ENABLE_SSPI */ #ifdef USE_OPENSSL #include @@ -78,7 +78,7 @@ typedef struct #ifndef OPENSSL_NO_ENGINE #define USE_SSL_ENGINE #endif -#endif /* USE_OPENSSL */ +#endif /* USE_OPENSSL */ /* * POSTGRES backend dependent Constants. @@ -143,7 +143,7 @@ typedef struct pgMessageField { struct pgMessageField *next; /* list link */ char code; /* field code */ - char contents[FLEXIBLE_ARRAY_MEMBER]; /* value, nul-terminated */ + char contents[FLEXIBLE_ARRAY_MEMBER]; /* value, nul-terminated */ } PGMessageField; /* Fields needed for notice handling */ @@ -151,7 +151,7 @@ typedef struct { PQnoticeReceiver noticeRec; /* notice message receiver */ void *noticeRecArg; - PQnoticeProcessor noticeProc; /* notice message processor */ + PQnoticeProcessor noticeProc; /* notice message processor */ void *noticeProcArg; } PGNoticeHooks; @@ -161,7 +161,7 @@ typedef struct PGEvent char *name; /* used only for error messages */ void *passThrough; /* pointer supplied at registration time */ void *data; /* optional state (instance) data */ - bool resultInitialized; /* T if RESULTCREATE/COPY succeeded */ + bool resultInitialized; /* T if RESULTCREATE/COPY succeeded */ } PGEvent; struct pg_result @@ -175,7 +175,7 @@ struct pg_result int numParameters; PGresParamDesc *paramDescs; ExecStatusType resultStatus; - char cmdStatus[CMDSTATUS_LEN]; /* cmd status from the query */ + char cmdStatus[CMDSTATUS_LEN]; /* cmd status from the query */ int binary; /* binary tuple values if binary == 1, * otherwise text */ @@ -255,7 +255,7 @@ typedef struct PQEnvironmentOption /* Typedef for parameter-status list entries */ typedef struct pgParameterStatus { - struct pgParameterStatus *next; /* list link */ + struct pgParameterStatus *next; /* list link */ char *name; /* parameter name */ char *value; /* parameter value */ /* Note: name and value are stored in same malloc block as struct is */ @@ -274,7 +274,7 @@ typedef struct pgLobjfuncs Oid fn_lo_tell; /* OID of backend function lo_tell */ Oid fn_lo_tell64; /* OID of backend function lo_tell64 */ Oid fn_lo_truncate; /* OID of backend function lo_truncate */ - Oid fn_lo_truncate64; /* OID of function lo_truncate64 */ + Oid fn_lo_truncate64; /* OID of function lo_truncate64 */ Oid fn_lo_read; /* OID of backend function LOread */ Oid fn_lo_write; /* OID of backend function LOwrite */ } PGlobjfuncs; @@ -333,7 +333,7 @@ struct pg_conn char *pgtty; /* tty on which the backend messages is * displayed (OBSOLETE, NOT USED) */ char *connect_timeout; /* connection timeout (numeric string) */ - char *client_encoding_initial; /* encoding to use */ + char *client_encoding_initial; /* encoding to use */ char *pgoptions; /* options to start the backend with */ char *appname; /* application name */ char *fbappname; /* fallback application name */ @@ -346,8 +346,8 @@ struct pg_conn char *keepalives_idle; /* time between TCP keepalives */ char *keepalives_interval; /* time between TCP keepalive * retransmits */ - char *keepalives_count; /* maximum number of TCP keepalive - * retransmits */ + char *keepalives_count; /* maximum number of TCP keepalive + * retransmits */ char *sslmode; /* SSL mode (require,prefer,allow,disable) */ char *sslcompression; /* SSL compression (0 or 1) */ char *sslkey; /* client key filename */ @@ -380,14 +380,13 @@ struct pg_conn PGTransactionStatusType xactStatus; /* never changes to ACTIVE */ PGQueryClass queryclass; char *last_query; /* last SQL command, or NULL if unknown */ - char last_sqlstate[6]; /* last reported SQLSTATE */ + char last_sqlstate[6]; /* last reported SQLSTATE */ bool options_valid; /* true if OK to attempt connection */ bool nonblocking; /* whether this connection is using nonblock * sending semantics */ bool singleRowMode; /* return current query result row-by-row? */ char copy_is_binary; /* 1 = copy binary, 0 = copy text */ - int copy_already_done; /* # bytes already returned in COPY - * OUT */ + int copy_already_done; /* # bytes already returned in COPY OUT */ PGnotify *notifyHead; /* oldest unreported Notify msg */ PGnotify *notifyTail; /* newest unreported Notify msg */ @@ -403,8 +402,7 @@ struct pg_conn SockAddr raddr; /* Remote address */ ProtocolVersion pversion; /* FE/BE protocol version in use */ int sversion; /* server version, e.g. 70401 for 7.4.1 */ - bool auth_req_received; /* true if any type of auth req - * received */ + bool auth_req_received; /* true if any type of auth req received */ bool password_needed; /* true if server demanded a password */ bool pgpassfile_used; /* true if password is from pgpassfile */ bool sigpipe_so; /* have we masked SIGPIPE via SO_NOSIGPIPE? */ @@ -468,8 +466,8 @@ struct pg_conn void *engine; /* dummy field to keep struct the same if * OpenSSL version changes */ #endif -#endif /* USE_OPENSSL */ -#endif /* USE_SSL */ +#endif /* USE_OPENSSL */ +#endif /* USE_SSL */ #ifdef ENABLE_GSS gss_ctx_id_t gctx; /* GSS context */ @@ -489,7 +487,7 @@ struct pg_conn #endif /* Buffer for current error message */ - PQExpBufferData errorMessage; /* expansible string */ + PQExpBufferData errorMessage; /* expansible string */ /* Buffer for receiving various parts of messages */ PQExpBufferData workBuffer; /* expansible string */ @@ -528,7 +526,7 @@ extern char *const pgresStatus[]; #define ROOT_CRL_FILE "root.crl" #endif -#endif /* USE_SSL */ +#endif /* USE_SSL */ /* ---------------- * Internal functions of libpq @@ -698,4 +696,4 @@ extern char *libpq_ngettext(const char *msgid, const char *msgid_plural, unsigne #define SOCK_ERRNO_SET(e) (errno = (e)) #endif -#endif /* LIBPQ_INT_H */ +#endif /* LIBPQ_INT_H */ diff --git a/src/interfaces/libpq/pqexpbuffer.c b/src/interfaces/libpq/pqexpbuffer.c index fd62cde99f..f4aa7c9cef 100644 --- a/src/interfaces/libpq/pqexpbuffer.c +++ b/src/interfaces/libpq/pqexpbuffer.c @@ -91,7 +91,7 @@ initPQExpBuffer(PQExpBuffer str) str->data = (char *) malloc(INITIAL_EXPBUFFER_SIZE); if (str->data == NULL) { - str->data = (char *) oom_buffer; /* see comment above */ + str->data = (char *) oom_buffer; /* see comment above */ str->maxlen = 0; str->len = 0; } diff --git a/src/interfaces/libpq/pqexpbuffer.h b/src/interfaces/libpq/pqexpbuffer.h index 239def42b7..19633f9b79 100644 --- a/src/interfaces/libpq/pqexpbuffer.h +++ b/src/interfaces/libpq/pqexpbuffer.h @@ -179,4 +179,4 @@ extern void appendPQExpBufferChar(PQExpBuffer str, char ch); extern void appendBinaryPQExpBuffer(PQExpBuffer str, const char *data, size_t datalen); -#endif /* PQEXPBUFFER_H */ +#endif /* PQEXPBUFFER_H */ diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 5b0d5aa8e8..02ce670346 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -739,7 +739,7 @@ plperl_init_interp(void) STMT_START { \ if (saved != NULL) { setlocale_perl(name, saved); pfree(saved); } \ } STMT_END -#endif /* WIN32 */ +#endif /* WIN32 */ if (plperl_on_init && *plperl_on_init) { @@ -2956,7 +2956,7 @@ plperl_hash_from_tuple(HeapTuple tuple, TupleDesc tupdesc) check_stack_depth(); hv = newHV(); - hv_ksplit(hv, tupdesc->natts); /* pre-grow the hash */ + hv_ksplit(hv, tupdesc->natts); /* pre-grow the hash */ for (i = 0; i < tupdesc->natts; i++) { @@ -3933,7 +3933,7 @@ setlocale_perl(int category, char *locale) newctype = RETVAL; new_ctype(newctype); } -#endif /* USE_LOCALE_CTYPE */ +#endif /* USE_LOCALE_CTYPE */ #ifdef USE_LOCALE_COLLATE if (category == LC_COLLATE #ifdef LC_ALL @@ -3951,7 +3951,7 @@ setlocale_perl(int category, char *locale) newcoll = RETVAL; new_collate(newcoll); } -#endif /* USE_LOCALE_COLLATE */ +#endif /* USE_LOCALE_COLLATE */ #ifdef USE_LOCALE_NUMERIC if (category == LC_NUMERIC @@ -3970,7 +3970,7 @@ setlocale_perl(int category, char *locale) newnum = RETVAL; new_numeric(newnum); } -#endif /* USE_LOCALE_NUMERIC */ +#endif /* USE_LOCALE_NUMERIC */ } return RETVAL; diff --git a/src/pl/plperl/plperl.h b/src/pl/plperl/plperl.h index ae367b0fc1..eecd192802 100644 --- a/src/pl/plperl/plperl.h +++ b/src/pl/plperl/plperl.h @@ -62,8 +62,8 @@ #else #define vsnprintf pg_vsnprintf #define snprintf pg_snprintf -#endif /* __GNUC__ */ -#endif /* USE_REPL_SNPRINTF */ +#endif /* __GNUC__ */ +#endif /* USE_REPL_SNPRINTF */ /* perl version and platform portability */ #define NEED_eval_pv @@ -107,4 +107,4 @@ void plperl_spi_freeplan(char *); void plperl_spi_cursor_close(char *); char *plperl_sv_to_literal(SV *, char *); -#endif /* PL_PERL_H */ +#endif /* PL_PERL_H */ diff --git a/src/pl/plperl/plperl_helpers.h b/src/pl/plperl/plperl_helpers.h index f8aa06835c..76124edc07 100644 --- a/src/pl/plperl/plperl_helpers.h +++ b/src/pl/plperl/plperl_helpers.h @@ -158,7 +158,7 @@ croak_cstr(const char *str) sv_setsv(errsv, ssv); croak(NULL); -#endif /* croak_sv */ +#endif /* croak_sv */ } -#endif /* PL_PERL_HELPERS_H */ +#endif /* PL_PERL_HELPERS_H */ diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c index aeb8e4dfe7..41cac84867 100644 --- a/src/pl/plpgsql/src/pl_comp.c +++ b/src/pl/plpgsql/src/pl_comp.c @@ -352,7 +352,7 @@ do_compile(FunctionCallInfo fcinfo, function->fn_tid = procTup->t_self; function->fn_input_collation = fcinfo->fncollation; function->fn_cxt = func_cxt; - function->out_param_varno = -1; /* set up for no OUT param */ + function->out_param_varno = -1; /* set up for no OUT param */ function->resolve_option = plpgsql_variable_conflict; function->print_strict_params = plpgsql_print_strict_params; /* only promote extra warnings and errors at CREATE FUNCTION time */ @@ -838,7 +838,7 @@ plpgsql_compile_inline(char *proc_source) function->fn_is_trigger = PLPGSQL_NOT_TRIGGER; function->fn_input_collation = InvalidOid; function->fn_cxt = func_cxt; - function->out_param_varno = -1; /* set up for no OUT param */ + function->out_param_varno = -1; /* set up for no OUT param */ function->resolve_option = plpgsql_variable_conflict; function->print_strict_params = plpgsql_print_strict_params; @@ -1439,7 +1439,7 @@ plpgsql_parse_dblword(char *word1, char *word2, /* Block-qualified reference to scalar variable. */ wdatum->datum = plpgsql_Datums[ns->itemno]; wdatum->ident = NULL; - wdatum->quoted = false; /* not used */ + wdatum->quoted = false; /* not used */ wdatum->idents = idents; return true; @@ -1469,7 +1469,7 @@ plpgsql_parse_dblword(char *word1, char *word2, wdatum->datum = plpgsql_Datums[ns->itemno]; } wdatum->ident = NULL; - wdatum->quoted = false; /* not used */ + wdatum->quoted = false; /* not used */ wdatum->idents = idents; return true; diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index da86702bdd..20ad7eea0d 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -81,8 +81,8 @@ typedef struct typedef struct SimpleEcontextStackEntry { ExprContext *stack_econtext; /* a stacked econtext */ - SubTransactionId xact_subxid; /* ID for current subxact */ - struct SimpleEcontextStackEntry *next; /* next stack entry up */ + SubTransactionId xact_subxid; /* ID for current subxact */ + struct SimpleEcontextStackEntry *next; /* next stack entry up */ } SimpleEcontextStackEntry; static EState *shared_simple_eval_estate = NULL; @@ -543,7 +543,7 @@ plpgsql_exec_function(PLpgSQL_function *func, FunctionCallInfo fcinfo, * the generated result type, instead. */ tupdesc = estate.rettupdesc; - if (tupdesc == NULL) /* shouldn't happen */ + if (tupdesc == NULL) /* shouldn't happen */ elog(ERROR, "return type must be a row type"); break; default: @@ -2726,7 +2726,7 @@ exec_stmt_return(PLpgSQL_execstate *estate, PLpgSQL_stmt_return *stmt) if (!row->rowtupdesc) /* should not happen */ elog(ERROR, "row variable has no tupdesc"); tup = make_tuple_from_row(estate, row, row->rowtupdesc); - if (tup == NULL) /* should not happen */ + if (tup == NULL) /* should not happen */ elog(ERROR, "row not compatible with its own tupdesc"); estate->retval = PointerGetDatum(tup); estate->rettupdesc = row->rowtupdesc; @@ -3441,7 +3441,7 @@ plpgsql_estate_setup(PLpgSQL_execstate *estate, estate->paramLI->paramFetch = plpgsql_param_fetch; estate->paramLI->paramFetchArg = (void *) estate; estate->paramLI->parserSetup = (ParserSetupHook) plpgsql_parser_setup; - estate->paramLI->parserSetupArg = NULL; /* filled during use */ + estate->paramLI->parserSetupArg = NULL; /* filled during use */ estate->paramLI->numParams = estate->ndatums; estate->paramLI->paramMask = NULL; estate->params_dirty = false; @@ -3456,7 +3456,7 @@ plpgsql_estate_setup(PLpgSQL_execstate *estate, ctl.entrysize = sizeof(plpgsql_CastHashEntry); ctl.hcxt = CurrentMemoryContext; estate->cast_hash = hash_create("PLpgSQL private cast cache", - 16, /* start small and extend */ + 16, /* start small and extend */ &ctl, HASH_ELEM | HASH_BLOBS | HASH_CONTEXT); estate->cast_hash_context = CurrentMemoryContext; @@ -4765,7 +4765,7 @@ exec_assign_value(PLpgSQL_execstate *estate, * array, either, so that's a no-op too. This is all ugly but * corresponds to the current behavior of execExpr*.c. */ - if (arrayelem->arraytyplen > 0 && /* fixed-length array? */ + if (arrayelem->arraytyplen > 0 && /* fixed-length array? */ (oldarrayisnull || isNull)) return; @@ -5102,7 +5102,7 @@ plpgsql_exec_get_datum_type_info(PLpgSQL_execstate *estate, default: elog(ERROR, "unrecognized dtype: %d", datum->dtype); - *typeid = InvalidOid; /* keep compiler quiet */ + *typeid = InvalidOid; /* keep compiler quiet */ *typmod = -1; *collation = InvalidOid; break; diff --git a/src/pl/plpgsql/src/plpgsql.h b/src/pl/plpgsql/src/plpgsql.h index 0f790ee536..2b19948562 100644 --- a/src/pl/plpgsql/src/plpgsql.h +++ b/src/pl/plpgsql/src/plpgsql.h @@ -232,10 +232,10 @@ typedef struct PLpgSQL_expr struct PLpgSQL_nsitem *ns; /* fields for "simple expression" fast-path execution: */ - Expr *expr_simple_expr; /* NULL means not a simple expr */ + Expr *expr_simple_expr; /* NULL means not a simple expr */ int expr_simple_generation; /* plancache generation we checked */ - Oid expr_simple_type; /* result type Oid, if simple */ - int32 expr_simple_typmod; /* result typmod, if simple */ + Oid expr_simple_type; /* result type Oid, if simple */ + int32 expr_simple_typmod; /* result typmod, if simple */ /* * if expr is simple AND prepared in current transaction, @@ -243,8 +243,8 @@ typedef struct PLpgSQL_expr * seeing if expr_simple_lxid matches current LXID. (If not, * expr_simple_state probably points at garbage!) */ - ExprState *expr_simple_state; /* eval tree for expr_simple_expr */ - bool expr_simple_in_use; /* true if eval tree is active */ + ExprState *expr_simple_state; /* eval tree for expr_simple_expr */ + bool expr_simple_in_use; /* true if eval tree is active */ LocalTransactionId expr_simple_lxid; } PLpgSQL_expr; @@ -865,7 +865,7 @@ typedef struct PLpgSQL_function /* the datums representing the function's local variables */ int ndatums; PLpgSQL_datum **datums; - Bitmapset *resettable_datums; /* dnos of non-simple vars */ + Bitmapset *resettable_datums; /* dnos of non-simple vars */ /* function body parsetree */ PLpgSQL_stmt_block *action; @@ -897,7 +897,7 @@ typedef struct PLpgSQL_execstate * CONTINUE stmt, if any */ ErrorData *cur_error; /* current exception handler's error */ - Tuplestorestate *tuple_store; /* SRFs accumulate results here */ + Tuplestorestate *tuple_store; /* SRFs accumulate results here */ MemoryContext tuple_store_cxt; ResourceOwner tuple_store_owner; ReturnSetInfo *rsi; @@ -1153,4 +1153,4 @@ extern void plpgsql_scanner_finish(void); */ extern int plpgsql_yyparse(void); -#endif /* PLPGSQL_H */ +#endif /* PLPGSQL_H */ diff --git a/src/pl/plpython/plpy_cursorobject.h b/src/pl/plpython/plpy_cursorobject.h index ef23865dd2..018b169cbf 100644 --- a/src/pl/plpython/plpy_cursorobject.h +++ b/src/pl/plpython/plpy_cursorobject.h @@ -21,4 +21,4 @@ extern void PLy_cursor_init_type(void); extern PyObject *PLy_cursor(PyObject *self, PyObject *args); extern PyObject *PLy_cursor_plan(PyObject *ob, PyObject *args); -#endif /* PLPY_CURSOROBJECT_H */ +#endif /* PLPY_CURSOROBJECT_H */ diff --git a/src/pl/plpython/plpy_elog.h b/src/pl/plpython/plpy_elog.h index 5dd4ef7a14..6bc50fd227 100644 --- a/src/pl/plpython/plpy_elog.h +++ b/src/pl/plpython/plpy_elog.h @@ -19,4 +19,4 @@ extern void PLy_exception_set_plural(PyObject *exc, const char *fmt_singular, co extern void PLy_exception_set_with_details(PyObject *excclass, ErrorData *edata); -#endif /* PLPY_ELOG_H */ +#endif /* PLPY_ELOG_H */ diff --git a/src/pl/plpython/plpy_exec.c b/src/pl/plpython/plpy_exec.c index a1ecc6d2a4..e59d076695 100644 --- a/src/pl/plpython/plpy_exec.c +++ b/src/pl/plpython/plpy_exec.c @@ -31,7 +31,7 @@ typedef struct PLySRFState { PyObject *iter; /* Python iterator producing results */ PLySavedArgs *savedargs; /* function argument values */ - MemoryContextCallback callback; /* for releasing refcounts when done */ + MemoryContextCallback callback; /* for releasing refcounts when done */ } PLySRFState; static PyObject *PLy_function_build_args(FunctionCallInfo fcinfo, PLyProcedure *proc); diff --git a/src/pl/plpython/plpy_exec.h b/src/pl/plpython/plpy_exec.h index 439a1d801f..68da1ffcb2 100644 --- a/src/pl/plpython/plpy_exec.h +++ b/src/pl/plpython/plpy_exec.h @@ -10,4 +10,4 @@ extern Datum PLy_exec_function(FunctionCallInfo fcinfo, PLyProcedure *proc); extern HeapTuple PLy_exec_trigger(FunctionCallInfo fcinfo, PLyProcedure *proc); -#endif /* PLPY_EXEC_H */ +#endif /* PLPY_EXEC_H */ diff --git a/src/pl/plpython/plpy_main.c b/src/pl/plpython/plpy_main.c index 860b804e54..7df50c09c8 100644 --- a/src/pl/plpython/plpy_main.c +++ b/src/pl/plpython/plpy_main.c @@ -214,7 +214,7 @@ plpython2_validator(PG_FUNCTION_ARGS) /* call plpython validator with our fcinfo so it gets our oid */ return plpython_validator(fcinfo); } -#endif /* PY_MAJOR_VERSION < 3 */ +#endif /* PY_MAJOR_VERSION < 3 */ Datum plpython_call_handler(PG_FUNCTION_ARGS) @@ -288,7 +288,7 @@ plpython2_call_handler(PG_FUNCTION_ARGS) { return plpython_call_handler(fcinfo); } -#endif /* PY_MAJOR_VERSION < 3 */ +#endif /* PY_MAJOR_VERSION < 3 */ Datum plpython_inline_handler(PG_FUNCTION_ARGS) @@ -368,7 +368,7 @@ plpython2_inline_handler(PG_FUNCTION_ARGS) { return plpython_inline_handler(fcinfo); } -#endif /* PY_MAJOR_VERSION < 3 */ +#endif /* PY_MAJOR_VERSION < 3 */ static bool PLy_procedure_is_trigger(Form_pg_proc procStruct) diff --git a/src/pl/plpython/plpy_main.h b/src/pl/plpython/plpy_main.h index 10426c4323..e8c97c24d7 100644 --- a/src/pl/plpython/plpy_main.h +++ b/src/pl/plpython/plpy_main.h @@ -28,4 +28,4 @@ extern PLyExecutionContext *PLy_current_execution_context(void); /* Get the scratch memory context for specified execution context */ extern MemoryContext PLy_get_scratch_context(PLyExecutionContext *context); -#endif /* PLPY_MAIN_H */ +#endif /* PLPY_MAIN_H */ diff --git a/src/pl/plpython/plpy_planobject.h b/src/pl/plpython/plpy_planobject.h index c67559266e..5adc957053 100644 --- a/src/pl/plpython/plpy_planobject.h +++ b/src/pl/plpython/plpy_planobject.h @@ -24,4 +24,4 @@ extern void PLy_plan_init_type(void); extern PyObject *PLy_plan_new(void); extern bool is_PLyPlanObject(PyObject *ob); -#endif /* PLPY_PLANOBJECT_H */ +#endif /* PLPY_PLANOBJECT_H */ diff --git a/src/pl/plpython/plpy_plpymodule.c b/src/pl/plpython/plpy_plpymodule.c index ad160aeec3..619c471903 100644 --- a/src/pl/plpython/plpy_plpymodule.c +++ b/src/pl/plpython/plpy_plpymodule.c @@ -140,7 +140,7 @@ PyInit_plpy(void) return m; } -#endif /* PY_MAJOR_VERSION >= 3 */ +#endif /* PY_MAJOR_VERSION >= 3 */ void PLy_init_plpy(void) diff --git a/src/pl/plpython/plpy_plpymodule.h b/src/pl/plpython/plpy_plpymodule.h index ee089b78a1..54d78101ce 100644 --- a/src/pl/plpython/plpy_plpymodule.h +++ b/src/pl/plpython/plpy_plpymodule.h @@ -16,4 +16,4 @@ PyMODINIT_FUNC PyInit_plpy(void); #endif extern void PLy_init_plpy(void); -#endif /* PLPY_PLPYMODULE_H */ +#endif /* PLPY_PLPYMODULE_H */ diff --git a/src/pl/plpython/plpy_procedure.h b/src/pl/plpython/plpy_procedure.h index 8ffa38e068..d05944fc39 100644 --- a/src/pl/plpython/plpy_procedure.h +++ b/src/pl/plpython/plpy_procedure.h @@ -17,7 +17,7 @@ typedef struct PLySavedArgs struct PLySavedArgs *next; /* linked-list pointer */ PyObject *args; /* "args" element of globals dict */ int nargs; /* length of namedargs array */ - PyObject *namedargs[FLEXIBLE_ARRAY_MEMBER]; /* named args */ + PyObject *namedargs[FLEXIBLE_ARRAY_MEMBER]; /* named args */ } PLySavedArgs; /* cached procedure data */ @@ -66,4 +66,4 @@ extern PLyProcedure *PLy_procedure_get(Oid fn_oid, Oid fn_rel, bool is_trigger); extern void PLy_procedure_compile(PLyProcedure *proc, const char *src); extern void PLy_procedure_delete(PLyProcedure *proc); -#endif /* PLPY_PROCEDURE_H */ +#endif /* PLPY_PROCEDURE_H */ diff --git a/src/pl/plpython/plpy_resultobject.h b/src/pl/plpython/plpy_resultobject.h index 314510c40f..bbaca0dd00 100644 --- a/src/pl/plpython/plpy_resultobject.h +++ b/src/pl/plpython/plpy_resultobject.h @@ -22,4 +22,4 @@ typedef struct PLyResultObject extern void PLy_result_init_type(void); extern PyObject *PLy_result_new(void); -#endif /* PLPY_RESULTOBJECT_H */ +#endif /* PLPY_RESULTOBJECT_H */ diff --git a/src/pl/plpython/plpy_spi.h b/src/pl/plpython/plpy_spi.h index 817a7584e7..d6b0a4707b 100644 --- a/src/pl/plpython/plpy_spi.h +++ b/src/pl/plpython/plpy_spi.h @@ -23,4 +23,4 @@ extern void PLy_spi_subtransaction_begin(MemoryContext oldcontext, ResourceOwner extern void PLy_spi_subtransaction_commit(MemoryContext oldcontext, ResourceOwner oldowner); extern void PLy_spi_subtransaction_abort(MemoryContext oldcontext, ResourceOwner oldowner); -#endif /* PLPY_SPI_H */ +#endif /* PLPY_SPI_H */ diff --git a/src/pl/plpython/plpy_subxactobject.h b/src/pl/plpython/plpy_subxactobject.h index d9c3929234..92a9e635f3 100644 --- a/src/pl/plpython/plpy_subxactobject.h +++ b/src/pl/plpython/plpy_subxactobject.h @@ -29,4 +29,4 @@ typedef struct PLySubtransactionData extern void PLy_subtransaction_init_type(void); extern PyObject *PLy_subtransaction_new(PyObject *self, PyObject *unused); -#endif /* PLPY_SUBXACTOBJECT */ +#endif /* PLPY_SUBXACTOBJECT */ diff --git a/src/pl/plpython/plpy_typeio.h b/src/pl/plpython/plpy_typeio.h index e04722c47a..95f84d8341 100644 --- a/src/pl/plpython/plpy_typeio.h +++ b/src/pl/plpython/plpy_typeio.h @@ -119,4 +119,4 @@ extern PyObject *PLyDict_FromTuple(PLyTypeInfo *info, HeapTuple tuple, TupleDesc /* conversion from Python objects to C strings */ extern char *PLyObject_AsString(PyObject *plrv); -#endif /* PLPY_TYPEIO_H */ +#endif /* PLPY_TYPEIO_H */ diff --git a/src/pl/plpython/plpy_util.c b/src/pl/plpython/plpy_util.c index f2d5949137..35d57a9e80 100644 --- a/src/pl/plpython/plpy_util.c +++ b/src/pl/plpython/plpy_util.c @@ -132,4 +132,4 @@ PLyUnicode_FromString(const char *s) return PLyUnicode_FromStringAndSize(s, strlen(s)); } -#endif /* PY_MAJOR_VERSION >= 3 */ +#endif /* PY_MAJOR_VERSION >= 3 */ diff --git a/src/pl/plpython/plpy_util.h b/src/pl/plpython/plpy_util.h index 66c5ccf8ac..f990bb0890 100644 --- a/src/pl/plpython/plpy_util.h +++ b/src/pl/plpython/plpy_util.h @@ -14,4 +14,4 @@ extern PyObject *PLyUnicode_FromString(const char *s); extern PyObject *PLyUnicode_FromStringAndSize(const char *s, Py_ssize_t size); #endif -#endif /* PLPY_UTIL_H */ +#endif /* PLPY_UTIL_H */ diff --git a/src/pl/plpython/plpython.h b/src/pl/plpython/plpython.h index d687860ab2..9a8e8f246d 100644 --- a/src/pl/plpython/plpython.h +++ b/src/pl/plpython/plpython.h @@ -138,8 +138,8 @@ typedef int Py_ssize_t; #else #define vsnprintf pg_vsnprintf #define snprintf pg_snprintf -#endif /* __GNUC__ */ -#endif /* USE_REPL_SNPRINTF */ +#endif /* __GNUC__ */ +#endif /* USE_REPL_SNPRINTF */ /* * Used throughout, and also by the Python 2/3 porting layer, so it's easier to @@ -147,4 +147,4 @@ typedef int Py_ssize_t; */ #include "plpy_util.h" -#endif /* PLPYTHON_H */ +#endif /* PLPYTHON_H */ diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index 89bb46fb4a..ca4b4b551e 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -135,16 +135,16 @@ typedef struct pltcl_interp_desc typedef struct pltcl_proc_desc { char *user_proname; /* user's name (from pg_proc.proname) */ - char *internal_proname; /* Tcl name (based on function OID) */ + char *internal_proname; /* Tcl name (based on function OID) */ MemoryContext fn_cxt; /* memory context for this procedure */ unsigned long fn_refcount; /* number of active references */ TransactionId fn_xmin; /* xmin of pg_proc row */ ItemPointerData fn_tid; /* TID of pg_proc row */ bool fn_readonly; /* is function readonly? */ bool lanpltrusted; /* is it pltcl (vs. pltclu)? */ - pltcl_interp_desc *interp_desc; /* interpreter to use */ + pltcl_interp_desc *interp_desc; /* interpreter to use */ FmgrInfo result_in_func; /* input function for fn's result type */ - Oid result_typioparam; /* param to pass to same */ + Oid result_typioparam; /* param to pass to same */ bool fn_retisset; /* true if function returns a set */ bool fn_retistuple; /* true if function returns composite */ int nargs; /* number of arguments */ @@ -221,8 +221,8 @@ typedef struct pltcl_call_state AttInMetadata *attinmeta; /* metadata for building tuples of that type */ ReturnSetInfo *rsi; /* passed-in ReturnSetInfo, if any */ - Tuplestorestate *tuple_store; /* SRFs accumulate result here */ - MemoryContext tuple_store_cxt; /* context and resowner for tuplestore */ + Tuplestorestate *tuple_store; /* SRFs accumulate result here */ + MemoryContext tuple_store_cxt; /* context and resowner for tuplestore */ ResourceOwner tuple_store_owner; } pltcl_call_state; @@ -1054,7 +1054,7 @@ pltcl_trigger_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state, /* Find or compile the function */ prodesc = compile_pltcl_function(fcinfo->flinfo->fn_oid, RelationGetRelid(trigdata->tg_relation), - false, /* not an event trigger */ + false, /* not an event trigger */ pltrusted); call_state->prodesc = prodesc; diff --git a/src/port/chklocale.c b/src/port/chklocale.c index c6ec929702..c357fed6dc 100644 --- a/src/port/chklocale.c +++ b/src/port/chklocale.c @@ -290,7 +290,7 @@ pg_codepage_to_encoding(UINT cp) return -1; } #endif -#endif /* WIN32 */ +#endif /* WIN32 */ #if (defined(HAVE_LANGINFO_H) && defined(CODESET)) || defined(WIN32) @@ -435,4 +435,4 @@ pg_get_encoding_from_locale(const char *ctype, bool write_message) return PG_SQL_ASCII; } -#endif /* (HAVE_LANGINFO_H && CODESET) || WIN32 */ +#endif /* (HAVE_LANGINFO_H && CODESET) || WIN32 */ diff --git a/src/port/crypt.c b/src/port/crypt.c index 9fc7abe10a..786161ff35 100644 --- a/src/port/crypt.c +++ b/src/port/crypt.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)crypt.c 8.1.1.1 (Berkeley) 8/18/93"; #else __RCSID("$NetBSD: crypt.c,v 1.18 2001/03/01 14:37:35 wiz Exp $"); #endif -#endif /* not lint */ +#endif /* not lint */ #include "c.h" @@ -287,7 +287,7 @@ typedef union { C_block tblk; permute(cpp,&tblk,p,8); LOAD (d,d0,d1,tblk); } #define PERM3264(d,d0,d1,cpp,p) \ { C_block tblk; permute(cpp,&tblk,p,4); LOAD (d,d0,d1,tblk); } -#endif /* LARGEDATA */ +#endif /* LARGEDATA */ STATIC init_des(void); STATIC init_perm(C_block[64 / CHUNKBITS][1 << CHUNKBITS], unsigned char[64], int, int); @@ -326,12 +326,12 @@ int chars_in; } while (--chars_in > 0); STORE(D, D0, D1, *out); } -#endif /* LARGEDATA */ +#endif /* LARGEDATA */ /* ===== (mostly) Standard DES Tables ==================== */ -static const unsigned char IP[] = { /* initial permutation */ +static const unsigned char IP[] = { /* initial permutation */ 58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4, 62, 54, 46, 38, 30, 22, 14, 6, @@ -344,7 +344,7 @@ static const unsigned char IP[] = { /* initial permutation */ /* The final permutation is the inverse of IP - no table is necessary */ -static const unsigned char ExpandTr[] = { /* expansion operation */ +static const unsigned char ExpandTr[] = { /* expansion operation */ 32, 1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9, 8, 9, 10, 11, 12, 13, @@ -367,7 +367,7 @@ static const unsigned char PC1[] = { /* permuted choice table 1 */ 21, 13, 5, 28, 20, 12, 4, }; -static const unsigned char Rotates[] = { /* PC1 rotation schedule */ +static const unsigned char Rotates[] = { /* PC1 rotation schedule */ 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, }; @@ -457,7 +457,7 @@ static const unsigned char itoa64[] = /* 0..63 => ascii-64 */ /* ===== Tables that are initialized at run time ==================== */ -static unsigned char a64toi[128]; /* ascii-64 => 0..63 */ +static unsigned char a64toi[128]; /* ascii-64 => 0..63 */ /* Initial key schedule permutation */ static C_block PC1ROT[64 / CHUNKBITS][1 << CHUNKBITS]; @@ -482,7 +482,7 @@ static C_block constdatablock; /* encryption constant */ static char cryptresult[1 + 4 + 4 + 11 + 1]; /* encrypted result */ extern char *__md5crypt(const char *, const char *); /* XXX */ -extern char *__bcrypt(const char *, const char *); /* XXX */ +extern char *__bcrypt(const char *, const char *); /* XXX */ /* @@ -524,7 +524,7 @@ const char *setting; key++; keyblock.b[i] = t; } - if (des_setkey((char *) keyblock.b)) /* also initializes "a64toi" */ + if (des_setkey((char *) keyblock.b)) /* also initializes "a64toi" */ return (NULL); encp = &cryptresult[0]; @@ -715,7 +715,7 @@ int num_iter; R1 = (R1 >> 1) & 0x55555555L; L1 = R0 | R1; /* L1 is the odd-numbered input bits */ STORE(L, L0, L1, B); - PERM3264(L, L0, L1, B.b, (C_block *) IE3264); /* even bits */ + PERM3264(L, L0, L1, B.b, (C_block *) IE3264); /* even bits */ PERM3264(R, R0, R1, B.b + 4, (C_block *) IE3264); /* odd bits */ if (num_iter >= 0) diff --git a/src/port/dirent.c b/src/port/dirent.c index 269f7429f8..2bab7938a0 100644 --- a/src/port/dirent.c +++ b/src/port/dirent.c @@ -64,8 +64,7 @@ opendir(const char *dirname) strcpy(d->dirname, dirname); if (d->dirname[strlen(d->dirname) - 1] != '/' && d->dirname[strlen(d->dirname) - 1] != '\\') - strcat(d->dirname, "\\"); /* Append backslash if not already - * there */ + strcat(d->dirname, "\\"); /* Append backslash if not already there */ strcat(d->dirname, "*"); /* Search for entries named anything */ d->handle = INVALID_HANDLE_VALUE; d->ret.d_ino = 0; /* no inodes on win32 */ @@ -102,8 +101,7 @@ readdir(DIR *d) return NULL; } } - strcpy(d->ret.d_name, fd.cFileName); /* Both strings are MAX_PATH - * long */ + strcpy(d->ret.d_name, fd.cFileName); /* Both strings are MAX_PATH long */ d->ret.d_namlen = strlen(d->ret.d_name); return &d->ret; diff --git a/src/port/dirmod.c b/src/port/dirmod.c index 98e74f25b0..4ce8cce005 100644 --- a/src/port/dirmod.c +++ b/src/port/dirmod.c @@ -121,10 +121,10 @@ pgunlink(const char *path) /* We undefined these above; now redefine for possible use below */ #define rename(from, to) pgrename(from, to) #define unlink(path) pgunlink(path) -#endif /* defined(WIN32) || defined(__CYGWIN__) */ +#endif /* defined(WIN32) || defined(__CYGWIN__) */ -#if defined(WIN32) && !defined(__CYGWIN__) /* Cygwin has its own symlinks */ +#if defined(WIN32) && !defined(__CYGWIN__) /* Cygwin has its own symlinks */ /* * pgsymlink support: @@ -352,7 +352,7 @@ pgwin32_is_junction(const char *path) } return ((attr & FILE_ATTRIBUTE_REPARSE_POINT) == FILE_ATTRIBUTE_REPARSE_POINT); } -#endif /* defined(WIN32) && !defined(__CYGWIN__) */ +#endif /* defined(WIN32) && !defined(__CYGWIN__) */ #if defined(WIN32) && !defined(__CYGWIN__) diff --git a/src/port/getaddrinfo.c b/src/port/getaddrinfo.c index ff85db4b54..4de989152e 100644 --- a/src/port/getaddrinfo.c +++ b/src/port/getaddrinfo.c @@ -328,7 +328,7 @@ gai_strerror(int errcode) case EAI_MEMORY: return "Not enough memory"; #endif -#if defined(EAI_NODATA) && EAI_NODATA != EAI_NONAME /* MSVC/WIN64 duplicate */ +#if defined(EAI_NODATA) && EAI_NODATA != EAI_NONAME /* MSVC/WIN64 duplicate */ case EAI_NODATA: return "No host data of that type was found"; #endif @@ -343,7 +343,7 @@ gai_strerror(int errcode) default: return "Unknown server error"; } -#endif /* HAVE_HSTRERROR */ +#endif /* HAVE_HSTRERROR */ } /* diff --git a/src/port/getopt.c b/src/port/getopt.c index 54c46ea366..10f4228d7c 100644 --- a/src/port/getopt.c +++ b/src/port/getopt.c @@ -36,7 +36,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95"; -#endif /* LIBC_SCCS and not lint */ +#endif /* LIBC_SCCS and not lint */ /* diff --git a/src/port/getrusage.c b/src/port/getrusage.c index 2ef7e09967..d029fc2c76 100644 --- a/src/port/getrusage.c +++ b/src/port/getrusage.c @@ -104,7 +104,7 @@ getrusage(int who, struct rusage *rusage) rusage->ru_utime.tv_usec = TICK_TO_USEC(u, tick_rate); rusage->ru_stime.tv_sec = TICK_TO_SEC(s, tick_rate); rusage->ru_stime.tv_usec = TICK_TO_USEC(u, tick_rate); -#endif /* WIN32 */ +#endif /* WIN32 */ return 0; } diff --git a/src/port/mkdtemp.c b/src/port/mkdtemp.c index 0aafb0d687..54844cb2f5 100644 --- a/src/port/mkdtemp.c +++ b/src/port/mkdtemp.c @@ -66,7 +66,7 @@ static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; #else __RCSID("$NetBSD: gettemp.c,v 1.17 2014/01/21 19:09:48 seanb Exp $"); #endif -#endif /* LIBC_SCCS and not lint */ +#endif /* LIBC_SCCS and not lint */ #endif #include @@ -215,7 +215,7 @@ GETTEMP(char *path, int *doopen, int domkdir) /* NOTREACHED */ } -#endif /* !HAVE_NBTOOL_CONFIG_H || !HAVE_MKSTEMP || +#endif /* !HAVE_NBTOOL_CONFIG_H || !HAVE_MKSTEMP || * !HAVE_MKDTEMP */ @@ -265,7 +265,7 @@ static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; #else __RCSID("$NetBSD: mkdtemp.c,v 1.11 2012/03/15 18:22:30 christos Exp $"); #endif -#endif /* LIBC_SCCS and not lint */ +#endif /* LIBC_SCCS and not lint */ #if HAVE_NBTOOL_CONFIG_H #define GETTEMP __nbcompat_gettemp @@ -290,4 +290,4 @@ mkdtemp(char *path) return GETTEMP(path, NULL, 1) ? path : NULL; } -#endif /* !HAVE_NBTOOL_CONFIG_H || !HAVE_MKDTEMP */ +#endif /* !HAVE_NBTOOL_CONFIG_H || !HAVE_MKDTEMP */ diff --git a/src/port/pg_crc32c_sb8.c b/src/port/pg_crc32c_sb8.c index eff7043202..dfd6cd9f49 100644 --- a/src/port/pg_crc32c_sb8.c +++ b/src/port/pg_crc32c_sb8.c @@ -1165,5 +1165,5 @@ static const uint32 pg_crc32c_table[8][256] = { 0xA1354CE5, 0x864870AC, 0xEFCF3477, 0xC8B2083E, 0xCCB751C4, 0xEBCA6D8D, 0x824D2956, 0xA530151F } -#endif /* WORDS_BIGENDIAN */ +#endif /* WORDS_BIGENDIAN */ }; diff --git a/src/port/pg_crc32c_sse42.c b/src/port/pg_crc32c_sse42.c index 75b4d96c69..d698124121 100644 --- a/src/port/pg_crc32c_sse42.c +++ b/src/port/pg_crc32c_sse42.c @@ -55,7 +55,7 @@ pg_comp_crc32c_sse42(pg_crc32c crc, const void *data, size_t len) crc = _mm_crc32_u32(crc, *((const unsigned int *) p)); p += 4; } -#endif /* __x86_64__ */ +#endif /* __x86_64__ */ /* Process any remaining bytes one at a time. */ while (p < pend) diff --git a/src/port/pgsleep.c b/src/port/pgsleep.c index 9f01b73b0f..f2db68a33d 100644 --- a/src/port/pgsleep.c +++ b/src/port/pgsleep.c @@ -60,4 +60,4 @@ pg_usleep(long microsec) } } -#endif /* defined(FRONTEND) || !defined(WIN32) */ +#endif /* defined(FRONTEND) || !defined(WIN32) */ diff --git a/src/port/pqsignal.c b/src/port/pqsignal.c index e7e445101c..f176387ca2 100644 --- a/src/port/pqsignal.c +++ b/src/port/pqsignal.c @@ -85,6 +85,6 @@ pqsignal_no_restart(int signo, pqsigfunc func) return oact.sa_handler; } -#endif /* !WIN32 */ +#endif /* !WIN32 */ -#endif /* !defined(WIN32) || defined(FRONTEND) */ +#endif /* !defined(WIN32) || defined(FRONTEND) */ diff --git a/src/port/snprintf.c b/src/port/snprintf.c index 62b23b0c1f..231e5d6bdb 100644 --- a/src/port/snprintf.c +++ b/src/port/snprintf.c @@ -364,7 +364,7 @@ nextch1: goto nextch1; case '*': if (afterstar) - have_non_dollar = true; /* multiple stars */ + have_non_dollar = true; /* multiple stars */ afterstar = true; accum = 0; goto nextch1; diff --git a/src/test/isolation/isolationtester.h b/src/test/isolation/isolationtester.h index a15d5be897..1f28272d65 100644 --- a/src/test/isolation/isolationtester.h +++ b/src/test/isolation/isolationtester.h @@ -60,4 +60,4 @@ extern int spec_yyparse(void); extern int spec_yylex(void); extern void spec_yyerror(const char *str); -#endif /* ISOLATIONTESTER_H */ +#endif /* ISOLATIONTESTER_H */ diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index b685aeb1fa..832a138da5 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -357,7 +357,7 @@ make_temp_sockdir(void) return temp_sockdir; } -#endif /* HAVE_UNIX_SOCKETS */ +#endif /* HAVE_UNIX_SOCKETS */ /* * Check whether string matches pattern @@ -1520,7 +1520,7 @@ wait_for_tests(PID_TYPE * pids, int *statuses, char **names, int num_tests) p = active_pids[r - WAIT_OBJECT_0]; /* compact the active_pids array */ active_pids[r - WAIT_OBJECT_0] = active_pids[tests_left - 1]; -#endif /* WIN32 */ +#endif /* WIN32 */ for (i = 0; i < num_tests; i++) { @@ -1747,8 +1747,8 @@ run_schedule(const char *schedule, test_function tfunc) bool newdiff; if (tl) - tl = tl->next; /* tl has the same length as rl and el - * if it exists */ + tl = tl->next; /* tl has the same length as rl and el if + * it exists */ newdiff = results_differ(tests[i], rl->str, el->str); if (newdiff && tl) diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c index e408e5ea4c..d2a821f3d5 100644 --- a/src/test/regress/regress.c +++ b/src/test/regress/regress.c @@ -550,7 +550,7 @@ ttdummy(PG_FUNCTION_ARGS) return PointerGetDatum(NULL); } } - else if (oldoff != TTDUMMY_INFINITY) /* DELETE */ + else if (oldoff != TTDUMMY_INFINITY) /* DELETE */ { pfree(relname); return PointerGetDatum(NULL); @@ -579,7 +579,7 @@ ttdummy(PG_FUNCTION_ARGS) { cvals[attnum[0] - 1] = newoff; /* start_date eq current date */ cnulls[attnum[0] - 1] = ' '; - cvals[attnum[1] - 1] = TTDUMMY_INFINITY; /* stop_date eq INFINITY */ + cvals[attnum[1] - 1] = TTDUMMY_INFINITY; /* stop_date eq INFINITY */ cnulls[attnum[1] - 1] = ' '; } else @@ -708,8 +708,7 @@ Datum int44out(PG_FUNCTION_ARGS) { int32 *an_array = (int32 *) PG_GETARG_POINTER(0); - char *result = (char *) palloc(16 * 4); /* Allow 14 digits + - * sign */ + char *result = (char *) palloc(16 * 4); /* Allow 14 digits + sign */ int i; char *walk; @@ -896,7 +895,7 @@ test_atomic_flag(void) pg_atomic_clear_flag(&flag); } -#endif /* PG_HAVE_ATOMIC_FLAG_SIMULATION */ +#endif /* PG_HAVE_ATOMIC_FLAG_SIMULATION */ static void test_atomic_uint32(void) diff --git a/src/test/thread/thread_test.c b/src/test/thread/thread_test.c index cb93bcc5ab..32ce80e57f 100644 --- a/src/test/thread/thread_test.c +++ b/src/test/thread/thread_test.c @@ -466,4 +466,4 @@ func_call_2(void) pthread_mutex_unlock(&init_mutex); } -#endif /* !ENABLE_THREAD_SAFETY && !IN_CONFIGURE */ +#endif /* !ENABLE_THREAD_SAFETY && !IN_CONFIGURE */ diff --git a/src/timezone/localtime.c b/src/timezone/localtime.c index 76d96ff631..08642d1236 100644 --- a/src/timezone/localtime.c +++ b/src/timezone/localtime.c @@ -44,7 +44,7 @@ * that tzname[0] has the "normal" length of three characters). */ #define WILDABBR " " -#endif /* !defined WILDABBR */ +#endif /* !defined WILDABBR */ static const char wildabbr[] = WILDABBR; @@ -270,7 +270,7 @@ tzloadbody(char const *name, char *canonname, struct state *sp, bool doextend, return EINVAL; if (nread < (tzheadsize /* struct tzhead */ - + timecnt * stored /* ats */ + + timecnt * stored /* ats */ + timecnt /* types */ + typecnt * 6 /* ttinfos */ + charcnt /* chars */ @@ -788,7 +788,7 @@ getrule(const char *strp, struct rule *rulep) strp = getoffset(strp, &rulep->r_time); } else - rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ + rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ return strp; } @@ -921,7 +921,7 @@ tzparse(const char *name, struct state *sp, bool lastditch) stdlen = (sizeof sp->chars) - 1; charcnt = stdlen + 1; stdoffset = 0; - sp->goback = sp->goahead = false; /* simulate failed tzload() */ + sp->goback = sp->goahead = false; /* simulate failed tzload() */ load_ok = false; } else diff --git a/src/timezone/pgtz.h b/src/timezone/pgtz.h index f5aec6e529..3d89ba00a7 100644 --- a/src/timezone/pgtz.h +++ b/src/timezone/pgtz.h @@ -72,4 +72,4 @@ extern int tzload(const char *name, char *canonname, struct state *sp, bool doextend); extern bool tzparse(const char *name, struct state *sp, bool lastditch); -#endif /* _PGTZ_H */ +#endif /* _PGTZ_H */ diff --git a/src/timezone/private.h b/src/timezone/private.h index f031b17b7e..c141fb6131 100644 --- a/src/timezone/private.h +++ b/src/timezone/private.h @@ -40,10 +40,10 @@ #ifndef WIFEXITED #define WIFEXITED(status) (((status) & 0xff) == 0) -#endif /* !defined WIFEXITED */ +#endif /* !defined WIFEXITED */ #ifndef WEXITSTATUS #define WEXITSTATUS(status) (((status) >> 8) & 0xff) -#endif /* !defined WEXITSTATUS */ +#endif /* !defined WEXITSTATUS */ /* Unlike 's isdigit, this also works if c < 0 | c > UCHAR_MAX. */ #define is_digit(c) ((unsigned)(c) - '0' <= 9) @@ -60,7 +60,7 @@ extern int unlink(const char *filename); #define remove unlink -#endif /* !defined remove */ +#endif /* !defined remove */ /* @@ -166,4 +166,4 @@ extern int unlink(const char *filename); ((int64) YEARSPERREPEAT * (int64) AVGSECSPERYEAR) #define SECSPERREPEAT_BITS 34 /* ceil(log2(SECSPERREPEAT)) */ -#endif /* !defined PRIVATE_H */ +#endif /* !defined PRIVATE_H */ diff --git a/src/timezone/strftime.c b/src/timezone/strftime.c index 9c9baee0b1..7cbafc9d83 100644 --- a/src/timezone/strftime.c +++ b/src/timezone/strftime.c @@ -245,7 +245,7 @@ _fmt(const char *format, const struct pg_tm *t, char *pt, const char *ptlim, */ pt = _add("kitchen sink", pt, ptlim); continue; -#endif /* defined KITCHEN_SINK */ +#endif /* defined KITCHEN_SINK */ case 'l': /* diff --git a/src/timezone/tzfile.h b/src/timezone/tzfile.h index 56a5b43472..2843833e49 100644 --- a/src/timezone/tzfile.h +++ b/src/timezone/tzfile.h @@ -34,9 +34,9 @@ struct tzhead { char tzh_magic[4]; /* TZ_MAGIC */ char tzh_version[1]; /* '\0' or '2' or '3' as of 2013 */ - char tzh_reserved[15]; /* reserved; must be zero */ - char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */ - char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ + char tzh_reserved[15]; /* reserved; must be zero */ + char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */ + char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ char tzh_leapcnt[4]; /* coded number of leap seconds */ char tzh_timecnt[4]; /* coded number of transition times */ char tzh_typecnt[4]; /* coded number of local time types */ @@ -100,4 +100,4 @@ struct tzhead #define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ -#endif /* !defined TZFILE_H */ +#endif /* !defined TZFILE_H */ diff --git a/src/timezone/zic.c b/src/timezone/zic.c index a38cadff58..27c841be9e 100644 --- a/src/timezone/zic.c +++ b/src/timezone/zic.c @@ -27,7 +27,7 @@ typedef int64 zic_t; #ifndef ZIC_MAX_ABBR_LEN_WO_WARN #define ZIC_MAX_ABBR_LEN_WO_WARN 6 -#endif /* !defined ZIC_MAX_ABBR_LEN_WO_WARN */ +#endif /* !defined ZIC_MAX_ABBR_LEN_WO_WARN */ #ifndef WIN32 #ifdef S_IRUSR @@ -83,9 +83,9 @@ struct rule * r_dycode r_dayofmonth r_wday */ -#define DC_DOM 0 /* 1..31 */ /* unused */ -#define DC_DOWGEQ 1 /* 1..31 */ /* 0..6 (Sun..Sat) */ -#define DC_DOWLEQ 2 /* 1..31 */ /* 0..6 (Sun..Sat) */ +#define DC_DOM 0 /* 1..31 */ /* unused */ +#define DC_DOWGEQ 1 /* 1..31 */ /* 0..6 (Sun..Sat) */ +#define DC_DOWLEQ 2 /* 1..31 */ /* 0..6 (Sun..Sat) */ struct zone { @@ -572,7 +572,7 @@ main(int argc, char *argv[]) #ifndef WIN32 umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH)); -#endif /* !WIN32 */ +#endif /* !WIN32 */ progname = argv[0]; if (TYPE_BIT(zic_t) <64) { @@ -852,7 +852,7 @@ relname(char const *from, char const *to) } return result; } -#endif /* HAVE_SYMLINK */ +#endif /* HAVE_SYMLINK */ /* Hard link FROM to TO, following any symbolic links. Return 0 if successful, an error number otherwise. */ @@ -920,7 +920,7 @@ dolink(char const *fromfield, char const *tofield, bool staysymlink) strerror(link_errno)); } else -#endif /* HAVE_SYMLINK */ +#endif /* HAVE_SYMLINK */ { FILE *fp, *tp; @@ -2140,7 +2140,7 @@ writezone(const char *const name, const char *const string, char version) writetype[type] = true; } } -#endif /* !defined +#endif /* !defined * LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH */ thistypecnt = 0; for (i = 0; i < typecnt; ++i) diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index b98aa15195..c8c702d69e 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -235,11 +235,6 @@ sub post_indent # Fix run-together comments to have a tab between them $source =~ s!\*/(/\*.*\*/)$!*/\t$1!gm; - # cpp conditionals - - # Reduce whitespace between #endif and comments to one tab - $source =~ s!^\#endif[ \t]+/\*!#endif /*!gm; - ## Functions # Use a single space before '*' in function return types diff --git a/src/tutorial/funcs.c b/src/tutorial/funcs.c index 3c78f336fc..721c0c87fc 100644 --- a/src/tutorial/funcs.c +++ b/src/tutorial/funcs.c @@ -25,7 +25,7 @@ float8 *add_one_float8(float8 *arg); Point *makepoint(Point *pointx, Point *pointy); text *copytext(text *t); text *concat_text(text *arg1, text *arg2); -bool c_overpaid(HeapTupleHeader t, /* the current instance of EMP */ +bool c_overpaid(HeapTupleHeader t, /* the current instance of EMP */ int32 limit); @@ -75,9 +75,9 @@ copytext(text *t) /* * VARDATA is a pointer to the data region of the struct. */ - memcpy((void *) VARDATA(new_t), /* destination */ + memcpy((void *) VARDATA(new_t), /* destination */ (void *) VARDATA(t), /* source */ - VARSIZE(t) - VARHDRSZ); /* how many bytes */ + VARSIZE(t) - VARHDRSZ); /* how many bytes */ return new_t; } diff --git a/src/tutorial/funcs_new.c b/src/tutorial/funcs_new.c index 2e09f8de6e..091ca639cf 100644 --- a/src/tutorial/funcs_new.c +++ b/src/tutorial/funcs_new.c @@ -81,9 +81,9 @@ copytext(PG_FUNCTION_ARGS) * VARDATA is a pointer to the data region of the new struct. The source * could be a short datum, so retrieve its data through VARDATA_ANY. */ - memcpy((void *) VARDATA(new_t), /* destination */ - (void *) VARDATA_ANY(t), /* source */ - VARSIZE_ANY_EXHDR(t)); /* how many bytes */ + memcpy((void *) VARDATA(new_t), /* destination */ + (void *) VARDATA_ANY(t), /* source */ + VARSIZE_ANY_EXHDR(t)); /* how many bytes */ PG_RETURN_TEXT_P(new_t); } -- 2.40.0