pgindent run for 9.4
authorBruce Momjian
Tue, 6 May 2014 16:12:18 +0000 (12:12 -0400)
committerBruce Momjian
Tue, 6 May 2014 16:12:18 +0000 (12:12 -0400)
This includes removing tabs after periods in C comments, which was
applied to back branches, so this change should not effect backpatching.

854 files changed:
config/test_quiet_include.h
contrib/auto_explain/auto_explain.c
contrib/btree_gist/btree_interval.c
contrib/cube/cube.c
contrib/cube/cubedata.h
contrib/dblink/dblink.c
contrib/earthdistance/earthdistance.c
contrib/file_fdw/file_fdw.c
contrib/fuzzystrmatch/levenshtein.c
contrib/hstore/hstore.h
contrib/hstore/hstore_gin.c
contrib/hstore/hstore_io.c
contrib/intarray/_int_bool.c
contrib/intarray/_int_gist.c
contrib/intarray/_int_tool.c
contrib/intarray/bench/bench.pl
contrib/ltree/ltree_op.c
contrib/oid2name/oid2name.c
contrib/pageinspect/rawpage.c
contrib/pg_archivecleanup/pg_archivecleanup.c
contrib/pg_prewarm/pg_prewarm.c
contrib/pg_stat_statements/pg_stat_statements.c
contrib/pg_test_fsync/pg_test_fsync.c
contrib/pg_trgm/trgm_gin.c
contrib/pg_trgm/trgm_gist.c
contrib/pg_trgm/trgm_regexp.c
contrib/pg_upgrade/check.c
contrib/pg_upgrade/controldata.c
contrib/pg_upgrade/dump.c
contrib/pg_upgrade/exec.c
contrib/pg_upgrade/file.c
contrib/pg_upgrade/function.c
contrib/pg_upgrade/info.c
contrib/pg_upgrade/option.c
contrib/pg_upgrade/page.c
contrib/pg_upgrade/parallel.c
contrib/pg_upgrade/pg_upgrade.c
contrib/pg_upgrade/pg_upgrade.h
contrib/pg_upgrade/relfilenode.c
contrib/pg_upgrade/server.c
contrib/pg_upgrade/tablespace.c
contrib/pg_upgrade/util.c
contrib/pg_upgrade/version_old_8_3.c
contrib/pg_xlogdump/compat.c
contrib/pg_xlogdump/pg_xlogdump.c
contrib/pgbench/pgbench.c
contrib/pgcrypto/crypt-des.c
contrib/pgcrypto/crypt-gensalt.c
contrib/pgcrypto/fortuna.c
contrib/pgcrypto/fortuna.h
contrib/pgcrypto/imath.c
contrib/pgcrypto/imath.h
contrib/pgcrypto/internal-sha2.c
contrib/pgcrypto/internal.c
contrib/pgcrypto/mbuf.c
contrib/pgcrypto/mbuf.h
contrib/pgcrypto/md5.c
contrib/pgcrypto/md5.h
contrib/pgcrypto/openssl.c
contrib/pgcrypto/pgcrypto.c
contrib/pgcrypto/pgcrypto.h
contrib/pgcrypto/pgp-armor.c
contrib/pgcrypto/pgp-cfb.c
contrib/pgcrypto/pgp-compress.c
contrib/pgcrypto/pgp-decrypt.c
contrib/pgcrypto/pgp-encrypt.c
contrib/pgcrypto/pgp-info.c
contrib/pgcrypto/pgp-mpi-internal.c
contrib/pgcrypto/pgp-mpi-openssl.c
contrib/pgcrypto/pgp-mpi.c
contrib/pgcrypto/pgp-pgsql.c
contrib/pgcrypto/pgp-pubdec.c
contrib/pgcrypto/pgp-pubenc.c
contrib/pgcrypto/pgp-pubkey.c
contrib/pgcrypto/pgp-s2k.c
contrib/pgcrypto/pgp.c
contrib/pgcrypto/pgp.h
contrib/pgcrypto/px-crypt.c
contrib/pgcrypto/px-crypt.h
contrib/pgcrypto/px-hmac.c
contrib/pgcrypto/px.c
contrib/pgcrypto/px.h
contrib/pgcrypto/random.c
contrib/pgcrypto/rijndael.c
contrib/pgcrypto/rijndael.h
contrib/pgcrypto/sha1.c
contrib/pgcrypto/sha1.h
contrib/pgcrypto/sha2.c
contrib/pgcrypto/sha2.h
contrib/pgstattuple/pgstatindex.c
contrib/pgstattuple/pgstattuple.c
contrib/postgres_fdw/connection.c
contrib/postgres_fdw/deparse.c
contrib/postgres_fdw/option.c
contrib/postgres_fdw/postgres_fdw.c
contrib/sepgsql/label.c
contrib/sepgsql/uavc.c
contrib/spi/timetravel.c
contrib/sslinfo/sslinfo.c
contrib/tcn/tcn.c
contrib/test_decoding/test_decoding.c
contrib/test_shm_mq/setup.c
contrib/test_shm_mq/test.c
contrib/test_shm_mq/test_shm_mq.h
contrib/test_shm_mq/worker.c
contrib/worker_spi/worker_spi.c
contrib/xml2/xpath.c
src/backend/access/common/heaptuple.c
src/backend/access/common/indextuple.c
src/backend/access/common/printtup.c
src/backend/access/common/reloptions.c
src/backend/access/common/tupconvert.c
src/backend/access/common/tupdesc.c
src/backend/access/gin/ginarrayproc.c
src/backend/access/gin/ginbtree.c
src/backend/access/gin/ginbulk.c
src/backend/access/gin/gindatapage.c
src/backend/access/gin/ginentrypage.c
src/backend/access/gin/ginfast.c
src/backend/access/gin/ginget.c
src/backend/access/gin/gininsert.c
src/backend/access/gin/ginlogic.c
src/backend/access/gin/ginpostinglist.c
src/backend/access/gin/ginscan.c
src/backend/access/gin/ginutil.c
src/backend/access/gin/ginvacuum.c
src/backend/access/gin/ginxlog.c
src/backend/access/gist/gist.c
src/backend/access/gist/gistget.c
src/backend/access/gist/gistscan.c
src/backend/access/gist/gistsplit.c
src/backend/access/gist/gistutil.c
src/backend/access/gist/gistvacuum.c
src/backend/access/gist/gistxlog.c
src/backend/access/hash/hash.c
src/backend/access/hash/hashfunc.c
src/backend/access/hash/hashinsert.c
src/backend/access/hash/hashovfl.c
src/backend/access/hash/hashpage.c
src/backend/access/hash/hashsearch.c
src/backend/access/hash/hashsort.c
src/backend/access/hash/hashutil.c
src/backend/access/heap/heapam.c
src/backend/access/heap/hio.c
src/backend/access/heap/pruneheap.c
src/backend/access/heap/rewriteheap.c
src/backend/access/heap/syncscan.c
src/backend/access/heap/tuptoaster.c
src/backend/access/heap/visibilitymap.c
src/backend/access/index/genam.c
src/backend/access/index/indexam.c
src/backend/access/nbtree/nbtcompare.c
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtsearch.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtutils.c
src/backend/access/nbtree/nbtxlog.c
src/backend/access/rmgrdesc/gindesc.c
src/backend/access/rmgrdesc/nbtdesc.c
src/backend/access/spgist/spgdoinsert.c
src/backend/access/spgist/spginsert.c
src/backend/access/spgist/spgscan.c
src/backend/access/spgist/spgtextproc.c
src/backend/access/spgist/spgutils.c
src/backend/access/spgist/spgvacuum.c
src/backend/access/spgist/spgxlog.c
src/backend/access/transam/clog.c
src/backend/access/transam/multixact.c
src/backend/access/transam/slru.c
src/backend/access/transam/subtrans.c
src/backend/access/transam/timeline.c
src/backend/access/transam/transam.c
src/backend/access/transam/twophase.c
src/backend/access/transam/varsup.c
src/backend/access/transam/xact.c
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogarchive.c
src/backend/access/transam/xlogfuncs.c
src/backend/access/transam/xlogreader.c
src/backend/bootstrap/bootstrap.c
src/backend/catalog/aclchk.c
src/backend/catalog/catalog.c
src/backend/catalog/dependency.c
src/backend/catalog/heap.c
src/backend/catalog/index.c
src/backend/catalog/indexing.c
src/backend/catalog/namespace.c
src/backend/catalog/objectaddress.c
src/backend/catalog/pg_aggregate.c
src/backend/catalog/pg_collation.c
src/backend/catalog/pg_constraint.c
src/backend/catalog/pg_db_role_setting.c
src/backend/catalog/pg_depend.c
src/backend/catalog/pg_enum.c
src/backend/catalog/pg_largeobject.c
src/backend/catalog/pg_operator.c
src/backend/catalog/pg_proc.c
src/backend/catalog/pg_shdepend.c
src/backend/catalog/pg_type.c
src/backend/catalog/storage.c
src/backend/catalog/toasting.c
src/backend/commands/aggregatecmds.c
src/backend/commands/alter.c
src/backend/commands/analyze.c
src/backend/commands/async.c
src/backend/commands/cluster.c
src/backend/commands/constraint.c
src/backend/commands/copy.c
src/backend/commands/createas.c
src/backend/commands/dbcommands.c
src/backend/commands/define.c
src/backend/commands/event_trigger.c
src/backend/commands/explain.c
src/backend/commands/extension.c
src/backend/commands/foreigncmds.c
src/backend/commands/functioncmds.c
src/backend/commands/indexcmds.c
src/backend/commands/matview.c
src/backend/commands/opclasscmds.c
src/backend/commands/operatorcmds.c
src/backend/commands/portalcmds.c
src/backend/commands/prepare.c
src/backend/commands/proclang.c
src/backend/commands/schemacmds.c
src/backend/commands/sequence.c
src/backend/commands/tablecmds.c
src/backend/commands/tablespace.c
src/backend/commands/trigger.c
src/backend/commands/typecmds.c
src/backend/commands/user.c
src/backend/commands/vacuum.c
src/backend/commands/vacuumlazy.c
src/backend/commands/variable.c
src/backend/commands/view.c
src/backend/executor/execAmi.c
src/backend/executor/execCurrent.c
src/backend/executor/execJunk.c
src/backend/executor/execMain.c
src/backend/executor/execProcnode.c
src/backend/executor/execQual.c
src/backend/executor/execScan.c
src/backend/executor/execTuples.c
src/backend/executor/execUtils.c
src/backend/executor/functions.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeAppend.c
src/backend/executor/nodeBitmapHeapscan.c
src/backend/executor/nodeForeignscan.c
src/backend/executor/nodeFunctionscan.c
src/backend/executor/nodeHash.c
src/backend/executor/nodeHashjoin.c
src/backend/executor/nodeIndexonlyscan.c
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeLimit.c
src/backend/executor/nodeLockRows.c
src/backend/executor/nodeMaterial.c
src/backend/executor/nodeMergeAppend.c
src/backend/executor/nodeMergejoin.c
src/backend/executor/nodeModifyTable.c
src/backend/executor/nodeRecursiveunion.c
src/backend/executor/nodeSetOp.c
src/backend/executor/nodeSubplan.c
src/backend/executor/nodeSubqueryscan.c
src/backend/executor/nodeUnique.c
src/backend/executor/nodeValuesscan.c
src/backend/executor/nodeWindowAgg.c
src/backend/executor/nodeWorktablescan.c
src/backend/executor/spi.c
src/backend/executor/tstoreReceiver.c
src/backend/lib/stringinfo.c
src/backend/libpq/auth.c
src/backend/libpq/be-fsstubs.c
src/backend/libpq/be-secure.c
src/backend/libpq/hba.c
src/backend/libpq/md5.c
src/backend/libpq/pqcomm.c
src/backend/libpq/pqformat.c
src/backend/main/main.c
src/backend/nodes/bitmapset.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/list.c
src/backend/nodes/makefuncs.c
src/backend/nodes/nodeFuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/params.c
src/backend/nodes/read.c
src/backend/nodes/readfuncs.c
src/backend/nodes/tidbitmap.c
src/backend/optimizer/geqo/geqo_eval.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/clausesel.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/path/equivclass.c
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/path/joinpath.c
src/backend/optimizer/path/joinrels.c
src/backend/optimizer/path/pathkeys.c
src/backend/optimizer/path/tidpath.c
src/backend/optimizer/plan/analyzejoins.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/initsplan.c
src/backend/optimizer/plan/planagg.c
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/setrefs.c
src/backend/optimizer/plan/subselect.c
src/backend/optimizer/prep/prepjointree.c
src/backend/optimizer/prep/prepqual.c
src/backend/optimizer/prep/prepsecurity.c
src/backend/optimizer/prep/preptlist.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/joininfo.c
src/backend/optimizer/util/orclauses.c
src/backend/optimizer/util/pathnode.c
src/backend/optimizer/util/placeholder.c
src/backend/optimizer/util/plancat.c
src/backend/optimizer/util/predtest.c
src/backend/optimizer/util/relnode.c
src/backend/optimizer/util/restrictinfo.c
src/backend/optimizer/util/tlist.c
src/backend/optimizer/util/var.c
src/backend/parser/analyze.c
src/backend/parser/kwlookup.c
src/backend/parser/parse_agg.c
src/backend/parser/parse_clause.c
src/backend/parser/parse_coerce.c
src/backend/parser/parse_collate.c
src/backend/parser/parse_cte.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_func.c
src/backend/parser/parse_node.c
src/backend/parser/parse_oper.c
src/backend/parser/parse_param.c
src/backend/parser/parse_relation.c
src/backend/parser/parse_target.c
src/backend/parser/parse_type.c
src/backend/parser/parse_utilcmd.c
src/backend/parser/parser.c
src/backend/parser/scansup.c
src/backend/port/darwin/system.c
src/backend/port/dynloader/darwin.c
src/backend/port/dynloader/freebsd.c
src/backend/port/dynloader/netbsd.c
src/backend/port/dynloader/openbsd.c
src/backend/port/posix_sema.c
src/backend/port/sysv_sema.c
src/backend/port/sysv_shmem.c
src/backend/port/unix_latch.c
src/backend/port/win32/socket.c
src/backend/port/win32_latch.c
src/backend/port/win32_shmem.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/bgworker.c
src/backend/postmaster/bgwriter.c
src/backend/postmaster/checkpointer.c
src/backend/postmaster/fork_process.c
src/backend/postmaster/pgarch.c
src/backend/postmaster/pgstat.c
src/backend/postmaster/postmaster.c
src/backend/postmaster/startup.c
src/backend/postmaster/syslogger.c
src/backend/postmaster/walwriter.c
src/backend/regex/regc_color.c
src/backend/regex/regc_cvec.c
src/backend/regex/regc_lex.c
src/backend/regex/regc_locale.c
src/backend/regex/regc_nfa.c
src/backend/regex/regc_pg_locale.c
src/backend/regex/regcomp.c
src/backend/regex/rege_dfa.c
src/backend/regex/regerror.c
src/backend/regex/regexec.c
src/backend/regex/regfree.c
src/backend/regex/regprefix.c
src/backend/replication/basebackup.c
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
src/backend/replication/logical/decode.c
src/backend/replication/logical/logical.c
src/backend/replication/logical/logicalfuncs.c
src/backend/replication/logical/reorderbuffer.c
src/backend/replication/logical/snapbuild.c
src/backend/replication/slot.c
src/backend/replication/slotfuncs.c
src/backend/replication/syncrep.c
src/backend/replication/walreceiver.c
src/backend/replication/walreceiverfuncs.c
src/backend/replication/walsender.c
src/backend/rewrite/rewriteDefine.c
src/backend/rewrite/rewriteHandler.c
src/backend/rewrite/rewriteManip.c
src/backend/rewrite/rewriteSupport.c
src/backend/storage/buffer/buf_init.c
src/backend/storage/buffer/buf_table.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/freelist.c
src/backend/storage/buffer/localbuf.c
src/backend/storage/file/buffile.c
src/backend/storage/file/fd.c
src/backend/storage/freespace/freespace.c
src/backend/storage/freespace/fsmpage.c
src/backend/storage/ipc/dsm.c
src/backend/storage/ipc/dsm_impl.c
src/backend/storage/ipc/ipc.c
src/backend/storage/ipc/ipci.c
src/backend/storage/ipc/pmsignal.c
src/backend/storage/ipc/procarray.c
src/backend/storage/ipc/procsignal.c
src/backend/storage/ipc/shm_mq.c
src/backend/storage/ipc/shm_toc.c
src/backend/storage/ipc/shmem.c
src/backend/storage/ipc/shmqueue.c
src/backend/storage/ipc/sinval.c
src/backend/storage/ipc/sinvaladt.c
src/backend/storage/ipc/standby.c
src/backend/storage/large_object/inv_api.c
src/backend/storage/lmgr/deadlock.c
src/backend/storage/lmgr/lmgr.c
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/lwlock.c
src/backend/storage/lmgr/predicate.c
src/backend/storage/lmgr/proc.c
src/backend/storage/lmgr/s_lock.c
src/backend/storage/lmgr/spin.c
src/backend/storage/page/bufpage.c
src/backend/storage/smgr/md.c
src/backend/storage/smgr/smgr.c
src/backend/tcop/fastpath.c
src/backend/tcop/postgres.c
src/backend/tcop/pquery.c
src/backend/tcop/utility.c
src/backend/tsearch/ts_locale.c
src/backend/tsearch/ts_selfuncs.c
src/backend/tsearch/ts_typanalyze.c
src/backend/tsearch/ts_utils.c
src/backend/tsearch/wparser_def.c
src/backend/utils/adt/acl.c
src/backend/utils/adt/array_selfuncs.c
src/backend/utils/adt/array_typanalyze.c
src/backend/utils/adt/array_userfuncs.c
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/arrayutils.c
src/backend/utils/adt/cash.c
src/backend/utils/adt/char.c
src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/datum.c
src/backend/utils/adt/dbsize.c
src/backend/utils/adt/domains.c
src/backend/utils/adt/float.c
src/backend/utils/adt/format_type.c
src/backend/utils/adt/formatting.c
src/backend/utils/adt/geo_ops.c
src/backend/utils/adt/geo_selfuncs.c
src/backend/utils/adt/inet_cidr_ntop.c
src/backend/utils/adt/int.c
src/backend/utils/adt/int8.c
src/backend/utils/adt/json.c
src/backend/utils/adt/jsonb.c
src/backend/utils/adt/jsonb_gin.c
src/backend/utils/adt/jsonb_op.c
src/backend/utils/adt/jsonb_util.c
src/backend/utils/adt/jsonfuncs.c
src/backend/utils/adt/like.c
src/backend/utils/adt/misc.c
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/network.c
src/backend/utils/adt/network_gist.c
src/backend/utils/adt/numeric.c
src/backend/utils/adt/oid.c
src/backend/utils/adt/orderedsetaggs.c
src/backend/utils/adt/pg_locale.c
src/backend/utils/adt/pg_lsn.c
src/backend/utils/adt/pg_lzcompress.c
src/backend/utils/adt/pgstatfuncs.c
src/backend/utils/adt/pseudotypes.c
src/backend/utils/adt/rangetypes.c
src/backend/utils/adt/rangetypes_gist.c
src/backend/utils/adt/regexp.c
src/backend/utils/adt/regproc.c
src/backend/utils/adt/ri_triggers.c
src/backend/utils/adt/rowtypes.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/adt/timestamp.c
src/backend/utils/adt/tsginidx.c
src/backend/utils/adt/varchar.c
src/backend/utils/adt/varlena.c
src/backend/utils/adt/xml.c
src/backend/utils/cache/attoptcache.c
src/backend/utils/cache/catcache.c
src/backend/utils/cache/inval.c
src/backend/utils/cache/lsyscache.c
src/backend/utils/cache/plancache.c
src/backend/utils/cache/relcache.c
src/backend/utils/cache/relfilenodemap.c
src/backend/utils/cache/relmapper.c
src/backend/utils/cache/spccache.c
src/backend/utils/cache/syscache.c
src/backend/utils/cache/typcache.c
src/backend/utils/error/elog.c
src/backend/utils/fmgr/dfmgr.c
src/backend/utils/fmgr/fmgr.c
src/backend/utils/fmgr/funcapi.c
src/backend/utils/hash/dynahash.c
src/backend/utils/init/miscinit.c
src/backend/utils/init/postinit.c
src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c
src/backend/utils/mb/mbutils.c
src/backend/utils/mb/wchar.c
src/backend/utils/mb/wstrcmp.c
src/backend/utils/mb/wstrncmp.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/ps_status.c
src/backend/utils/misc/rbtree.c
src/backend/utils/misc/timeout.c
src/backend/utils/misc/tzparser.c
src/backend/utils/mmgr/aset.c
src/backend/utils/mmgr/mcxt.c
src/backend/utils/mmgr/portalmem.c
src/backend/utils/resowner/resowner.c
src/backend/utils/sort/logtape.c
src/backend/utils/sort/tuplesort.c
src/backend/utils/sort/tuplestore.c
src/backend/utils/time/combocid.c
src/backend/utils/time/snapmgr.c
src/backend/utils/time/tqual.c
src/bin/initdb/findtimezone.c
src/bin/initdb/initdb.c
src/bin/initdb/t/001_initdb.pl
src/bin/pg_basebackup/pg_basebackup.c
src/bin/pg_basebackup/pg_receivexlog.c
src/bin/pg_basebackup/pg_recvlogical.c
src/bin/pg_basebackup/receivelog.c
src/bin/pg_basebackup/streamutil.c
src/bin/pg_basebackup/streamutil.h
src/bin/pg_basebackup/t/010_pg_basebackup.pl
src/bin/pg_config/t/001_pg_config.pl
src/bin/pg_controldata/pg_controldata.c
src/bin/pg_controldata/t/001_pg_controldata.pl
src/bin/pg_ctl/pg_ctl.c
src/bin/pg_ctl/t/001_start_stop.pl
src/bin/pg_ctl/t/002_status.pl
src/bin/pg_dump/common.c
src/bin/pg_dump/compress_io.c
src/bin/pg_dump/dumputils.c
src/bin/pg_dump/parallel.c
src/bin/pg_dump/pg_backup.h
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_backup_archiver.h
src/bin/pg_dump/pg_backup_custom.c
src/bin/pg_dump/pg_backup_db.c
src/bin/pg_dump/pg_backup_directory.c
src/bin/pg_dump/pg_backup_tar.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/pg_dump_sort.c
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_resetxlog/pg_resetxlog.c
src/bin/psql/command.c
src/bin/psql/common.c
src/bin/psql/copy.c
src/bin/psql/describe.c
src/bin/psql/input.c
src/bin/psql/large_obj.c
src/bin/psql/mainloop.c
src/bin/psql/mbprint.c
src/bin/psql/print.c
src/bin/psql/settings.h
src/bin/psql/stringutils.c
src/bin/psql/tab-complete.c
src/bin/psql/variables.c
src/bin/scripts/common.c
src/bin/scripts/createuser.c
src/bin/scripts/pg_isready.c
src/bin/scripts/t/010_clusterdb.pl
src/bin/scripts/t/011_clusterdb_all.pl
src/bin/scripts/t/020_createdb.pl
src/bin/scripts/t/030_createlang.pl
src/bin/scripts/t/040_createuser.pl
src/bin/scripts/t/050_dropdb.pl
src/bin/scripts/t/060_droplang.pl
src/bin/scripts/t/070_dropuser.pl
src/bin/scripts/t/090_reindexdb.pl
src/bin/scripts/t/091_reindexdb_all.pl
src/bin/scripts/t/100_vacuumdb.pl
src/bin/scripts/t/101_vacuumdb_all.pl
src/bin/scripts/t/102_vacuumdb_stages.pl
src/bin/scripts/vacuumdb.c
src/common/psprintf.c
src/common/relpath.c
src/include/access/attnum.h
src/include/access/genam.h
src/include/access/gin.h
src/include/access/gin_private.h
src/include/access/gist.h
src/include/access/hash.h
src/include/access/heapam.h
src/include/access/heapam_xlog.h
src/include/access/htup.h
src/include/access/htup_details.h
src/include/access/itup.h
src/include/access/nbtree.h
src/include/access/reloptions.h
src/include/access/rewriteheap.h
src/include/access/rmgr.h
src/include/access/rmgrlist.h
src/include/access/skey.h
src/include/access/slru.h
src/include/access/spgist_private.h
src/include/access/transam.h
src/include/access/tupdesc.h
src/include/access/tupmacs.h
src/include/access/tuptoaster.h
src/include/access/xlog.h
src/include/access/xlog_internal.h
src/include/access/xlogdefs.h
src/include/c.h
src/include/catalog/catversion.h
src/include/catalog/dependency.h
src/include/catalog/duplicate_oids
src/include/catalog/genbki.h
src/include/catalog/namespace.h
src/include/catalog/objectaccess.h
src/include/catalog/pg_aggregate.h
src/include/catalog/pg_attrdef.h
src/include/catalog/pg_attribute.h
src/include/catalog/pg_authid.h
src/include/catalog/pg_constraint.h
src/include/catalog/pg_control.h
src/include/catalog/pg_db_role_setting.h
src/include/catalog/pg_default_acl.h
src/include/catalog/pg_description.h
src/include/catalog/pg_event_trigger.h
src/include/catalog/pg_index.h
src/include/catalog/pg_largeobject.h
src/include/catalog/pg_opclass.h
src/include/catalog/pg_proc.h
src/include/catalog/pg_rewrite.h
src/include/catalog/pg_shdepend.h
src/include/catalog/pg_shdescription.h
src/include/catalog/pg_statistic.h
src/include/catalog/pg_trigger.h
src/include/catalog/pg_ts_dict.h
src/include/catalog/pg_ts_template.h
src/include/catalog/pg_type.h
src/include/catalog/toasting.h
src/include/commands/comment.h
src/include/commands/tablecmds.h
src/include/commands/vacuum.h
src/include/common/fe_memutils.h
src/include/common/relpath.h
src/include/datatype/timestamp.h
src/include/executor/executor.h
src/include/executor/hashjoin.h
src/include/executor/spi_priv.h
src/include/executor/tuptable.h
src/include/fmgr.h
src/include/funcapi.h
src/include/lib/ilist.h
src/include/lib/stringinfo.h
src/include/libpq/libpq-be.h
src/include/libpq/pqcomm.h
src/include/mb/pg_wchar.h
src/include/miscadmin.h
src/include/nodes/execnodes.h
src/include/nodes/nodes.h
src/include/nodes/params.h
src/include/nodes/parsenodes.h
src/include/nodes/plannodes.h
src/include/nodes/primnodes.h
src/include/nodes/relation.h
src/include/nodes/replnodes.h
src/include/nodes/tidbitmap.h
src/include/nodes/value.h
src/include/parser/gramparse.h
src/include/parser/parse_node.h
src/include/parser/scanner.h
src/include/pg_config_manual.h
src/include/pgstat.h
src/include/port.h
src/include/port/linux.h
src/include/port/win32.h
src/include/portability/instr_time.h
src/include/postgres.h
src/include/postgres_ext.h
src/include/postmaster/bgworker.h
src/include/postmaster/bgworker_internals.h
src/include/postmaster/syslogger.h
src/include/regex/regcustom.h
src/include/regex/regex.h
src/include/regex/regexport.h
src/include/regex/regguts.h
src/include/replication/basebackup.h
src/include/replication/decode.h
src/include/replication/logical.h
src/include/replication/output_plugin.h
src/include/replication/reorderbuffer.h
src/include/replication/slot.h
src/include/replication/snapbuild.h
src/include/replication/walreceiver.h
src/include/rewrite/rewriteHandler.h
src/include/snowball/header.h
src/include/storage/barrier.h
src/include/storage/block.h
src/include/storage/buf_internals.h
src/include/storage/bufpage.h
src/include/storage/dsm.h
src/include/storage/dsm_impl.h
src/include/storage/ipc.h
src/include/storage/itemid.h
src/include/storage/itemptr.h
src/include/storage/large_object.h
src/include/storage/lock.h
src/include/storage/lwlock.h
src/include/storage/pg_sema.h
src/include/storage/pg_shmem.h
src/include/storage/pos.h
src/include/storage/predicate_internals.h
src/include/storage/proc.h
src/include/storage/procarray.h
src/include/storage/relfilenode.h
src/include/storage/shm_mq.h
src/include/storage/shm_toc.h
src/include/storage/sinval.h
src/include/storage/sinvaladt.h
src/include/storage/smgr.h
src/include/storage/spin.h
src/include/tcop/dest.h
src/include/tcop/tcopdebug.h
src/include/utils/acl.h
src/include/utils/builtins.h
src/include/utils/catcache.h
src/include/utils/datetime.h
src/include/utils/elog.h
src/include/utils/guc.h
src/include/utils/hsearch.h
src/include/utils/inet.h
src/include/utils/jsonapi.h
src/include/utils/jsonb.h
src/include/utils/memutils.h
src/include/utils/palloc.h
src/include/utils/pg_crc.h
src/include/utils/plancache.h
src/include/utils/portal.h
src/include/utils/rel.h
src/include/utils/relcache.h
src/include/utils/relfilenodemap.h
src/include/utils/resowner.h
src/include/utils/resowner_private.h
src/include/utils/selfuncs.h
src/include/utils/snapshot.h
src/include/utils/sortsupport.h
src/include/utils/tqual.h
src/include/utils/tuplesort.h
src/include/utils/tuplestore.h
src/include/utils/typcache.h
src/interfaces/ecpg/ecpglib/data.c
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/ecpglib/extern.h
src/interfaces/ecpg/include/sqlca.h
src/interfaces/ecpg/pgtypeslib/dt.h
src/interfaces/ecpg/pgtypeslib/dt_common.c
src/interfaces/ecpg/pgtypeslib/interval.c
src/interfaces/ecpg/pgtypeslib/numeric.c
src/interfaces/ecpg/preproc/c_keywords.c
src/interfaces/ecpg/preproc/extern.h
src/interfaces/ecpg/preproc/output.c
src/interfaces/ecpg/preproc/parse.pl
src/interfaces/ecpg/preproc/parser.c
src/interfaces/ecpg/preproc/type.c
src/interfaces/ecpg/preproc/variable.c
src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c
src/interfaces/ecpg/test/expected/preproc-init.c
src/interfaces/ecpg/test/expected/sql-array.c
src/interfaces/ecpg/test/expected/sql-code100.c
src/interfaces/ecpg/test/expected/sql-copystdout.c
src/interfaces/ecpg/test/expected/sql-define.c
src/interfaces/ecpg/test/expected/sql-dynalloc.c
src/interfaces/ecpg/test/expected/sql-dynalloc2.c
src/interfaces/ecpg/test/expected/sql-dyntest.c
src/interfaces/ecpg/test/expected/sql-indicators.c
src/interfaces/ecpg/test/expected/thread-alloc.c
src/interfaces/ecpg/test/expected/thread-descriptor.c
src/interfaces/ecpg/test/expected/thread-prep.c
src/interfaces/ecpg/test/pg_regress_ecpg.c
src/interfaces/libpq/fe-auth.c
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/fe-lobj.c
src/interfaces/libpq/fe-misc.c
src/interfaces/libpq/fe-protocol2.c
src/interfaces/libpq/fe-protocol3.c
src/interfaces/libpq/fe-secure.c
src/interfaces/libpq/libpq-fe.h
src/interfaces/libpq/libpq-int.h
src/interfaces/libpq/pqexpbuffer.c
src/interfaces/libpq/pqexpbuffer.h
src/interfaces/libpq/test/uri-regress.c
src/pl/plperl/plperl.c
src/pl/plpgsql/src/pl_comp.c
src/pl/plpgsql/src/pl_exec.c
src/pl/plpgsql/src/pl_funcs.c
src/pl/plpgsql/src/pl_handler.c
src/pl/plpgsql/src/pl_scanner.c
src/pl/plpgsql/src/plpgsql.h
src/pl/plpython/plpy_elog.c
src/pl/plpython/plpy_exec.c
src/pl/plpython/plpy_typeio.c
src/pl/plpython/plpy_util.c
src/pl/tcl/pltcl.c
src/port/chklocale.c
src/port/crypt.c
src/port/dirent.c
src/port/erand48.c
src/port/fls.c
src/port/getaddrinfo.c
src/port/getopt.c
src/port/getopt_long.c
src/port/inet_aton.c
src/port/kill.c
src/port/path.c
src/port/pgmkdirp.c
src/port/pqsignal.c
src/port/qsort.c
src/port/qsort_arg.c
src/port/snprintf.c
src/port/sprompt.c
src/port/strlcat.c
src/port/strlcpy.c
src/port/thread.c
src/port/unsetenv.c
src/test/isolation/isolation_main.c
src/test/isolation/isolationtester.c
src/test/isolation/isolationtester.h
src/test/perl/TestLib.pm
src/test/regress/pg_regress.c
src/test/regress/pg_regress.h
src/test/regress/pg_regress_main.c
src/test/regress/regress.c
src/timezone/localtime.c
src/timezone/pgtz.c
src/timezone/zic.c
src/tools/entab/entab.c
src/tools/git_changelog
src/tools/msvc/MSBuildProject.pm
src/tools/msvc/Mkvcbuild.pm
src/tools/msvc/Solution.pm
src/tools/msvc/gendef.pl
src/tools/pgindent/pgindent
src/tutorial/complex.c

index eb0515ede7861f5f4cb7bf27595c547877c53e11..f4fa4d30dd774aa90c6715c032e4f70500136ea4 100644 (file)
@@ -2,4 +2,8 @@
  * For the raison d'etre of this file, check the comment above the definition
  * of the PGAC_C_INLINE macro in config/c-compiler.m4.
  */
-static inline int fun () { return 0; }
+static inline int
+fun()
+{
+   return 0;
+}
index c8ca7c4a3403059a6d8c8cbd9b96059b14f26174..cbbd25753f72deb33123b47508d732e57f1cb247 100644 (file)
@@ -116,7 +116,7 @@ _PG_init(void)
 
    DefineCustomBoolVariable("auto_explain.log_triggers",
                             "Include trigger statistics in plans.",
-                            "This has no effect unless log_analyze is also set.",
+                       "This has no effect unless log_analyze is also set.",
                             &auto_explain_log_triggers,
                             false,
                             PGC_SUSET,
index e406d7120c4937a2582e84e916af4dc464b90777..93a341eb77e4abf9ac287a275379e532de39d809 100644 (file)
@@ -86,7 +86,7 @@ gbt_intv_dist(const void *a, const void *b)
 
 /*
  * INTERVALSIZE should be the actual size-on-disk of an Interval, as shown
- * in pg_type. This might be less than sizeof(Interval) if the compiler
+ * in pg_type.  This might be less than sizeof(Interval) if the compiler
  * insists on adding alignment padding at the end of the struct.
  */
 #define INTERVALSIZE 16
index 906cc9efc7f7684253f5f50bafc83fa9f74f89dc..b0305ef431dca7a23272f6a98a6096ff3feae504 100644 (file)
@@ -104,7 +104,7 @@ bool        g_cube_internal_consistent(NDBOX *key, NDBOX *query, StrategyNumber strate
 ** Auxiliary funxtions
 */
 static double distance_1D(double a1, double a2, double b1, double b2);
-static bool    cube_is_point_internal(NDBOX *cube);
+static bool cube_is_point_internal(NDBOX *cube);
 
 
 /*****************************************************************************
@@ -538,7 +538,7 @@ g_cube_picksplit(PG_FUNCTION_ARGS)
    rt_cube_size(datum_r, &size_r);
 
    /*
-    * Now split up the regions between the two seeds.  An important property
+    * Now split up the regions between the two seeds.  An important property
     * of this split algorithm is that the split vector v has the indices of
     * items to be split in order in its left and right vectors.  We exploit
     * this property by doing a merge in the code that actually splits the
@@ -554,7 +554,7 @@ g_cube_picksplit(PG_FUNCTION_ARGS)
    {
        /*
         * If we've already decided where to place this item, just put it on
-        * the right list.  Otherwise, we need to figure out which page needs
+        * the right list.  Otherwise, we need to figure out which page needs
         * the least enlargement in order to store the item.
         */
 
@@ -728,27 +728,27 @@ cube_union_v0(NDBOX *a, NDBOX *b)
    SET_VARSIZE(result, size);
    SET_DIM(result, dim);
 
-    /* First compute the union of the dimensions present in both args */
+   /* First compute the union of the dimensions present in both args */
    for (i = 0; i < DIM(b); i++)
    {
        result->x[i] = Min(
-           Min(LL_COORD(a, i), UR_COORD(a, i)),
-           Min(LL_COORD(b, i), UR_COORD(b, i))
-       );
+                          Min(LL_COORD(a, i), UR_COORD(a, i)),
+                          Min(LL_COORD(b, i), UR_COORD(b, i))
+           );
        result->x[i + DIM(a)] = Max(
-           Max(LL_COORD(a, i), UR_COORD(a, i)),
-           Max(LL_COORD(b, i), UR_COORD(b, i))
-       );
+                                   Max(LL_COORD(a, i), UR_COORD(a, i)),
+                                   Max(LL_COORD(b, i), UR_COORD(b, i))
+           );
    }
    /* continue on the higher dimensions only present in 'a' */
    for (; i < DIM(a); i++)
    {
        result->x[i] = Min(0,
-           Min(LL_COORD(a, i), UR_COORD(a, i))
-       );
+                          Min(LL_COORD(a, i), UR_COORD(a, i))
+           );
        result->x[i + dim] = Max(0,
-           Max(LL_COORD(a, i), UR_COORD(a, i))
-       );
+                                Max(LL_COORD(a, i), UR_COORD(a, i))
+           );
    }
 
    /*
@@ -795,6 +795,7 @@ cube_inter(PG_FUNCTION_ARGS)
    if (DIM(a) < DIM(b))
    {
        NDBOX      *tmp = b;
+
        b = a;
        a = tmp;
        swapped = true;
@@ -806,27 +807,27 @@ cube_inter(PG_FUNCTION_ARGS)
    SET_VARSIZE(result, size);
    SET_DIM(result, dim);
 
-    /* First compute intersection of the dimensions present in both args */
+   /* First compute intersection of the dimensions present in both args */
    for (i = 0; i < DIM(b); i++)
    {
        result->x[i] = Max(
-           Min(LL_COORD(a, i), UR_COORD(a, i)),
-           Min(LL_COORD(b, i), UR_COORD(b, i))
-       );
+                          Min(LL_COORD(a, i), UR_COORD(a, i)),
+                          Min(LL_COORD(b, i), UR_COORD(b, i))
+           );
        result->x[i + DIM(a)] = Min(
-           Max(LL_COORD(a, i), UR_COORD(a, i)),
-           Max(LL_COORD(b, i), UR_COORD(b, i))
-       );
+                                   Max(LL_COORD(a, i), UR_COORD(a, i)),
+                                   Max(LL_COORD(b, i), UR_COORD(b, i))
+           );
    }
    /* continue on the higher dimemsions only present in 'a' */
    for (; i < DIM(a); i++)
    {
        result->x[i] = Max(0,
-           Min(LL_COORD(a, i), UR_COORD(a, i))
-       );
+                          Min(LL_COORD(a, i), UR_COORD(a, i))
+           );
        result->x[i + DIM(a)] = Min(0,
-           Max(LL_COORD(a, i), UR_COORD(a, i))
-       );
+                                   Max(LL_COORD(a, i), UR_COORD(a, i))
+           );
    }
 
    /*
@@ -1236,14 +1237,14 @@ cube_distance(PG_FUNCTION_ARGS)
    /* compute within the dimensions of (b) */
    for (i = 0; i < DIM(b); i++)
    {
-       d = distance_1D(LL_COORD(a,i), UR_COORD(a,i), LL_COORD(b,i), UR_COORD(b,i));
+       d = distance_1D(LL_COORD(a, i), UR_COORD(a, i), LL_COORD(b, i), UR_COORD(b, i));
        distance += d * d;
    }
 
    /* compute distance to zero for those dimensions in (a) absent in (b) */
    for (i = DIM(b); i < DIM(a); i++)
    {
-       d = distance_1D(LL_COORD(a,i), UR_COORD(a,i), 0.0, 0.0);
+       d = distance_1D(LL_COORD(a, i), UR_COORD(a, i), 0.0, 0.0);
        distance += d * d;
    }
 
@@ -1297,11 +1298,11 @@ cube_is_point_internal(NDBOX *cube)
        return true;
 
    /*
-    * Even if the point-flag is not set, all the lower-left coordinates
-    * might match the upper-right coordinates, so that the value is in
-    * fact a point. Such values don't arise with current code - the point
-    * flag is always set if appropriate - but they might be present on-disk
-    * in clusters upgraded from pre-9.4 versions.
+    * Even if the point-flag is not set, all the lower-left coordinates might
+    * match the upper-right coordinates, so that the value is in fact a
+    * point. Such values don't arise with current code - the point flag is
+    * always set if appropriate - but they might be present on-disk in
+    * clusters upgraded from pre-9.4 versions.
     */
    for (i = 0; i < DIM(cube); i++)
    {
@@ -1317,6 +1318,7 @@ cube_dim(PG_FUNCTION_ARGS)
 {
    NDBOX      *c = PG_GETARG_NDBOX(0);
    int         dim = DIM(c);
+
    PG_FREE_IF_COPY(c, 0);
    PG_RETURN_INT32(dim);
 }
@@ -1330,7 +1332,7 @@ cube_ll_coord(PG_FUNCTION_ARGS)
    double      result;
 
    if (DIM(c) >= n && n > 0)
-       result = Min(LL_COORD(c, n-1), UR_COORD(c, n-1));
+       result = Min(LL_COORD(c, n - 1), UR_COORD(c, n - 1));
    else
        result = 0;
 
@@ -1347,7 +1349,7 @@ cube_ur_coord(PG_FUNCTION_ARGS)
    double      result;
 
    if (DIM(c) >= n && n > 0)
-       result = Max(LL_COORD(c, n-1), UR_COORD(c, n-1));
+       result = Max(LL_COORD(c, n - 1), UR_COORD(c, n - 1));
    else
        result = 0;
 
@@ -1382,15 +1384,15 @@ cube_enlarge(PG_FUNCTION_ARGS)
 
    for (i = 0, j = dim; i < DIM(a); i++, j++)
    {
-       if (LL_COORD(a,i) >= UR_COORD(a,i))
+       if (LL_COORD(a, i) >= UR_COORD(a, i))
        {
-           result->x[i] = UR_COORD(a,i) - r;
-           result->x[j] = LL_COORD(a,i) + r;
+           result->x[i] = UR_COORD(a, i) - r;
+           result->x[j] = LL_COORD(a, i) + r;
        }
        else
        {
-           result->x[i] = LL_COORD(a,i) - r;
-           result->x[j] = UR_COORD(a,i) + r;
+           result->x[i] = LL_COORD(a, i) - r;
+           result->x[j] = UR_COORD(a, i) + r;
        }
        if (result->x[i] > result->x[j])
        {
@@ -1503,7 +1505,7 @@ cube_c_f8(PG_FUNCTION_ARGS)
            result->x[DIM(result) + i] = cube->x[DIM(cube) + i];
        }
        result->x[DIM(result) - 1] = x;
-       result->x[2*DIM(result) - 1] = x;
+       result->x[2 * DIM(result) - 1] = x;
    }
 
    PG_FREE_IF_COPY(cube, 0);
@@ -1521,7 +1523,8 @@ cube_c_f8_f8(PG_FUNCTION_ARGS)
    int         size;
    int         i;
 
-   if (IS_POINT(cube) && (x1 == x2)){
+   if (IS_POINT(cube) && (x1 == x2))
+   {
        size = POINT_SIZE((DIM(cube) + 1));
        result = (NDBOX *) palloc0(size);
        SET_VARSIZE(result, size);
index 6c825b98ea735b89506755dd290b5ce0e67e92a6..5d44e110817ad5281e3f983ec2f7a0fb4350e38b 100644 (file)
@@ -13,9 +13,9 @@ typedef struct NDBOX
     *
     * Following information is stored:
     *
-    *  bits 0-7  : number of cube dimensions;
-    *  bits 8-30 : unused, initialize to zero;
-    *  bit  31   : point flag. If set, the upper right coordinates are not
+    *  bits 0-7  : number of cube dimensions;
+    *  bits 8-30 : unused, initialize to zero;
+    *  bit  31   : point flag. If set, the upper right coordinates are not
     *              stored, and are implicitly the same as the lower left
     *              coordinates.
     *----------
@@ -31,12 +31,12 @@ typedef struct NDBOX
 } NDBOX;
 
 #define POINT_BIT          0x80000000
-#define    DIM_MASK            0x7fffffff
+#define DIM_MASK           0x7fffffff
 
 #define IS_POINT(cube)     ( ((cube)->header & POINT_BIT) != 0 )
-#define SET_POINT_BIT(cube)    ( (cube)->header |= POINT_BIT )
+#define SET_POINT_BIT(cube) ( (cube)->header |= POINT_BIT )
 #define DIM(cube)          ( (cube)->header & DIM_MASK )
-#define SET_DIM(cube, _dim)    ( (cube)->header = ((cube)->header & ~DIM_MASK) | (_dim) )
+#define SET_DIM(cube, _dim) ( (cube)->header = ((cube)->header & ~DIM_MASK) | (_dim) )
 
 #define LL_COORD(cube, i) ( (cube)->x[i] )
 #define UR_COORD(cube, i) ( IS_POINT(cube) ? (cube)->x[i] : (cube)->x[(i) + DIM(cube)] )
index 7b711f13b3e2be2f4d3f83e9a5ada258fa836115..a81853fa9118170f7773363c76afb07afe633f19 100644 (file)
@@ -2394,7 +2394,7 @@ get_tuple_of_interest(Relation rel, int *pkattnums, int pknumatts, char **src_pk
     * Build sql statement to look up tuple of interest, ie, the one matching
     * src_pkattvals.  We used to use "SELECT *" here, but it's simpler to
     * generate a result tuple that matches the table's physical structure,
-    * with NULLs for any dropped columns.  Otherwise we have to deal with two
+    * with NULLs for any dropped columns.  Otherwise we have to deal with two
     * different tupdescs and everything's very confusing.
     */
    appendStringInfoString(&buf, "SELECT ");
@@ -2620,7 +2620,7 @@ dblink_security_check(PGconn *conn, remoteConn *rconn)
 }
 
 /*
- * For non-superusers, insist that the connstr specify a password. This
+ * For non-superusers, insist that the connstr specify a password.  This
  * prevents a password from being picked up from .pgpass, a service file,
  * the environment, etc.  We don't want the postgres user's passwords
  * to be accessible to non-superusers.
index eadfce4605475e850f198ec93d5267c061940974..6bbebdfd1a31e4b91cc824c727a9884a03f1ebd8 100644 (file)
@@ -91,7 +91,7 @@ geo_distance_internal(Point *pt1, Point *pt2)
  *  distance between the points in miles on earth's surface
  *
  * If float8 is passed-by-value, the oldstyle version-0 calling convention
- * is unportable, so we use version-1. However, if it's passed-by-reference,
+ * is unportable, so we use version-1.  However, if it's passed-by-reference,
  * continue to use oldstyle.  This is just because we'd like earthdistance
  * to serve as a canary for any unintentional breakage of version-0 functions
  * with float8 results.
index 476e520301aa992b4ceb10345ffb2842dda6471d..5a4d5aac2156709e3c6398b45a8a7c7741639319 100644 (file)
@@ -70,6 +70,7 @@ static const struct FileFdwOption valid_options[] = {
    {"encoding", ForeignTableRelationId},
    {"force_not_null", AttributeRelationId},
    {"force_null", AttributeRelationId},
+
    /*
     * force_quote is not supported by file_fdw because it's for COPY TO.
     */
@@ -253,6 +254,7 @@ file_fdw_validator(PG_FUNCTION_ARGS)
                         errmsg("conflicting or redundant options")));
            filename = defGetString(def);
        }
+
        /*
         * force_not_null is a boolean option; after validation we can discard
         * it - it will be retrieved later in get_file_fdw_attribute_options()
@@ -397,7 +399,7 @@ get_file_fdw_attribute_options(Oid relid)
    List       *fnncolumns = NIL;
    List       *fncolumns = NIL;
 
-   List *options = NIL;
+   List       *options = NIL;
 
    rel = heap_open(relid, AccessShareLock);
    tupleDesc = RelationGetDescr(rel);
@@ -443,12 +445,15 @@ get_file_fdw_attribute_options(Oid relid)
 
    heap_close(rel, AccessShareLock);
 
-   /* Return DefElem only when some column(s) have force_not_null / force_null options set */
+   /*
+    * Return DefElem only when some column(s) have force_not_null /
+    * force_null options set
+    */
    if (fnncolumns != NIL)
        options = lappend(options, makeDefElem("force_not_null", (Node *) fnncolumns));
 
    if (fncolumns != NIL)
-       options = lappend(options,makeDefElem("force_null", (Node *) fncolumns));
+       options = lappend(options, makeDefElem("force_null", (Node *) fncolumns));
 
    return options;
 }
@@ -508,7 +513,7 @@ fileGetForeignPaths(PlannerInfo *root,
                   &startup_cost, &total_cost);
 
    /*
-    * Create a ForeignPath node and add it as only possible path.  We use the
+    * Create a ForeignPath node and add it as only possible path.  We use the
     * fdw_private list of the path to carry the convert_selectively option;
     * it will be propagated into the fdw_private list of the Plan node.
     */
@@ -921,7 +926,7 @@ estimate_size(PlannerInfo *root, RelOptInfo *baserel,
         * planner's idea of the relation width; which is bogus if not all
         * columns are being read, not to mention that the text representation
         * of a row probably isn't the same size as its internal
-        * representation.  Possibly we could do something better, but the
+        * representation.  Possibly we could do something better, but the
         * real answer to anyone who complains is "ANALYZE" ...
         */
        int         tuple_width;
@@ -986,7 +991,7 @@ estimate_costs(PlannerInfo *root, RelOptInfo *baserel,
  * which must have at least targrows entries.
  * The actual number of rows selected is returned as the function result.
  * We also count the total number of rows in the file and return it into
- * *totalrows. Note that *totaldeadrows is always set to 0.
+ * *totalrows.  Note that *totaldeadrows is always set to 0.
  *
  * Note that the returned list of rows is not always in order by physical
  * position in the file.  Therefore, correlation estimates derived later
index 989c4161d6ad7d0a33d12d9253403b6628a5a554..4f37a54b1e446338e79da6686b4646a2fcf32fed 100644 (file)
@@ -50,7 +50,7 @@ static int levenshtein_internal(text *s, text *t,
  * array.
  *
  * If max_d >= 0, we only need to provide an accurate answer when that answer
- * is less than or equal to the bound. From any cell in the matrix, there is
+ * is less than or equal to the bound.  From any cell in the matrix, there is
  * theoretical "minimum residual distance" from that cell to the last column
  * of the final row.  This minimum residual distance is zero when the
  * untransformed portions of the strings are of equal length (because we might
@@ -141,7 +141,7 @@ levenshtein_internal(text *s, text *t,
    stop_column = m + 1;
 
    /*
-    * If max_d >= 0, determine whether the bound is impossibly tight.  If so,
+    * If max_d >= 0, determine whether the bound is impossibly tight.  If so,
     * return max_d + 1 immediately.  Otherwise, determine whether it's tight
     * enough to limit the computation we must perform.  If so, figure out
     * initial stop column.
@@ -168,7 +168,7 @@ levenshtein_internal(text *s, text *t,
             * need to fill in.  If the string is growing, the theoretical
             * minimum distance already incorporates the cost of deleting the
             * number of characters necessary to make the two strings equal in
-            * length.  Each additional deletion forces another insertion, so
+            * length.  Each additional deletion forces another insertion, so
             * the best-case total cost increases by ins_c + del_c. If the
             * string is shrinking, the minimum theoretical cost assumes no
             * excess deletions; that is, we're starting no further right than
@@ -246,7 +246,7 @@ levenshtein_internal(text *s, text *t,
        /*
         * The main loop fills in curr, but curr[0] needs a special case: to
         * transform the first 0 characters of s into the first j characters
-        * of t, we must perform j insertions.  However, if start_column > 0,
+        * of t, we must perform j insertions.  However, if start_column > 0,
         * this special case does not apply.
         */
        if (start_column == 0)
index 382111617a01bf7359219c40f60ac4461d60d73b..f9088f8b1b6c43510e751b8341816e9c69352e99 100644 (file)
@@ -12,7 +12,7 @@
  * HEntry: there is one of these for each key _and_ value in an hstore
  *
  * the position offset points to the _end_ so that we can get the length
- * by subtraction from the previous entry. the ISFIRST flag lets us tell
+ * by subtraction from the previous entry.  the ISFIRST flag lets us tell
  * whether there is a previous entry.
  */
 typedef struct
index 9f2de06f7fe301d083ed99b2253e0118c661c2df..68f9061db14a963a83b3c8f1625b8992d2a396b5 100644 (file)
@@ -13,7 +13,7 @@
 /*
  * When using a GIN index for hstore, we choose to index both keys and values.
  * The storage format is "text" values, with K, V, or N prepended to the string
- * to indicate key, value, or null values. (As of 9.1 it might be better to
+ * to indicate key, value, or null values.  (As of 9.1 it might be better to
  * store null values as nulls, but we'll keep it this way for on-disk
  * compatibility.)
  */
@@ -165,7 +165,7 @@ gin_consistent_hstore(PG_FUNCTION_ARGS)
    {
        /*
         * Index doesn't have information about correspondence of keys and
-        * values, so we need recheck.  However, if not all the keys are
+        * values, so we need recheck.  However, if not all the keys are
         * present, we can fail at once.
         */
        *recheck = true;
index 9899317bfca33cc6a66a75458f538f14dec8fe61..cd303fc972959e57605da62fd75b52387adfd88b 100644 (file)
@@ -1245,7 +1245,7 @@ hstore_to_json_loose(PG_FUNCTION_ARGS)
                dst;
 
    if (count == 0)
-       PG_RETURN_TEXT_P(cstring_to_text_with_len("{}",2));
+       PG_RETURN_TEXT_P(cstring_to_text_with_len("{}", 2));
 
    initStringInfo(&tmp);
    initStringInfo(&dst);
@@ -1335,7 +1335,7 @@ hstore_to_json(PG_FUNCTION_ARGS)
                dst;
 
    if (count == 0)
-       PG_RETURN_TEXT_P(cstring_to_text_with_len("{}",2));
+       PG_RETURN_TEXT_P(cstring_to_text_with_len("{}", 2));
 
    initStringInfo(&tmp);
    initStringInfo(&dst);
@@ -1381,7 +1381,8 @@ hstore_to_jsonb(PG_FUNCTION_ARGS)
 
    for (i = 0; i < count; i++)
    {
-       JsonbValue key, val;
+       JsonbValue  key,
+                   val;
 
        key.estSize = sizeof(JEntry);
        key.type = jbvString;
@@ -1424,7 +1425,7 @@ hstore_to_jsonb_loose(PG_FUNCTION_ARGS)
    JsonbParseState *state = NULL;
    JsonbValue *res;
    StringInfoData tmp;
-   bool        is_number;
+   bool        is_number;
 
    initStringInfo(&tmp);
 
@@ -1432,7 +1433,8 @@ hstore_to_jsonb_loose(PG_FUNCTION_ARGS)
 
    for (i = 0; i < count; i++)
    {
-       JsonbValue key, val;
+       JsonbValue  key,
+                   val;
 
        key.estSize = sizeof(JEntry);
        key.type = jbvString;
@@ -1507,7 +1509,8 @@ hstore_to_jsonb_loose(PG_FUNCTION_ARGS)
            {
                val.type = jbvNumeric;
                val.val.numeric = DatumGetNumeric(
-                   DirectFunctionCall3(numeric_in, CStringGetDatum(tmp.data), 0, -1));
+                                                 DirectFunctionCall3(numeric_in, CStringGetDatum(tmp.data), 0, -1));
+
                val.estSize += VARSIZE_ANY(val.val.numeric) +sizeof(JEntry);
            }
            else
index 566a6c25056849e8591b99f664ed06d069da7ded..c3c39d194bc89e9bf49139f9cd5819b066c66d2f 100644 (file)
@@ -345,7 +345,7 @@ gin_bool_consistent(QUERYTYPE *query, bool *check)
        return FALSE;
 
    /*
-    * Set up data for checkcondition_gin.  This must agree with the query
+    * Set up data for checkcondition_gin.  This must agree with the query
     * extraction code in ginint4_queryextract.
     */
    gcv.first = items;
index d64a81a5595e26f6289f4edcd45152ad3e987013..53abcc45a5ffe952cec62a4bee58d2a106e78fd8 100644 (file)
@@ -472,7 +472,7 @@ g_int_picksplit(PG_FUNCTION_ARGS)
    qsort((void *) costvector, maxoff, sizeof(SPLITCOST), comparecost);
 
    /*
-    * Now split up the regions between the two seeds.  An important property
+    * Now split up the regions between the two seeds.  An important property
     * of this split algorithm is that the split vector v has the indices of
     * items to be split in order in its left and right vectors.  We exploit
     * this property by doing a merge in the code that actually splits the
@@ -490,7 +490,7 @@ g_int_picksplit(PG_FUNCTION_ARGS)
 
        /*
         * If we've already decided where to place this item, just put it on
-        * the right list.  Otherwise, we need to figure out which page needs
+        * the right list.  Otherwise, we need to figure out which page needs
         * the least enlargement in order to store the item.
         */
 
index fc462b20766054cff68fb6e0b345db58a77eacc8..511c7acb54e811c5b3612230149253309e9f3f2e 100644 (file)
@@ -184,7 +184,7 @@ rt__int_size(ArrayType *a, float *size)
    *size = (float) ARRNELEMS(a);
 }
 
-/* Sort the given data (len >= 2). Return true if any duplicates found */
+/* Sort the given data (len >= 2).  Return true if any duplicates found */
 bool
 isort(int32 *a, int len)
 {
@@ -196,7 +196,7 @@ isort(int32 *a, int len)
    bool        r = FALSE;
 
    /*
-    * We use a simple insertion sort.  While this is O(N^2) in the worst
+    * We use a simple insertion sort.  While this is O(N^2) in the worst
     * case, it's quite fast if the input is already sorted or nearly so.
     * Also, for not-too-large inputs it's faster than more complex methods
     * anyhow.
index 76f66288c0fc8c9425cc3b528ff8604714288fd4..87462911147451428e9aa7c3ee016fc40570e1d6 100755 (executable)
@@ -80,7 +80,7 @@ else
    $outf = ($opt{u}) ? 'distinct( message.mid )' : 'message.mid';
 }
 my $sql =
-   "select $outf from "
+    "select $outf from "
   . join(', ', keys %table)
   . " where "
   . join(' AND ', @where) . ';';
index 992106f05ac18f04b48f2f38a7f3763ff4a92527..4561073fa0933043bee915ed211e8b518fe78641 100644 (file)
@@ -593,7 +593,7 @@ ltreeparentsel(PG_FUNCTION_ARGS)
        /*
         * If the histogram is large enough, see what fraction of it the
         * constant is "<@" to, and assume that's representative of the
-        * non-MCV population.  Otherwise use the default selectivity for the
+        * non-MCV population.  Otherwise use the default selectivity for the
         * non-MCV population.
         */
        selec = histogram_selectivity(&vardata, &contproc,
index d8565941f90997726efe0dc5e141e6c957be0878..e5eeec21c153f6138d58ae77cb2d9cb824f6bba2 100644 (file)
@@ -407,7 +407,7 @@ sql_exec(PGconn *conn, const char *todo, bool quiet)
 }
 
 /*
- * Dump all databases. There are no system objects to worry about.
+ * Dump all databases.  There are no system objects to worry about.
  */
 void
 sql_exec_dumpalldbs(PGconn *conn, struct options * opts)
@@ -503,20 +503,20 @@ sql_exec_searchtables(PGconn *conn, struct options * opts)
 
    /* now build the query */
    todo = psprintf(
-            "SELECT pg_catalog.pg_relation_filenode(c.oid) as \"Filenode\", relname as \"Table Name\" %s\n"
-            "FROM pg_catalog.pg_class c \n"
-        "  LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace \n"
-            "  LEFT JOIN pg_catalog.pg_database d ON d.datname = pg_catalog.current_database(),\n"
-            "  pg_catalog.pg_tablespace t \n"
-            "WHERE relkind IN ('r', 'm', 'i', 'S', 't') AND \n"
-            "      t.oid = CASE\n"
-            "          WHEN reltablespace <> 0 THEN reltablespace\n"
-            "          ELSE dattablespace\n"
-            "      END AND \n"
-            "  (%s) \n"
-            "ORDER BY relname\n",
-            opts->extended ? addfields : "",
-            qualifiers);
+                   "SELECT pg_catalog.pg_relation_filenode(c.oid) as \"Filenode\", relname as \"Table Name\" %s\n"
+                   "FROM pg_catalog.pg_class c \n"
+         LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace \n"
+                   "   LEFT JOIN pg_catalog.pg_database d ON d.datname = pg_catalog.current_database(),\n"
+                   "   pg_catalog.pg_tablespace t \n"
+                   "WHERE relkind IN ('r', 'm', 'i', 'S', 't') AND \n"
+                   "       t.oid = CASE\n"
+                     WHEN reltablespace <> 0 THEN reltablespace\n"
+                   "           ELSE dattablespace\n"
+                   "       END AND \n"
+                   "  (%s) \n"
+                   "ORDER BY relname\n",
+                   opts->extended ? addfields : "",
+                   qualifiers);
 
    free(qualifiers);
 
index 66c88b17afa600e3581bc9e03a25594724d5e65c..cc66fc8b04d9907da2ee10a8382e38980090f475 100644 (file)
@@ -208,7 +208,8 @@ page_header(PG_FUNCTION_ARGS)
    /* pageinspect >= 1.2 uses pg_lsn instead of text for the LSN field. */
    if (tupdesc->attrs[0]->atttypid == TEXTOID)
    {
-       char    lsnchar[64];
+       char        lsnchar[64];
+
        snprintf(lsnchar, sizeof(lsnchar), "%X/%X",
                 (uint32) (lsn >> 32), (uint32) lsn);
        values[0] = CStringGetTextDatum(lsnchar);
index 39348c6db107ccee2caa0441d9d9a0171c204d13..212b267fcfa6cdd4b406570e325c54effcf704bc 100644 (file)
@@ -113,7 +113,7 @@ CleanupPriorWALFiles(void)
 
            /*
             * We ignore the timeline part of the XLOG segment identifiers in
-            * deciding whether a segment is still needed.  This ensures that
+            * deciding whether a segment is still needed.  This ensures that
             * we won't prematurely remove a segment from a parent timeline.
             * We could probably be a little more proactive about removing
             * segments of non-parent timelines, but that would be a whole lot
@@ -140,7 +140,7 @@ CleanupPriorWALFiles(void)
                {
                    /*
                     * Prints the name of the file to be removed and skips the
-                    * actual removal.  The regular printout is so that the
+                    * actual removal.  The regular printout is so that the
                     * user can pipe the output into some other program.
                     */
                    printf("%s\n", WALFilePath);
index d50726d109ba7a7c7031c89060b4780e0a012a95..df20e888eff08d927475d535312a114a6e0ae260 100644 (file)
@@ -45,7 +45,7 @@ static char blockbuffer[BLCKSZ];
  *
  * The first argument is the relation to be prewarmed; the second controls
  * how prewarming is done; legal options are 'prefetch', 'read', and 'buffer'.
- * The third is the name of the relation fork to be prewarmed. The fourth
+ * The third is the name of the relation fork to be prewarmed.  The fourth
  * and fifth arguments specify the first and last block to be prewarmed.
  * If the fourth argument is NULL, it will be taken as 0; if the fifth argument
  * is NULL, it will be taken as the number of blocks in the relation.  The
index de82ef5a1f5fcf5c5be82694d95864093e07e275..07f09e1e94100fec16e84f50e95dce4f7569c9c7 100644 (file)
@@ -4,7 +4,7 @@
  *     Track statement execution times across a whole database cluster.
  *
  * Execution costs are totalled for each distinct source query, and kept in
- * a shared hashtable. (We track only as many distinct queries as will fit
+ * a shared hashtable.  (We track only as many distinct queries as will fit
  * in the designated amount of shared memory.)
  *
  * As of Postgres 9.2, this module normalizes query entries.  Normalization
@@ -15,7 +15,7 @@
  *
  * Normalization is implemented by fingerprinting queries, selectively
  * serializing those fields of each query tree's nodes that are judged to be
- * essential to the query. This is referred to as a query jumble.  This is
+ * essential to the query.  This is referred to as a query jumble.  This is
  * distinct from a regular serialization in that various extraneous
  * information is ignored as irrelevant or not essential to the query, such
  * as the collations of Vars and, most notably, the values of constants.
@@ -615,7 +615,7 @@ pgss_shmem_startup(void)
     * because we remove that file on startup; it acts inversely to
     * PGSS_DUMP_FILE, in that it is only supposed to be around when the
     * server is running, whereas PGSS_DUMP_FILE is only supposed to be around
-    * when the server is not running.  Leaving the file creates no danger of
+    * when the server is not running.  Leaving the file creates no danger of
     * a newly restored database having a spurious record of execution costs,
     * which is what we're really concerned about here.
     */
@@ -702,7 +702,7 @@ pgss_shmem_shutdown(int code, Datum arg)
 
    /*
     * When serializing to disk, we store query texts immediately after their
-    * entry data.  Any orphaned query texts are thereby excluded.
+    * entry data.  Any orphaned query texts are thereby excluded.
     */
    hash_seq_init(&hash_seq, pgss_hash);
    while ((entry = hash_seq_search(&hash_seq)) != NULL)
@@ -1363,9 +1363,9 @@ pg_stat_statements_internal(FunctionCallInfo fcinfo,
 
    /*
     * We'd like to load the query text file (if needed) while not holding any
-    * lock on pgss->lock.  In the worst case we'll have to do this again
+    * lock on pgss->lock.  In the worst case we'll have to do this again
     * after we have the lock, but it's unlikely enough to make this a win
-    * despite occasional duplicated work.  We need to reload if anybody
+    * despite occasional duplicated work.  We need to reload if anybody
     * writes to the file (either a retail qtext_store(), or a garbage
     * collection) between this point and where we've gotten shared lock.  If
     * a qtext_store is actually in progress when we look, we might as well
@@ -1572,7 +1572,7 @@ pgss_memsize(void)
  * would be difficult to demonstrate this even under artificial conditions.)
  *
  * Note: despite needing exclusive lock, it's not an error for the target
- * entry to already exist. This is because pgss_store releases and
+ * entry to already exist.  This is because pgss_store releases and
  * reacquires lock after failing to find a match; so someone else could
  * have made the entry while we waited to get exclusive lock.
  */
@@ -1692,13 +1692,13 @@ entry_dealloc(void)
  * have it handy, so we require them to pass it too.
  *
  * If successful, returns true, and stores the new entry's offset in the file
- * into *query_offset. Also, if gc_count isn't NULL, *gc_count is set to the
+ * into *query_offset.  Also, if gc_count isn't NULL, *gc_count is set to the
  * number of garbage collections that have occurred so far.
  *
  * On failure, returns false.
  *
  * At least a shared lock on pgss->lock must be held by the caller, so as
- * to prevent a concurrent garbage collection. Share-lock-holding callers
+ * to prevent a concurrent garbage collection.  Share-lock-holding callers
  * should pass a gc_count pointer to obtain the number of garbage collections,
  * so that they can recheck the count after obtaining exclusive lock to
  * detect whether a garbage collection occurred (and removed this entry).
@@ -1940,7 +1940,7 @@ gc_qtexts(void)
    /*
     * When called from pgss_store, some other session might have proceeded
     * with garbage collection in the no-lock-held interim of lock strength
-    * escalation.  Check once more that this is actually necessary.
+    * escalation.  Check once more that this is actually necessary.
     */
    if (!need_gc_qtexts())
        return;
@@ -2005,7 +2005,7 @@ gc_qtexts(void)
    }
 
    /*
-    * Truncate away any now-unused space.  If this fails for some odd reason,
+    * Truncate away any now-unused space.  If this fails for some odd reason,
     * we log it, but there's no need to fail.
     */
    if (ftruncate(fileno(qfile), extent) != 0)
@@ -2258,7 +2258,7 @@ JumbleRangeTable(pgssJumbleState *jstate, List *rtable)
  *
  * Note: the reason we don't simply use expression_tree_walker() is that the
  * point of that function is to support tree walkers that don't care about
- * most tree node types, but here we care about all types. We should complain
+ * most tree node types, but here we care about all types.  We should complain
  * about any unrecognized node type.
  */
 static void
@@ -2772,7 +2772,7 @@ generate_normalized_query(pgssJumbleState *jstate, const char *query,
  * a problem.
  *
  * Duplicate constant pointers are possible, and will have their lengths
- * marked as '-1', so that they are later ignored. (Actually, we assume the
+ * marked as '-1', so that they are later ignored.  (Actually, we assume the
  * lengths were initialized as -1 to start with, and don't change them here.)
  *
  * N.B. There is an assumption that a '-' character at a Const location begins
@@ -2841,7 +2841,7 @@ fill_in_constant_lengths(pgssJumbleState *jstate, const char *query)
                     * adjustment of location to that of the leading '-'
                     * operator in the event of a negative constant.  It is
                     * also useful for our purposes to start from the minus
-                    * symbol.  In this way, queries like "select * from foo
+                    * symbol.  In this way, queries like "select * from foo
                     * where bar = 1" and "select * from foo where bar = -2"
                     * will have identical normalized query strings.
                     */
index 682821a8d787392fc4fa9ffa99e00d2cb8b77067..842295ae3d97681e24cf903f99be767b9620a7ca 100644 (file)
@@ -369,12 +369,13 @@ test_sync(int writes_per_op)
        {
            for (writes = 0; writes < writes_per_op; writes++)
                if (write(tmpfile, buf, XLOG_BLCKSZ) != XLOG_BLCKSZ)
-               /*
-                * This can generate write failures if the filesystem
-                * has a large block size, e.g. 4k, and there is no
-                * support for O_DIRECT writes smaller than the
-                * file system block size, e.g. XFS.
-                */
+
+                   /*
+                    * This can generate write failures if the filesystem has
+                    * a large block size, e.g. 4k, and there is no support
+                    * for O_DIRECT writes smaller than the file system block
+                    * size, e.g. XFS.
+                    */
                    die("write failed");
            if (lseek(tmpfile, 0, SEEK_SET) == -1)
                die("seek failed");
index ac18c7b80f18ffdd72723b62726ff16da8e941d7..c59925c5750b270eb58b2777708a0aec19b0826d 100644 (file)
@@ -114,7 +114,7 @@ gin_extract_query_trgm(PG_FUNCTION_ARGS)
            {
                /*
                 * Successful regex processing: store NFA-like graph as
-                * extra_data.  GIN API requires an array of nentries
+                * extra_data.  GIN API requires an array of nentries
                 * Pointers, but we just put the same value in each element.
                 */
                trglen = ARRNELEM(trg);
index ede969f424cd78479c778a2f6f194ea42d1a8fae..69dc7f71f07069810b01e1484095c89abed97969 100644 (file)
@@ -386,7 +386,7 @@ gtrgm_consistent(PG_FUNCTION_ARGS)
 
                    /*
                     * GETBIT() tests may give false positives, due to limited
-                    * size of the sign array.  But since trigramsMatchGraph()
+                    * size of the sign array.  But since trigramsMatchGraph()
                     * implements a monotone boolean function, false positives
                     * in the check array can't lead to false negative answer.
                     * So we can apply trigramsMatchGraph despite uncertainty,
index 9720408a025723ef7ea93468bcc26bea100dbd1a..9f050533c59853d487590dca194cea425ce583e2 100644 (file)
@@ -62,7 +62,7 @@
  * In the 2nd stage, the automaton is transformed into a graph based on the
  * original NFA.  Each state in the expanded graph represents a state from
  * the original NFA, plus a prefix identifying the last two characters
- * (colors, to be precise) seen before entering the state. There can be
+ * (colors, to be precise) seen before entering the state.  There can be
  * multiple states in the expanded graph for each state in the original NFA,
  * depending on what characters can precede it.  A prefix position can be
  * "unknown" if it's uncertain what the preceding character was, or "blank"
@@ -74,7 +74,7 @@
  * "enter key".
  *
  * Each arc of the expanded graph is labelled with a trigram that must be
- * present in the string to match. We can construct this from an out-arc of
+ * present in the string to match.  We can construct this from an out-arc of
  * the underlying NFA state by combining the expanded state's prefix with the
  * color label of the underlying out-arc, if neither prefix position is
  * "unknown".  But note that some of the colors in the trigram might be
  *
  * When building the graph, if the number of states or arcs exceed pre-defined
  * limits, we give up and simply mark any states not yet processed as final
- * states. Roughly speaking, that means that we make use of some portion from
+ * states.  Roughly speaking, that means that we make use of some portion from
  * the beginning of the regexp.  Also, any colors that have too many member
  * characters are treated as "unknown", so that we can't derive trigrams
  * from them.
  * 1) Create state 1 with enter key (UNKNOWN, UNKNOWN, 1).
  * 2) Add key (UNKNOWN, "a", 2) to state 1.
  * 3) Add key ("a", "b", 3) to state 1.
- * 4) Create new state 2 with enter key ("b", "c", 4). Add an arc
+ * 4) Create new state 2 with enter key ("b", "c", 4).  Add an arc
  *   from state 1 to state 2 with label trigram "abc".
  * 5) Mark state 2 final because state 4 of source NFA is marked as final.
- * 6) Create new state 3 with enter key ("b", "d", 5). Add an arc
+ * 6) Create new state 3 with enter key ("b", "d", 5).  Add an arc
  *   from state 1 to state 3 with label trigram "abd".
  * 7) Mark state 3 final because state 5 of source NFA is marked as final.
  *
@@ -273,10 +273,10 @@ typedef struct
  *
  * We call a prefix ambiguous if at least one of its colors is unknown.  It's
  * fully ambiguous if both are unknown, partially ambiguous if only the first
- * is unknown. (The case of first color known, second unknown is not valid.)
+ * is unknown.  (The case of first color known, second unknown is not valid.)
  *
  * Wholly- or partly-blank prefixes are mostly handled the same as regular
- * color prefixes. This allows us to generate appropriate partly-blank
+ * color prefixes.  This allows us to generate appropriate partly-blank
  * trigrams when the NFA requires word character(s) to appear adjacent to
  * non-word character(s).
  */
@@ -302,7 +302,7 @@ typedef struct
 
 /*
  * Key identifying a state of our expanded graph: color prefix, and number
- * of the corresponding state in the underlying regex NFA. The color prefix
+ * of the corresponding state in the underlying regex NFA.  The color prefix
  * shows how we reached the regex state (to the extent that we know it).
  */
 typedef struct
@@ -437,7 +437,7 @@ struct TrgmPackedGraph
     * colorTrigramsCount and colorTrigramsGroups contain information about
     * how trigrams are grouped into color trigrams.  "colorTrigramsCount" is
     * the count of color trigrams and "colorTrigramGroups" contains number of
-    * simple trigrams for each color trigram.  The array of simple trigrams
+    * simple trigrams for each color trigram.  The array of simple trigrams
     * (stored separately from this struct) is ordered so that the simple
     * trigrams for each color trigram are consecutive, and they're in order
     * by color trigram number.
@@ -524,7 +524,7 @@ createTrgmNFA(text *text_re, Oid collation,
    /*
     * This processing generates a great deal of cruft, which we'd like to
     * clean up before returning (since this function may be called in a
-    * query-lifespan memory context).  Make a temp context we can work in so
+    * query-lifespan memory context).  Make a temp context we can work in so
     * that cleanup is easy.
     */
    tmpcontext = AllocSetContextCreate(CurrentMemoryContext,
@@ -840,7 +840,7 @@ convertPgWchar(pg_wchar c, trgm_mb_char *result)
 
    /*
     * We can ignore the NUL character, since it can never appear in a PG text
-    * string.  This avoids the need for various special cases when
+    * string.  This avoids the need for various special cases when
     * reconstructing trigrams.
     */
    if (c == 0)
@@ -851,7 +851,7 @@ convertPgWchar(pg_wchar c, trgm_mb_char *result)
    pg_wchar2mb_with_len(&c, s, 1);
 
    /*
-    * In IGNORECASE mode, we can ignore uppercase characters.  We assume that
+    * In IGNORECASE mode, we can ignore uppercase characters.  We assume that
     * the regex engine generated both uppercase and lowercase equivalents
     * within each color, since we used the REG_ICASE option; so there's no
     * need to process the uppercase version.
@@ -933,7 +933,7 @@ transformGraph(TrgmNFA *trgmNFA)
 
    /*
     * Recursively build the expanded graph by processing queue of states
-    * (breadth-first search).  getState already put initstate in the queue.
+    * (breadth-first search).  getState already put initstate in the queue.
     */
    while (trgmNFA->queue != NIL)
    {
@@ -942,7 +942,7 @@ transformGraph(TrgmNFA *trgmNFA)
        trgmNFA->queue = list_delete_first(trgmNFA->queue);
 
        /*
-        * If we overflowed then just mark state as final.  Otherwise do
+        * If we overflowed then just mark state as final.  Otherwise do
         * actual processing.
         */
        if (trgmNFA->overflowed)
@@ -968,7 +968,7 @@ processState(TrgmNFA *trgmNFA, TrgmState *state)
 
    /*
     * Add state's own key, and then process all keys added to keysQueue until
-    * queue is empty.  But we can quit if the state gets marked final.
+    * queue is empty.  But we can quit if the state gets marked final.
     */
    addKey(trgmNFA, state, &state->stateKey);
    while (trgmNFA->keysQueue != NIL && !state->fin)
@@ -1022,7 +1022,7 @@ addKey(TrgmNFA *trgmNFA, TrgmState *state, TrgmStateKey *key)
 
    /*
     * Compare key to each existing enter key of the state to check for
-    * redundancy.  We can drop either old key(s) or the new key if we find
+    * redundancy.  We can drop either old key(s) or the new key if we find
     * redundancy.
     */
    prev = NULL;
@@ -1096,7 +1096,7 @@ addKey(TrgmNFA *trgmNFA, TrgmState *state, TrgmStateKey *key)
        else if (pg_reg_colorisend(trgmNFA->regex, arc->co))
        {
            /*
-            * End of line/string ($).  We must consider this arc as a
+            * End of line/string ($).  We must consider this arc as a
             * transition that doesn't read anything.  The reason for adding
             * this enter key to the state is that if the arc leads to the
             * NFA's final state, we must mark this expanded state as final.
@@ -1141,7 +1141,7 @@ addKey(TrgmNFA *trgmNFA, TrgmState *state, TrgmStateKey *key)
                     * We can reach the arc destination after reading a word
                     * character, but the prefix is not something that addArc
                     * will accept, so no trigram arc can get made for this
-                    * transition.  We must make an enter key to show that the
+                    * transition.  We must make an enter key to show that the
                     * arc destination is reachable.  The prefix for the enter
                     * key should reflect the info we have for this arc.
                     */
@@ -1154,9 +1154,9 @@ addKey(TrgmNFA *trgmNFA, TrgmState *state, TrgmStateKey *key)
            else
            {
                /*
-                * Unexpandable color.  Add enter key with ambiguous prefix,
+                * Unexpandable color.  Add enter key with ambiguous prefix,
                 * showing we can reach the destination from this state, but
-                * the preceding colors will be uncertain.  (We do not set the
+                * the preceding colors will be uncertain.  (We do not set the
                 * first prefix color to key->prefix.colors[1], because a
                 * prefix of known followed by unknown is invalid.)
                 */
@@ -1345,9 +1345,9 @@ validArcLabel(TrgmStateKey *key, TrgmColor co)
        return false;
 
    /*
-    * We also reject nonblank-blank-anything.  The nonblank-blank-nonblank
+    * We also reject nonblank-blank-anything.  The nonblank-blank-nonblank
     * case doesn't correspond to any trigram the trigram extraction code
-    * would make.  The nonblank-blank-blank case is also not possible with
+    * would make.  The nonblank-blank-blank case is also not possible with
     * RPADDING = 1.  (Note that in many cases we'd fail to generate such a
     * trigram even if it were valid, for example processing "foo bar" will
     * not result in considering the trigram "o  ".  So if you want to support
@@ -1557,7 +1557,7 @@ selectColorTrigrams(TrgmNFA *trgmNFA)
 
    /*
     * Remove color trigrams from the graph so long as total penalty of color
-    * trigrams exceeds WISH_TRGM_PENALTY.  (If we fail to get down to
+    * trigrams exceeds WISH_TRGM_PENALTY.  (If we fail to get down to
     * WISH_TRGM_PENALTY, it's OK so long as total count is no more than
     * MAX_TRGM_COUNT.)  We prefer to remove color trigrams with higher
     * penalty, since those are the most promising for reducing the total
index d22b6d38e291da113c796833ec651ed57fbfc7fa..20b117bba772479a680d8965aebe01d89f2ea6f7 100644 (file)
@@ -278,7 +278,7 @@ check_cluster_versions(void)
    /* Only current PG version is supported as a target */
    if (GET_MAJOR_VERSION(new_cluster.major_version) != GET_MAJOR_VERSION(PG_VERSION_NUM))
        pg_fatal("This utility can only upgrade to PostgreSQL version %s.\n",
-              PG_MAJORVERSION);
+                PG_MAJORVERSION);
 
    /*
     * We can't allow downgrading because we use the target pg_dumpall, and
@@ -316,17 +316,17 @@ check_cluster_compatibility(bool live_check)
    if (GET_MAJOR_VERSION(new_cluster.major_version) == 900 &&
        new_cluster.controldata.cat_ver < TABLE_SPACE_SUBDIRS_CAT_VER)
        pg_fatal("This utility can only upgrade to PostgreSQL version 9.0 after 2010-01-11\n"
-              "because of backend API changes made during development.\n");
+                "because of backend API changes made during development.\n");
 
    /* We read the real port number for PG >= 9.1 */
    if (live_check && GET_MAJOR_VERSION(old_cluster.major_version) < 901 &&
        old_cluster.port == DEF_PGUPORT)
        pg_fatal("When checking a pre-PG 9.1 live old server, "
-              "you must specify the old server's port number.\n");
+                "you must specify the old server's port number.\n");
 
    if (live_check && old_cluster.port == new_cluster.port)
        pg_fatal("When checking a live server, "
-              "the old and new port numbers must be different.\n");
+                "the old and new port numbers must be different.\n");
 }
 
 
@@ -438,7 +438,7 @@ equivalent_locale(const char *loca, const char *locb)
        return (pg_strcasecmp(loca, locb) == 0);
 
    /*
-    * Compare the encoding parts.  Windows tends to use code page numbers for
+    * Compare the encoding parts.  Windows tends to use code page numbers for
     * the encoding part, which equivalent_encoding() won't like, so accept if
     * the strings are case-insensitive equal; otherwise use
     * equivalent_encoding() to compare.
@@ -499,7 +499,7 @@ check_new_cluster_is_empty(void)
            /* pg_largeobject and its index should be skipped */
            if (strcmp(rel_arr->rels[relnum].nspname, "pg_catalog") != 0)
                pg_fatal("New cluster database \"%s\" is not empty\n",
-                      new_cluster.dbarr.dbs[dbnum].db_name);
+                        new_cluster.dbarr.dbs[dbnum].db_name);
        }
    }
 
@@ -526,7 +526,7 @@ create_script_for_cluster_analyze(char **analyze_script_file_name)
 
    if ((script = fopen_priv(*analyze_script_file_name, "w")) == NULL)
        pg_fatal("Could not open file \"%s\": %s\n",
-              *analyze_script_file_name, getErrorText(errno));
+                *analyze_script_file_name, getErrorText(errno));
 
 #ifndef WIN32
    /* add shebang header */
@@ -581,7 +581,7 @@ create_script_for_cluster_analyze(char **analyze_script_file_name)
 #ifndef WIN32
    if (chmod(*analyze_script_file_name, S_IRWXU) != 0)
        pg_fatal("Could not add execute permission to file \"%s\": %s\n",
-              *analyze_script_file_name, getErrorText(errno));
+                *analyze_script_file_name, getErrorText(errno));
 #endif
 
    if (os_info.user_specified)
@@ -632,7 +632,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
 
    if ((script = fopen_priv(*deletion_script_file_name, "w")) == NULL)
        pg_fatal("Could not open file \"%s\": %s\n",
-              *deletion_script_file_name, getErrorText(errno));
+                *deletion_script_file_name, getErrorText(errno));
 
 #ifndef WIN32
    /* add shebang header */
@@ -668,7 +668,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
        }
        else
        {
-           char    *suffix_path = pg_strdup(old_cluster.tablespace_suffix);
+           char       *suffix_path = pg_strdup(old_cluster.tablespace_suffix);
 
            /*
             * Simply delete the tablespace directory, which might be ".old"
@@ -686,7 +686,7 @@ create_script_for_old_cluster_deletion(char **deletion_script_file_name)
 #ifndef WIN32
    if (chmod(*deletion_script_file_name, S_IRWXU) != 0)
        pg_fatal("Could not add execute permission to file \"%s\": %s\n",
-              *deletion_script_file_name, getErrorText(errno));
+                *deletion_script_file_name, getErrorText(errno));
 #endif
 
    check_ok();
@@ -714,7 +714,7 @@ check_is_super_user(ClusterInfo *cluster)
 
    if (PQntuples(res) != 1 || strcmp(PQgetvalue(res, 0, 0), "t") != 0)
        pg_fatal("database user \"%s\" is not a superuser\n",
-              os_info.user);
+                os_info.user);
 
    cluster->install_role_oid = atooid(PQgetvalue(res, 0, 1));
 
@@ -757,7 +757,7 @@ check_for_prepared_transactions(ClusterInfo *cluster)
 
    if (PQntuples(res) != 0)
        pg_fatal("The %s cluster contains prepared transactions\n",
-              CLUSTER_NAME(cluster));
+                CLUSTER_NAME(cluster));
 
    PQclear(res);
 
@@ -822,7 +822,7 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster)
            found = true;
            if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL)
                pg_fatal("Could not open file \"%s\": %s\n",
-                      output_path, getErrorText(errno));
+                        output_path, getErrorText(errno));
            if (!db_used)
            {
                fprintf(script, "Database: %s\n", active_db->db_name);
@@ -847,10 +847,10 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster)
        pg_fatal("Your installation contains \"contrib/isn\" functions which rely on the\n"
          "bigint data type.  Your old and new clusters pass bigint values\n"
        "differently so this cluster cannot currently be upgraded.  You can\n"
-              "manually upgrade databases that use \"contrib/isn\" facilities and remove\n"
-              "\"contrib/isn\" from the old cluster and restart the upgrade.  A list of\n"
-              "the problem functions is in the file:\n"
-              "    %s\n\n", output_path);
+                "manually upgrade databases that use \"contrib/isn\" facilities and remove\n"
+                "\"contrib/isn\" from the old cluster and restart the upgrade.  A list of\n"
+                "the problem functions is in the file:\n"
+                "    %s\n\n", output_path);
    }
    else
        check_ok();
@@ -926,7 +926,7 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
            found = true;
            if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL)
                pg_fatal("Could not open file \"%s\": %s\n",
-                      output_path, getErrorText(errno));
+                        output_path, getErrorText(errno));
            if (!db_used)
            {
                fprintf(script, "Database: %s\n", active_db->db_name);
@@ -952,9 +952,9 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
        pg_fatal("Your installation contains one of the reg* data types in user tables.\n"
         "These data types reference system OIDs that are not preserved by\n"
        "pg_upgrade, so this cluster cannot currently be upgraded.  You can\n"
-              "remove the problem tables and restart the upgrade.  A list of the problem\n"
-              "columns is in the file:\n"
-              "    %s\n\n", output_path);
+                "remove the problem tables and restart the upgrade.  A list of the problem\n"
+                "columns is in the file:\n"
+                "    %s\n\n", output_path);
    }
    else
        check_ok();
@@ -975,7 +975,7 @@ get_bin_version(ClusterInfo *cluster)
    if ((output = popen(cmd, "r")) == NULL ||
        fgets(cmd_output, sizeof(cmd_output), output) == NULL)
        pg_fatal("Could not get pg_ctl version data using %s: %s\n",
-              cmd, getErrorText(errno));
+                cmd, getErrorText(errno));
 
    pclose(output);
 
index 476c6be276e0efd317be6e98f30b8f42050dfb2b..2906ccbf8c8f7c8074c8f738c97a1d86c5107ff1 100644 (file)
@@ -27,7 +27,7 @@
  * pg_control data.  pg_resetxlog cannot be run while the server is running
  * so we use pg_controldata;  pg_controldata doesn't provide all the fields
  * we need to actually perform the upgrade, but it provides enough for
- * check mode. We do not implement pg_resetxlog -n because it is hard to
+ * check mode.  We do not implement pg_resetxlog -n because it is hard to
  * return valid xid data for a running server.
  */
 void
@@ -119,7 +119,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
 
    if ((output = popen(cmd, "r")) == NULL)
        pg_fatal("Could not get control data using %s: %s\n",
-              cmd, getErrorText(errno));
+                cmd, getErrorText(errno));
 
    /* Only pre-8.4 has these so if they are not set below we will check later */
    cluster->controldata.lc_collate = NULL;
@@ -156,8 +156,8 @@ get_control_data(ClusterInfo *cluster, bool live_check)
            for (p = bufin; *p; p++)
                if (!isascii(*p))
                    pg_fatal("The 8.3 cluster's pg_controldata is incapable of outputting ASCII, even\n"
-                          "with LANG=C.  You must upgrade this cluster to a newer version of PostgreSQL\n"
-                          "8.3 to fix this bug.  PostgreSQL 8.3.7 and later are known to work properly.\n");
+                            "with LANG=C.  You must upgrade this cluster to a newer version of PostgreSQL\n"
+                            "8.3 to fix this bug.  PostgreSQL 8.3.7 and later are known to work properly.\n");
        }
 #endif
 
@@ -606,8 +606,8 @@ check_control_data(ControlData *oldctrl,
         * This is a common 8.3 -> 8.4 upgrade problem, so we are more verbose
         */
        pg_fatal("You will need to rebuild the new server with configure option\n"
-              "--disable-integer-datetimes or get server binaries built with those\n"
-              "options.\n");
+                "--disable-integer-datetimes or get server binaries built with those\n"
+                "options.\n");
    }
 
    /*
index 9b6bf4d0ede31ee05950d95ef8fb17d26ab7a569..6c7661049c7be5925343effacd7141ebc13e4cc3 100644 (file)
@@ -34,8 +34,8 @@ generate_old_dump(void)
 
    /*
     * Set umask for this function, all functions it calls, and all
-    * subprocesses/threads it creates.  We can't use fopen_priv()
-    * as Windows uses threads and umask is process-global.
+    * subprocesses/threads it creates.  We can't use fopen_priv() as Windows
+    * uses threads and umask is process-global.
     */
    old_umask = umask(S_IRWXG | S_IRWXO);
 
index 91e66e6ecf465766ef88558754d3989384d4aeae..6c217c902d86cc97f111ee7ba0c32a4b5aa0f725 100644 (file)
@@ -52,7 +52,7 @@ exec_prog(const char *log_file, const char *opt_log_file,
    va_list     ap;
 
 #ifdef WIN32
-static DWORD       mainThreadId = 0;
+   static DWORD mainThreadId = 0;
 
    /* We assume we are called from the primary thread first */
    if (mainThreadId == 0)
@@ -73,14 +73,15 @@ static DWORD       mainThreadId = 0;
    pg_log(PG_VERBOSE, "%s\n", cmd);
 
 #ifdef WIN32
+
    /*
-    * For some reason, Windows issues a file-in-use error if we write data
-    * to the log file from a non-primary thread just before we create a
-    * subprocess that also writes to the same log file.  One fix is to
-    * sleep for 100ms.  A cleaner fix is to write to the log file _after_
-    * the subprocess has completed, so we do this only when writing from
-    * a non-primary thread.  fflush(), running system() twice, and
-    * pre-creating the file do not see to help.
+    * For some reason, Windows issues a file-in-use error if we write data to
+    * the log file from a non-primary thread just before we create a
+    * subprocess that also writes to the same log file.  One fix is to sleep
+    * for 100ms.  A cleaner fix is to write to the log file _after_ the
+    * subprocess has completed, so we do this only when writing from a
+    * non-primary thread.  fflush(), running system() twice, and pre-creating
+    * the file do not see to help.
     */
    if (mainThreadId != GetCurrentThreadId())
        result = system(cmd);
@@ -101,7 +102,7 @@ static DWORD       mainThreadId = 0;
 
        for (iter = 0; iter < 4 && log == NULL; iter++)
        {
-           pg_usleep(1000000);     /* 1 sec */
+           pg_usleep(1000000); /* 1 sec */
            log = fopen(log_file, "a");
        }
    }
@@ -154,11 +155,12 @@ static DWORD       mainThreadId = 0;
    }
 
 #ifndef WIN32
+
    /*
     * We can't do this on Windows because it will keep the "pg_ctl start"
     * output filename open until the server stops, so we do the \n\n above on
     * that platform.  We use a unique filename for "pg_ctl start" that is
-    * never reused while the server is running, so it works fine.  We could
+    * never reused while the server is running, so it works fine.  We could
     * log these commands to a third file, but that just adds complexity.
     */
    if ((log = fopen(log_file, "a")) == NULL)
@@ -189,7 +191,7 @@ pid_lock_file_exists(const char *datadir)
        /* ENOTDIR means we will throw a more useful error later */
        if (errno != ENOENT && errno != ENOTDIR)
            pg_fatal("could not open file \"%s\" for reading: %s\n",
-                  path, getErrorText(errno));
+                    path, getErrorText(errno));
 
        return false;
    }
@@ -238,7 +240,7 @@ win32_check_directory_write_permissions(void)
    int         fd;
 
    /*
-    * We open a file we would normally create anyway.  We do this even in
+    * We open a file we would normally create anyway.  We do this even in
     * 'check' mode, which isn't ideal, but this is the best we can do.
     */
    if ((fd = open(GLOBALS_DUMP_FILE, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)) < 0)
@@ -255,7 +257,7 @@ win32_check_directory_write_permissions(void)
  *
  * This function validates the given cluster directory - we search for a
  * small set of subdirectories that we expect to find in a valid $PGDATA
- * directory.  If any of the subdirectories are missing (or secured against
+ * directory.  If any of the subdirectories are missing (or secured against
  * us) we display an error message and exit()
  *
  */
@@ -295,7 +297,7 @@ check_data_dir(const char *pg_data)
  * check_bin_dir()
  *
  * This function searches for the executables that we expect to find
- * in the binaries directory.  If we find that a required executable
+ * in the binaries directory.  If we find that a required executable
  * is missing (or secured against us), we display an error message and
  * exit().
  */
@@ -349,10 +351,10 @@ validate_exec(const char *dir, const char *cmdName)
     */
    if (stat(path, &buf) < 0)
        pg_fatal("check for \"%s\" failed: %s\n",
-              path, getErrorText(errno));
+                path, getErrorText(errno));
    else if (!S_ISREG(buf.st_mode))
        pg_fatal("check for \"%s\" failed: not an executable file\n",
-              path);
+                path);
 
    /*
     * Ensure that the file is both executable and readable (required for
@@ -364,7 +366,7 @@ validate_exec(const char *dir, const char *cmdName)
    if ((buf.st_mode & S_IRUSR) == 0)
 #endif
        pg_fatal("check for \"%s\" failed: cannot read file (permission denied)\n",
-              path);
+                path);
 
 #ifndef WIN32
    if (access(path, X_OK) != 0)
@@ -372,5 +374,5 @@ validate_exec(const char *dir, const char *cmdName)
    if ((buf.st_mode & S_IXUSR) == 0)
 #endif
        pg_fatal("check for \"%s\" failed: cannot execute (permission denied)\n",
-              path);
+                path);
 }
index 04d948cfd7c4b29f5f2b37f1d9868e0f262ee386..ab9d1edcb6d86f26efb9d018ce8848403fd3e8a6 100644 (file)
@@ -214,8 +214,8 @@ check_hard_link(void)
    if (pg_link_file(existing_file, new_link_file) == -1)
    {
        pg_fatal("Could not create hard link between old and new data directories: %s\n"
-              "In link mode the old and new data directories must be on the same file system volume.\n",
-              getErrorText(errno));
+                "In link mode the old and new data directories must be on the same file system volume.\n",
+                getErrorText(errno));
    }
    unlink(new_link_file);
 }
index 5300fd603553ba6db3e73f6854d5b141fa1c461c..f2cd4716c72958bf3f28a2385bc4bb11a81cd977 100644 (file)
@@ -296,7 +296,7 @@ check_loadable_libraries(void)
         * plpython2u language was created with library name plpython2.so as a
         * symbolic link to plpython.so.  In Postgres 9.1, only the
         * plpython2.so library was created, and both plpythonu and plpython2u
-        * pointing to it.  For this reason, any reference to library name
+        * pointing to it.  For this reason, any reference to library name
         * "plpython" in an old PG <= 9.1 cluster must look for "plpython2" in
         * the new cluster.
         *
@@ -327,7 +327,7 @@ check_loadable_libraries(void)
 
            if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL)
                pg_fatal("Could not open file \"%s\": %s\n",
-                      output_path, getErrorText(errno));
+                        output_path, getErrorText(errno));
            fprintf(script, "Could not load library \"%s\"\n%s\n",
                    lib,
                    PQerrorMessage(conn));
@@ -343,10 +343,10 @@ check_loadable_libraries(void)
        fclose(script);
        pg_log(PG_REPORT, "fatal\n");
        pg_fatal("Your installation references loadable libraries that are missing from the\n"
-              "new installation.  You can add these libraries to the new installation,\n"
-              "or remove the functions using them from the old installation.  A list of\n"
-              "problem libraries is in the file:\n"
-              "    %s\n\n", output_path);
+                "new installation.  You can add these libraries to the new installation,\n"
+                "or remove the functions using them from the old installation.  A list of\n"
+                "problem libraries is in the file:\n"
+                "    %s\n\n", output_path);
    }
    else
        check_ok();
index fd083de821f1c4bdef611a1fc3fd9f197a65cae6..d2968b479a930673fa61093970ddccf9a1e86483 100644 (file)
@@ -52,7 +52,7 @@ gen_db_file_maps(DbInfo *old_db, DbInfo *new_db,
 
        if (old_rel->reloid != new_rel->reloid)
            pg_fatal("Mismatch of relation OID in database \"%s\": old OID %d, new OID %d\n",
-                  old_db->db_name, old_rel->reloid, new_rel->reloid);
+                    old_db->db_name, old_rel->reloid, new_rel->reloid);
 
        /*
         * TOAST table names initially match the heap pg_class oid. In
@@ -69,9 +69,9 @@ gen_db_file_maps(DbInfo *old_db, DbInfo *new_db,
              strcmp(old_rel->nspname, "pg_toast") != 0) &&
             strcmp(old_rel->relname, new_rel->relname) != 0))
            pg_fatal("Mismatch of relation names in database \"%s\": "
-                  "old name \"%s.%s\", new name \"%s.%s\"\n",
-                  old_db->db_name, old_rel->nspname, old_rel->relname,
-                  new_rel->nspname, new_rel->relname);
+                    "old name \"%s.%s\", new name \"%s.%s\"\n",
+                    old_db->db_name, old_rel->nspname, old_rel->relname,
+                    new_rel->nspname, new_rel->relname);
 
        create_rel_filename_map(old_pgdata, new_pgdata, old_db, new_db,
                                old_rel, new_rel, maps + num_maps);
@@ -84,7 +84,7 @@ gen_db_file_maps(DbInfo *old_db, DbInfo *new_db,
     */
    if (old_db->rel_arr.nrels != new_db->rel_arr.nrels)
        pg_fatal("old and new databases \"%s\" have a different number of relations\n",
-              old_db->db_name);
+                old_db->db_name);
 
    *nmaps = num_maps;
    return maps;
@@ -270,7 +270,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
                i_relfilenode,
                i_reltablespace;
    char        query[QUERY_ALLOC];
-   char       *last_namespace = NULL, *last_tablespace = NULL;
+   char       *last_namespace = NULL,
+              *last_tablespace = NULL;
 
    /*
     * pg_largeobject contains user data that does not appear in pg_dumpall
@@ -322,7 +323,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
                              "SELECT reltoastrelid "
                              "FROM info_rels i JOIN pg_catalog.pg_class c "
                              "     ON i.reloid = c.oid "
-                             "     AND c.reltoastrelid != %u", InvalidOid));
+                         "     AND c.reltoastrelid != %u", InvalidOid));
    PQclear(executeQueryOrDie(conn,
                              "INSERT INTO info_rels "
                              "SELECT indexrelid "
@@ -373,9 +374,9 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
        curr->nsp_alloc = false;
 
        /*
-        * Many of the namespace and tablespace strings are identical,
-        * so we try to reuse the allocated string pointers where possible
-        * to reduce memory consumption.
+        * Many of the namespace and tablespace strings are identical, so we
+        * try to reuse the allocated string pointers where possible to reduce
+        * memory consumption.
         */
        /* Can we reuse the previous string allocation? */
        if (last_namespace && strcmp(nspname, last_namespace) == 0)
index acec083c0f0d565d0ce54c0fe65d8349904115ea..b81010a813083b199b88162f2713b7c927aa0b8e 100644 (file)
@@ -188,7 +188,7 @@ parseCommandLine(int argc, char *argv[])
 
            default:
                pg_fatal("Try \"%s --help\" for more information.\n",
-                      os_info.progname);
+                        os_info.progname);
                break;
        }
    }
@@ -211,8 +211,9 @@ parseCommandLine(int argc, char *argv[])
    /* Turn off read-only mode;  add prefix to PGOPTIONS? */
    if (getenv("PGOPTIONS"))
    {
-       char *pgoptions = psprintf("%s %s", FIX_DEFAULT_READ_ONLY,
-                                   getenv("PGOPTIONS"));
+       char       *pgoptions = psprintf("%s %s", FIX_DEFAULT_READ_ONLY,
+                                        getenv("PGOPTIONS"));
+
        pg_putenv("PGOPTIONS", pgoptions);
        pfree(pgoptions);
    }
@@ -319,8 +320,8 @@ check_required_directory(char **dirpath, char **configpath,
        }
        else
            pg_fatal("You must identify the directory where the %s.\n"
-                  "Please use the %s command-line option or the %s environment variable.\n",
-                  description, cmdLineOption, envVarName);
+                    "Please use the %s command-line option or the %s environment variable.\n",
+                    description, cmdLineOption, envVarName);
    }
 
    /*
@@ -373,7 +374,7 @@ adjust_data_dir(ClusterInfo *cluster)
 
    /*
     * We don't have a data directory yet, so we can't check the PG version,
-    * so this might fail --- only works for PG 9.2+.   If this fails,
+    * so this might fail --- only works for PG 9.2+.   If this fails,
     * pg_upgrade will fail anyway because the data files will not be found.
     */
    snprintf(cmd, sizeof(cmd), "\"%s/postmaster\" -D \"%s\" -C data_directory",
@@ -382,7 +383,7 @@ adjust_data_dir(ClusterInfo *cluster)
    if ((output = popen(cmd, "r")) == NULL ||
        fgets(cmd_output, sizeof(cmd_output), output) == NULL)
        pg_fatal("Could not get data directory using %s: %s\n",
-              cmd, getErrorText(errno));
+                cmd, getErrorText(errno));
 
    pclose(output);
 
index 9f88818c475bfdca5470a251c407d7cd00d01a1f..6354cec2b0f0b22a3dfb4f0e868d96e6e74b35bf 100644 (file)
@@ -30,7 +30,7 @@ static pageCnvCtx *loadConverterPlugin(
  * the PageLayoutVersion of the new cluster.  If the versions differ, this
  * function loads a converter plugin and returns a pointer to a pageCnvCtx
  * object (in *result) that knows how to convert pages from the old format
- * to the new format.  If the versions are identical, this function just
+ * to the new format.  If the versions are identical, this function just
  * returns a NULL pageCnvCtx pointer to indicate that page-by-page conversion
  * is not required.
  */
@@ -110,7 +110,7 @@ getPageVersion(uint16 *version, const char *pathName)
  * This function loads a page-converter plugin library and grabs a
  * pointer to each of the (interesting) functions provided by that
  * plugin.  The name of the plugin library is derived from the given
- * newPageVersion and oldPageVersion.  If a plugin is found, this
+ * newPageVersion and oldPageVersion.  If a plugin is found, this
  * function returns a pointer to a pageCnvCtx object (which will contain
  * a collection of plugin function pointers). If the required plugin
  * is not found, this function returns NULL.
index f4201e112145e69fb11a020a9bfa304120449be1..5d2565d44100e5b7d75fe8ce1a9d73704a0d4f23 100644 (file)
@@ -339,10 +339,10 @@ reap_child(bool wait_for_child)
        thread_handles[thread_num] = thread_handles[parallel_jobs - 1];
 
        /*
-        * Move last active thead arg struct into the now-dead slot,
-        * and the now-dead slot to the end for reuse by the next thread.
-        * Though the thread struct is in use by another thread, we can
-        * safely swap the struct pointers within the array.
+        * Move last active thead arg struct into the now-dead slot, and the
+        * now-dead slot to the end for reuse by the next thread. Though the
+        * thread struct is in use by another thread, we can safely swap the
+        * struct pointers within the array.
         */
        tmp_args = cur_thread_args[thread_num];
        cur_thread_args[thread_num] = cur_thread_args[parallel_jobs - 1];
index 5e21028506029bd42a4577a675e634f323e7688b..773bb07e04eb9c2a3384ff68fc9398fe5cbd7313 100644 (file)
@@ -125,7 +125,7 @@ main(int argc, char **argv)
 
    /*
     * Most failures happen in create_new_objects(), which has completed at
-    * this point.  We do this here because it is just before linking, which
+    * this point.  We do this here because it is just before linking, which
     * will link the old and new cluster data files, preventing the old
     * cluster from being safely started once the new cluster is started.
     */
@@ -193,7 +193,7 @@ setup(char *argv0, bool *live_check)
    {
        /*
         * If we have a postmaster.pid file, try to start the server.  If it
-        * starts, the pid file was stale, so stop the server.  If it doesn't
+        * starts, the pid file was stale, so stop the server.  If it doesn't
         * start, assume the server is running.  If the pid file is left over
         * from a server crash, this also allows any committed transactions
         * stored in the WAL to be replayed so they are not lost, because WAL
@@ -205,7 +205,7 @@ setup(char *argv0, bool *live_check)
        {
            if (!user_opts.check)
                pg_fatal("There seems to be a postmaster servicing the old cluster.\n"
-                      "Please shutdown that postmaster and try again.\n");
+                        "Please shutdown that postmaster and try again.\n");
            else
                *live_check = true;
        }
@@ -218,7 +218,7 @@ setup(char *argv0, bool *live_check)
            stop_postmaster(false);
        else
            pg_fatal("There seems to be a postmaster servicing the new cluster.\n"
-                  "Please shutdown that postmaster and try again.\n");
+                    "Please shutdown that postmaster and try again.\n");
    }
 
    /* get path to pg_upgrade executable */
@@ -279,8 +279,8 @@ prepare_new_databases(void)
 
    /*
     * Install support functions in the global-object restore database to
-    * preserve pg_authid.oid.  pg_dumpall uses 'template0' as its template
-    * database so objects we add into 'template1' are not propogated.  They
+    * preserve pg_authid.oid.  pg_dumpall uses 'template0' as its template
+    * database so objects we add into 'template1' are not propogated.  They
     * are removed on pg_upgrade exit.
     */
    install_support_functions_in_new_db("template1");
index 14039b4d3dea11f1797fca65c87ce7222e0ad2c4..33be33d64062eb5833bb4fb6ca67781be07894d7 100644 (file)
@@ -142,10 +142,10 @@ typedef struct
  */
 typedef struct
 {
-   const char      *old_tablespace;
-   const char      *new_tablespace;
-   const char      *old_tablespace_suffix;
-   const char      *new_tablespace_suffix;
+   const char *old_tablespace;
+   const char *new_tablespace;
+   const char *old_tablespace_suffix;
+   const char *new_tablespace_suffix;
    Oid         old_db_oid;
    Oid         new_db_oid;
 
@@ -167,7 +167,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 */
    RelInfoArr  rel_arr;        /* array of all user relinfos */
 } DbInfo;
 
@@ -454,7 +455,7 @@ pg_log(eLogType type, const char *fmt,...)
 __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
 void
 pg_fatal(const char *fmt,...)
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2),noreturn));
+__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2), noreturn));
 void       end_progress_output(void);
 void
 prep_status(const char *fmt,...)
index dccc86d25a2fc0238bf50d4e9bef9dfdb81fd120..aa6aafde5e97d70ff1673599a56197fed388c038 100644 (file)
@@ -37,7 +37,7 @@ transfer_all_new_tablespaces(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr,
    /*
     * Transfering files by tablespace is tricky because a single database can
     * use multiple tablespaces.  For non-parallel mode, we just pass a NULL
-    * tablespace path, which matches all tablespaces.  In parallel mode, we
+    * tablespace path, which matches all tablespaces.  In parallel mode, we
     * pass the default tablespace and all user-created tablespaces and let
     * those operations happen in parallel.
     */
@@ -108,7 +108,7 @@ transfer_all_new_dbs(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr,
 
        if (new_dbnum >= new_db_arr->ndbs)
            pg_fatal("old database \"%s\" not found in the new cluster\n",
-                  old_db->db_name);
+                    old_db->db_name);
 
        n_maps = 0;
        mappings = gen_db_file_maps(old_db, new_db, &n_maps, old_pgdata,
@@ -135,7 +135,7 @@ transfer_all_new_dbs(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr,
 /*
  * get_pg_database_relfilenode()
  *
- * Retrieves the relfilenode for a few system-catalog tables.  We need these
+ * Retrieves the relfilenode for a few system-catalog tables.  We need these
  * relfilenodes later in the upgrade process.
  */
 void
@@ -259,8 +259,8 @@ transfer_relfile(pageCnvCtx *pageConverter, FileNameMap *map,
                    return;
                else
                    pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
-                          map->nspname, map->relname, old_file, new_file,
-                          getErrorText(errno));
+                            map->nspname, map->relname, old_file, new_file,
+                            getErrorText(errno));
            }
            close(fd);
        }
@@ -272,7 +272,7 @@ transfer_relfile(pageCnvCtx *pageConverter, FileNameMap *map,
 
        if ((user_opts.transfer_mode == TRANSFER_MODE_LINK) && (pageConverter != NULL))
            pg_fatal("This upgrade requires page-by-page conversion, "
-                  "you must use copy mode instead of link mode.\n");
+                    "you must use copy mode instead of link mode.\n");
 
        if (user_opts.transfer_mode == TRANSFER_MODE_COPY)
        {
@@ -280,7 +280,7 @@ transfer_relfile(pageCnvCtx *pageConverter, FileNameMap *map,
 
            if ((msg = copyAndUpdateFile(pageConverter, old_file, new_file, true)) != NULL)
                pg_fatal("error while copying relation \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
-                      map->nspname, map->relname, old_file, new_file, msg);
+                        map->nspname, map->relname, old_file, new_file, msg);
        }
        else
        {
@@ -288,7 +288,7 @@ transfer_relfile(pageCnvCtx *pageConverter, FileNameMap *map,
 
            if ((msg = linkAndUpdateFile(pageConverter, old_file, new_file)) != NULL)
                pg_fatal("error while creating link for relation \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
-                      map->nspname, map->relname, old_file, new_file, msg);
+                        map->nspname, map->relname, old_file, new_file, msg);
        }
    }
 
index 705510320ef7f6c776f554f7af015f689700f7e3..5f4b5307cbad79ef5e9a68109b2c271b1fe4329f 100644 (file)
@@ -240,28 +240,26 @@ start_postmaster(ClusterInfo *cluster, bool throw_error)
        return false;
 
    /*
-    * We set this here to make sure atexit() shuts down the server,
-    * but only if we started the server successfully.  We do it
-    * before checking for connectivity in case the server started but
-    * there is a connectivity failure.  If pg_ctl did not return success,
-    * we will exit below.
+    * We set this here to make sure atexit() shuts down the server, but only
+    * if we started the server successfully.  We do it before checking for
+    * connectivity in case the server started but there is a connectivity
+    * failure.  If pg_ctl did not return success, we will exit below.
     *
     * Pre-9.1 servers do not have PQping(), so we could be leaving the server
-    * running if authentication was misconfigured, so someday we might went to
-    * be more aggressive about doing server shutdowns even if pg_ctl fails,
-    * but now (2013-08-14) it seems prudent to be cautious.  We don't want to
-    * shutdown a server that might have been accidentally started during the
-    * upgrade.
+    * running if authentication was misconfigured, so someday we might went
+    * to be more aggressive about doing server shutdowns even if pg_ctl
+    * fails, but now (2013-08-14) it seems prudent to be cautious.  We don't
+    * want to shutdown a server that might have been accidentally started
+    * during the upgrade.
     */
    if (pg_ctl_return)
        os_info.running_cluster = cluster;
 
    /*
-    * pg_ctl -w might have failed because the server couldn't be started,
-    * or there might have been a connection problem in _checking_ if the
-    * server has started.  Therefore, even if pg_ctl failed, we continue
-    * and test for connectivity in case we get a connection reason for the
-    * failure.
+    * pg_ctl -w might have failed because the server couldn't be started, or
+    * there might have been a connection problem in _checking_ if the server
+    * has started.  Therefore, even if pg_ctl failed, we continue and test
+    * for connectivity in case we get a connection reason for the failure.
     */
    if ((conn = get_db_conn(cluster, "template1")) == NULL ||
        PQstatus(conn) != CONNECTION_OK)
@@ -271,18 +269,19 @@ start_postmaster(ClusterInfo *cluster, bool throw_error)
        if (conn)
            PQfinish(conn);
        pg_fatal("could not connect to %s postmaster started with the command:\n"
-              "%s\n",
-              CLUSTER_NAME(cluster), cmd);
+                "%s\n",
+                CLUSTER_NAME(cluster), cmd);
    }
    PQfinish(conn);
 
    /*
     * If pg_ctl failed, and the connection didn't fail, and throw_error is
-    * enabled, fail now.  This could happen if the server was already running.
+    * enabled, fail now.  This could happen if the server was already
+    * running.
     */
    if (!pg_ctl_return)
        pg_fatal("pg_ctl failed to start the %s server, or connection failed\n",
-              CLUSTER_NAME(cluster));
+                CLUSTER_NAME(cluster));
 
    return true;
 }
@@ -340,7 +339,7 @@ check_pghost_envvar(void)
                (strcmp(value, "localhost") != 0 && strcmp(value, "127.0.0.1") != 0 &&
                 strcmp(value, "::1") != 0 && value[0] != '/'))
                pg_fatal("libpq environment variable %s has a non-local server value: %s\n",
-                      option->envvar, value);
+                        option->envvar, value);
        }
    }
 
index 94bba087bb7f8ecb4647b9dbc69f56d9db94e06a..68e9cb241c75dbc0bb42a976733238d7e77de717 100644 (file)
@@ -28,7 +28,7 @@ init_tablespaces(void)
    if (os_info.num_old_tablespaces > 0 &&
    strcmp(old_cluster.tablespace_suffix, new_cluster.tablespace_suffix) == 0)
        pg_fatal("Cannot upgrade to/from the same system catalog version when\n"
-              "using tablespaces.\n");
+                "using tablespaces.\n");
 }
 
 
@@ -78,10 +78,9 @@ get_tablespace_paths(void)
         * Effectively, this is checking only for tables/indexes in
         * non-existent tablespace directories.  Databases located in
         * non-existent tablespaces already throw a backend error.
-        * Non-existent tablespace directories can occur when a data
-        * directory that contains user tablespaces is moved as part
-        * of pg_upgrade preparation and the symbolic links are not
-        * updated.
+        * Non-existent tablespace directories can occur when a data directory
+        * that contains user tablespaces is moved as part of pg_upgrade
+        * preparation and the symbolic links are not updated.
         */
        if (stat(os_info.old_tablespaces[tblnum], &statBuf) != 0)
        {
@@ -91,13 +90,13 @@ get_tablespace_paths(void)
                              os_info.old_tablespaces[tblnum]);
            else
                report_status(PG_FATAL,
-                             "cannot stat() tablespace directory \"%s\": %s\n",
-                             os_info.old_tablespaces[tblnum], getErrorText(errno));
+                          "cannot stat() tablespace directory \"%s\": %s\n",
+                      os_info.old_tablespaces[tblnum], getErrorText(errno));
        }
        if (!S_ISDIR(statBuf.st_mode))
-               report_status(PG_FATAL,
-                             "tablespace path \"%s\" is not a directory\n",
-                             os_info.old_tablespaces[tblnum]);
+           report_status(PG_FATAL,
+                         "tablespace path \"%s\" is not a directory\n",
+                         os_info.old_tablespaces[tblnum]);
    }
 
    PQclear(res);
index 7f4458c0acef2c3b1f43695406af1b538b872368..3b94057696d0ad7cae3ead2521af10c39e25c2b1 100644 (file)
@@ -82,7 +82,7 @@ prep_status(const char *fmt,...)
 
 
 static
- __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0)))
+__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0)))
 void
 pg_log_v(eLogType type, const char *fmt, va_list ap)
 {
@@ -280,7 +280,7 @@ pg_putenv(const char *var, const char *val)
 
        /*
         * Do not free envstr because it becomes part of the environment on
-        * some operating systems.  See port/unsetenv.c::unsetenv.
+        * some operating systems.  See port/unsetenv.c::unsetenv.
         */
 #else
        SetEnvironmentVariableA(var, val);
index f58f74511f756d5ab2ee86d74765bf19bc744646..07e79bd609a5f613e93bf94d3c2d9a3e16c5cd6c 100644 (file)
@@ -98,10 +98,10 @@ old_8_3_check_for_name_data_type_usage(ClusterInfo *cluster)
        pg_log(PG_REPORT, "fatal\n");
        pg_fatal("Your installation contains the \"name\" data type in user tables.  This\n"
        "data type changed its internal alignment between your old and new\n"
-              "clusters so this cluster cannot currently be upgraded.  You can remove\n"
+                "clusters so this cluster cannot currently be upgraded.  You can remove\n"
        "the problem tables and restart the upgrade.  A list of the problem\n"
-              "columns is in the file:\n"
-              "    %s\n\n", output_path);
+                "columns is in the file:\n"
+                "    %s\n\n", output_path);
    }
    else
        check_ok();
@@ -187,11 +187,11 @@ old_8_3_check_for_tsquery_usage(ClusterInfo *cluster)
    {
        pg_log(PG_REPORT, "fatal\n");
        pg_fatal("Your installation contains the \"tsquery\" data type.    This data type\n"
-              "added a new internal field between your old and new clusters so this\n"
+                "added a new internal field between your old and new clusters so this\n"
        "cluster cannot currently be upgraded.  You can remove the problem\n"
-              "columns and restart the upgrade.  A list of the problem columns is in the\n"
-              "file:\n"
-              "    %s\n\n", output_path);
+                "columns and restart the upgrade.  A list of the problem columns is in the\n"
+                "file:\n"
+                "    %s\n\n", output_path);
    }
    else
        check_ok();
@@ -242,7 +242,7 @@ old_8_3_check_ltree_usage(ClusterInfo *cluster)
            found = true;
            if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL)
                pg_fatal("Could not open file \"%s\": %s\n",
-                      output_path, getErrorText(errno));
+                        output_path, getErrorText(errno));
            if (!db_used)
            {
                fprintf(script, "Database: %s\n", active_db->db_name);
@@ -265,12 +265,12 @@ old_8_3_check_ltree_usage(ClusterInfo *cluster)
    {
        pg_log(PG_REPORT, "fatal\n");
        pg_fatal("Your installation contains the \"ltree\" data type.  This data type\n"
-              "changed its internal storage format between your old and new clusters so this\n"
-              "cluster cannot currently be upgraded.  You can manually upgrade databases\n"
-              "that use \"contrib/ltree\" facilities and remove \"contrib/ltree\" from the old\n"
-              "cluster and restart the upgrade.  A list of the problem functions is in the\n"
-              "file:\n"
-              "    %s\n\n", output_path);
+                "changed its internal storage format between your old and new clusters so this\n"
+                "cluster cannot currently be upgraded.  You can manually upgrade databases\n"
+                "that use \"contrib/ltree\" facilities and remove \"contrib/ltree\" from the old\n"
+                "cluster and restart the upgrade.  A list of the problem functions is in the\n"
+                "file:\n"
+                "    %s\n\n", output_path);
    }
    else
        check_ok();
index 9c9b68a7a9789419870c67c705d28aa85c627c16..6ca7012fd906bc80b4d2e1da7dc2537b8acefd83 100644 (file)
@@ -41,7 +41,7 @@ timestamptz_to_time_t(TimestampTz t)
 
 /*
  * Stopgap implementation of timestamptz_to_str that doesn't depend on backend
- * infrastructure. This will work for timestamps that are within the range
+ * infrastructure.  This will work for timestamps that are within the range
  * of the platform time_t type.  (pg_time_t is compatible except for possibly
  * being wider.)
  *
index 31b5d7589aa3a25766b048fa871e1e7f267cb32b..824b8c393c9f601ccd7539b4347de9196c3546ff 100644 (file)
@@ -704,7 +704,7 @@ main(int argc, char **argv)
                break;
            else
            {
-               pg_usleep(1000000L);        /* 1 second */
+               pg_usleep(1000000L);    /* 1 second */
                continue;
            }
        }
index 7c1e59e4c4a0d34158cce59e834ddecb8cb205ad..e399d9a68e271d6c3ee9ca289f3b412bf7e4d1d0 100644 (file)
@@ -162,9 +162,11 @@ bool       use_log;            /* log transaction latencies to a file */
 bool       use_quiet;          /* quiet logging onto stderr */
 int            agg_interval;       /* log aggregates instead of individual
                                 * transactions */
-int            progress = 0;       /* thread progress report every this seconds */
-int         progress_nclients = 0; /* number of clients for progress report */
-int            progress_nthreads = 0; /* number of threads for progress report */
+int            progress = 0;       /* thread progress report every this seconds */
+int            progress_nclients = 0;      /* number of clients for progress
+                                        * report */
+int            progress_nthreads = 0;      /* number of threads for progress
+                                        * report */
 bool       is_connect;         /* establish connection for each transaction */
 bool       is_latencies;       /* report per-command latencies */
 int            main_pid;           /* main process id used in log filename */
@@ -201,7 +203,7 @@ typedef struct
    int         listen;         /* 0 indicates that an async query has been
                                 * sent */
    int         sleeping;       /* 1 indicates that the client is napping */
-   bool        throttling;     /* whether nap is for throttling */
+   bool        throttling;     /* whether nap is for throttling */
    int64       until;          /* napping until (usec) */
    Variable   *variables;      /* array of variable definitions */
    int         nvariables;
@@ -227,9 +229,9 @@ typedef struct
    instr_time *exec_elapsed;   /* time spent executing cmds (per Command) */
    int        *exec_count;     /* number of cmd executions (per Command) */
    unsigned short random_state[3];     /* separate randomness for each thread */
-   int64       throttle_trigger;   /* previous/next throttling (us) */
-   int64       throttle_lag;       /* total transaction lag behind throttling */
-   int64       throttle_lag_max;   /* max transaction lag */
+   int64       throttle_trigger;       /* previous/next throttling (us) */
+   int64       throttle_lag;   /* total transaction lag behind throttling */
+   int64       throttle_lag_max;       /* max transaction lag */
 } TState;
 
 #define INVALID_THREAD     ((pthread_t) 0)
@@ -240,8 +242,8 @@ typedef struct
    int         xacts;
    int64       latencies;
    int64       sqlats;
-   int64       throttle_lag;
-   int64       throttle_lag_max;
+   int64       throttle_lag;
+   int64       throttle_lag_max;
 } TResult;
 
 /*
@@ -343,20 +345,20 @@ usage(void)
           "\nInitialization options:\n"
           "  -i, --initialize         invokes initialization mode\n"
           "  -F, --fillfactor=NUM     set fill factor\n"
-          "  -n, --no-vacuum          do not run VACUUM after initialization\n"
-          "  -q, --quiet              quiet logging (one message each 5 seconds)\n"
+       "  -n, --no-vacuum          do not run VACUUM after initialization\n"
+   "  -q, --quiet              quiet logging (one message each 5 seconds)\n"
           "  -s, --scale=NUM          scaling factor\n"
           "  --foreign-keys           create foreign key constraints between tables\n"
           "  --index-tablespace=TABLESPACE\n"
-          "                           create indexes in the specified tablespace\n"
-          "  --tablespace=TABLESPACE  create tables in the specified tablespace\n"
+   "                           create indexes in the specified tablespace\n"
+    "  --tablespace=TABLESPACE  create tables in the specified tablespace\n"
           "  --unlogged-tables        create tables as unlogged tables\n"
           "\nBenchmarking options:\n"
           "  -c, --client=NUM         number of concurrent database clients (default: 1)\n"
           "  -C, --connect            establish new connection for each transaction\n"
           "  -D, --define=VARNAME=VALUE\n"
-          "                           define variable for use by custom script\n"
-          "  -f, --file=FILENAME      read transaction script from FILENAME\n"
+     "                           define variable for use by custom script\n"
+        "  -f, --file=FILENAME      read transaction script from FILENAME\n"
           "  -j, --jobs=NUM           number of threads (default: 1)\n"
           "  -l, --log                write transaction times to log file\n"
           "  -M, --protocol=simple|extended|prepared\n"
@@ -365,20 +367,20 @@ usage(void)
           "  -N, --skip-some-updates  skip updates of pgbench_tellers and pgbench_branches\n"
           "  -P, --progress=NUM       show thread progress report every NUM seconds\n"
           "  -r, --report-latencies   report average latency per command\n"
-          "  -R, --rate=NUM           target rate in transactions per second\n"
+       "  -R, --rate=NUM           target rate in transactions per second\n"
           "  -s, --scale=NUM          report this scale factor in output\n"
           "  -S, --select-only        perform SELECT-only transactions\n"
           "  -t, --transactions=NUM   number of transactions each client runs (default: 10)\n"
-          "  -T, --time=NUM           duration of benchmark test in seconds\n"
+        "  -T, --time=NUM           duration of benchmark test in seconds\n"
           "  -v, --vacuum-all         vacuum all four standard tables before tests\n"
           "  --aggregate-interval=NUM aggregate data over NUM seconds\n"
           "  --sampling-rate=NUM      fraction of transactions to log (e.g. 0.01 for 1%%)\n"
           "\nCommon options:\n"
           "  -d, --debug              print debugging output\n"
-          "  -h, --host=HOSTNAME      database server host or socket directory\n"
+     "  -h, --host=HOSTNAME      database server host or socket directory\n"
           "  -p, --port=PORT          database server port number\n"
           "  -U, --username=USERNAME  connect as specified database user\n"
-          "  -V, --version            output version information, then exit\n"
+        "  -V, --version            output version information, then exit\n"
           "  -?, --help               show this help, then exit\n"
           "\n"
           "Report bugs to .\n",
@@ -413,7 +415,7 @@ strtoint64(const char *str)
        ptr++;
 
        /*
-        * Do an explicit check for INT64_MIN.  Ugly though this is, it's
+        * Do an explicit check for INT64_MIN.  Ugly though this is, it's
         * cleaner than trying to get the loop below to handle it portably.
         */
        if (strncmp(ptr, "9223372036854775808", 19) == 0)
@@ -907,34 +909,34 @@ doCustom(TState *thread, CState *st, instr_time *conn_time, FILE *logfile, AggVa
 {
    PGresult   *res;
    Command   **commands;
-   bool        trans_needs_throttle = false;
+   bool        trans_needs_throttle = false;
 
 top:
    commands = sql_files[st->use_file];
 
    /*
-    * Handle throttling once per transaction by sleeping.  It is simpler
-    * to do this here rather than at the end, because so much complicated
-    * logic happens below when statements finish.
+    * Handle throttling once per transaction by sleeping.  It is simpler to
+    * do this here rather than at the end, because so much complicated logic
+    * happens below when statements finish.
     */
-   if (throttle_delay && ! st->is_throttled)
+   if (throttle_delay && !st->is_throttled)
    {
        /*
         * Use inverse transform sampling to randomly generate a delay, such
         * that the series of delays will approximate a Poisson distribution
         * centered on the throttle_delay time.
         *
-        * 10000 implies a 9.2 (-log(1/10000)) to 0.0 (log 1) delay multiplier,
-        * and results in a 0.055 % target underestimation bias:
+        * 10000 implies a 9.2 (-log(1/10000)) to 0.0 (log 1) delay
+        * multiplier, and results in a 0.055 % target underestimation bias:
         *
         * SELECT 1.0/AVG(-LN(i/10000.0)) FROM generate_series(1,10000) AS i;
         * = 1.000552717032611116335474
         *
-        * If transactions are too slow or a given wait is shorter than
-        * transaction, the next transaction will start right away.
+        * If transactions are too slow or a given wait is shorter than a
+        * transaction, the next transaction will start right away.
         */
-       int64 wait = (int64) (throttle_delay *
-           1.00055271703 * -log(getrand(thread, 1, 10000)/10000.0));
+       int64       wait = (int64) (throttle_delay *
+                 1.00055271703 * -log(getrand(thread, 1, 10000) / 10000.0));
 
        thread->throttle_trigger += wait;
 
@@ -943,14 +945,14 @@ top:
        st->throttling = true;
        st->is_throttled = true;
        if (debug)
-           fprintf(stderr, "client %d throttling "INT64_FORMAT" us\n",
+           fprintf(stderr, "client %d throttling " INT64_FORMAT " us\n",
                    st->id, wait);
    }
 
    if (st->sleeping)
    {                           /* are we sleeping? */
        instr_time  now;
-       int64 now_us;
+       int64       now_us;
 
        INSTR_TIME_SET_CURRENT(now);
        now_us = INSTR_TIME_GET_MICROSEC(now);
@@ -960,7 +962,8 @@ top:
            if (st->throttling)
            {
                /* Measure lag of throttled transaction relative to target */
-               int64 lag = now_us - st->until;
+               int64       lag = now_us - st->until;
+
                thread->throttle_lag += lag;
                if (lag > thread->throttle_lag_max)
                    thread->throttle_lag_max = lag;
@@ -1011,6 +1014,7 @@ top:
            INSTR_TIME_SUBTRACT(diff, st->txn_begin);
            latency = INSTR_TIME_GET_MICROSEC(diff);
            st->txn_latencies += latency;
+
            /*
             * XXX In a long benchmark run of high-latency transactions, this
             * int64 addition eventually overflows.  For example, 100 threads
@@ -1174,14 +1178,16 @@ top:
            st->use_file = (int) getrand(thread, 0, num_files - 1);
            commands = sql_files[st->use_file];
            st->is_throttled = false;
+
            /*
-            * No transaction is underway anymore, which means there is nothing
-            * to listen to right now.  When throttling rate limits are active,
-            * a sleep will happen next, as the next transaction starts.  And
-            * then in any case the next SQL command will set listen back to 1.
+            * No transaction is underway anymore, which means there is
+            * nothing to listen to right now.  When throttling rate limits
+            * are active, a sleep will happen next, as the next transaction
+            * starts.  And then in any case the next SQL command will set
+            * listen back to 1.
             */
            st->listen = 0;
-           trans_needs_throttle = (throttle_delay>0);
+           trans_needs_throttle = (throttle_delay > 0);
        }
    }
 
@@ -1201,11 +1207,12 @@ top:
    }
 
    /*
-    * This ensures that a throttling delay is inserted before proceeding
-    * with sql commands, after the first transaction. The first transaction
+    * This ensures that a throttling delay is inserted before proceeding with
+    * sql commands, after the first transaction. The first transaction
     * throttling is performed when first entering doCustom.
     */
-   if (trans_needs_throttle) {
+   if (trans_needs_throttle)
+   {
        trans_needs_throttle = false;
        goto top;
    }
@@ -1553,12 +1560,12 @@ init(bool is_no_vacuum)
     * Note: TPC-B requires at least 100 bytes per row, and the "filler"
     * fields in these table declarations were intended to comply with that.
     * The pgbench_accounts table complies with that because the "filler"
-    * column is set to blank-padded empty string. But for all other tables the
-    * column defaults to NULL and so don't actually take any space.  We could
-    * fix that by giving them non-null default values.  However, that would
-    * completely break comparability of pgbench results with prior versions.
-    * Since pgbench has never pretended to be fully TPC-B compliant anyway, we
-    * stick with the historical behavior.
+    * column is set to blank-padded empty string. But for all other tables
+    * the column defaults to NULL and so don't actually take any space.  We
+    * could fix that by giving them non-null default values.  However, that
+    * would completely break comparability of pgbench results with prior
+    * versions. Since pgbench has never pretended to be fully TPC-B compliant
+    * anyway, we stick with the historical behavior.
     */
    struct ddlinfo
    {
@@ -2209,8 +2216,9 @@ printResults(int ttype, int normal_xacts, int nclients,
    if (throttle_delay || progress)
    {
        /* compute and show latency average and standard deviation */
-       double latency = 0.001 * total_latencies / normal_xacts;
-       double sqlat = (double) total_sqlats / normal_xacts;
+       double      latency = 0.001 * total_latencies / normal_xacts;
+       double      sqlat = (double) total_sqlats / normal_xacts;
+
        printf("latency average: %.3f ms\n"
               "latency stddev: %.3f ms\n",
               latency, 0.001 * sqrt(sqlat - 1000000.0 * latency * latency));
@@ -2288,7 +2296,7 @@ int
 main(int argc, char **argv)
 {
    static struct option long_options[] = {
-       /* systematic long/short named options*/
+       /* systematic long/short named options */
        {"client", required_argument, NULL, 'c'},
        {"connect", no_argument, NULL, 'C'},
        {"debug", no_argument, NULL, 'd'},
@@ -2344,8 +2352,8 @@ main(int argc, char **argv)
    int         total_xacts = 0;
    int64       total_latencies = 0;
    int64       total_sqlats = 0;
-   int64       throttle_lag = 0;
-   int64       throttle_lag_max = 0;
+   int64       throttle_lag = 0;
+   int64       throttle_lag_max = 0;
 
    int         i;
 
@@ -2550,23 +2558,24 @@ main(int argc, char **argv)
                if (progress <= 0)
                {
                    fprintf(stderr,
-                      "thread progress delay (-P) must be positive (%s)\n",
+                       "thread progress delay (-P) must be positive (%s)\n",
                            optarg);
                    exit(1);
                }
                break;
            case 'R':
-           {
-               /* get a double from the beginning of option value */
-               double throttle_value = atof(optarg);
-               if (throttle_value <= 0.0)
                {
-                   fprintf(stderr, "invalid rate limit: %s\n", optarg);
-                   exit(1);
+                   /* get a double from the beginning of option value */
+                   double      throttle_value = atof(optarg);
+
+                   if (throttle_value <= 0.0)
+                   {
+                       fprintf(stderr, "invalid rate limit: %s\n", optarg);
+                       exit(1);
+                   }
+                   /* Invert rate limit into a time offset */
+                   throttle_delay = (int64) (1000000.0 / throttle_value);
                }
-               /* Invert rate limit into a time offset */
-               throttle_delay = (int64) (1000000.0 / throttle_value);
-           }
                break;
            case 0:
                /* This covers long options which take no argument. */
@@ -2963,11 +2972,15 @@ threadRun(void *arg)
    int         nstate = thread->nstate;
    int         remains = nstate;       /* number of remaining clients */
    int         i;
+
    /* for reporting progress: */
-   int64       thread_start = INSTR_TIME_GET_MICROSEC(thread->start_time);
+   int64       thread_start = INSTR_TIME_GET_MICROSEC(thread->start_time);
    int64       last_report = thread_start;
    int64       next_report = last_report + (int64) progress * 1000000;
-   int64       last_count = 0, last_lats = 0, last_sqlats = 0, last_lags = 0;
+   int64       last_count = 0,
+               last_lats = 0,
+               last_sqlats = 0,
+               last_lags = 0;
 
    AggVals     aggs;
 
@@ -3073,7 +3086,7 @@ threadRun(void *arg)
                    st->con = NULL;
                    continue;
                }
-               else /* just a nap from the script */
+               else    /* just a nap from the script */
                {
                    int         this_usec;
 
@@ -3160,19 +3173,27 @@ threadRun(void *arg)
        /* each process reports its own progression */
        if (progress)
        {
-           instr_time now_time;
-           int64 now;
+           instr_time  now_time;
+           int64       now;
+
            INSTR_TIME_SET_CURRENT(now_time);
            now = INSTR_TIME_GET_MICROSEC(now_time);
            if (now >= next_report)
            {
                /* generate and show report */
-               int64 count = 0, lats = 0, sqlats = 0;
-               int64 lags = thread->throttle_lag;
-               int64 run = now - last_report;
-               double tps, total_run, latency, sqlat, stdev, lag;
-
-               for (i = 0 ; i < nstate ; i++)
+               int64       count = 0,
+                           lats = 0,
+                           sqlats = 0;
+               int64       lags = thread->throttle_lag;
+               int64       run = now - last_report;
+               double      tps,
+                           total_run,
+                           latency,
+                           sqlat,
+                           stdev,
+                           lag;
+
+               for (i = 0; i < nstate; i++)
                {
                    count += state[i].cnt;
                    lats += state[i].txn_latencies;
@@ -3202,32 +3223,41 @@ threadRun(void *arg)
                last_sqlats = sqlats;
                last_lags = lags;
                last_report = now;
-               next_report += (int64) progress * 1000000;
+               next_report += (int64) progress *1000000;
            }
        }
 #else
        /* progress report by thread 0 for all threads */
        if (progress && thread->tid == 0)
        {
-           instr_time now_time;
-           int64 now;
+           instr_time  now_time;
+           int64       now;
+
            INSTR_TIME_SET_CURRENT(now_time);
            now = INSTR_TIME_GET_MICROSEC(now_time);
            if (now >= next_report)
            {
                /* generate and show report */
-               int64 count = 0, lats = 0, sqlats = 0, lags = 0;
-               int64 run = now - last_report;
-               double tps, total_run, latency, sqlat, lag, stdev;
-
-               for (i = 0 ; i < progress_nclients ; i++)
+               int64       count = 0,
+                           lats = 0,
+                           sqlats = 0,
+                           lags = 0;
+               int64       run = now - last_report;
+               double      tps,
+                           total_run,
+                           latency,
+                           sqlat,
+                           lag,
+                           stdev;
+
+               for (i = 0; i < progress_nclients; i++)
                {
                    count += state[i].cnt;
-                   lats   += state[i].txn_latencies;
+                   lats += state[i].txn_latencies;
                    sqlats += state[i].txn_sqlats;
                }
 
-               for (i = 0 ; i < progress_nthreads ; i++)
+               for (i = 0; i < progress_nthreads; i++)
                    lags += thread[i].throttle_lag;
 
                total_run = (now - thread_start) / 1000000.0;
@@ -3253,10 +3283,10 @@ threadRun(void *arg)
                last_sqlats = sqlats;
                last_lags = lags;
                last_report = now;
-               next_report += (int64) progress * 1000000;
+               next_report += (int64) progress *1000000;
            }
        }
-#endif /* PTHREAD_FORK_EMULATION */
+#endif   /* PTHREAD_FORK_EMULATION */
    }
 
 done:
index cc2e76a71f7b9907072f30a6a2c389068e3c9d37..4ed44beeff51707a2ca1b86842bbca7da4e5b647 100644 (file)
@@ -29,7 +29,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index ec2e0fa0250b15bad811ac9d4639c033c619d345..6dc7cbdb3a5250c71f944abfd8730d232b563d8b 100644 (file)
@@ -9,7 +9,7 @@
  * entirely in crypt_blowfish.c.
  *
  * Put bcrypt generator also here as crypt-blowfish.c
- * may not be compiled always.       -- marko
+ * may not be compiled always.        -- marko
  */
 
 #include "postgres.h"
index 47380a812a2ff461112eafd947996dd089d3602d..7ab888fb98170473cf43db6fc6bfc518177cc7ef 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -53,7 +53,7 @@
 
 /*
  * There is some confusion about whether and how to carry forward
- * the state of the pools. Seems like original Fortuna does not
+ * the state of the pools.  Seems like original Fortuna does not
  * do it, resetting hash after each request.  I guess expecting
  * feeding to happen more often that requesting.   This is absolutely
  * unsuitable for pgcrypto, as nothing asynchronous happens here.
@@ -77,7 +77,7 @@
  * How many pools.
  *
  * Original Fortuna uses 32 pools, that means 32'th pool is
- * used not earlier than in 13th year. This is a waste in
+ * used not earlier than in 13th year.  This is a waste in
  * pgcrypto, as we have very low-frequancy seeding.  Here
  * is preferable to have all entropy usable in reasonable time.
  *
@@ -296,7 +296,7 @@ reseed(FState *st)
 }
 
 /*
- * Pick a random pool. This uses key bytes as random source.
+ * Pick a random pool.  This uses key bytes as random source.
  */
 static unsigned
 get_rand_pool(FState *st)
index 2e49f8aab8306df1079ce5da955c9c5f40f45226..bf9f4768d16137883eef287df20f96cbb6830a57 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 3286cd9d80a04f69efb2bfb43e1f1dc420fa9520..5c6ebebfe2108c138c224545935f67db123e794a 100644 (file)
@@ -21,7 +21,7 @@
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
   BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
@@ -211,7 +211,7 @@ static int  s_vcmp(mp_int a, int v);
 static mp_digit s_uadd(mp_digit *da, mp_digit *db, mp_digit *dc,
       mp_size size_a, mp_size size_b);
 
-/* Unsigned magnitude subtraction. Assumes dc is big enough. */
+/* Unsigned magnitude subtraction.  Assumes dc is big enough. */
 static void s_usub(mp_digit *da, mp_digit *db, mp_digit *dc,
       mp_size size_a, mp_size size_b);
 
@@ -2275,7 +2275,7 @@ mp_error_string(mp_result res)
 /* }}} */
 
 /*------------------------------------------------------------------------*/
-/* Private functions for internal use. These make assumptions.           */
+/* Private functions for internal use.  These make assumptions.           */
 
 /* {{{ s_alloc(num) */
 
index cd48c143195b102b2f9fc72c6ffa50891ecb0d0f..0a4f0f713f43afd82c8684ff6ae2058e9316399b 100644 (file)
@@ -20,7 +20,7 @@
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
   BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
index 912effb14120becaaa26e49cef338342282bdd35..55ec7e16bd9fa045c8a50cbcdb5c49d8274ad2e7 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 7b33e496d413eb5340fb9b73106096128e845746..cb8ba2633d5a745981390295e3605a163a7f1d4f 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index f3a0e01c41fb33fb6f2ace7b2d0a3fbeeef4a12e..6124e4513c7cba62777a51df55548c9489efd9dd 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index da016c0a539edcbc08457cd303fada73f939cc7c..988293a729920a0e761e74463401e62d1d2c9042 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 08227a809c7458238422d545eb4a0aa06ba2a9e1..cac4e408ab40db444668ec72e3908ad439b60df2 100644 (file)
@@ -19,7 +19,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 03b9ab58ba678c9c4790c6345d38712ad70c5bd3..07d08c134d48f10879d3f15c24c7a23fb283ac03 100644 (file)
@@ -20,7 +20,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 068bf3469e0d949bcd4b17daa23b1a7c97fdb1c6..976af7059152dd75dc01a15174e066357929d8a1 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -429,8 +429,8 @@ bf_init(PX_Cipher *c, const uint8 *key, unsigned klen, const uint8 *iv)
 
    /*
     * Test if key len is supported. BF_set_key silently cut large keys and it
-    * could be a problem when user transfer crypted data from one server
-    * to another.
+    * could be a problem when user transfer crypted data from one server to
+    * another.
     */
 
    if (bf_is_strong == -1)
index 9917e18d864ee462682130734ae4ed82febdb54b..2d446d8cc950b9c210af74a15c95fc33c62c2927 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 04ea696ac38d44e1c24b9f6411c3530c4416cd43..dfc7a10590f1b7482d16c0f4f29b590be15e9954 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 8460bf924a2a921aec8548a56cfcd324e922b604..40f20550ea1333906a7711b28867eef16e7da473 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 17e6c66ade8275a84c821153a7a2a32b7b0570b2..1d99915f9db7c14ce49eed542f5b75e47ffffff2 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -89,7 +89,7 @@ pgp_cfb_free(PGP_CFB *ctx)
 }
 
 /*
- * Data processing for normal CFB. (PGP_PKT_SYMENCRYPTED_DATA_MDC)
+ * Data processing for normal CFB.  (PGP_PKT_SYMENCRYPTED_DATA_MDC)
  */
 static int
 mix_encrypt_normal(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst)
index 9c328e3daebac1586363598606dd0c6104ef0734..57efe73338613f037e516498b1d337c06f9ff27d 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 2063e8c319e3a63fae90535b932937ee469df90f..e03ee7f5f02fe9e00892ee96e80e2f8dd0278c7c 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 48eb3f42af0e278f54949952b05e0a216163fd5b..2320c7574b5cb585138fa09cb12e96b968da49da 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index b75266f18c1ea243e794be75482c1fcee2b2c8f5..9bfbbe6d0c986771f59f36f245b4ebb8df283229 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 6057dcd88c706b066c56bf43df75b86fc3d2e71b..be95f2d092690a4dd8378e4b21ea24dddd37f57c 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -146,7 +146,7 @@ bn_to_mpi(mpz_t *bn)
  *
  * Until I research it further, I just mimic gpg behaviour.
  * It has a special mapping table, for values <= 5120,
- * above that it uses 'arbitrary high number'. Following
+ * above that it uses 'arbitrary high number'.  Following
  * algorihm hovers 10-70 bits above gpg values.  And for
  * larger p, it uses gpg's algorihm.
  *
index 57acfa0f1771d34b0cb28f780a490b2e69dc5bad..24484a6c54e24c44ca3d71af70f8b6e10fa91380 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -81,7 +81,7 @@ bn_to_mpi(BIGNUM *bn)
  *
  * Until I research it further, I just mimic gpg behaviour.
  * It has a special mapping table, for values <= 5120,
- * above that it uses 'arbitrary high number'. Following
+ * above that it uses 'arbitrary high number'.  Following
  * algorihm hovers 10-70 bits above gpg values.  And for
  * larger p, it uses gpg's algorihm.
  *
index 7a6385b79c4ce5f73df5637fdcf6e0fbe376c87b..1da52acc9ad5a6ea98afb30dca72bf26ab0f9d12 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index fff59de2c8aa2667a648028e45aa83f4822386a7..ad1fd084276a356a622f84aea85b5c75789d4a43 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -74,7 +74,7 @@ add_block_entropy(PX_MD *md, text *data)
 }
 
 /*
- * Mix user data into RNG. It is for user own interests to have
+ * Mix user data into RNG.  It is for user own interests to have
  * RNG state shuffled.
  */
 static void
@@ -291,7 +291,7 @@ set_arg(PGP_Context *ctx, char *key, char *val,
 }
 
 /*
- * Find next word. Handle ',' and '=' as words.  Skip whitespace.
+ * Find next word.  Handle ',' and '=' as words.  Skip whitespace.
  * Put word info into res_p, res_len.
  * Returns ptr to next word.
  */
index 69b1ab34915dfc3e8a5fd23cd607da80b2add9bf..b925ff8599f3e0f0b57caaaf69c60b02da615d2d 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index a3d768f7c4435fbb10865044dce40ce2d73d66d3..3b43bb61c05a02d183a00103acb9baa75f41f6ce 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index abab0581235bf742705295c48d43a82c52e653dc..f898d72ae99ae5cd128b91644d00d05a1087cdbb 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index fe29164bb554db7c8ac23fa81afc6324c3e70c02..193dd95173ffed5b716961ec8faa4f24d02897b6 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 027b467d55464ce582cfdbc58c8a0d82873ecedd..03fe48fb64ce0025506aa2ecf7f62f6751b009a8 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index f856e0733c6c8e8e2914dba42ed031034148f991..8d4ab9862dfd5dc3da577f47f4a02ca3cf622874 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 523efc8fb02dd61f9613d9e39445c3de2112b672..7b003a76ca663bd418ac858d0a6e7680325e87c8 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 7dde9ab77b59292a5007ebfebe1a0e39a8a2b884..24daee743c956fdc846257ae9ba59bc3dbbe6214 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 8db79233d95eb7481ad0005ef54151d8d2ec55cf..06e5148f1b42710d8cb244c11561a9393b76ea7d 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 4b2a1207f9dbac79a67acd04e6f0c8112ad27f0c..93c436daa0dba691b49d318e9b5c072fb35482ba 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index e09dee49ab4ee836d7bb26f6252e23f324faacb8..a01a58e29c0b3604fd7ea3b3e36807bdccab0f7e 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 393a0be983a9cb098441d3b6fdf5c180c8db3b68..3f092ca3461149c73cc772e44bc8c42b017f185e 100644 (file)
@@ -17,7 +17,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 5651d03750eca8409cde61db7341920d7d82a576..4adbcc1f916f5bbd4333178acf1ccd6afcb20261 100644 (file)
@@ -7,12 +7,12 @@
 /*        RIJNDAEL by Joan Daemen and Vincent Rijmen                   */
 /*                                                                     */
 /* which is a candidate algorithm in the Advanced Encryption Standard  */
-/* programme of the US National Institute of Standards and Technology. */
+/* programme of the US National Institute of Standards and Technology.  */
 /*                                                                     */
 /* Copyright in this implementation is held by Dr B R Gladman but I        */
 /* hereby give permission for its free direct or derivative use subject */
 /* to acknowledgment of its origin and compliance with any conditions  */
-/* that the originators of the algorithm place on its exploitation.        */
+/* that the originators of the algorithm place on its exploitation.     */
 /*                                                                     */
 /* Dr Brian Gladman ([email protected]) 14th January 1999        */
 
@@ -188,7 +188,7 @@ gen_tabs(void)
    /* rijndael specification is in big endian format with  */
    /* bit 0 as the most significant bit. In the remainder  */
    /* of the specification the bits are numbered from the  */
-   /* least significant end of a byte.                     */
+   /* least significant end of a byte.                     */
 
    for (i = 0; i < 256; ++i)
    {
index fb30e46c14403d1d4e584d04785384c212e6b1fc..e536c61a6fb3daa9661e840ffdab57de0b4c2c4c 100644 (file)
@@ -8,12 +8,12 @@
 /*        RIJNDAEL by Joan Daemen and Vincent Rijmen                   */
 /*                                                                     */
 /* which is a candidate algorithm in the Advanced Encryption Standard  */
-/* programme of the US National Institute of Standards and Technology. */
+/* programme of the US National Institute of Standards and Technology.  */
 /*                                                                     */
 /* Copyright in this implementation is held by Dr B R Gladman but I        */
 /* hereby give permission for its free direct or derivative use subject */
 /* to acknowledgment of its origin and compliance with any conditions  */
-/* that the originators of the algorithm place on its exploitation.        */
+/* that the originators of the algorithm place on its exploitation.     */
 /*                                                                     */
 /* Dr Brian Gladman ([email protected]) 14th January 1999        */
 
index ac406faf7e994c9c07c3eea24f5bb26cac60f04c..0e753ce63a1f0d2bb901d85a6615e32010b2963b 100644 (file)
@@ -19,7 +19,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index 3e0931efbc8fd8873d6d8fb2f9a30f580edd3f9d..5532ca160d38152fd4edceecd4ca6d67e034fa5b 100644 (file)
@@ -20,7 +20,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index bde1f61b3112465d2354933ba0a3dda80b77c10f..231f9dfbb0e6bb95520bcf7f576d0c0e3b859121 100644 (file)
@@ -22,7 +22,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index df77a7a65963b2107b13f8f27cb79e6aa6496f5d..501f0e0446338196750b266d37e2c54e47897999 100644 (file)
@@ -23,7 +23,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
index f617d99d4d93161938adccf4b344207b8b051cc2..a2ea5d709cf98b3c684205953a40254c33227a57 100644 (file)
@@ -268,11 +268,11 @@ pgstatindex_impl(Relation rel, FunctionCallInfo fcinfo)
        values[j++] = psprintf("%d", indexStat.version);
        values[j++] = psprintf("%d", indexStat.level);
        values[j++] = psprintf(INT64_FORMAT,
-                (indexStat.root_pages +
-                 indexStat.leaf_pages +
-                 indexStat.internal_pages +
-                 indexStat.deleted_pages +
-                 indexStat.empty_pages) * BLCKSZ);
+                              (indexStat.root_pages +
+                               indexStat.leaf_pages +
+                               indexStat.internal_pages +
+                               indexStat.deleted_pages +
+                               indexStat.empty_pages) * BLCKSZ);
        values[j++] = psprintf("%u", indexStat.root_blkno);
        values[j++] = psprintf(INT64_FORMAT, indexStat.internal_pages);
        values[j++] = psprintf(INT64_FORMAT, indexStat.leaf_pages);
@@ -280,12 +280,12 @@ pgstatindex_impl(Relation rel, FunctionCallInfo fcinfo)
        values[j++] = psprintf(INT64_FORMAT, indexStat.deleted_pages);
        if (indexStat.max_avail > 0)
            values[j++] = psprintf("%.2f",
-                    100.0 - (double) indexStat.free_space / (double) indexStat.max_avail * 100.0);
+                                  100.0 - (double) indexStat.free_space / (double) indexStat.max_avail * 100.0);
        else
            values[j++] = pstrdup("NaN");
        if (indexStat.leaf_pages > 0)
            values[j++] = psprintf("%.2f",
-                    (double) indexStat.fragments / (double) indexStat.leaf_pages * 100.0);
+                                  (double) indexStat.fragments / (double) indexStat.leaf_pages * 100.0);
        else
            values[j++] = pstrdup("NaN");
 
index 16b437babe7a7577cffe17e6322f6504ccf2b19e..edc603f6a1b097674f822c5b48facf81e5ab2b12 100644 (file)
@@ -310,7 +310,7 @@ pgstat_heap(Relation rel, FunctionCallInfo fcinfo)
 
        /*
         * To avoid physically reading the table twice, try to do the
-        * free-space scan in parallel with the heap scan.  However,
+        * free-space scan in parallel with the heap scan.  However,
         * heap_getnext may find no tuples on a given page, so we cannot
         * simply examine the pages returned by the heap scan.
         */
index b688241283805d7d0c57375c90ccd610967def5e..116be7ddcb77ce2509e8c4d538fc988d8f80b991 100644 (file)
@@ -83,7 +83,7 @@ static void pgfdw_subxact_callback(SubXactEvent event,
  * the right subtransaction nesting depth if we didn't do that already.
  *
  * will_prep_stmt must be true if caller intends to create any prepared
- * statements. Since those don't go away automatically at transaction end
+ * statements.  Since those don't go away automatically at transaction end
  * (not even on error), we need this flag to cue manual cleanup.
  *
  * XXX Note that caching connections theoretically requires a mechanism to
@@ -152,7 +152,7 @@ GetConnection(ForeignServer *server, UserMapping *user,
 
    /*
     * If cache entry doesn't have a connection, we have to establish a new
-    * connection.  (If connect_pg_server throws an error, the cache entry
+    * connection.  (If connect_pg_server throws an error, the cache entry
     * will be left in a valid empty state.)
     */
    if (entry->conn == NULL)
@@ -273,10 +273,10 @@ connect_pg_server(ForeignServer *server, UserMapping *user)
 }
 
 /*
- * For non-superusers, insist that the connstr specify a password. This
+ * For non-superusers, insist that the connstr specify a password.  This
  * prevents a password from being picked up from .pgpass, a service file,
  * the environment, etc.  We don't want the postgres user's passwords
- * to be accessible to non-superusers. (See also dblink_connstr_check in
+ * to be accessible to non-superusers.  (See also dblink_connstr_check in
  * contrib/dblink.)
  */
 static void
@@ -323,10 +323,10 @@ configure_remote_session(PGconn *conn)
    /*
     * Set remote timezone; this is basically just cosmetic, since all
     * transmitted and returned timestamptzs should specify a zone explicitly
-    * anyway.  However it makes the regression test outputs more predictable.
+    * anyway.  However it makes the regression test outputs more predictable.
     *
     * We don't risk setting remote zone equal to ours, since the remote
-    * server might use a different timezone database.  Instead, use UTC
+    * server might use a different timezone database.  Instead, use UTC
     * (quoted, because very old servers are picky about case).
     */
    do_sql_command(conn, "SET timezone = 'UTC'");
index 4e6fa8b805e8f9944c5cffd237dfbc1997865b89..d7d9b9c77d2540b020c5f10738642f67f999ca01 100644 (file)
@@ -215,7 +215,7 @@ is_foreign_expr(PlannerInfo *root,
  * We must check that the expression contains only node types we can deparse,
  * that all types/functions/operators are safe to send (which we approximate
  * as being built-in), and that all collations used in the expression derive
- * from Vars of the foreign table. Because of the latter, the logic is
+ * from Vars of the foreign table.  Because of the latter, the logic is
  * pretty close to assign_collations_walker() in parse_collate.c, though we
  * can assume here that the given expression is valid.
  */
@@ -245,7 +245,7 @@ foreign_expr_walker(Node *node,
 
                /*
                 * If the Var is from the foreign table, we consider its
-                * collation (if any) safe to use.  If it is from another
+                * collation (if any) safe to use.  If it is from another
                 * table, we treat its collation the same way as we would a
                 * Param's collation, ie it's not safe for it to have a
                 * non-default collation.
@@ -371,7 +371,7 @@ foreign_expr_walker(Node *node,
 
                /*
                 * Detect whether node is introducing a collation not derived
-                * from a foreign Var.  (If so, we just mark it unsafe for now
+                * from a foreign Var.  (If so, we just mark it unsafe for now
                 * rather than immediately returning false, since the parent
                 * node might not care.)
                 */
@@ -658,7 +658,7 @@ is_builtin(Oid oid)
 
 /*
  * Construct a simple SELECT statement that retrieves desired columns
- * of the specified foreign table, and append it to "buf". The output
+ * of the specified foreign table, and append it to "buf".  The output
  * contains just "SELECT ... FROM tablename".
  *
  * We also create an integer List of the columns being retrieved, which is
@@ -746,7 +746,7 @@ deparseTargetList(StringInfo buf,
    }
 
    /*
-    * Add ctid if needed.  We currently don't support retrieving any other
+    * Add ctid if needed.  We currently don't support retrieving any other
     * system columns.
     */
    if (bms_is_member(SelfItemPointerAttributeNumber - FirstLowInvalidHeapAttributeNumber,
@@ -1447,7 +1447,7 @@ deparseArrayRef(ArrayRef *node, deparse_expr_cxt *context)
    /*
     * Deparse referenced array expression first.  If that expression includes
     * a cast, we have to parenthesize to prevent the array subscript from
-    * being taken as typename decoration.  We can avoid that in the typical
+    * being taken as typename decoration.  We can avoid that in the typical
     * case of subscripting a Var, but otherwise do it.
     */
    if (IsA(node->refexpr, Var))
@@ -1559,7 +1559,7 @@ deparseFuncExpr(FuncExpr *node, deparse_expr_cxt *context)
 }
 
 /*
- * Deparse given operator expression.  To avoid problems around
+ * Deparse given operator expression.   To avoid problems around
  * priority of operations, we always parenthesize the arguments.
  */
 static void
@@ -1656,7 +1656,7 @@ deparseDistinctExpr(DistinctExpr *node, deparse_expr_cxt *context)
 }
 
 /*
- * Deparse given ScalarArrayOpExpr expression. To avoid problems
+ * Deparse given ScalarArrayOpExpr expression.  To avoid problems
  * around priority of operations, we always parenthesize the arguments.
  */
 static void
@@ -1822,7 +1822,7 @@ printRemoteParam(int paramindex, Oid paramtype, int32 paramtypmod,
  * This is used when we're just trying to EXPLAIN the remote query.
  * We don't have the actual value of the runtime parameter yet, and we don't
  * want the remote planner to generate a plan that depends on such a value
- * anyway. Thus, we can't do something simple like "$1::paramtype".
+ * anyway.  Thus, we can't do something simple like "$1::paramtype".
  * Instead, we emit "((SELECT null::paramtype)::paramtype)".
  * In all extant versions of Postgres, the planner will see that as an unknown
  * constant value, which is what we want.  This might need adjustment if we
index 6f98dfcb2342335eb0590e20beb2ab79f0ed66c3..65e7b8946a3e54d41c064e857e26e374fe8d473d 100644 (file)
@@ -266,7 +266,7 @@ is_libpq_option(const char *keyword)
 
 /*
  * Generate key-value arrays which include only libpq options from the
- * given list (which can contain any kind of options). Caller must have
+ * given list (which can contain any kind of options).  Caller must have
  * allocated large-enough arrays.  Returns number of options found.
  */
 int
index 040e5867bfc9463401bce9164a55da77febfb9d9..7dd43a993798467e08a8e187f92b0951ab5960bf 100644 (file)
@@ -90,7 +90,7 @@ typedef struct PgFdwRelationInfo
  * 2) Integer list of attribute numbers retrieved by the SELECT
  *
  * These items are indexed with the enum FdwScanPrivateIndex, so an item
- * can be fetched with list_nth(). For example, to get the SELECT statement:
+ * can be fetched with list_nth().  For example, to get the SELECT statement:
  *     sql = strVal(list_nth(fdw_private, FdwScanPrivateSelectSql));
  */
 enum FdwScanPrivateIndex
@@ -424,8 +424,8 @@ postgresGetForeignRelSize(PlannerInfo *root,
 
    /*
     * If the table or the server is configured to use remote estimates,
-    * identify which user to do remote access as during planning.  This
-    * should match what ExecCheckRTEPerms() does.  If we fail due to lack of
+    * identify which user to do remote access as during planning.  This
+    * should match what ExecCheckRTEPerms() does.  If we fail due to lack of
     * permissions, the query would have failed at runtime anyway.
     */
    if (fpinfo->use_remote_estimate)
@@ -447,7 +447,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
 
    /*
     * Identify which attributes will need to be retrieved from the remote
-    * server.  These include all attrs needed for joins or final output, plus
+    * server.  These include all attrs needed for joins or final output, plus
     * all attrs used in the local_conds.  (Note: if we end up using a
     * parameterized scan, it's possible that some of the join clauses will be
     * sent to the remote and thus we wouldn't really need to retrieve the
@@ -487,7 +487,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
    if (fpinfo->use_remote_estimate)
    {
        /*
-        * Get cost/size estimates with help of remote server.  Save the
+        * Get cost/size estimates with help of remote server.  Save the
         * values in fpinfo so we don't need to do it again to generate the
         * basic foreign path.
         */
@@ -757,7 +757,7 @@ postgresGetForeignPlan(PlannerInfo *root,
     * remote-safety.
     *
     * Note: the join clauses we see here should be the exact same ones
-    * previously examined by postgresGetForeignPaths.  Possibly it'd be worth
+    * previously examined by postgresGetForeignPaths.  Possibly it'd be worth
     * passing forward the classification work done then, rather than
     * repeating it here.
     *
@@ -898,7 +898,7 @@ postgresBeginForeignScan(ForeignScanState *node, int eflags)
    node->fdw_state = (void *) fsstate;
 
    /*
-    * Identify which user to do the remote access as.  This should match what
+    * Identify which user to do the remote access as.  This should match what
     * ExecCheckRTEPerms() does.
     */
    rte = rt_fetch(fsplan->scan.scanrelid, estate->es_range_table);
@@ -962,7 +962,7 @@ postgresBeginForeignScan(ForeignScanState *node, int eflags)
     * Prepare remote-parameter expressions for evaluation.  (Note: in
     * practice, we expect that all these expressions will be just Params, so
     * we could possibly do something more efficient than using the full
-    * expression-eval machinery for this.  But probably there would be little
+    * expression-eval machinery for this.  But probably there would be little
     * benefit, and it'd require postgres_fdw to know more than is desirable
     * about Param evaluation.)
     */
@@ -1038,8 +1038,8 @@ postgresReScanForeignScan(ForeignScanState *node)
 
    /*
     * If any internal parameters affecting this node have changed, we'd
-    * better destroy and recreate the cursor.  Otherwise, rewinding it should
-    * be good enough.  If we've only fetched zero or one batch, we needn't
+    * better destroy and recreate the cursor.  Otherwise, rewinding it should
+    * be good enough.  If we've only fetched zero or one batch, we needn't
     * even rewind the cursor, just rescan what we have.
     */
    if (node->ss.ps.chgParam != NULL)
@@ -1145,9 +1145,9 @@ postgresAddForeignUpdateTargets(Query *parsetree,
  * Note: currently, the plan tree generated for UPDATE/DELETE will always
  * include a ForeignScan that retrieves ctids (using SELECT FOR UPDATE)
  * and then the ModifyTable node will have to execute individual remote
- * UPDATE/DELETE commands. If there are no local conditions or joins
+ * UPDATE/DELETE commands.  If there are no local conditions or joins
  * needed, it'd be better to let the scan node do UPDATE/DELETE RETURNING
- * and then do nothing at ModifyTable. Room for future optimization ...
+ * and then do nothing at ModifyTable.  Room for future optimization ...
  */
 static List *
 postgresPlanForeignModify(PlannerInfo *root,
@@ -1285,7 +1285,7 @@ postgresBeginForeignModify(ModifyTableState *mtstate,
    fmstate->rel = rel;
 
    /*
-    * Identify which user to do the remote access as.  This should match what
+    * Identify which user to do the remote access as.  This should match what
     * ExecCheckRTEPerms() does.
     */
    rte = rt_fetch(resultRelInfo->ri_RangeTableIndex, estate->es_range_table);
@@ -1850,7 +1850,7 @@ get_remote_estimate(const char *sql, PGconn *conn,
            pgfdw_report_error(ERROR, res, conn, false, sql);
 
        /*
-        * Extract cost numbers for topmost plan node.  Note we search for a
+        * Extract cost numbers for topmost plan node.  Note we search for a
         * left paren from the end of the line to avoid being confused by
         * other uses of parentheses.
         */
@@ -1972,7 +1972,7 @@ create_cursor(ForeignScanState *node)
     * Notice that we pass NULL for paramTypes, thus forcing the remote server
     * to infer types for all parameters.  Since we explicitly cast every
     * parameter (see deparse.c), the "inference" is trivial and will produce
-    * the desired result.  This allows us to avoid assuming that the remote
+    * the desired result.  This allows us to avoid assuming that the remote
     * server has the same OIDs we do for the parameters' types.
     *
     * We don't use a PG_TRY block here, so be careful not to throw error
@@ -2081,7 +2081,7 @@ fetch_more_data(ForeignScanState *node)
  * user-visible computations.
  *
  * We use the equivalent of a function SET option to allow the settings to
- * persist only until the caller calls reset_transmission_modes(). If an
+ * persist only until the caller calls reset_transmission_modes().  If an
  * error is thrown in between, guc.c will take care of undoing the settings.
  *
  * The return value is the nestlevel that must be passed to
@@ -2093,7 +2093,7 @@ set_transmission_modes(void)
    int         nestlevel = NewGUCNestLevel();
 
    /*
-    * The values set here should match what pg_dump does.  See also
+    * The values set here should match what pg_dump does.  See also
     * configure_remote_session in connection.c.
     */
    if (DateStyle != USE_ISO_DATES)
@@ -2299,7 +2299,7 @@ postgresAnalyzeForeignTable(Relation relation,
    *func = postgresAcquireSampleRowsFunc;
 
    /*
-    * Now we have to get the number of pages.  It's annoying that the ANALYZE
+    * Now we have to get the number of pages.  It's annoying that the ANALYZE
     * API requires us to return that now, because it forces some duplication
     * of effort between this routine and postgresAcquireSampleRowsFunc.  But
     * it's probably not worth redefining that API at this point.
@@ -2356,7 +2356,7 @@ postgresAnalyzeForeignTable(Relation relation,
  * which must have at least targrows entries.
  * The actual number of rows selected is returned as the function result.
  * We also count the total number of rows in the table and return it into
- * *totalrows. Note that *totaldeadrows is always set to 0.
+ * *totalrows.  Note that *totaldeadrows is always set to 0.
  *
  * Note that the returned list of rows is not always in order by physical
  * position in the table.  Therefore, correlation estimates derived later
@@ -2687,7 +2687,7 @@ make_tuple_from_result_row(PGresult *res,
 
 /*
  * Callback function which is called when error occurs during column value
- * conversion. Print names of column and relation.
+ * conversion.  Print names of column and relation.
  */
 static void
 conversion_error_callback(void *arg)
index 32be8a7acd2dc8786f06306826e4ccf093b2efc2..2682b37864aa61a44a0733a621c814e2ac24ab00 100644 (file)
@@ -106,7 +106,7 @@ sepgsql_get_client_label(void)
  * sepgsql_set_client_label
  *
  * This routine tries to switch the current security label of the client, and
- * checks related permissions. The supplied new label shall be added to the
+ * checks related permissions.  The supplied new label shall be added to the
  * client_label_pending list, then saved at transaction-commit time to ensure
  * transaction-awareness.
  */
@@ -161,7 +161,7 @@ sepgsql_set_client_label(const char *new_label)
 /*
  * sepgsql_xact_callback
  *
- * A callback routine of transaction commit/abort/prepare. Commmit or abort
+ * A callback routine of transaction commit/abort/prepare.  Commmit or abort
  * changes in the client_label_pending list.
  */
 static void
index 03a03a75c7f62a8e033197ce99fa764f7c293fc9..b014b01f36c452fd30b989a3394aca14a38a2b1d 100644 (file)
@@ -142,7 +142,7 @@ sepgsql_avc_reclaim(void)
  * Access control decisions must be atomic, but multiple system calls may
  * be required to make a decision; thus, when referencing the access vector
  * cache, we must loop until we complete without an intervening cache flush
- * event.  In practice, looping even once should be very rare. Callers should
+ * event.  In practice, looping even once should be very rare.  Callers should
  * do something like this:
  *
  *  sepgsql_avc_check_valid();
index a97eaa148f4a01b27b105f15c3f8e80cecfaca6e..a37cbee8631a54824e3710acf06273c86ec68c63 100644 (file)
@@ -45,17 +45,17 @@ static EPlan *find_plan(char *ident, EPlan **eplan, int *nplans);
 
 /*
  * timetravel () --
- *     1.  IF an update affects tuple with stop_date eq INFINITY
+ *     1.  IF an update affects tuple with stop_date eq INFINITY
  *         then form (and return) new tuple with start_date eq current date
  *         and stop_date eq INFINITY [ and update_user eq current user ]
  *         and all other column values as in new tuple, and insert tuple
  *         with old data and stop_date eq current date
  *         ELSE - skip updation of tuple.
- *     2.  IF an delete affects tuple with stop_date eq INFINITY
+ *     2.  IF an delete affects tuple with stop_date eq INFINITY
  *         then insert the same tuple with stop_date eq current date
  *         [ and delete_user eq current user ]
  *         ELSE - skip deletion of tuple.
- *     3.  On INSERT, if start_date is NULL then current date will be
+ *     3.  On INSERT, if start_date is NULL then current date will be
  *         inserted, if stop_date is NULL then INFINITY will be inserted.
  *         [ and insert_user eq current user, update_user and delete_user
  *         eq NULL ]
index ac691574b417d036f37592795634b838fefbebd0..db491a4bc806b1278220ce513b18931f74bc92c7 100644 (file)
@@ -123,7 +123,7 @@ ssl_client_serial(PG_FUNCTION_ARGS)
  * current database encoding if possible.  Any invalid characters are
  * replaced by question marks.
  *
- * Parameter: str - OpenSSL ASN1_STRING structure. Memory management
+ * Parameter: str - OpenSSL ASN1_STRING structure.  Memory management
  * of this structure is responsibility of caller.
  *
  * Returns Datum, which can be directly returned from a C language SQL
index b4720969d11ef1fbc0f75276a83e8d92be92e44c..ba34f9b1fadfb7bcced83050a800eb10ebb70f17 100644 (file)
@@ -49,7 +49,7 @@ strcpy_quoted(StringInfo r, const char *s, const char q)
  * triggered_change_notification
  *
  * This trigger function will send a notification of data modification with
- * primary key values. The channel will be "tcn" unless the trigger is
+ * primary key values.  The channel will be "tcn" unless the trigger is
  * created with a parameter, in which case that parameter will be used.
  */
 PG_FUNCTION_INFO_V1(triggered_change_notification);
index 31aa0122d8c8f91db76dd3e8d0a3e5ababf49a5c..5ce052b5c61409f3dc0574d8d45c6642bee8a4e6 100644 (file)
@@ -34,8 +34,8 @@
 PG_MODULE_MAGIC;
 
 /* These must be available to pg_dlsym() */
-extern void        _PG_init(void);
-extern void        _PG_output_plugin_init(OutputPluginCallbacks *cb);
+extern void _PG_init(void);
+extern void _PG_output_plugin_init(OutputPluginCallbacks *cb);
 
 typedef struct
 {
@@ -45,7 +45,7 @@ typedef struct
 } TestDecodingData;
 
 static void pg_decode_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt,
-                             bool is_init);
+                 bool is_init);
 static void pg_decode_shutdown(LogicalDecodingContext *ctx);
 static void pg_decode_begin_txn(LogicalDecodingContext *ctx,
                    ReorderBufferTXN *txn);
@@ -110,8 +110,8 @@ pg_decode_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt,
            else if (!parse_bool(strVal(elem->arg), &data->include_xids))
                ereport(ERROR,
                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                        errmsg("could not parse value \"%s\" for parameter \"%s\"",
-                               strVal(elem->arg), elem->defname)));
+                 errmsg("could not parse value \"%s\" for parameter \"%s\"",
+                        strVal(elem->arg), elem->defname)));
        }
        else if (strcmp(elem->defname, "include-timestamp") == 0)
        {
@@ -120,20 +120,20 @@ pg_decode_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt,
            else if (!parse_bool(strVal(elem->arg), &data->include_timestamp))
                ereport(ERROR,
                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                        errmsg("could not parse value \"%s\" for parameter \"%s\"",
-                               strVal(elem->arg), elem->defname)));
+                 errmsg("could not parse value \"%s\" for parameter \"%s\"",
+                        strVal(elem->arg), elem->defname)));
        }
        else if (strcmp(elem->defname, "force-binary") == 0)
        {
-           bool force_binary;
+           bool        force_binary;
 
            if (elem->arg == NULL)
                continue;
            else if (!parse_bool(strVal(elem->arg), &force_binary))
                ereport(ERROR,
                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                        errmsg("could not parse value \"%s\" for parameter \"%s\"",
-                               strVal(elem->arg), elem->defname)));
+                 errmsg("could not parse value \"%s\" for parameter \"%s\"",
+                        strVal(elem->arg), elem->defname)));
 
            if (force_binary)
                opt->output_type = OUTPUT_PLUGIN_BINARY_OUTPUT;
@@ -318,7 +318,8 @@ tuple_to_stringinfo(StringInfo s, TupleDesc tupdesc, HeapTuple tuple, bool skip_
                          OidOutputFunctionCall(typoutput, origval));
        else
        {
-           Datum       val;        /* definitely detoasted Datum */
+           Datum       val;    /* definitely detoasted Datum */
+
            val = PointerGetDatum(PG_DETOAST_DATUM(origval));
            print_literal(s, typid, OidOutputFunctionCall(typoutput, val));
        }
@@ -349,9 +350,9 @@ pg_decode_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
    appendStringInfoString(ctx->out, "table ");
    appendStringInfoString(ctx->out,
                           quote_qualified_identifier(
-                              get_namespace_name(
-                                  get_rel_namespace(RelationGetRelid(relation))),
-                              NameStr(class_form->relname)));
+                                                     get_namespace_name(
+                             get_rel_namespace(RelationGetRelid(relation))),
+                                             NameStr(class_form->relname)));
    appendStringInfoString(ctx->out, ":");
 
    switch (change->action)
index 612480fd4e58e77c907bca19b56dba9907a1c317..572cf8898f15a9a29395c6d6b01090a67304b713 100644 (file)
@@ -25,7 +25,7 @@
 
 typedef struct
 {
-   int     nworkers;
+   int         nworkers;
    BackgroundWorkerHandle *handle[FLEXIBLE_ARRAY_MEMBER];
 } worker_state;
 
@@ -34,7 +34,7 @@ static void setup_dynamic_shared_memory(int64 queue_size, int nworkers,
                            test_shm_mq_header **hdrp,
                            shm_mq **outp, shm_mq **inp);
 static worker_state *setup_background_workers(int nworkers,
-                                             dsm_segment *seg);
+                        dsm_segment *seg);
 static void cleanup_background_workers(dsm_segment *seg, Datum arg);
 static void wait_for_workers_to_become_ready(worker_state *wstate,
                                 volatile test_shm_mq_header *hdr);
@@ -50,9 +50,9 @@ test_shm_mq_setup(int64 queue_size, int32 nworkers, dsm_segment **segp,
 {
    dsm_segment *seg;
    test_shm_mq_header *hdr;
-   shm_mq     *outq = NULL;        /* placate compiler */
-   shm_mq     *inq = NULL;         /* placate compiler */
-   worker_state       *wstate;
+   shm_mq     *outq = NULL;    /* placate compiler */
+   shm_mq     *inq = NULL;     /* placate compiler */
+   worker_state *wstate;
 
    /* Set up a dynamic shared memory segment. */
    setup_dynamic_shared_memory(queue_size, nworkers, &seg, &hdr, &outq, &inq);
@@ -69,8 +69,8 @@ test_shm_mq_setup(int64 queue_size, int32 nworkers, dsm_segment **segp,
    wait_for_workers_to_become_ready(wstate, hdr);
 
    /*
-    * Once we reach this point, all workers are ready.  We no longer need
-    * to kill them if we die; they'll die on their own as the message queues
+    * Once we reach this point, all workers are ready.  We no longer need to
+    * kill them if we die; they'll die on their own as the message queues
     * shut down.
     */
    cancel_on_dsm_detach(seg, cleanup_background_workers,
@@ -90,11 +90,11 @@ setup_dynamic_shared_memory(int64 queue_size, int nworkers,
                            dsm_segment **segp, test_shm_mq_header **hdrp,
                            shm_mq **outp, shm_mq **inp)
 {
-   shm_toc_estimator   e;
-   int                 i;
-   Size            segsize;
-   dsm_segment    *seg;
-   shm_toc        *toc;
+   shm_toc_estimator e;
+   int         i;
+   Size        segsize;
+   dsm_segment *seg;
+   shm_toc    *toc;
    test_shm_mq_header *hdr;
 
    /* Ensure a valid queue size. */
@@ -140,7 +140,7 @@ setup_dynamic_shared_memory(int64 queue_size, int nworkers,
    /* Set up one message queue per worker, plus one. */
    for (i = 0; i <= nworkers; ++i)
    {
-       shm_mq         *mq;
+       shm_mq     *mq;
 
        mq = shm_mq_create(shm_toc_allocate(toc, (Size) queue_size),
                           (Size) queue_size);
@@ -171,10 +171,10 @@ setup_dynamic_shared_memory(int64 queue_size, int nworkers,
 static worker_state *
 setup_background_workers(int nworkers, dsm_segment *seg)
 {
-   MemoryContext   oldcontext;
+   MemoryContext oldcontext;
    BackgroundWorker worker;
-   worker_state    *wstate;
-   int     i;
+   worker_state *wstate;
+   int         i;
 
    /*
     * We need the worker_state object and the background worker handles to
@@ -194,16 +194,16 @@ setup_background_workers(int nworkers, dsm_segment *seg)
     * Arrange to kill all the workers if we abort before all workers are
     * finished hooking themselves up to the dynamic shared memory segment.
     *
-    * If we die after all the workers have finished hooking themselves up
-    * to the dynamic shared memory segment, we'll mark the two queues to
-    * which we're directly connected as detached, and the worker(s)
-    * connected to those queues will exit, marking any other queues to
-    * which they are connected as detached.  This will cause any
-    * as-yet-unaware workers connected to those queues to exit in their
-    * turn, and so on, until everybody exits.
+    * If we die after all the workers have finished hooking themselves up to
+    * the dynamic shared memory segment, we'll mark the two queues to which
+    * we're directly connected as detached, and the worker(s) connected to
+    * those queues will exit, marking any other queues to which they are
+    * connected as detached.  This will cause any as-yet-unaware workers
+    * connected to those queues to exit in their turn, and so on, until
+    * everybody exits.
     *
-    * But suppose the workers which are supposed to connect to the queues
-    * to which we're directly attached exit due to some error before they
+    * But suppose the workers which are supposed to connect to the queues to
+    * which we're directly attached exit due to some error before they
     * actually attach the queues.  The remaining workers will have no way of
     * knowing this.  From their perspective, they're still waiting for those
     * workers to start, when in fact they've already died.
@@ -255,8 +255,8 @@ static void
 wait_for_workers_to_become_ready(worker_state *wstate,
                                 volatile test_shm_mq_header *hdr)
 {
-   bool    save_set_latch_on_sigusr1;
-   bool    result = false;
+   bool        save_set_latch_on_sigusr1;
+   bool        result = false;
 
    save_set_latch_on_sigusr1 = set_latch_on_sigusr1;
    set_latch_on_sigusr1 = true;
@@ -265,7 +265,7 @@ wait_for_workers_to_become_ready(worker_state *wstate,
    {
        for (;;)
        {
-           int workers_ready;
+           int         workers_ready;
 
            /* If all the workers are ready, we have succeeded. */
            SpinLockAcquire(&hdr->mutex);
@@ -310,13 +310,13 @@ wait_for_workers_to_become_ready(worker_state *wstate,
 static bool
 check_worker_status(worker_state *wstate)
 {
-   int n;
+   int         n;
 
    /* If any workers (or the postmaster) have died, we have failed. */
    for (n = 0; n < wstate->nworkers; ++n)
    {
        BgwHandleStatus status;
-       pid_t   pid;
+       pid_t       pid;
 
        status = GetBackgroundWorkerPid(wstate->handle[n], &pid);
        if (status == BGWH_STOPPED || status == BGWH_POSTMASTER_DIED)
index 1832e1d1dbaaa1d2075d9c78ab9b2beba2ff9d7b..8750bae8dbf448ee65e4dd594dbc703d10c0e527 100644 (file)
@@ -18,8 +18,7 @@
 
 #include "test_shm_mq.h"
 
-PG_MODULE_MAGIC;
-PG_FUNCTION_INFO_V1(test_shm_mq);
+PG_MODULE_MAGIC; PG_FUNCTION_INFO_V1(test_shm_mq);
 PG_FUNCTION_INFO_V1(test_shm_mq_pipelined);
 
 void       _PG_init(void);
@@ -47,7 +46,7 @@ test_shm_mq(PG_FUNCTION_ARGS)
    dsm_segment *seg;
    shm_mq_handle *outqh;
    shm_mq_handle *inqh;
-   shm_mq_result   res;
+   shm_mq_result res;
    Size        len;
    void       *data;
 
@@ -59,8 +58,8 @@ test_shm_mq(PG_FUNCTION_ARGS)
 
    /*
     * Since this test sends data using the blocking interfaces, it cannot
-    * send data to itself.  Therefore, a minimum of 1 worker is required.
-    * Of course, a negative worker count is nonsensical.
+    * send data to itself.  Therefore, a minimum of 1 worker is required. Of
+    * course, a negative worker count is nonsensical.
     */
    if (nworkers < 1)
        ereport(ERROR,
@@ -139,7 +138,7 @@ test_shm_mq_pipelined(PG_FUNCTION_ARGS)
    dsm_segment *seg;
    shm_mq_handle *outqh;
    shm_mq_handle *inqh;
-   shm_mq_result   res;
+   shm_mq_result res;
    Size        len;
    void       *data;
 
@@ -204,8 +203,8 @@ test_shm_mq_pipelined(PG_FUNCTION_ARGS)
            }
            else if (res == SHM_MQ_DETACHED)
                ereport(ERROR,
-                   (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-                    errmsg("could not receive message")));
+                       (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+                        errmsg("could not receive message")));
        }
        else
        {
@@ -216,18 +215,18 @@ test_shm_mq_pipelined(PG_FUNCTION_ARGS)
            if (send_count != receive_count)
                ereport(ERROR,
                        (errcode(ERRCODE_INTERNAL_ERROR),
-                        errmsg("message sent %d times, but received %d times",
-                           send_count, receive_count)));
+                      errmsg("message sent %d times, but received %d times",
+                             send_count, receive_count)));
            break;
        }
 
        if (wait)
        {
            /*
-            * If we made no progress, wait for one of the other processes
-            * to which we are connected to set our latch, indicating that
-            * they have read or written data and therefore there may now be
-            * work for us to do.
+            * If we made no progress, wait for one of the other processes to
+            * which we are connected to set our latch, indicating that they
+            * have read or written data and therefore there may now be work
+            * for us to do.
             */
            WaitLatch(&MyProc->procLatch, WL_LATCH_SET, 0);
            CHECK_FOR_INTERRUPTS();
@@ -247,13 +246,13 @@ test_shm_mq_pipelined(PG_FUNCTION_ARGS)
 static void
 verify_message(Size origlen, char *origdata, Size newlen, char *newdata)
 {
-   Size    i;
+   Size        i;
 
    if (origlen != newlen)
        ereport(ERROR,
                (errmsg("message corrupted"),
                 errdetail("The original message was %zu bytes but the final message is %zu bytes.",
-                    origlen, newlen)));
+                          origlen, newlen)));
 
    for (i = 0; i < origlen; ++i)
        if (origdata[i] != newdata[i])
index 5e0ee9ba43852b84088d3d8950124544b4a8baf3..7ebfba902f91cdfd98774ac8fc405e9d27adc7c9 100644 (file)
  */
 typedef struct
 {
-   slock_t         mutex;
-   int             workers_total;
-   int             workers_attached;
-   int             workers_ready;
+   slock_t     mutex;
+   int         workers_total;
+   int         workers_attached;
+   int         workers_ready;
 } test_shm_mq_header;
 
 /* Set up dynamic shared memory and background workers for test run. */
 extern void test_shm_mq_setup(int64 queue_size, int32 nworkers,
-                             dsm_segment **seg, shm_mq_handle **output,
-                             shm_mq_handle **input);
+                 dsm_segment **seg, shm_mq_handle **output,
+                 shm_mq_handle **input);
 
 /* Main entrypoint for a worker. */
-extern void    test_shm_mq_main(Datum);
+extern void test_shm_mq_main(Datum);
 
 #endif
index 5627a57a3ecf15d4bd1bd966d4e28c03fa4aa59b..0d66c92ddb14a7e023d686b349b8bf8ed4c544c1 100644 (file)
@@ -30,8 +30,8 @@
 
 static void handle_sigterm(SIGNAL_ARGS);
 static void attach_to_queues(dsm_segment *seg, shm_toc *toc,
-                            int myworkernumber, shm_mq_handle **inqhp,
-                            shm_mq_handle **outqhp);
+                int myworkernumber, shm_mq_handle **inqhp,
+                shm_mq_handle **outqhp);
 static void copy_messages(shm_mq_handle *inqh, shm_mq_handle *outqh);
 
 /*
@@ -48,7 +48,7 @@ void
 test_shm_mq_main(Datum main_arg)
 {
    dsm_segment *seg;
-   shm_toc    *toc;
+   shm_toc    *toc;
    shm_mq_handle *inqh;
    shm_mq_handle *outqh;
    volatile test_shm_mq_header *hdr;
@@ -58,12 +58,12 @@ test_shm_mq_main(Datum main_arg)
    /*
     * Establish signal handlers.
     *
-    * We want CHECK_FOR_INTERRUPTS() to kill off this worker process just
-    * as it would a normal user backend.  To make that happen, we establish
-    * a signal handler that is a stripped-down version of die().  We don't
-    * have any equivalent of the backend's command-read loop, where interrupts
-    * can be processed immediately, so make sure ImmediateInterruptOK is
-    * turned off.
+    * We want CHECK_FOR_INTERRUPTS() to kill off this worker process just as
+    * it would a normal user backend.  To make that happen, we establish a
+    * signal handler that is a stripped-down version of die().  We don't have
+    * any equivalent of the backend's command-read loop, where interrupts can
+    * be processed immediately, so make sure ImmediateInterruptOK is turned
+    * off.
     */
    pqsignal(SIGTERM, handle_sigterm);
    ImmediateInterruptOK = false;
@@ -76,8 +76,8 @@ test_shm_mq_main(Datum main_arg)
     * memory segment to which we must attach for further instructions.  In
     * order to attach to dynamic shared memory, we need a resource owner.
     * Once we've mapped the segment in our address space, attach to the table
-    * of contents so we can locate the various data structures we'll need
-    * to find within the segment.
+    * of contents so we can locate the various data structures we'll need to
+    * find within the segment.
     */
    CurrentResourceOwner = ResourceOwnerCreate(NULL, "test_shm_mq worker");
    seg = dsm_attach(DatumGetInt32(main_arg));
@@ -89,7 +89,7 @@ test_shm_mq_main(Datum main_arg)
    if (toc == NULL)
        ereport(ERROR,
                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-                errmsg("bad magic number in dynamic shared memory segment")));
+              errmsg("bad magic number in dynamic shared memory segment")));
 
    /*
     * Acquire a worker number.
@@ -114,8 +114,8 @@ test_shm_mq_main(Datum main_arg)
    attach_to_queues(seg, toc, myworkernumber, &inqh, &outqh);
 
    /*
-    * Indicate that we're fully initialized and ready to begin the main
-    * part of the parallel operation.
+    * Indicate that we're fully initialized and ready to begin the main part
+    * of the parallel operation.
     *
     * Once we signal that we're ready, the user backend is entitled to assume
     * that our on_dsm_detach callbacks will fire before we disconnect from
index a01385354fe2b0567c3c7d147d8c9a40d5faf3fd..db25ecd2d98cb0283db66ef16eed530afd89eee4 100644 (file)
@@ -188,7 +188,7 @@ worker_spi_main(Datum main_arg)
    initialize_worker_spi(table);
 
    /*
-    * Quote identifiers passed to us.  Note that this must be done after
+    * Quote identifiers passed to us.  Note that this must be done after
     * initialize_worker_spi, because that routine assumes the names are not
     * quoted.
     *
@@ -250,7 +250,7 @@ worker_spi_main(Datum main_arg)
         * StartTransactionCommand() call should be preceded by a
         * SetCurrentStatementStartTimestamp() call, which sets both the time
         * for the statement we're about the run, and also the transaction
-        * start time.  Also, each other query sent to SPI should probably be
+        * start time.  Also, each other query sent to SPI should probably be
         * preceded by SetCurrentStatementStartTimestamp(), so that statement
         * start time is always up to date.
         *
@@ -370,7 +370,7 @@ worker_spi_launch(PG_FUNCTION_ARGS)
    int32       i = PG_GETARG_INT32(0);
    BackgroundWorker worker;
    BackgroundWorkerHandle *handle;
-   BgwHandleStatus status;
+   BgwHandleStatus status;
    pid_t       pid;
 
    worker.bgw_flags = BGWORKER_SHMEM_ACCESS |
@@ -394,11 +394,11 @@ worker_spi_launch(PG_FUNCTION_ARGS)
        ereport(ERROR,
                (errcode(ERRCODE_INSUFFICIENT_RESOURCES),
                 errmsg("could not start background process"),
-                errhint("More details may be available in the server log.")));
+              errhint("More details may be available in the server log.")));
    if (status == BGWH_POSTMASTER_DIED)
        ereport(ERROR,
                (errcode(ERRCODE_INSUFFICIENT_RESOURCES),
-                errmsg("cannot start background processes without postmaster"),
+             errmsg("cannot start background processes without postmaster"),
                 errhint("Kill all remaining database processes and restart the database.")));
    Assert(status == BGWH_STARTED);
 
index 156ed2f49357209483f7ff8276652d9d1ab53bff..a8b159ebff7bbb30562c06751aa7c6779b38d37d 100644 (file)
@@ -709,7 +709,7 @@ xpath_table(PG_FUNCTION_ARGS)
 
            /*
             * Clear the values array, so that not-well-formed documents
-            * return NULL in all columns.  Note that this also means that
+            * return NULL in all columns.  Note that this also means that
             * spare columns will be NULL.
             */
            for (j = 0; j < ret_tupdesc->natts; j++)
index c64ede9dac583c8bd75f87d1f8bb11ef059bf8cb..009ebe7a1cbfb0d5fb4f76578e7831ae6b2dd863 100644 (file)
@@ -21,7 +21,7 @@
  * tuptoaster.c.
  *
  * This change will break any code that assumes it needn't detoast values
- * that have been put into a tuple but never sent to disk. Hopefully there
+ * that have been put into a tuple but never sent to disk.  Hopefully there
  * are few such places.
  *
  * Varlenas still have alignment 'i' (or 'd') in pg_type/pg_attribute, since
@@ -387,7 +387,7 @@ nocachegetattr(HeapTuple tuple,
 
        /*
         * Otherwise, check for non-fixed-length attrs up to and including
-        * target.  If there aren't any, it's safe to cheaply initialize the
+        * target.  If there aren't any, it's safe to cheaply initialize the
         * cached offsets for these attrs.
         */
        if (HeapTupleHasVarWidth(tuple))
@@ -454,7 +454,7 @@ nocachegetattr(HeapTuple tuple,
         *
         * Note - This loop is a little tricky.  For each non-null attribute,
         * we have to first account for alignment padding before the attr,
-        * then advance over the attr based on its length.  Nulls have no
+        * then advance over the attr based on its length.  Nulls have no
         * storage and no alignment padding either.  We can use/set
         * attcacheoff until we reach either a null or a var-width attribute.
         */
@@ -549,7 +549,7 @@ heap_getsysattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
 
            /*
             * cmin and cmax are now both aliases for the same field, which
-            * can in fact also be a combo command id.  XXX perhaps we should
+            * can in fact also be a combo command id.  XXX perhaps we should
             * return the "real" cmin or cmax if possible, that is if we are
             * inside the originating transaction?
             */
@@ -709,7 +709,7 @@ heap_form_tuple(TupleDesc tupleDescriptor,
    len += data_len;
 
    /*
-    * Allocate and zero the space needed.  Note that the tuple body and
+    * Allocate and zero the space needed.  Note that the tuple body and
     * HeapTupleData management structure are allocated in one chunk.
     */
    tuple = (HeapTuple) palloc0(HEAPTUPLESIZE + len);
index 7da10e9a74a8fa31397fce8c36ead8983331d09e..5fd400990b7e137ef59a10f7eb6507f50588911b 100644 (file)
@@ -71,7 +71,7 @@ index_form_tuple(TupleDesc tupleDescriptor,
 
        /*
         * If value is stored EXTERNAL, must fetch it so we are not depending
-        * on outside storage.  This should be improved someday.
+        * on outside storage.  This should be improved someday.
         */
        if (VARATT_IS_EXTERNAL(DatumGetPointer(values[i])))
        {
@@ -280,7 +280,7 @@ nocache_index_getattr(IndexTuple tup,
 
        /*
         * Otherwise, check for non-fixed-length attrs up to and including
-        * target.  If there aren't any, it's safe to cheaply initialize the
+        * target.  If there aren't any, it's safe to cheaply initialize the
         * cached offsets for these attrs.
         */
        if (IndexTupleHasVarwidths(tup))
@@ -347,7 +347,7 @@ nocache_index_getattr(IndexTuple tup,
         *
         * Note - This loop is a little tricky.  For each non-null attribute,
         * we have to first account for alignment padding before the attr,
-        * then advance over the attr based on its length.  Nulls have no
+        * then advance over the attr based on its length.  Nulls have no
         * storage and no alignment padding either.  We can use/set
         * attcacheoff until we reach either a null or a var-width attribute.
         */
index af59aa1a406174bd8ff5763da7b047e596d7ba9a..c7fa727485c69fe30ce2a1abc77c92c7d51dff02 100644 (file)
@@ -182,7 +182,7 @@ printtup_startup(DestReceiver *self, int operation, TupleDesc typeinfo)
  * or some similar function; it does not contain a full set of fields.
  * The targetlist will be NIL when executing a utility function that does
  * not have a plan.  If the targetlist isn't NIL then it is a Query node's
- * targetlist; it is up to us to ignore resjunk columns in it. The formats[]
+ * targetlist; it is up to us to ignore resjunk columns in it.  The formats[]
  * array pointer might be NULL (if we are doing Describe on a prepared stmt);
  * send zeroes for the format codes in that case.
  */
index 530a1aee7bbe20f1b00a7d185462eb7b6761cb71..522b671993edccbbe7f10951f60b11bc1eb950d4 100644 (file)
@@ -540,7 +540,7 @@ add_real_reloption(bits32 kinds, char *name, char *desc, double default_val,
  *     Add a new string reloption
  *
  * "validator" is an optional function pointer that can be used to test the
- * validity of the values. It must elog(ERROR) when the argument string is
+ * validity of the values.  It must elog(ERROR) when the argument string is
  * not acceptable for the variable.  Note that the default value must pass
  * the validation.
  */
@@ -868,7 +868,7 @@ extractRelOptions(HeapTuple tuple, TupleDesc tupdesc, Oid amoptions)
  * is returned.
  *
  * Note: values of type int, bool and real are allocated as part of the
- * returned array. Values of type string are allocated separately and must
+ * returned array.  Values of type string are allocated separately and must
  * be freed by the caller.
  */
 relopt_value *
@@ -1205,7 +1205,7 @@ default_reloptions(Datum reloptions, bool validate, relopt_kind kind)
        {"check_option", RELOPT_TYPE_STRING,
        offsetof(StdRdOptions, check_option_offset)},
        {"user_catalog_table", RELOPT_TYPE_BOOL,
-        offsetof(StdRdOptions, user_catalog_table)}
+       offsetof(StdRdOptions, user_catalog_table)}
    };
 
    options = parseRelOptions(reloptions, validate, kind, &numoptions);
index 1b6c6d957c955c2d5978e0899f7db879b4784d85..2e48b32ba3baee3f228802e86d072fe91fbece0d 100644 (file)
@@ -5,7 +5,7 @@
  *
  * These functions provide conversion between rowtypes that are logically
  * equivalent but might have columns in a different order or different sets
- * of dropped columns. There is some overlap of functionality with the
+ * of dropped columns.  There is some overlap of functionality with the
  * executor's "junkfilter" routines, but these functions work on bare
  * HeapTuples rather than TupleTableSlots.
  *
index 74cfb6499a5c5a02a721520bdf232f86760422a2..f3b36893f78927a2ff3ee45fca01547874dbefb9 100644 (file)
@@ -581,7 +581,7 @@ TupleDescInitEntryCollation(TupleDesc desc,
  * Given a relation schema (list of ColumnDef nodes), build a TupleDesc.
  *
  * Note: the default assumption is no OIDs; caller may modify the returned
- * TupleDesc if it wants OIDs. Also, tdtypeid will need to be filled in
+ * TupleDesc if it wants OIDs.  Also, tdtypeid will need to be filled in
  * later on.
  */
 TupleDesc
index 32dbed68c776799c7b4ac58ba04c3037d57ad019..66cea28113a37e963f269efe692f7448de693d77 100644 (file)
@@ -197,7 +197,7 @@ ginarrayconsistent(PG_FUNCTION_ARGS)
 
            /*
             * Must have all elements in check[] true; no discrimination
-            * against nulls here.  This is because array_contain_compare and
+            * against nulls here.  This is because array_contain_compare and
             * array_eq handle nulls differently ...
             */
            res = true;
@@ -279,9 +279,10 @@ ginarraytriconsistent(PG_FUNCTION_ARGS)
            res = GIN_MAYBE;
            break;
        case GinEqualStrategy:
+
            /*
             * Must have all elements in check[] true; no discrimination
-            * against nulls here.  This is because array_contain_compare and
+            * against nulls here.  This is because array_contain_compare and
             * array_eq handle nulls differently ...
             */
            res = GIN_MAYBE;
index 9b0f82fc90461a84cb23010dee30aa105687f1ec..27f88e0eb214bbe54dd56cd34309ec66ea11e0b9 100644 (file)
@@ -251,6 +251,7 @@ ginFindParents(GinBtree btree, GinBtreeStack *stack)
            Assert(blkno != btree->rootBlkno);
            ptr->blkno = blkno;
            ptr->buffer = buffer;
+
            /*
             * parent may be wrong, but if so, the ginFinishSplit call will
             * recurse to call ginFindParents again to fix it.
@@ -328,7 +329,8 @@ ginPlaceToPage(GinBtree btree, GinBtreeStack *stack,
    GinPlaceToPageRC rc;
    uint16      xlflags = 0;
    Page        childpage = NULL;
-   Page        newlpage = NULL, newrpage = NULL;
+   Page        newlpage = NULL,
+               newrpage = NULL;
 
    if (GinPageIsData(page))
        xlflags |= GIN_INSERT_ISDATA;
@@ -346,8 +348,8 @@ ginPlaceToPage(GinBtree btree, GinBtreeStack *stack,
    }
 
    /*
-    * Try to put the incoming tuple on the page. placeToPage will decide
-    * if the page needs to be split.
+    * Try to put the incoming tuple on the page. placeToPage will decide if
+    * the page needs to be split.
     */
    rc = btree->placeToPage(btree, stack->buffer, stack,
                            insertdata, updateblkno,
@@ -371,7 +373,7 @@ ginPlaceToPage(GinBtree btree, GinBtreeStack *stack,
            XLogRecPtr  recptr;
            XLogRecData rdata[3];
            ginxlogInsert xlrec;
-           BlockIdData childblknos[2];
+           BlockIdData childblknos[2];
 
            xlrec.node = btree->index->rd_node;
            xlrec.blkno = BufferGetBlockNumber(stack->buffer);
@@ -449,7 +451,8 @@ ginPlaceToPage(GinBtree btree, GinBtreeStack *stack,
        data.flags = xlflags;
        if (childbuf != InvalidBuffer)
        {
-           Page childpage = BufferGetPage(childbuf);
+           Page        childpage = BufferGetPage(childbuf);
+
            GinPageGetOpaque(childpage)->flags &= ~GIN_INCOMPLETE_SPLIT;
 
            data.leftChildBlkno = BufferGetBlockNumber(childbuf);
@@ -505,8 +508,8 @@ ginPlaceToPage(GinBtree btree, GinBtreeStack *stack,
 
            /*
             * Construct a new root page containing downlinks to the new left
-            * and right pages. (do this in a temporary copy first rather
-            * than overwriting the original page directly, so that we can still
+            * and right pages. (do this in a temporary copy first rather than
+            * overwriting the original page directly, so that we can still
             * abort gracefully if this fails.)
             */
            newrootpg = PageGetTempPage(newrpage);
@@ -604,7 +607,7 @@ ginPlaceToPage(GinBtree btree, GinBtreeStack *stack,
    else
    {
        elog(ERROR, "unknown return code from GIN placeToPage method: %d", rc);
-       return false;       /* keep compiler quiet */
+       return false;           /* keep compiler quiet */
    }
 }
 
@@ -627,8 +630,8 @@ ginFinishSplit(GinBtree btree, GinBtreeStack *stack, bool freestack,
    bool        first = true;
 
    /*
-    * freestack == false when we encounter an incompletely split page during a
-    * scan, while freestack == true is used in the normal scenario that a
+    * freestack == false when we encounter an incompletely split page during
+    * scan, while freestack == true is used in the normal scenario that a
     * split is finished right after the initial insert.
     */
    if (!freestack)
@@ -650,8 +653,8 @@ ginFinishSplit(GinBtree btree, GinBtreeStack *stack, bool freestack,
         * then continue with the current one.
         *
         * Note: we have to finish *all* incomplete splits we encounter, even
-        * if we have to move right. Otherwise we might choose as the target
-        * page that has no downlink in the parent, and splitting it further
+        * if we have to move right. Otherwise we might choose as the target a
+        * page that has no downlink in the parent, and splitting it further
         * would fail.
         */
        if (GinPageIsIncompleteSplit(BufferGetPage(parent->buffer)))
index 9f3009b58945193c03f6143802172a028a19890d..3af027187ac485807941dbbb6fbbf977f6acc1af 100644 (file)
@@ -187,7 +187,7 @@ ginInsertBAEntry(BuildAccumulator *accum,
  * Since the entries are being inserted into a balanced binary tree, you
  * might think that the order of insertion wouldn't be critical, but it turns
  * out that inserting the entries in sorted order results in a lot of
- * rebalancing operations and is slow. To prevent this, we attempt to insert
+ * rebalancing operations and is slow.  To prevent this, we attempt to insert
  * the nodes in an order that will produce a nearly-balanced tree if the input
  * is in fact sorted.
  *
index c11ed858833b99ce6bfd1f3e2c6d95e0e59961d1..272a9ca7c09db884e6fd2a7ff38d9d578bfb8e03 100644 (file)
@@ -49,8 +49,8 @@ typedef struct
    dlist_head  segments;       /* a list of leafSegmentInfos */
 
    /*
-    * The following fields represent how the segments are split across
-    * pages, if a page split is required. Filled in by leafRepackItems.
+    * The following fields represent how the segments are split across pages,
+    * if a page split is required. Filled in by leafRepackItems.
     */
    dlist_node *lastleft;       /* last segment on left page */
    int         lsize;          /* total size on left page */
@@ -61,7 +61,7 @@ typedef struct
 
 typedef struct
 {
-   dlist_node  node;       /* linked list pointers */
+   dlist_node  node;           /* linked list pointers */
 
    /*-------------
     * 'action' indicates the status of this in-memory segment, compared to
@@ -83,9 +83,9 @@ typedef struct
    int         nmodifieditems;
 
    /*
-    * The following fields represent the items in this segment. If 'items'
-    * is not NULL, it contains a palloc'd array of the itemsin this segment.
-    * If 'seg' is not NULL, it contains the items in an already-compressed
+    * The following fields represent the items in this segment. If 'items' is
+    * not NULL, it contains a palloc'd array of the itemsin this segment. If
+    * 'seg' is not NULL, it contains the items in an already-compressed
     * format. It can point to an on-disk page (!modified), or a palloc'd
     * segment in memory. If both are set, they must represent the same items.
     */
@@ -386,7 +386,7 @@ GinDataPageAddPostingItem(Page page, PostingItem *data, OffsetNumber offset)
        if (offset != maxoff + 1)
            memmove(ptr + sizeof(PostingItem),
                    ptr,
-                   (maxoff - offset + 1) * sizeof(PostingItem));
+                   (maxoff - offset + 1) *sizeof(PostingItem));
    }
    memcpy(ptr, data, sizeof(PostingItem));
 
@@ -436,8 +436,8 @@ dataPlaceToPageLeaf(GinBtree btree, Buffer buf, GinBtreeStack *stack,
    int         maxitems = items->nitem - items->curitem;
    Page        page = BufferGetPage(buf);
    int         i;
-   ItemPointerData rbound;
-   ItemPointerData lbound;
+   ItemPointerData rbound;
+   ItemPointerData lbound;
    bool        needsplit;
    bool        append;
    int         segsize;
@@ -451,7 +451,7 @@ dataPlaceToPageLeaf(GinBtree btree, Buffer buf, GinBtreeStack *stack,
 
    Assert(GinPageIsData(page));
 
-   rbound  = *GinDataPageGetRightBound(page);
+   rbound = *GinDataPageGetRightBound(page);
 
    /*
     * Count how many of the new items belong to this page.
@@ -464,8 +464,8 @@ dataPlaceToPageLeaf(GinBtree btree, Buffer buf, GinBtreeStack *stack,
            {
                /*
                 * This needs to go to some other location in the tree. (The
-                * caller should've chosen the insert location so that at least
-                * the first item goes here.)
+                * caller should've chosen the insert location so that at
+                * least the first item goes here.)
                 */
                Assert(i > 0);
                break;
@@ -553,7 +553,7 @@ dataPlaceToPageLeaf(GinBtree btree, Buffer buf, GinBtreeStack *stack,
    /* Add the new items to the segments */
    if (!addItemsToLeaf(leaf, newItems, maxitems))
    {
-        /* all items were duplicates, we have nothing to do */
+       /* all items were duplicates, we have nothing to do */
        items->curitem += maxitems;
 
        MemoryContextSwitchTo(oldCxt);
@@ -680,7 +680,7 @@ dataPlaceToPageLeaf(GinBtree btree, Buffer buf, GinBtreeStack *stack,
 
        Assert(GinPageRightMost(page) ||
               ginCompareItemPointers(GinDataPageGetRightBound(*newlpage),
-                                     GinDataPageGetRightBound(*newrpage)) < 0);
+                                  GinDataPageGetRightBound(*newrpage)) < 0);
 
        if (append)
            elog(DEBUG2, "appended %d items to block %u; split %d/%d (%d to go)",
@@ -769,16 +769,16 @@ ginVacuumPostingTreeLeaf(Relation indexrel, Buffer buffer, GinVacuumState *gvs)
     * We don't try to re-encode the segments here, even though some of them
     * might be really small now that we've removed some items from them. It
     * seems like a waste of effort, as there isn't really any benefit from
-    * larger segments per se; larger segments only help to pack more items
-    * in the same space. We might as well delay doing that until the next
+    * larger segments per se; larger segments only help to pack more items in
+    * the same space. We might as well delay doing that until the next
     * insertion, which will need to re-encode at least part of the page
     * anyway.
     *
-    * Also note if the page was in uncompressed, pre-9.4 format before, it
-    * is now represented as one huge segment that contains all the items.
-    * It might make sense to split that, to speed up random access, but we
-    * don't bother. You'll have to REINDEX anyway if you want the full gain
-    * of the new tighter index format.
+    * Also note if the page was in uncompressed, pre-9.4 format before, it is
+    * now represented as one huge segment that contains all the items. It
+    * might make sense to split that, to speed up random access, but we don't
+    * bother. You'll have to REINDEX anyway if you want the full gain of the
+    * new tighter index format.
     */
    if (removedsomething)
    {
@@ -795,6 +795,7 @@ ginVacuumPostingTreeLeaf(Relation indexrel, Buffer buffer, GinVacuumState *gvs)
        {
            leafSegmentInfo *seginfo = dlist_container(leafSegmentInfo, node,
                                                       iter.cur);
+
            if (seginfo->action != GIN_SEGMENT_UNMODIFIED)
                modified = true;
            if (modified && seginfo->action != GIN_SEGMENT_DELETE)
@@ -862,10 +863,11 @@ constructLeafRecompressWALData(Buffer buf, disassembledLeaf *leaf)
    }
 
    walbufbegin = palloc(
-       sizeof(ginxlogRecompressDataLeaf) +
-       BLCKSZ +            /* max size needed to hold the segment data */
-       nmodified * 2 +     /* (segno + action) per action */
-       sizeof(XLogRecData));
+                        sizeof(ginxlogRecompressDataLeaf) +
+                        BLCKSZ +       /* max size needed to hold the segment
+                                        * data */
+                        nmodified * 2 +        /* (segno + action) per action */
+                        sizeof(XLogRecData));
    walbufend = walbufbegin;
 
    recompress_xlog = (ginxlogRecompressDataLeaf *) walbufend;
@@ -965,9 +967,9 @@ dataPlaceToPageLeafRecompress(Buffer buf, disassembledLeaf *leaf)
    int         segsize;
 
    /*
-    * If the page was in pre-9.4 format before, convert the header, and
-    * force all segments to be copied to the page whether they were modified
-    * or not.
+    * If the page was in pre-9.4 format before, convert the header, and force
+    * all segments to be copied to the page whether they were modified or
+    * not.
     */
    if (!GinPageIsCompressed(page))
    {
@@ -1022,6 +1024,7 @@ dataPlaceToPageLeafSplit(Buffer buf, disassembledLeaf *leaf,
    dlist_node *node;
    dlist_node *firstright;
    leafSegmentInfo *seginfo;
+
    /* these must be static so they can be returned to caller */
    static ginxlogSplitDataLeaf split_xlog;
    static XLogRecData rdata[3];
@@ -1121,6 +1124,7 @@ dataPlaceToPageInternal(GinBtree btree, Buffer buf, GinBtreeStack *stack,
    Page        page = BufferGetPage(buf);
    OffsetNumber off = stack->off;
    PostingItem *pitem;
+
    /* these must be static so they can be returned to caller */
    static XLogRecData rdata;
    static ginxlogInsertDataInternal data;
@@ -1198,7 +1202,7 @@ dataSplitPageInternal(GinBtree btree, Buffer origbuf,
    int         nrightitems;
    Size        pageSize = PageGetPageSize(oldpage);
    ItemPointerData oldbound = *GinDataPageGetRightBound(oldpage);
-   ItemPointer bound;
+   ItemPointer bound;
    Page        lpage;
    Page        rpage;
    OffsetNumber separator;
@@ -1216,8 +1220,8 @@ dataSplitPageInternal(GinBtree btree, Buffer origbuf,
    *prdata = rdata;
 
    /*
-    * First construct a new list of PostingItems, which includes all the
-    * old items, and the new item.
+    * First construct a new list of PostingItems, which includes all the old
+    * items, and the new item.
     */
    memcpy(allitems, GinDataPageGetPostingItem(oldpage, FirstOffsetNumber),
           (off - 1) * sizeof(PostingItem));
@@ -1402,8 +1406,8 @@ addItemsToLeaf(disassembledLeaf *leaf, ItemPointer newItems, int nNewItems)
    leafSegmentInfo *newseg;
 
    /*
-    * If the page is completely empty, just construct one new segment to
-    * hold all the new items.
+    * If the page is completely empty, just construct one new segment to hold
+    * all the new items.
     */
    if (dlist_is_empty(&leaf->segments))
    {
@@ -1418,9 +1422,9 @@ addItemsToLeaf(disassembledLeaf *leaf, ItemPointer newItems, int nNewItems)
 
    dlist_foreach(iter, &leaf->segments)
    {
-       leafSegmentInfo *cur = (leafSegmentInfo *)  dlist_container(leafSegmentInfo, node, iter.cur);
+       leafSegmentInfo *cur = (leafSegmentInfo *) dlist_container(leafSegmentInfo, node, iter.cur);
        int         nthis;
-       ItemPointer tmpitems;
+       ItemPointer tmpitems;
        int         ntmpitems;
 
        /*
@@ -1434,7 +1438,7 @@ addItemsToLeaf(disassembledLeaf *leaf, ItemPointer newItems, int nNewItems)
            ItemPointerData next_first;
 
            next = (leafSegmentInfo *) dlist_container(leafSegmentInfo, node,
-                                  dlist_next_node(&leaf->segments, iter.cur));
+                                dlist_next_node(&leaf->segments, iter.cur));
            if (next->items)
                next_first = next->items[0];
            else
@@ -1556,27 +1560,27 @@ leafRepackItems(disassembledLeaf *leaf, ItemPointer remaining)
            if (seginfo->seg == NULL)
            {
                if (seginfo->nitems > GinPostingListSegmentMaxSize)
-                   npacked = 0; /* no chance that it would fit. */
+                   npacked = 0;    /* no chance that it would fit. */
                else
                {
                    seginfo->seg = ginCompressPostingList(seginfo->items,
                                                          seginfo->nitems,
-                                                  GinPostingListSegmentMaxSize,
+                                               GinPostingListSegmentMaxSize,
                                                          &npacked);
                }
                if (npacked != seginfo->nitems)
                {
                    /*
-                    * Too large. Compress again to the target size, and create
-                    * a new segment to represent the remaining items. The new
-                    * segment is inserted after this one, so it will be
-                    * processed in the next iteration of this loop.
+                    * Too large. Compress again to the target size, and
+                    * create a new segment to represent the remaining items.
+                    * The new segment is inserted after this one, so it will
+                    * be processed in the next iteration of this loop.
                     */
                    if (seginfo->seg)
                        pfree(seginfo->seg);
                    seginfo->seg = ginCompressPostingList(seginfo->items,
                                                          seginfo->nitems,
-                                              GinPostingListSegmentTargetSize,
+                                            GinPostingListSegmentTargetSize,
                                                          &npacked);
                    if (seginfo->action != GIN_SEGMENT_INSERT)
                        seginfo->action = GIN_SEGMENT_REPLACE;
@@ -1596,7 +1600,7 @@ leafRepackItems(disassembledLeaf *leaf, ItemPointer remaining)
             */
            if (SizeOfGinPostingList(seginfo->seg) < GinPostingListSegmentMinSize && next_node)
            {
-               int     nmerged;
+               int         nmerged;
 
                nextseg = dlist_container(leafSegmentInfo, node, next_node);
 
@@ -1741,8 +1745,8 @@ createPostingTree(Relation index, ItemPointerData *items, uint32 nitems,
    GinPageGetOpaque(tmppage)->rightlink = InvalidBlockNumber;
 
    /*
-    * Write as many of the items to the root page as fit. In segments
-    * of max GinPostingListSegmentMaxSize bytes each.
+    * Write as many of the items to the root page as fit. In segments of max
+    * GinPostingListSegmentMaxSize bytes each.
     */
    nrootitems = 0;
    rootsize = 0;
index 4291bab63beab784f5e85938b46af1d9ccb125b9..412f90da4db594d327672711050279d12a76dc04 100644 (file)
@@ -135,7 +135,8 @@ GinFormTuple(GinState *ginstate,
     */
    if (data)
    {
-       char *ptr = GinGetPosting(itup);
+       char       *ptr = GinGetPosting(itup);
+
        memcpy(ptr, data, dataSize);
    }
 
@@ -162,7 +163,7 @@ ginReadTuple(GinState *ginstate, OffsetNumber attnum, IndexTuple itup,
 {
    Pointer     ptr = GinGetPosting(itup);
    int         nipd = GinGetNPosting(itup);
-   ItemPointer ipd;
+   ItemPointer ipd;
    int         ndecoded;
 
    if (GinItupIsCompressed(itup))
@@ -192,7 +193,7 @@ ginReadTuple(GinState *ginstate, OffsetNumber attnum, IndexTuple itup,
  * Form a non-leaf entry tuple by copying the key data from the given tuple,
  * which can be either a leaf or non-leaf entry tuple.
  *
- * Any posting list in the source tuple is not copied. The specified child
+ * Any posting list in the source tuple is not copied.  The specified child
  * block number is inserted into t_tid.
  */
 static IndexTuple
index a16c2140c2226c4658391af89da3665beef3d581..09c3e39bf3b9156df60c4b03828fe812f3546f85 100644 (file)
@@ -440,7 +440,7 @@ ginHeapTupleFastInsert(GinState *ginstate, GinTupleCollector *collector)
  * Create temporary index tuples for a single indexable item (one index column
  * for the heap tuple specified by ht_ctid), and append them to the array
  * in *collector.  They will subsequently be written out using
- * ginHeapTupleFastInsert. Note that to guarantee consistent state, all
+ * ginHeapTupleFastInsert.  Note that to guarantee consistent state, all
  * temp tuples for a given heap tuple must be written in one call to
  * ginHeapTupleFastInsert.
  */
@@ -707,7 +707,7 @@ processPendingPage(BuildAccumulator *accum, KeyArray *ka,
  *
  * This can be called concurrently by multiple backends, so it must cope.
  * On first glance it looks completely not concurrent-safe and not crash-safe
- * either. The reason it's okay is that multiple insertion of the same entry
+ * either.  The reason it's okay is that multiple insertion of the same entry
  * is detected and treated as a no-op by gininsert.c.  If we crash after
  * posting entries to the main index and before removing them from the
  * pending list, it's okay because when we redo the posting later on, nothing
@@ -761,7 +761,7 @@ ginInsertCleanup(GinState *ginstate,
    LockBuffer(metabuffer, GIN_UNLOCK);
 
    /*
-    * Initialize.  All temporary space will be in opCtx
+    * Initialize.  All temporary space will be in opCtx
     */
    opCtx = AllocSetContextCreate(CurrentMemoryContext,
                                  "GIN insert cleanup temporary context",
@@ -855,7 +855,7 @@ ginInsertCleanup(GinState *ginstate,
 
            /*
             * While we left the page unlocked, more stuff might have gotten
-            * added to it.  If so, process those entries immediately.  There
+            * added to it.  If so, process those entries immediately.  There
             * shouldn't be very many, so we don't worry about the fact that
             * we're doing this with exclusive lock. Insertion algorithm
             * guarantees that inserted row(s) will not continue on next page.
index fda19cf4e69d73c3902bb9baf34e9157bcfb0c4d..271f09901b9fcc5e665ec5f72378aaa28362d5e1 100644 (file)
@@ -85,7 +85,8 @@ scanPostingTree(Relation index, GinScanEntry scanEntry,
        page = BufferGetPage(buffer);
        if ((GinPageGetOpaque(page)->flags & GIN_DELETED) == 0)
        {
-           int n = GinDataLeafPageGetItemsToTbm(page, scanEntry->matchBitmap);
+           int         n = GinDataLeafPageGetItemsToTbm(page, scanEntry->matchBitmap);
+
            scanEntry->predictNumberResult += n;
        }
 
@@ -100,7 +101,7 @@ scanPostingTree(Relation index, GinScanEntry scanEntry,
 
 /*
  * Collects TIDs into scanEntry->matchBitmap for all heap tuples that
- * match the search entry. This supports three different match modes:
+ * match the search entry.  This supports three different match modes:
  *
  * 1. Partial-match support: scan from current point until the
  *   comparePartialFn says we're done.
@@ -196,7 +197,7 @@ collectMatchBitmap(GinBtreeData *btree, GinBtreeStack *stack,
            /*
             * In ALL mode, we are not interested in null items, so we can
             * stop if we get to a null-item placeholder (which will be the
-            * last entry for a given attnum).  We do want to include NULL_KEY
+            * last entry for a given attnum).  We do want to include NULL_KEY
             * and EMPTY_ITEM entries, though.
             */
            if (icategory == GIN_CAT_NULL_ITEM)
@@ -407,7 +408,7 @@ restartScanEntry:
        else if (GinGetNPosting(itup) > 0)
        {
            entry->list = ginReadTuple(ginstate, entry->attnum, itup,
-               &entry->nlist);
+                                      &entry->nlist);
            entry->predictNumberResult = entry->nlist;
 
            entry->isFinished = FALSE;
@@ -463,11 +464,11 @@ startScanKey(GinState *ginstate, GinScanOpaque so, GinScanKey key)
     * considerably, if the frequent term can be put in the additional set.
     *
     * There can be many legal ways to divide them entries into these two
-    * sets. A conservative division is to just put everything in the
-    * required set, but the more you can put in the additional set, the more
-    * you can skip during the scan. To maximize skipping, we try to put as
-    * many frequent items as possible into additional, and less frequent
-    * ones into required. To do that, sort the entries by frequency
+    * sets. A conservative division is to just put everything in the required
+    * set, but the more you can put in the additional set, the more you can
+    * skip during the scan. To maximize skipping, we try to put as many
+    * frequent items as possible into additional, and less frequent ones into
+    * required. To do that, sort the entries by frequency
     * (predictNumberResult), and put entries into the required set in that
     * order, until the consistent function says that none of the remaining
     * entries can form a match, without any items from the required set. The
@@ -635,8 +636,8 @@ entryLoadMoreItems(GinState *ginstate, GinScanEntry entry, ItemPointerData advan
        if (stepright)
        {
            /*
-            * We've processed all the entries on this page. If it was the last
-            * page in the tree, we're done.
+            * We've processed all the entries on this page. If it was the
+            * last page in the tree, we're done.
             */
            if (GinPageRightMost(page))
            {
@@ -647,8 +648,8 @@ entryLoadMoreItems(GinState *ginstate, GinScanEntry entry, ItemPointerData advan
            }
 
            /*
-            * Step to next page, following the right link. then find the first
-            * ItemPointer greater than advancePast.
+            * Step to next page, following the right link. then find the
+            * first ItemPointer greater than advancePast.
             */
            entry->buffer = ginStepRight(entry->buffer,
                                         ginstate->index,
@@ -658,7 +659,7 @@ entryLoadMoreItems(GinState *ginstate, GinScanEntry entry, ItemPointerData advan
        stepright = true;
 
        if (GinPageGetOpaque(page)->flags & GIN_DELETED)
-           continue;       /* page was deleted by concurrent vacuum */
+           continue;           /* page was deleted by concurrent vacuum */
 
        /*
         * The first item > advancePast might not be on this page, but
@@ -781,6 +782,7 @@ entryGetItem(GinState *ginstate, GinScanEntry entry,
                gotitem = true;
                break;
            }
+
            /*
             * Not a lossy page. Skip over any offsets <= advancePast, and
             * return that.
@@ -788,8 +790,9 @@ entryGetItem(GinState *ginstate, GinScanEntry entry,
            if (entry->matchResult->blockno == advancePastBlk)
            {
                /*
-                * First, do a quick check against the last offset on the page.
-                * If that's > advancePast, so are all the other offsets.
+                * First, do a quick check against the last offset on the
+                * page. If that's > advancePast, so are all the other
+                * offsets.
                 */
                if (entry->matchResult->offsets[entry->matchResult->ntuples - 1] <= advancePastOff)
                {
@@ -890,8 +893,8 @@ keyGetItem(GinState *ginstate, MemoryContext tempCtx, GinScanKey key,
 
    /*
     * We might have already tested this item; if so, no need to repeat work.
-    * (Note: the ">" case can happen, if advancePast is exact but we previously
-    * had to set curItem to a lossy-page pointer.)
+    * (Note: the ">" case can happen, if advancePast is exact but we
+    * previously had to set curItem to a lossy-page pointer.)
     */
    if (ginCompareItemPointers(&key->curItem, &advancePast) > 0)
        return;
@@ -942,8 +945,8 @@ keyGetItem(GinState *ginstate, MemoryContext tempCtx, GinScanKey key,
    /*
     * Ok, we now know that there are no matches < minItem.
     *
-    * If minItem is lossy, it means that there were no exact items on
-    * the page among requiredEntries, because lossy pointers sort after exact
+    * If minItem is lossy, it means that there were no exact items on the
+    * page among requiredEntries, because lossy pointers sort after exact
     * items. However, there might be exact items for the same page among
     * additionalEntries, so we mustn't advance past them.
     */
@@ -1085,6 +1088,7 @@ keyGetItem(GinState *ginstate, MemoryContext tempCtx, GinScanKey key,
        if (entry->isFinished)
            key->entryRes[i] = GIN_FALSE;
 #if 0
+
        /*
         * This case can't currently happen, because we loaded all the entries
         * for this item earlier.
@@ -1119,6 +1123,7 @@ keyGetItem(GinState *ginstate, MemoryContext tempCtx, GinScanKey key,
            break;
 
        default:
+
            /*
             * the 'default' case shouldn't happen, but if the consistent
             * function returns something bogus, this is the safe result
@@ -1129,11 +1134,10 @@ keyGetItem(GinState *ginstate, MemoryContext tempCtx, GinScanKey key,
    }
 
    /*
-    * We have a tuple, and we know if it matches or not. If it's a
-    * non-match, we could continue to find the next matching tuple, but
-    * let's break out and give scanGetItem a chance to advance the other
-    * keys. They might be able to skip past to a much higher TID, allowing
-    * us to save work.
+    * We have a tuple, and we know if it matches or not. If it's a non-match,
+    * we could continue to find the next matching tuple, but let's break out
+    * and give scanGetItem a chance to advance the other keys. They might be
+    * able to skip past to a much higher TID, allowing us to save work.
     */
 
    /* clean up after consistentFn calls */
@@ -1165,14 +1169,14 @@ scanGetItem(IndexScanDesc scan, ItemPointerData advancePast,
     * matching item.
     *
     * This logic works only if a keyGetItem stream can never contain both
-    * exact and lossy pointers for the same page.  Else we could have a
+    * exact and lossy pointers for the same page.  Else we could have a
     * case like
     *
     *      stream 1        stream 2
-    *      ...             ...
+    *      ...             ...
     *      42/6            42/7
     *      50/1            42/0xffff
-    *      ...             ...
+    *      ...             ...
     *
     * We would conclude that 42/6 is not a match and advance stream 1,
     * thus never detecting the match to the lossy pointer in stream 2.
@@ -1205,12 +1209,11 @@ scanGetItem(IndexScanDesc scan, ItemPointerData advancePast,
            }
 
            /*
-            * It's a match. We can conclude that nothing < matches, so
-            * the other key streams can skip to this item.
+            * It's a match. We can conclude that nothing < matches, so the
+            * other key streams can skip to this item.
             *
-            * Beware of lossy pointers, though; from a lossy pointer, we
-            * can only conclude that nothing smaller than this *block*
-            * matches.
+            * Beware of lossy pointers, though; from a lossy pointer, we can
+            * only conclude that nothing smaller than this *block* matches.
             */
            if (ItemPointerIsLossyPage(&key->curItem))
            {
@@ -1229,8 +1232,8 @@ scanGetItem(IndexScanDesc scan, ItemPointerData advancePast,
            }
 
            /*
-            * If this is the first key, remember this location as a
-            * potential match, and proceed to check the rest of the keys.
+            * If this is the first key, remember this location as a potential
+            * match, and proceed to check the rest of the keys.
             *
             * Otherwise, check if this is the same item that we checked the
             * previous keys for (or a lossy pointer for the same page). If
@@ -1247,7 +1250,7 @@ scanGetItem(IndexScanDesc scan, ItemPointerData advancePast,
                if (ItemPointerIsLossyPage(&key->curItem) ||
                    ItemPointerIsLossyPage(item))
                {
-                   Assert (GinItemPointerGetBlockNumber(&key->curItem) >= GinItemPointerGetBlockNumber(item));
+                   Assert(GinItemPointerGetBlockNumber(&key->curItem) >= GinItemPointerGetBlockNumber(item));
                    match = (GinItemPointerGetBlockNumber(&key->curItem) ==
                             GinItemPointerGetBlockNumber(item));
                }
@@ -1264,8 +1267,8 @@ scanGetItem(IndexScanDesc scan, ItemPointerData advancePast,
 
    /*
     * Now *item contains the first ItemPointer after previous result that
-    * satisfied all the keys for that exact TID, or a lossy reference
-    * to the same page.
+    * satisfied all the keys for that exact TID, or a lossy reference to the
+    * same page.
     *
     * We must return recheck = true if any of the keys are marked recheck.
     */
@@ -1776,10 +1779,10 @@ gingetbitmap(PG_FUNCTION_ARGS)
 
    /*
     * First, scan the pending list and collect any matching entries into the
-    * bitmap.  After we scan a pending item, some other backend could post it
+    * bitmap.  After we scan a pending item, some other backend could post it
     * into the main index, and so we might visit it a second time during the
     * main scan.  This is okay because we'll just re-set the same bit in the
-    * bitmap.  (The possibility of duplicate visits is a major reason why GIN
+    * bitmap.  (The possibility of duplicate visits is a major reason why GIN
     * can't support the amgettuple API, however.) Note that it would not do
     * to scan the main index before the pending list, since concurrent
     * cleanup could then make us miss entries entirely.
index 3bafb6471b337aa9394dbdcaa662e0e2e8f6a483..b27cae3aab2d342935fbb8ba80f3ddbb2d04a478 100644 (file)
@@ -40,7 +40,7 @@ typedef struct
  * Adds array of item pointers to tuple's posting list, or
  * creates posting tree and tuple pointing to tree in case
  * of not enough space.  Max size of tuple is defined in
- * GinFormTuple(). Returns a new, modified index tuple.
+ * GinFormTuple().  Returns a new, modified index tuple.
  * items[] must be in sorted order with no duplicates.
  */
 static IndexTuple
index 167d25ea5c7e72f1bb48c68d492e6d4fd9885127..052abd2bd8e0e906627904368daac0f82ee1200e 100644 (file)
@@ -47,7 +47,7 @@
  * Maximum number of MAYBE inputs that shimTriConsistentFn will try to
  * resolve by calling all combinations.
  */
-#define    MAX_MAYBE_ENTRIES   4
+#define MAX_MAYBE_ENTRIES  4
 
 /*
  * Dummy consistent functions for an EVERYTHING key.  Just claim it matches.
@@ -95,14 +95,14 @@ static GinTernaryValue
 directTriConsistentFn(GinScanKey key)
 {
    return DatumGetGinTernaryValue(FunctionCall7Coll(
-                                      key->triConsistentFmgrInfo,
-                                      key->collation,
-                                      PointerGetDatum(key->entryRes),
-                                      UInt16GetDatum(key->strategy),
-                                      key->query,
-                                      UInt32GetDatum(key->nuserentries),
-                                      PointerGetDatum(key->extra_data),
-                                      PointerGetDatum(key->queryValues),
+                                                 key->triConsistentFmgrInfo,
+                                                    key->collation,
+                                             PointerGetDatum(key->entryRes),
+                                              UInt16GetDatum(key->strategy),
+                                                    key->query,
+                                          UInt32GetDatum(key->nuserentries),
+                                           PointerGetDatum(key->extra_data),
+                                          PointerGetDatum(key->queryValues),
                                     PointerGetDatum(key->queryCategories)));
 }
 
@@ -115,15 +115,16 @@ static bool
 shimBoolConsistentFn(GinScanKey key)
 {
    GinTernaryValue result;
+
    result = DatumGetGinTernaryValue(FunctionCall7Coll(
-                                        key->triConsistentFmgrInfo,
-                                        key->collation,
-                                        PointerGetDatum(key->entryRes),
-                                        UInt16GetDatum(key->strategy),
-                                        key->query,
-                                        UInt32GetDatum(key->nuserentries),
-                                        PointerGetDatum(key->extra_data),
-                                        PointerGetDatum(key->queryValues),
+                                                 key->triConsistentFmgrInfo,
+                                                      key->collation,
+                                             PointerGetDatum(key->entryRes),
+                                              UInt16GetDatum(key->strategy),
+                                                      key->query,
+                                          UInt32GetDatum(key->nuserentries),
+                                           PointerGetDatum(key->extra_data),
+                                          PointerGetDatum(key->queryValues),
                                     PointerGetDatum(key->queryCategories)));
    if (result == GIN_MAYBE)
    {
@@ -240,8 +241,8 @@ ginInitConsistentFunction(GinState *ginstate, GinScanKey key)
            key->boolConsistentFn = shimBoolConsistentFn;
 
        if (OidIsValid(ginstate->triConsistentFn[key->attnum - 1].fn_oid))
-           key->triConsistentFn =  directTriConsistentFn;
+           key->triConsistentFn = directTriConsistentFn;
        else
-           key->triConsistentFn =  shimTriConsistentFn;
+           key->triConsistentFn = shimTriConsistentFn;
    }
 }
index 81bbb09c24462ec0c58fa241b8f65bbcc7150d46..606a824f1254095c81f5929752013e07a4e41b67 100644 (file)
@@ -126,9 +126,9 @@ encode_varbyte(uint64 val, unsigned char **ptr)
 static uint64
 decode_varbyte(unsigned char **ptr)
 {
-   uint64 val;
+   uint64      val;
    unsigned char *p = *ptr;
-   uint64 c;
+   uint64      c;
 
    c = *(p++);
    val = c & 0x7F;
@@ -210,7 +210,7 @@ ginCompressPostingList(const ItemPointer ipd, int nipd, int maxsize,
        uint64      val = itemptr_to_uint64(&ipd[totalpacked]);
        uint64      delta = val - prev;
 
-       Assert (val > prev);
+       Assert(val > prev);
 
        if (endptr - ptr >= 6)
            encode_varbyte(delta, &ptr);
@@ -225,7 +225,7 @@ ginCompressPostingList(const ItemPointer ipd, int nipd, int maxsize,
 
            encode_varbyte(delta, &p);
            if (p - buf > (endptr - ptr))
-               break; /* output is full */
+               break;          /* output is full */
 
            memcpy(ptr, buf, p - buf);
            ptr += (p - buf);
@@ -286,7 +286,7 @@ ginPostingListDecode(GinPostingList *plist, int *ndecoded)
 ItemPointer
 ginPostingListDecodeAllSegments(GinPostingList *segment, int len, int *ndecoded_out)
 {
-   ItemPointer result;
+   ItemPointer result;
    int         nallocated;
    uint64      val;
    char       *endseg = ((char *) segment) + len;
@@ -349,7 +349,7 @@ ginPostingListDecodeAllSegmentsToTbm(GinPostingList *ptr, int len,
                                     TIDBitmap *tbm)
 {
    int         ndecoded;
-   ItemPointer items;
+   ItemPointer items;
 
    items = ginPostingListDecodeAllSegments(ptr, len, &ndecoded);
    tbm_add_tuples(tbm, items, ndecoded, false);
@@ -374,8 +374,8 @@ ginMergeItemPointers(ItemPointerData *a, uint32 na,
    dst = (ItemPointer) palloc((na + nb) * sizeof(ItemPointerData));
 
    /*
-    * If the argument arrays don't overlap, we can just append them to
-    * each other.
+    * If the argument arrays don't overlap, we can just append them to each
+    * other.
     */
    if (na == 0 || nb == 0 || ginCompareItemPointers(&a[na - 1], &b[0]) < 0)
    {
index b19386e19ad6e380cd3afc616b42980de0f33877..66c62b2e32a2dcf3c57a07605833615f00f5c51d 100644 (file)
@@ -389,7 +389,7 @@ ginNewScanKey(IndexScanDesc scan)
    /*
     * If the index is version 0, it may be missing null and placeholder
     * entries, which would render searches for nulls and full-index scans
-    * unreliable.  Throw an error if so.
+    * unreliable.  Throw an error if so.
     */
    if (hasNullQuery && !so->isVoidRes)
    {
index 4dadb50dcaafab371f300e26c0bb7ff9cec44d1e..3ca0b68434bc6da94dd590d74c5e65276e0fda01 100644 (file)
@@ -67,6 +67,7 @@ initGinState(GinState *state, Relation index)
        fmgr_info_copy(&(state->extractQueryFn[i]),
                       index_getprocinfo(index, i + 1, GIN_EXTRACTQUERY_PROC),
                       CurrentMemoryContext);
+
        /*
         * Check opclass capability to do tri-state or binary logic consistent
         * check.
@@ -74,14 +75,14 @@ initGinState(GinState *state, Relation index)
        if (index_getprocid(index, i + 1, GIN_TRICONSISTENT_PROC) != InvalidOid)
        {
            fmgr_info_copy(&(state->triConsistentFn[i]),
-              index_getprocinfo(index, i + 1, GIN_TRICONSISTENT_PROC),
+                    index_getprocinfo(index, i + 1, GIN_TRICONSISTENT_PROC),
                           CurrentMemoryContext);
        }
 
        if (index_getprocid(index, i + 1, GIN_CONSISTENT_PROC) != InvalidOid)
        {
            fmgr_info_copy(&(state->consistentFn[i]),
-                          index_getprocinfo(index, i + 1, GIN_CONSISTENT_PROC),
+                       index_getprocinfo(index, i + 1, GIN_CONSISTENT_PROC),
                           CurrentMemoryContext);
        }
 
@@ -458,7 +459,7 @@ ginExtractEntries(GinState *ginstate, OffsetNumber attnum,
     * If there's more than one key, sort and unique-ify.
     *
     * XXX Using qsort here is notationally painful, and the overhead is
-    * pretty bad too.  For small numbers of keys it'd likely be better to use
+    * pretty bad too.  For small numbers of keys it'd likely be better to use
     * a simple insertion sort.
     */
    if (*nentries > 1)
index 72f734caf8de6476e1eac3dbe50dc06feac2221a..af4d2714b5f8cd21dc197bf1af54ad8efe1b7be4 100644 (file)
@@ -47,7 +47,7 @@ ginVacuumItemPointers(GinVacuumState *gvs, ItemPointerData *items,
 {
    int         i,
                remaining = 0;
-   ItemPointer tmpitems = NULL;
+   ItemPointer tmpitems = NULL;
 
    /*
     * Iterate over TIDs array
@@ -208,8 +208,8 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot,
    }
 
    /*
-    * if we have root and there are empty pages in tree, then we don't release
-    * lock to go further processing and guarantee that tree is unused
+    * if we have root and there are empty pages in tree, then we don't
+    * release lock to go further processing and guarantee that tree is unused
     */
    if (!(isRoot && hasVoidPage))
    {
@@ -236,7 +236,7 @@ ginDeletePage(GinVacuumState *gvs, BlockNumber deleteBlkno, BlockNumber leftBlkn
    Buffer      pBuffer;
    Page        page,
                parentPage;
-   BlockNumber rightlink;
+   BlockNumber rightlink;
 
    /*
     * Lock the pages in the same order as an insertion would, to avoid
@@ -302,11 +302,11 @@ ginDeletePage(GinVacuumState *gvs, BlockNumber deleteBlkno, BlockNumber leftBlkn
        data.rightLink = GinPageGetOpaque(page)->rightlink;
 
        /*
-        * We can't pass buffer_std = TRUE, because we didn't set pd_lower
-        * on pre-9.4 versions. The page might've been binary-upgraded from
-        * an older version, and hence not have pd_lower set correctly.
-        * Ditto for the left page, but removing the item from the parent
-        * updated its pd_lower, so we know that's OK at this point.
+        * We can't pass buffer_std = TRUE, because we didn't set pd_lower on
+        * pre-9.4 versions. The page might've been binary-upgraded from an
+        * older version, and hence not have pd_lower set correctly. Ditto for
+        * the left page, but removing the item from the parent updated its
+        * pd_lower, so we know that's OK at this point.
         */
        rdata[0].buffer = dBuffer;
        rdata[0].buffer_std = FALSE;
@@ -538,7 +538,8 @@ ginVacuumEntryPage(GinVacuumState *gvs, Buffer buffer, BlockNumber *roots, uint3
                }
 
                /*
-                * if we already created a temporary page, make changes in place
+                * if we already created a temporary page, make changes in
+                * place
                 */
                if (tmppage == origpage)
                {
index d19389330c532c9bc0313a06c9553bf817d99a0a..a8a917a9d0ede8d0b4aea0823f5a69a908b31b69 100644 (file)
@@ -133,7 +133,7 @@ ginRedoInsertEntry(Buffer buffer, bool isLeaf, BlockNumber rightblkno, void *rda
    if (PageAddItem(page, (Item) itup, IndexTupleSize(itup), offset, false, false) == InvalidOffsetNumber)
    {
        RelFileNode node;
-       ForkNumber forknum;
+       ForkNumber  forknum;
        BlockNumber blknum;
 
        BufferGetTag(buffer, &node, &forknum, &blknum);
@@ -341,8 +341,8 @@ ginRedoInsert(XLogRecPtr lsn, XLogRecord *record)
    payload = XLogRecGetData(record) + sizeof(ginxlogInsert);
 
    /*
-    * First clear incomplete-split flag on child page if this finishes
-    * split.
+    * First clear incomplete-split flag on child page if this finishes a
+    * split.
     */
    if (!isLeaf)
    {
@@ -472,8 +472,8 @@ ginRedoSplit(XLogRecPtr lsn, XLogRecord *record)
    payload = XLogRecGetData(record) + sizeof(ginxlogSplit);
 
    /*
-    * First clear incomplete-split flag on child page if this finishes
-    * split
+    * First clear incomplete-split flag on child page if this finishes a
+    * split
     */
    if (!isLeaf)
    {
@@ -522,7 +522,7 @@ ginRedoSplit(XLogRecPtr lsn, XLogRecord *record)
 
    if (isRoot)
    {
-       BlockNumber rootBlkno = data->rrlink;
+       BlockNumber rootBlkno = data->rrlink;
        Buffer      rootBuf = XLogReadBuffer(data->node, rootBlkno, true);
        Page        rootPage = BufferGetPage(rootBuf);
 
@@ -711,9 +711,9 @@ ginRedoUpdateMetapage(XLogRecPtr lsn, XLogRecord *record)
    Buffer      buffer;
 
    /*
-    * Restore the metapage. This is essentially the same as a full-page image,
-    * so restore the metapage unconditionally without looking at the LSN, to
-    * avoid torn page hazards.
+    * Restore the metapage. This is essentially the same as a full-page
+    * image, so restore the metapage unconditionally without looking at the
+    * LSN, to avoid torn page hazards.
     */
    metabuffer = XLogReadBuffer(data->node, GIN_METAPAGE_BLKNO, false);
    if (!BufferIsValid(metabuffer))
@@ -877,7 +877,7 @@ ginRedoDeleteListPages(XLogRecPtr lsn, XLogRecord *record)
 
    /*
     * In normal operation, shiftList() takes exclusive lock on all the
-    * pages-to-be-deleted simultaneously.  During replay, however, it should
+    * pages-to-be-deleted simultaneously.  During replay, however, it should
     * be all right to lock them one at a time.  This is dependent on the fact
     * that we are deleting pages from the head of the list, and that readers
     * share-lock the next page before releasing the one they are on. So we
index 64125d519538746f2de41e9ed6d683ef9a730644..e6f06c29e51de05dc488ed263e050f43bc2bcd0b 100644 (file)
@@ -1382,7 +1382,7 @@ initGISTstate(Relation index)
        /*
         * If the index column has a specified collation, we should honor that
         * while doing comparisons.  However, we may have a collatable storage
-        * type for a noncollatable indexed data type.  If there's no index
+        * type for a noncollatable indexed data type.  If there's no index
         * collation then specify default collation in case the support
         * functions need collation.  This is harmless if the support
         * functions don't care about collation, so we just do it
index 92a9dce8e61c4270dcd35dfefa2d2e12189ef0f1..7a8692b5087d2ee6cba1bb47eb02ab13057dd0b7 100644 (file)
@@ -31,7 +31,7 @@
  *
  * On success return for a heap tuple, *recheck_p is set to indicate
  * whether recheck is needed.  We recheck if any of the consistent() functions
- * request it. recheck is not interesting when examining a non-leaf entry,
+ * request it.  recheck is not interesting when examining a non-leaf entry,
  * since we must visit the lower index page if there's any doubt.
  *
  * If we are doing an ordered scan, so->distances[] is filled with distance
@@ -62,7 +62,7 @@ gistindex_keytest(IndexScanDesc scan,
 
    /*
     * If it's a leftover invalid tuple from pre-9.1, treat it as a match with
-    * minimum possible distances.  This means we'll always follow it to the
+    * minimum possible distances.  This means we'll always follow it to the
     * referenced page.
     */
    if (GistTupleIsInvalid(tuple))
@@ -224,7 +224,7 @@ gistindex_keytest(IndexScanDesc scan,
  * ntids: if not NULL, gistgetbitmap's output tuple counter
  *
  * If tbm/ntids aren't NULL, we are doing an amgetbitmap scan, and heap
- * tuples should be reported directly into the bitmap. If they are NULL,
+ * tuples should be reported directly into the bitmap.  If they are NULL,
  * we're doing a plain or ordered indexscan.  For a plain indexscan, heap
  * tuple TIDs are returned into so->pageData[].  For an ordered indexscan,
  * heap tuple TIDs are pushed into individual search queue items.
index 5194fe08ab7199d8a2319733e387adb6ed4181de..8360b16ae5016226f19d818b726aa913ebc346a6 100644 (file)
@@ -56,7 +56,7 @@ GISTSearchTreeItemCombiner(RBNode *existing, const RBNode *newrb, void *arg)
    /*
     * If new item is heap tuple, it goes to front of chain; otherwise insert
     * it before the first index-page item, so that index pages are visited in
-    * LIFO order, ensuring depth-first search of index pages.  See comments
+    * LIFO order, ensuring depth-first search of index pages.  See comments
     * in gist_private.h.
     */
    if (GISTSearchItemIsHeap(*newitem))
index 2dd26de0982435c6f8decc85f68c2d48cbe04fa2..e1994bf04b5f1c0879175f08fb043c9011d9bf25 100644 (file)
@@ -71,7 +71,7 @@ gistunionsubkeyvec(GISTSTATE *giststate, IndexTuple *itvec,
  * Recompute unions of left- and right-side subkeys after a page split,
  * ignoring any tuples that are marked in spl->spl_dontcare[].
  *
- * Note: we always recompute union keys for all index columns. In some cases
+ * Note: we always recompute union keys for all index columns.  In some cases
  * this might represent duplicate work for the leftmost column(s), but it's
  * not safe to assume that "zero penalty to move a tuple" means "the union
  * key doesn't change at all".  Penalty functions aren't 100% accurate.
@@ -160,7 +160,7 @@ findDontCares(Relation r, GISTSTATE *giststate, GISTENTRY *valvec,
 
 /*
  * Remove tuples that are marked don't-cares from the tuple index array a[]
- * of length *len. This is applied separately to the spl_left and spl_right
+ * of length *len.  This is applied separately to the spl_left and spl_right
  * arrays.
  */
 static void
@@ -193,7 +193,7 @@ removeDontCares(OffsetNumber *a, int *len, const bool *dontcare)
 /*
  * Place a single don't-care tuple into either the left or right side of the
  * split, according to which has least penalty for merging the tuple into
- * the previously-computed union keys. We need consider only columns starting
+ * the previously-computed union keys.  We need consider only columns starting
  * at attno.
  */
 static void
@@ -291,7 +291,7 @@ supportSecondarySplit(Relation r, GISTSTATE *giststate, int attno,
 
        /*
         * There is only one previously defined union, so we just choose swap
-        * or not by lowest penalty for that side.  We can only get here if a
+        * or not by lowest penalty for that side.  We can only get here if a
         * secondary split happened to have all NULLs in its column in the
         * tuples that the outer recursion level had assigned to one side.
         * (Note that the null checks in gistSplitByKey don't prevent the
@@ -427,7 +427,7 @@ gistUserPicksplit(Relation r, GistEntryVector *entryvec, int attno, GistSplitVec
    sv->spl_rdatum = v->spl_rattr[attno];
 
    /*
-    * Let the opclass-specific PickSplit method do its thing.  Note that at
+    * Let the opclass-specific PickSplit method do its thing.  Note that at
     * this point we know there are no null keys in the entryvec.
     */
    FunctionCall2Coll(&giststate->picksplitFn[attno],
index fbccdb800bcc3d981588519c4fbaa42a7a4d1054..f32e35ad1596de9f1a78fad11d7a2b66f69c51f6 100644 (file)
@@ -414,7 +414,7 @@ gistchoose(Relation r, Page p, IndexTuple it,   /* it has compressed entry */
     * some inserts to go to other equally-good subtrees.
     *
     * keep_current_best is -1 if we haven't yet had to make a random choice
-    * whether to keep the current best tuple.  If we have done so, and
+    * whether to keep the current best tuple.  If we have done so, and
     * decided to keep it, keep_current_best is 1; if we've decided to
     * replace, keep_current_best is 0.  (This state will be reset to -1 as
     * soon as we've made the replacement, but sometimes we make the choice in
@@ -456,7 +456,7 @@ gistchoose(Relation r, Page p, IndexTuple it,   /* it has compressed entry */
            {
                /*
                 * New best penalty for column.  Tentatively select this tuple
-                * as the target, and record the best penalty.  Then reset the
+                * as the target, and record the best penalty.  Then reset the
                 * next column's penalty to "unknown" (and indirectly, the
                 * same for all the ones to its right).  This will force us to
                 * adopt this tuple's penalty values as the best for all the
@@ -475,7 +475,7 @@ gistchoose(Relation r, Page p, IndexTuple it,   /* it has compressed entry */
            {
                /*
                 * The current tuple is exactly as good for this column as the
-                * best tuple seen so far.  The next iteration of this loop
+                * best tuple seen so far.  The next iteration of this loop
                 * will compare the next column.
                 */
            }
@@ -681,7 +681,7 @@ gistcheckpage(Relation rel, Buffer buf)
    /*
     * ReadBuffer verifies that every newly-read page passes
     * PageHeaderIsValid, which means it either contains a reasonably sane
-    * page header or is all-zero.  We have to defend against the all-zero
+    * page header or is all-zero.  We have to defend against the all-zero
     * case, however.
     */
    if (PageIsNew(page))
index 215806be12f4665703df0f5c7bb41c585ada3afa..278d386a7cdac354f5755c0325a758b38977f7fd 100644 (file)
@@ -49,7 +49,7 @@ gistvacuumcleanup(PG_FUNCTION_ARGS)
        stats->estimated_count = info->estimated_count;
 
        /*
-        * XXX the above is wrong if index is partial.  Would it be OK to just
+        * XXX the above is wrong if index is partial.  Would it be OK to just
         * return NULL, or is there work we must do below?
         */
    }
index e12b9c66dc136a7f75bb278319dc0696e4e8c05e..7d36b2ab6a301aad34d3fec4417b7c8edd80b24b 100644 (file)
@@ -38,7 +38,7 @@ static MemoryContext opCtx;       /* working memory for operations */
  * follow-right flag, because that change is not included in the full-page
  * image.  To be sure that the intermediate state with the wrong flag value is
  * not visible to concurrent Hot Standby queries, this function handles
- * restoring the full-page image as well as updating the flag. (Note that
+ * restoring the full-page image as well as updating the flag.  (Note that
  * we never need to do anything else to the child page in the current WAL
  * action.)
  */
@@ -89,7 +89,7 @@ gistRedoPageUpdateRecord(XLogRecPtr lsn, XLogRecord *record)
 
    /*
     * We need to acquire and hold lock on target page while updating the left
-    * child page.  If we have a full-page image of target page, getting the
+    * child page.  If we have a full-page image of target page, getting the
     * lock is a side-effect of restoring that image.  Note that even if the
     * target page no longer exists, we'll still attempt to replay the change
     * on the child page.
@@ -387,6 +387,7 @@ gistXLogSplit(RelFileNode node, BlockNumber blkno, bool page_is_leaf,
 
    for (ptr = dist; ptr; ptr = ptr->next)
        npage++;
+
    /*
     * the caller should've checked this already, but doesn't hurt to check
     * again.
index 502fc31dd19ce0994408c9daa896288a291bf5c7..7abb7a47fc22778ad2f1865e1abb843d8460874e 100644 (file)
@@ -78,7 +78,7 @@ hashbuild(PG_FUNCTION_ARGS)
     * (assuming their hash codes are pretty random) there will be no locality
     * of access to the index, and if the index is bigger than available RAM
     * then we'll thrash horribly.  To prevent that scenario, we can sort the
-    * tuples by (expected) bucket number.  However, such a sort is useless
+    * tuples by (expected) bucket number.  However, such a sort is useless
     * overhead when the index does fit in RAM.  We choose to sort if the
     * initial index size exceeds NBuffers.
     *
@@ -248,7 +248,7 @@ hashgettuple(PG_FUNCTION_ARGS)
        /*
         * An insertion into the current index page could have happened while
         * we didn't have read lock on it.  Re-find our position by looking
-        * for the TID we previously returned.  (Because we hold share lock on
+        * for the TID we previously returned.  (Because we hold share lock on
         * the bucket, no deletions or splits could have occurred; therefore
         * we can expect that the TID still exists in the current index page,
         * at an offset >= where we were.)
@@ -524,7 +524,7 @@ hashbulkdelete(PG_FUNCTION_ARGS)
    /*
     * Read the metapage to fetch original bucket and tuple counts.  Also, we
     * keep a copy of the last-seen metapage so that we can use its
-    * hashm_spares[] values to compute bucket page addresses.  This is a bit
+    * hashm_spares[] values to compute bucket page addresses.  This is a bit
     * hokey but perfectly safe, since the interesting entries in the spares
     * array cannot change under us; and it beats rereading the metapage for
     * each bucket.
@@ -655,7 +655,7 @@ loop_top:
    {
        /*
         * Otherwise, our count is untrustworthy since we may have
-        * double-scanned tuples in split buckets.  Proceed by dead-reckoning.
+        * double-scanned tuples in split buckets.  Proceed by dead-reckoning.
         * (Note: we still return estimated_count = false, because using this
         * count is better than not updating reltuples at all.)
         */
index 6d351da5b0a574f7e138fa6b7e86a93725088951..c61fec6b84f08adc7abc6f1f023e3f61de50426a 100644 (file)
@@ -11,7 +11,7 @@
  *   src/backend/access/hash/hashfunc.c
  *
  * NOTES
- *   These functions are stored in pg_amproc.  For each operator class
+ *   These functions are stored in pg_amproc.  For each operator class
  *   defined for hash indexes, they compute the hash value of the argument.
  *
  *   Additional hash functions appear in /utils/adt/ files for various
@@ -158,7 +158,7 @@ hashtext(PG_FUNCTION_ARGS)
    /*
     * Note: this is currently identical in behavior to hashvarlena, but keep
     * it as a separate function in case we someday want to do something
-    * different in non-C locales.  (See also hashbpchar, if so.)
+    * different in non-C locales.  (See also hashbpchar, if so.)
     */
    result = hash_any((unsigned char *) VARDATA_ANY(key),
                      VARSIZE_ANY_EXHDR(key));
@@ -236,7 +236,7 @@ hashvarlena(PG_FUNCTION_ARGS)
  *
  * This allows some parallelism.  Read-after-writes are good at doubling
  * the number of bits affected, so the goal of mixing pulls in the opposite
- * direction from the goal of parallelism. I did what I could.  Rotates
+ * direction from the goal of parallelism.  I did what I could.  Rotates
  * seem to cost as much as shifts on every machine I could lay my hands on,
  * and rotates are much kinder to the top and bottom bits, so I used rotates.
  *----------
@@ -270,7 +270,7 @@ hashvarlena(PG_FUNCTION_ARGS)
  * substantial performance increase since final() does not need to
  * do well in reverse, but is does need to affect all output bits.
  * mix(), on the other hand, does not need to affect all output
- * bits (affecting 32 bits is enough). The original hash function had
+ * bits (affecting 32 bits is enough).  The original hash function had
  * a single mixing operation that had to satisfy both sets of requirements
  * and was slower as a result.
  *----------
@@ -291,7 +291,7 @@ hashvarlena(PG_FUNCTION_ARGS)
  *     k       : the key (the unaligned variable-length array of bytes)
  *     len     : the length of the key, counting by bytes
  *
- * Returns a uint32 value. Every bit of the key affects every bit of
+ * Returns a uint32 value.  Every bit of the key affects every bit of
  * the return value.  Every 1-bit and 2-bit delta achieves avalanche.
  * About 6*len+35 instructions. The best hash table sizes are powers
  * of 2.  There is no need to do mod a prime (mod is sooo slow!).
index 49211eef9a3cd4f8e7ecd83d1e5a4e222afa579a..05e9808b8ad0b7991029d31ebe9aafdf65abc036 100644 (file)
@@ -89,7 +89,7 @@ _hash_doinsert(Relation rel, IndexTuple itup)
 
        /*
         * If the previous iteration of this loop locked what is still the
-        * correct target bucket, we are done.  Otherwise, drop any old lock
+        * correct target bucket, we are done.  Otherwise, drop any old lock
         * and lock what now appears to be the correct bucket.
         */
        if (retry)
index 2389c3843f71595d57761a04c8a8b85fb3193b9a..628c05698b9c901e00b97c565691c4a736b521fb 100644 (file)
@@ -80,7 +80,7 @@ blkno_to_bitno(HashMetaPage metap, BlockNumber ovflblkno)
  *
  * Add an overflow page to the bucket whose last page is pointed to by 'buf'.
  *
- * On entry, the caller must hold a pin but no lock on 'buf'.  The pin is
+ * On entry, the caller must hold a pin but no lock on 'buf'.  The pin is
  * dropped before exiting (we assume the caller is not interested in 'buf'
  * anymore).  The returned overflow page will be pinned and write-locked;
  * it is guaranteed to be empty.
@@ -89,12 +89,12 @@ blkno_to_bitno(HashMetaPage metap, BlockNumber ovflblkno)
  * That buffer is returned in the same state.
  *
  * The caller must hold at least share lock on the bucket, to ensure that
- * no one else tries to compact the bucket meanwhile.  This guarantees that
+ * no one else tries to compact the bucket meanwhile.  This guarantees that
  * 'buf' won't stop being part of the bucket while it's unlocked.
  *
  * NB: since this could be executed concurrently by multiple processes,
  * one should not assume that the returned overflow page will be the
- * immediate successor of the originally passed 'buf'. Additional overflow
+ * immediate successor of the originally passed 'buf'.  Additional overflow
  * pages might have been added to the bucket chain in between.
  */
 Buffer
@@ -157,7 +157,7 @@ _hash_addovflpage(Relation rel, Buffer metabuf, Buffer buf)
 /*
  * _hash_getovflpage()
  *
- * Find an available overflow page and return it.  The returned buffer
+ * Find an available overflow page and return it.  The returned buffer
  * is pinned and write-locked, and has had _hash_pageinit() applied,
  * but it is caller's responsibility to fill the special space.
  *
@@ -253,7 +253,7 @@ _hash_getovflpage(Relation rel, Buffer metabuf)
         * We create the new bitmap page with all pages marked "in use".
         * Actually two pages in the new bitmap's range will exist
         * immediately: the bitmap page itself, and the following page which
-        * is the one we return to the caller.  Both of these are correctly
+        * is the one we return to the caller.  Both of these are correctly
         * marked "in use".  Subsequent pages do not exist yet, but it is
         * convenient to pre-mark them as "in use" too.
         */
@@ -284,7 +284,7 @@ _hash_getovflpage(Relation rel, Buffer metabuf)
    metap->hashm_spares[splitnum]++;
 
    /*
-    * Adjust hashm_firstfree to avoid redundant searches.  But don't risk
+    * Adjust hashm_firstfree to avoid redundant searches.  But don't risk
     * changing it if someone moved it while we were searching bitmap pages.
     */
    if (metap->hashm_firstfree == orig_firstfree)
@@ -313,7 +313,7 @@ found:
    blkno = bitno_to_blkno(metap, bit);
 
    /*
-    * Adjust hashm_firstfree to avoid redundant searches.  But don't risk
+    * Adjust hashm_firstfree to avoid redundant searches.  But don't risk
     * changing it if someone moved it while we were searching bitmap pages.
     */
    if (metap->hashm_firstfree == orig_firstfree)
@@ -494,7 +494,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf,
 /*
  * _hash_initbitmap()
  *
- *  Initialize a new bitmap page.  The metapage has a write-lock upon
+ *  Initialize a new bitmap page.  The metapage has a write-lock upon
  *  entering the function, and must be written by caller after return.
  *
  * 'blkno' is the block number of the new bitmap page.
index 1552b73f28bc024e4f2dd2ab37eeb96b95def3a2..9e4a2e0434047b93b909dc424202d8b4129cc589 100644 (file)
@@ -49,7 +49,7 @@ static void _hash_splitbucket(Relation rel, Buffer metabuf,
  * of the locking rules).  However, we can skip taking lmgr locks when the
  * index is local to the current backend (ie, either temp or new in the
  * current transaction).  No one else can see it, so there's no reason to
- * take locks. We still take buffer-level locks, but not lmgr locks.
+ * take locks.  We still take buffer-level locks, but not lmgr locks.
  */
 #define USELOCKING(rel)        (!RELATION_IS_LOCAL(rel))
 
@@ -136,7 +136,7 @@ _hash_getbuf(Relation rel, BlockNumber blkno, int access, int flags)
  *
  *     This must be used only to fetch pages that are known to be before
  *     the index's filesystem EOF, but are to be filled from scratch.
- *     _hash_pageinit() is applied automatically.  Otherwise it has
+ *     _hash_pageinit() is applied automatically.  Otherwise it has
  *     effects similar to _hash_getbuf() with access = HASH_WRITE.
  *
  *     When this routine returns, a write lock is set on the
@@ -344,7 +344,7 @@ _hash_metapinit(Relation rel, double num_tuples, ForkNumber forkNum)
    /*
     * Determine the target fill factor (in tuples per bucket) for this index.
     * The idea is to make the fill factor correspond to pages about as full
-    * as the user-settable fillfactor parameter says.  We can compute it
+    * as the user-settable fillfactor parameter says.  We can compute it
     * exactly since the index datatype (i.e. uint32 hash key) is fixed-width.
     */
    data_width = sizeof(uint32);
@@ -377,7 +377,7 @@ _hash_metapinit(Relation rel, double num_tuples, ForkNumber forkNum)
    /*
     * We initialize the metapage, the first N bucket pages, and the first
     * bitmap page in sequence, using _hash_getnewbuf to cause smgrextend()
-    * calls to occur.  This ensures that the smgr level has the right idea of
+    * calls to occur.  This ensures that the smgr level has the right idea of
     * the physical index length.
     */
    metabuf = _hash_getnewbuf(rel, HASH_METAPAGE, forkNum);
@@ -545,7 +545,7 @@ _hash_expandtable(Relation rel, Buffer metabuf)
 
    /*
     * Determine which bucket is to be split, and attempt to lock the old
-    * bucket.  If we can't get the lock, give up.
+    * bucket.  If we can't get the lock, give up.
     *
     * The lock protects us against other backends, but not against our own
     * backend.  Must check for active scans separately.
@@ -603,7 +603,7 @@ _hash_expandtable(Relation rel, Buffer metabuf)
    }
 
    /*
-    * Okay to proceed with split.  Update the metapage bucket mapping info.
+    * Okay to proceed with split.  Update the metapage bucket mapping info.
     *
     * Since we are scribbling on the metapage data right in the shared
     * buffer, any failure in this next little bit leaves us with a big
@@ -641,7 +641,7 @@ _hash_expandtable(Relation rel, Buffer metabuf)
     * Copy bucket mapping info now; this saves re-accessing the meta page
     * inside _hash_splitbucket's inner loop.  Note that once we drop the
     * split lock, other splits could begin, so these values might be out of
-    * date before _hash_splitbucket finishes.  That's okay, since all it
+    * date before _hash_splitbucket finishes.  That's okay, since all it
     * needs is to tell which of these two buckets to map hashkeys into.
     */
    maxbucket = metap->hashm_maxbucket;
@@ -876,7 +876,7 @@ _hash_splitbucket(Relation rel,
 
    /*
     * We're at the end of the old bucket chain, so we're done partitioning
-    * the tuples.  Before quitting, call _hash_squeezebucket to ensure the
+    * the tuples.  Before quitting, call _hash_squeezebucket to ensure the
     * tuples remaining in the old bucket (including the overflow pages) are
     * packed as tightly as possible.  The new bucket is already tight.
     */
index ad405646c53da4c2790d544203d7fe9f73816ec0..5aabe06606491e1bb143e3a3d9eda70fe937b45c 100644 (file)
@@ -210,7 +210,7 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
 
        /*
         * If the previous iteration of this loop locked what is still the
-        * correct target bucket, we are done.  Otherwise, drop any old lock
+        * correct target bucket, we are done.  Otherwise, drop any old lock
         * and lock what now appears to be the correct bucket.
         */
        if (retry)
@@ -269,7 +269,7 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
  * _hash_step() -- step to the next valid item in a scan in the bucket.
  *
  *     If no valid record exists in the requested direction, return
- *     false.  Else, return true and set the hashso_curpos for the
+ *     false.  Else, return true and set the hashso_curpos for the
  *     scan to the right thing.
  *
  *     'bufP' points to the current buffer, which is pinned and read-locked.
index e13670c4f40da6d3ed6929b1a98ef424311508b6..c0d6fec25678a8757cbef5b57de96a62fd9367fa 100644 (file)
@@ -8,7 +8,7 @@
  * thrashing.  We use tuplesort.c to sort the given index tuples into order.
  *
  * Note: if the number of rows in the table has been underestimated,
- * bucket splits may occur during the index build. In that case we'd
+ * bucket splits may occur during the index build.  In that case we'd
  * be inserting into two or more buckets for each possible masked-off
  * hash code value.  That's no big problem though, since we'll still have
  * plenty of locality of access.
@@ -52,7 +52,7 @@ _h_spoolinit(Relation heap, Relation index, uint32 num_buckets)
    hspool->index = index;
 
    /*
-    * Determine the bitmask for hash code values.  Since there are currently
+    * Determine the bitmask for hash code values.  Since there are currently
     * num_buckets buckets in the index, the appropriate mask can be computed
     * as follows.
     *
index 20bd279258576303f32aa57379cb68f81a8095fb..43652921ac1c3cc98bb2b4981faa451033c1ea32 100644 (file)
@@ -160,7 +160,7 @@ _hash_checkpage(Relation rel, Buffer buf, int flags)
    /*
     * ReadBuffer verifies that every newly-read page passes
     * PageHeaderIsValid, which means it either contains a reasonably sane
-    * page header or is all-zero.  We have to defend against the all-zero
+    * page header or is all-zero.  We have to defend against the all-zero
     * case, however.
     */
    if (PageIsNew(page))
@@ -280,7 +280,7 @@ _hash_form_tuple(Relation index, Datum *values, bool *isnull)
  *
  * Returns the offset of the first index entry having hashkey >= hash_value,
  * or the page's max offset plus one if hash_value is greater than all
- * existing hash keys in the page. This is the appropriate place to start
+ * existing hash keys in the page.  This is the appropriate place to start
  * a search, or to insert a new item.
  */
 OffsetNumber
index 336fbb06dac9cc481d4bf035eda21dd391953fd1..405117a5261d9165736079f84f2e90dddf9e3a32 100644 (file)
@@ -88,11 +88,11 @@ static XLogRecPtr log_heap_update(Relation reln, Buffer oldbuf,
                HeapTuple newtup, HeapTuple old_key_tup,
                bool all_visible_cleared, bool new_all_visible_cleared);
 static void HeapSatisfiesHOTandKeyUpdate(Relation relation,
-                         Bitmapset *hot_attrs,
-                         Bitmapset *key_attrs, Bitmapset *id_attrs,
-                         bool *satisfies_hot, bool *satisfies_key,
-                         bool *satisfies_id,
-                         HeapTuple oldtup, HeapTuple newtup);
+                            Bitmapset *hot_attrs,
+                            Bitmapset *key_attrs, Bitmapset *id_attrs,
+                            bool *satisfies_hot, bool *satisfies_key,
+                            bool *satisfies_id,
+                            HeapTuple oldtup, HeapTuple newtup);
 static void compute_new_xmax_infomask(TransactionId xmax, uint16 old_infomask,
                          uint16 old_infomask2, TransactionId add_to_xmax,
                          LockTupleMode mode, bool is_update,
@@ -113,7 +113,7 @@ static bool ConditionalMultiXactIdWait(MultiXactId multi, MultiXactStatus status
                           XLTW_Oper oper, int *remaining);
 static XLogRecPtr log_heap_new_cid(Relation relation, HeapTuple tup);
 static HeapTuple ExtractReplicaIdentity(Relation rel, HeapTuple tup, bool key_modified,
-                                       bool *copy);
+                      bool *copy);
 
 
 /*
@@ -213,7 +213,7 @@ initscan(HeapScanDesc scan, ScanKey key, bool is_rescan)
     * while the scan is in progress will be invisible to my snapshot anyway.
     * (That is not true when using a non-MVCC snapshot.  However, we couldn't
     * guarantee to return tuples added after scan start anyway, since they
-    * might go into pages we already scanned.  To guarantee consistent
+    * might go into pages we already scanned.  To guarantee consistent
     * results for a non-MVCC snapshot, the caller must hold some higher-level
     * lock that ensures the interesting tuple(s) won't change.)
     */
@@ -221,7 +221,7 @@ initscan(HeapScanDesc scan, ScanKey key, bool is_rescan)
 
    /*
     * If the table is large relative to NBuffers, use a bulk-read access
-    * strategy and enable synchronized scanning (see syncscan.c).  Although
+    * strategy and enable synchronized scanning (see syncscan.c).  Although
     * the thresholds for these features could be different, we make them the
     * same so that there are only two behaviors to tune rather than four.
     * (However, some callers need to be able to disable one or both of these
@@ -325,7 +325,7 @@ heapgetpage(HeapScanDesc scan, BlockNumber page)
    }
 
    /*
-    * Be sure to check for interrupts at least once per page.  Checks at
+    * Be sure to check for interrupts at least once per page.  Checks at
     * higher code levels won't be able to stop a seqscan that encounters many
     * pages' worth of consecutive dead tuples.
     */
@@ -349,7 +349,7 @@ heapgetpage(HeapScanDesc scan, BlockNumber page)
 
    /*
     * We must hold share lock on the buffer content while examining tuple
-    * visibility.  Afterwards, however, the tuples we have found to be
+    * visibility.  Afterwards, however, the tuples we have found to be
     * visible are guaranteed good as long as we hold the buffer pin.
     */
    LockBuffer(buffer, BUFFER_LOCK_SHARE);
@@ -1126,7 +1126,7 @@ relation_openrv(const RangeVar *relation, LOCKMODE lockmode)
  *
  *     Same as relation_openrv, but with an additional missing_ok argument
  *     allowing a NULL return rather than an error if the relation is not
- *     found.  (Note that some other causes, such as permissions problems,
+ *     found.  (Note that some other causes, such as permissions problems,
  *     will still result in an ereport.)
  * ----------------
  */
@@ -1740,7 +1740,7 @@ heap_hot_search_buffer(ItemPointer tid, Relation relation, Buffer buffer,
 
        /*
         * When first_call is true (and thus, skip is initially false) we'll
-        * return the first tuple we find.  But on later passes, heapTuple
+        * return the first tuple we find.  But on later passes, heapTuple
         * will initially be pointing to the tuple we returned last time.
         * Returning it again would be incorrect (and would loop forever), so
         * we skip it and return the next match we find.
@@ -1834,7 +1834,7 @@ heap_hot_search(ItemPointer tid, Relation relation, Snapshot snapshot,
  * possibly uncommitted version.
  *
  * *tid is both an input and an output parameter: it is updated to
- * show the latest version of the row. Note that it will not be changed
+ * show the latest version of the row.  Note that it will not be changed
  * if no version of the row passes the snapshot test.
  */
 void
@@ -1955,7 +1955,7 @@ heap_get_latest_tid(Relation relation,
  *
  * This is called after we have waited for the XMAX transaction to terminate.
  * If the transaction aborted, we guarantee the XMAX_INVALID hint bit will
- * be set on exit. If the transaction committed, we set the XMAX_COMMITTED
+ * be set on exit.  If the transaction committed, we set the XMAX_COMMITTED
  * hint bit if possible --- but beware that that may not yet be possible,
  * if the transaction committed asynchronously.
  *
@@ -2042,7 +2042,7 @@ FreeBulkInsertState(BulkInsertState bistate)
  * The return value is the OID assigned to the tuple (either here or by the
  * caller), or InvalidOid if no OID.  The header fields of *tup are updated
  * to match the stored tuple; in particular tup->t_self receives the actual
- * TID where the tuple was stored. But note that any toasting of fields
+ * TID where the tuple was stored.  But note that any toasting of fields
  * within the tuple data is NOT reflected into *tup.
  */
 Oid
@@ -2071,7 +2071,7 @@ heap_insert(Relation relation, HeapTuple tup, CommandId cid,
     * For a heap insert, we only need to check for table-level SSI locks. Our
     * new tuple can't possibly conflict with existing tuple locks, and heap
     * page locks are only consolidated versions of tuple locks; they do not
-    * lock "gaps" as index page locks do.  So we don't need to identify a
+    * lock "gaps" as index page locks do.  So we don't need to identify a
     * buffer before making the call.
     */
    CheckForSerializableConflictIn(relation, NULL, InvalidBuffer);
@@ -2123,8 +2123,8 @@ heap_insert(Relation relation, HeapTuple tup, CommandId cid,
        bool        need_tuple_data;
 
        /*
-        * For logical decoding, we need the tuple even if we're doing a
-        * full page write, so make sure to log it separately. (XXX We could
+        * For logical decoding, we need the tuple even if we're doing a full
+        * page write, so make sure to log it separately. (XXX We could
         * alternatively store a pointer into the FPW).
         *
         * Also, if this is a catalog, we need to transmit combocids to
@@ -2165,9 +2165,9 @@ heap_insert(Relation relation, HeapTuple tup, CommandId cid,
        rdata[2].next = NULL;
 
        /*
-        * Make a separate rdata entry for the tuple's buffer if we're
-        * doing logical decoding, so that an eventual FPW doesn't
-        * remove the tuple's data.
+        * Make a separate rdata entry for the tuple's buffer if we're doing
+        * logical decoding, so that an eventual FPW doesn't remove the
+        * tuple's data.
         */
        if (need_tuple_data)
        {
@@ -2248,7 +2248,7 @@ heap_prepare_insert(Relation relation, HeapTuple tup, TransactionId xid,
 
        /*
         * If the object id of this tuple has already been assigned, trust the
-        * caller.  There are a couple of ways this can happen.  At initial db
+        * caller.  There are a couple of ways this can happen.  At initial db
         * creation, the backend program sets oids for tuples. When we define
         * an index, we set the oid.  Finally, in the future, we may allow
         * users to set their own object ids in order to support a persistent
@@ -2342,7 +2342,7 @@ heap_multi_insert(Relation relation, HeapTuple *tuples, int ntuples,
     * For a heap insert, we only need to check for table-level SSI locks. Our
     * new tuple can't possibly conflict with existing tuple locks, and heap
     * page locks are only consolidated versions of tuple locks; they do not
-    * lock "gaps" as index page locks do.  So we don't need to identify a
+    * lock "gaps" as index page locks do.  So we don't need to identify a
     * buffer before making the call.
     */
    CheckForSerializableConflictIn(relation, NULL, InvalidBuffer);
@@ -2356,7 +2356,7 @@ heap_multi_insert(Relation relation, HeapTuple *tuples, int ntuples,
        int         nthispage;
 
        /*
-