Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Phase 3 of pgindent updates.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 21 Jun 2017 19:35:54 +0000 (15:35 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 21 Jun 2017 19:35:54 +0000 (15:35 -0400)
Don't move parenthesized lines to the left, even if that means they
flow past the right margin.

By default, BSD indent lines up statement continuation lines that are
within parentheses so that they start just to the right of the preceding
left parenthesis.  However, traditionally, if that resulted in the
continuation line extending to the right of the desired right margin,
then indent would push it left just far enough to not overrun the margin,
if it could do so without making the continuation line start to the left of
the current statement indent.  That makes for a weird mix of indentations
unless one has been completely rigid about never violating the 80-column
limit.

This behavior has been pretty universally panned by Postgres developers.
Hence, disable it with indent's new -lpl switch, so that parenthesized
lines are always lined up with the preceding left paren.

This patch is much less interesting than the first round of indent
changes, but also bulkier, so I thought it best to separate the effects.

Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org
Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us

568 files changed:
contrib/adminpack/adminpack.c
contrib/amcheck/verify_nbtree.c
contrib/auth_delay/auth_delay.c
contrib/auto_explain/auto_explain.c
contrib/bloom/bloom.h
contrib/bloom/blvacuum.c
contrib/btree_gin/btree_gin.c
contrib/btree_gist/btree_cash.c
contrib/btree_gist/btree_date.c
contrib/btree_gist/btree_enum.c
contrib/btree_gist/btree_float4.c
contrib/btree_gist/btree_float8.c
contrib/btree_gist/btree_inet.c
contrib/btree_gist/btree_int2.c
contrib/btree_gist/btree_int4.c
contrib/btree_gist/btree_int8.c
contrib/btree_gist/btree_interval.c
contrib/btree_gist/btree_macaddr.c
contrib/btree_gist/btree_macaddr8.c
contrib/btree_gist/btree_oid.c
contrib/btree_gist/btree_time.c
contrib/btree_gist/btree_ts.c
contrib/btree_gist/btree_utils_var.c
contrib/btree_gist/btree_uuid.c
contrib/cube/cube.c
contrib/dblink/dblink.c
contrib/earthdistance/earthdistance.c
contrib/file_fdw/file_fdw.c
contrib/hstore/hstore_io.c
contrib/hstore/hstore_op.c
contrib/intarray/_int_bool.c
contrib/intarray/_int_gist.c
contrib/intarray/_int_op.c
contrib/intarray/_int_selfuncs.c
contrib/isn/isn.c
contrib/ltree/_ltree_op.c
contrib/ltree/lquery_op.c
contrib/ltree/ltree.h
contrib/ltree/ltree_gist.c
contrib/ltree/ltree_io.c
contrib/oid2name/oid2name.c
contrib/pageinspect/brinfuncs.c
contrib/pageinspect/btreefuncs.c
contrib/pageinspect/ginfuncs.c
contrib/pageinspect/hashfuncs.c
contrib/pageinspect/heapfuncs.c
contrib/pageinspect/rawpage.c
contrib/passwordcheck/passwordcheck.c
contrib/pg_prewarm/pg_prewarm.c
contrib/pg_standby/pg_standby.c
contrib/pg_stat_statements/pg_stat_statements.c
contrib/pg_visibility/pg_visibility.c
contrib/pgcrypto/crypt-blowfish.c
contrib/pgcrypto/crypt-gensalt.c
contrib/pgcrypto/pgp-pgsql.c
contrib/pgcrypto/px-crypt.h
contrib/pgrowlocks/pgrowlocks.c
contrib/pgstattuple/pgstatapprox.c
contrib/pgstattuple/pgstatindex.c
contrib/postgres_fdw/connection.c
contrib/postgres_fdw/deparse.c
contrib/postgres_fdw/option.c
contrib/postgres_fdw/postgres_fdw.c
contrib/seg/seg.c
contrib/sepgsql/hooks.c
contrib/sepgsql/label.c
contrib/sepgsql/proc.c
contrib/sepgsql/uavc.c
contrib/spi/refint.c
contrib/sslinfo/sslinfo.c
contrib/tablefunc/tablefunc.c
contrib/tcn/tcn.c
contrib/test_decoding/test_decoding.c
contrib/unaccent/unaccent.c
contrib/xml2/xpath.c
contrib/xml2/xslt_proc.c
src/backend/access/brin/brin.c
src/backend/access/brin/brin_inclusion.c
src/backend/access/brin/brin_minmax.c
src/backend/access/brin/brin_pageops.c
src/backend/access/brin/brin_revmap.c
src/backend/access/brin/brin_tuple.c
src/backend/access/common/indextuple.c
src/backend/access/common/reloptions.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/ginscan.c
src/backend/access/gin/ginutil.c
src/backend/access/gist/gist.c
src/backend/access/gist/gistbuild.c
src/backend/access/gist/gistbuildbuffers.c
src/backend/access/gist/gistproc.c
src/backend/access/gist/gistsplit.c
src/backend/access/gist/gistutil.c
src/backend/access/hash/hashinsert.c
src/backend/access/hash/hashovfl.c
src/backend/access/hash/hashpage.c
src/backend/access/hash/hashutil.c
src/backend/access/heap/heapam.c
src/backend/access/heap/pruneheap.c
src/backend/access/heap/tuptoaster.c
src/backend/access/heap/visibilitymap.c
src/backend/access/index/indexam.c
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtsearch.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtutils.c
src/backend/access/rmgrdesc/brindesc.c
src/backend/access/rmgrdesc/gindesc.c
src/backend/access/rmgrdesc/hashdesc.c
src/backend/access/rmgrdesc/logicalmsgdesc.c
src/backend/access/rmgrdesc/nbtdesc.c
src/backend/access/rmgrdesc/spgdesc.c
src/backend/access/rmgrdesc/xactdesc.c
src/backend/access/rmgrdesc/xlogdesc.c
src/backend/access/spgist/spgdoinsert.c
src/backend/access/spgist/spginsert.c
src/backend/access/spgist/spgquadtreeproc.c
src/backend/access/spgist/spgscan.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/commit_ts.c
src/backend/access/transam/multixact.c
src/backend/access/transam/parallel.c
src/backend/access/transam/slru.c
src/backend/access/transam/timeline.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/xlogfuncs.c
src/backend/access/transam/xloginsert.c
src/backend/access/transam/xlogreader.c
src/backend/access/transam/xlogutils.c
src/backend/bootstrap/bootstrap.c
src/backend/catalog/aclchk.c
src/backend/catalog/dependency.c
src/backend/catalog/heap.c
src/backend/catalog/index.c
src/backend/catalog/namespace.c
src/backend/catalog/objectaddress.c
src/backend/catalog/partition.c
src/backend/catalog/pg_aggregate.c
src/backend/catalog/pg_collation.c
src/backend/catalog/pg_constraint.c
src/backend/catalog/pg_depend.c
src/backend/catalog/pg_enum.c
src/backend/catalog/pg_operator.c
src/backend/catalog/pg_proc.c
src/backend/catalog/pg_publication.c
src/backend/catalog/pg_shdepend.c
src/backend/catalog/pg_type.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/collationcmds.c
src/backend/commands/copy.c
src/backend/commands/createas.c
src/backend/commands/dbcommands.c
src/backend/commands/define.c
src/backend/commands/dropcmds.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/policy.c
src/backend/commands/prepare.c
src/backend/commands/proclang.c
src/backend/commands/publicationcmds.c
src/backend/commands/schemacmds.c
src/backend/commands/sequence.c
src/backend/commands/statscmds.c
src/backend/commands/subscriptioncmds.c
src/backend/commands/tablecmds.c
src/backend/commands/tablespace.c
src/backend/commands/trigger.c
src/backend/commands/tsearchcmds.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/execExpr.c
src/backend/executor/execExprInterp.c
src/backend/executor/execIndexing.c
src/backend/executor/execMain.c
src/backend/executor/execParallel.c
src/backend/executor/execProcnode.c
src/backend/executor/execReplication.c
src/backend/executor/execSRF.c
src/backend/executor/execTuples.c
src/backend/executor/functions.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeBitmapIndexscan.c
src/backend/executor/nodeFunctionscan.c
src/backend/executor/nodeGatherMerge.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/nodeMergejoin.c
src/backend/executor/nodeModifyTable.c
src/backend/executor/nodeNestloop.c
src/backend/executor/nodeSamplescan.c
src/backend/executor/nodeSeqscan.c
src/backend/executor/nodeTableFuncscan.c
src/backend/executor/nodeTidscan.c
src/backend/executor/nodeWindowAgg.c
src/backend/executor/spi.c
src/backend/executor/tqueue.c
src/backend/executor/tstoreReceiver.c
src/backend/lib/pairingheap.c
src/backend/libpq/auth-scram.c
src/backend/libpq/auth.c
src/backend/libpq/be-fsstubs.c
src/backend/libpq/be-secure-openssl.c
src/backend/libpq/hba.c
src/backend/libpq/pqcomm.c
src/backend/main/main.c
src/backend/nodes/nodeFuncs.c
src/backend/nodes/params.c
src/backend/nodes/tidbitmap.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/plan/createplan.c
src/backend/optimizer/plan/initsplan.c
src/backend/optimizer/plan/planagg.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/prepunion.c
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/orclauses.c
src/backend/optimizer/util/pathnode.c
src/backend/optimizer/util/plancat.c
src/backend/optimizer/util/relnode.c
src/backend/optimizer/util/var.c
src/backend/parser/analyze.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/port/dynloader/hpux.c
src/backend/port/sysv_sema.c
src/backend/port/sysv_shmem.c
src/backend/port/win32/crashdump.c
src/backend/port/win32/mingwcompat.c
src/backend/port/win32/signal.c
src/backend/port/win32/socket.c
src/backend/port/win32/timer.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/bgworker.c
src/backend/postmaster/checkpointer.c
src/backend/postmaster/pgarch.c
src/backend/postmaster/pgstat.c
src/backend/postmaster/postmaster.c
src/backend/postmaster/syslogger.c
src/backend/replication/basebackup.c
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
src/backend/replication/logical/decode.c
src/backend/replication/logical/launcher.c
src/backend/replication/logical/logical.c
src/backend/replication/logical/logicalfuncs.c
src/backend/replication/logical/origin.c
src/backend/replication/logical/relation.c
src/backend/replication/logical/reorderbuffer.c
src/backend/replication/logical/snapbuild.c
src/backend/replication/logical/tablesync.c
src/backend/replication/logical/worker.c
src/backend/replication/pgoutput/pgoutput.c
src/backend/replication/slot.c
src/backend/replication/syncrep.c
src/backend/replication/walreceiver.c
src/backend/replication/walsender.c
src/backend/rewrite/rewriteDefine.c
src/backend/rewrite/rewriteHandler.c
src/backend/rewrite/rewriteManip.c
src/backend/rewrite/rowsecurity.c
src/backend/statistics/dependencies.c
src/backend/statistics/extended_stats.c
src/backend/statistics/mvdistinct.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/freelist.c
src/backend/storage/buffer/localbuf.c
src/backend/storage/file/fd.c
src/backend/storage/ipc/dsm.c
src/backend/storage/ipc/dsm_impl.c
src/backend/storage/ipc/ipc.c
src/backend/storage/ipc/latch.c
src/backend/storage/ipc/procarray.c
src/backend/storage/ipc/shm_toc.c
src/backend/storage/ipc/shmem.c
src/backend/storage/ipc/sinval.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/lock.c
src/backend/storage/lmgr/predicate.c
src/backend/storage/lmgr/proc.c
src/backend/storage/lmgr/s_lock.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/dict.c
src/backend/tsearch/dict_ispell.c
src/backend/tsearch/dict_simple.c
src/backend/tsearch/dict_thesaurus.c
src/backend/tsearch/spell.c
src/backend/tsearch/to_tsany.c
src/backend/tsearch/ts_locale.c
src/backend/tsearch/ts_parse.c
src/backend/tsearch/ts_typanalyze.c
src/backend/tsearch/wparser.c
src/backend/tsearch/wparser_def.c
src/backend/utils/adt/acl.c
src/backend/utils/adt/amutils.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/date.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/dbsize.c
src/backend/utils/adt/domains.c
src/backend/utils/adt/encode.c
src/backend/utils/adt/enum.c
src/backend/utils/adt/float.c
src/backend/utils/adt/formatting.c
src/backend/utils/adt/genfile.c
src/backend/utils/adt/geo_ops.c
src/backend/utils/adt/inet_cidr_ntop.c
src/backend/utils/adt/json.c
src/backend/utils/adt/jsonb.c
src/backend/utils/adt/jsonb_util.c
src/backend/utils/adt/jsonfuncs.c
src/backend/utils/adt/levenshtein.c
src/backend/utils/adt/like.c
src/backend/utils/adt/like_match.c
src/backend/utils/adt/lockfuncs.c
src/backend/utils/adt/mac.c
src/backend/utils/adt/mac8.c
src/backend/utils/adt/misc.c
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/network_selfuncs.c
src/backend/utils/adt/numeric.c
src/backend/utils/adt/numutils.c
src/backend/utils/adt/pg_locale.c
src/backend/utils/adt/pg_upgrade_support.c
src/backend/utils/adt/pgstatfuncs.c
src/backend/utils/adt/rangetypes.c
src/backend/utils/adt/rangetypes_selfuncs.c
src/backend/utils/adt/rangetypes_spgist.c
src/backend/utils/adt/rangetypes_typanalyze.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/tsquery.c
src/backend/utils/adt/tsvector_op.c
src/backend/utils/adt/uuid.c
src/backend/utils/adt/varbit.c
src/backend/utils/adt/varchar.c
src/backend/utils/adt/varlena.c
src/backend/utils/adt/xml.c
src/backend/utils/cache/inval.c
src/backend/utils/cache/plancache.c
src/backend/utils/cache/relcache.c
src/backend/utils/cache/relmapper.c
src/backend/utils/cache/ts_cache.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/utf8_and_euc2004/utf8_and_euc2004.c
src/backend/utils/mb/conversion_procs/utf8_and_sjis2004/utf8_and_sjis2004.c
src/backend/utils/mb/mbutils.c
src/backend/utils/mb/wchar.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/help_config.c
src/backend/utils/misc/pg_controldata.c
src/backend/utils/misc/pg_rusage.c
src/backend/utils/mmgr/aset.c
src/backend/utils/mmgr/dsa.c
src/backend/utils/mmgr/freepage.c
src/backend/utils/mmgr/mcxt.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/bin/initdb/findtimezone.c
src/bin/initdb/initdb.c
src/bin/pg_basebackup/pg_basebackup.c
src/bin/pg_basebackup/pg_receivewal.c
src/bin/pg_basebackup/pg_recvlogical.c
src/bin/pg_basebackup/receivelog.c
src/bin/pg_basebackup/streamutil.c
src/bin/pg_basebackup/walmethods.c
src/bin/pg_ctl/pg_ctl.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_archiver.c
src/bin/pg_dump/pg_backup_custom.c
src/bin/pg_dump/pg_backup_db.c
src/bin/pg_dump/pg_backup_tar.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_dump/pg_restore.c
src/bin/pg_resetwal/pg_resetwal.c
src/bin/pg_rewind/filemap.c
src/bin/pg_rewind/parsexlog.c
src/bin/pg_rewind/pg_rewind.c
src/bin/pg_test_timing/pg_test_timing.c
src/bin/pg_upgrade/check.c
src/bin/pg_upgrade/controldata.c
src/bin/pg_upgrade/dump.c
src/bin/pg_upgrade/function.c
src/bin/pg_upgrade/info.c
src/bin/pg_upgrade/option.c
src/bin/pg_upgrade/pg_upgrade.c
src/bin/pg_upgrade/pg_upgrade.h
src/bin/pg_upgrade/server.c
src/bin/pg_upgrade/tablespace.c
src/bin/pg_upgrade/version.c
src/bin/pg_waldump/compat.c
src/bin/pg_waldump/pg_waldump.c
src/bin/pgbench/pgbench.c
src/bin/pgevent/pgevent.c
src/bin/psql/command.c
src/bin/psql/crosstabview.c
src/bin/psql/describe.c
src/bin/psql/help.c
src/bin/psql/large_obj.c
src/bin/psql/mainloop.c
src/bin/psql/tab-complete.c
src/bin/scripts/common.h
src/bin/scripts/dropdb.c
src/bin/scripts/reindexdb.c
src/bin/scripts/vacuumdb.c
src/common/file_utils.c
src/common/restricted_token.c
src/common/username.c
src/fe_utils/mbprint.c
src/fe_utils/print.c
src/include/access/amapi.h
src/include/access/clog.h
src/include/access/genam.h
src/include/access/gin_private.h
src/include/access/hash.h
src/include/access/heapam.h
src/include/access/xlog.h
src/include/catalog/pg_constraint_fn.h
src/include/commands/createas.h
src/include/commands/explain.h
src/include/executor/executor.h
src/include/executor/nodeIndexscan.h
src/include/foreign/fdwapi.h
src/include/lib/pairingheap.h
src/include/mb/pg_wchar.h
src/include/optimizer/cost.h
src/include/parser/parse_relation.h
src/include/pgtar.h
src/include/postgres.h
src/include/replication/logical.h
src/include/replication/reorderbuffer.h
src/include/rewrite/rewriteManip.h
src/include/storage/procarray.h
src/include/storage/sinval.h
src/include/tcop/utility.h
src/include/utils/acl.h
src/include/utils/elog.h
src/include/utils/jsonapi.h
src/interfaces/ecpg/ecpglib/data.c
src/interfaces/ecpg/ecpglib/error.c
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/ecpglib/extern.h
src/interfaces/ecpg/ecpglib/prepare.c
src/interfaces/ecpg/pgtypeslib/dt_common.c
src/interfaces/ecpg/preproc/descriptor.c
src/interfaces/ecpg/preproc/ecpg.c
src/interfaces/ecpg/preproc/type.c
src/interfaces/libpq/fe-auth-scram.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-print.c
src/interfaces/libpq/fe-protocol2.c
src/interfaces/libpq/fe-protocol3.c
src/interfaces/libpq/fe-secure-openssl.c
src/interfaces/libpq/fe-secure.c
src/interfaces/libpq/win32.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_handler.c
src/pl/plpython/plpy_cursorobject.c
src/pl/plpython/plpy_elog.c
src/pl/plpython/plpy_elog.h
src/pl/plpython/plpy_exec.c
src/pl/plpython/plpy_plpymodule.c
src/pl/plpython/plpy_procedure.c
src/pl/plpython/plpy_spi.c
src/pl/plpython/plpy_typeio.c
src/pl/tcl/pltcl.c
src/port/dirmod.c
src/port/getaddrinfo.c
src/port/getopt_long.c
src/port/gettimeofday.c
src/port/inet_net_ntop.c
src/port/open.c
src/port/path.c
src/port/win32security.c
src/test/isolation/isolationtester.c
src/test/modules/test_shm_mq/setup.c
src/test/modules/test_shm_mq/test.c
src/test/modules/test_shm_mq/worker.c
src/test/modules/worker_spi/worker_spi.c
src/test/regress/pg_regress.c
src/test/regress/regress.c
src/timezone/pgtz.c
src/tools/findoidjoins/findoidjoins.c
src/tools/pgindent/pgindent

index 10338f951ff2a4e650bb317db5a1ce2cc995e4d0..f3f8e7f1e41ec1033a9c939064c1dc640fc45352 100644 (file)
@@ -74,7 +74,7 @@ convert_and_check_filename(text *arg, bool logAllowed)
        if (path_contains_parent_reference(filename))
            ereport(ERROR,
                    (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-           (errmsg("reference to parent directory (\"..\") not allowed"))));
+                    (errmsg("reference to parent directory (\"..\") not allowed"))));
 
        /*
         * Allow absolute paths if within DataDir or Log_directory, even
@@ -105,7 +105,7 @@ requireSuperuser(void)
    if (!superuser())
        ereport(ERROR,
                (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-             (errmsg("only superuser may access generic file functions"))));
+                (errmsg("only superuser may access generic file functions"))));
 }
 
 
index c134e5f3b0a9dd6e7f2b12c69140e4aa22e9cc3e..9ae83dc8399baffdca35e3695596ac1a773b6992 100644 (file)
@@ -240,8 +240,8 @@ btree_index_checkable(Relation rel)
        ereport(ERROR,
                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                 errmsg("cannot access temporary tables of other sessions"),
-            errdetail("Index \"%s\" is associated with temporary relation.",
-                      RelationGetRelationName(rel))));
+                errdetail("Index \"%s\" is associated with temporary relation.",
+                          RelationGetRelationName(rel))));
 
    if (!IndexIsValid(rel->rd_index))
        ereport(ERROR,
@@ -411,12 +411,12 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level)
                ereport(ERROR,
                        (errcode(ERRCODE_INDEX_CORRUPTED),
                         errmsg("block %u fell off the end of index \"%s\"",
-                            current, RelationGetRelationName(state->rel))));
+                               current, RelationGetRelationName(state->rel))));
            else
                ereport(DEBUG1,
                        (errcode(ERRCODE_NO_DATA),
                         errmsg("block %u of index \"%s\" ignored",
-                            current, RelationGetRelationName(state->rel))));
+                               current, RelationGetRelationName(state->rel))));
            goto nextpage;
        }
        else if (nextleveldown.leftmost == InvalidBlockNumber)
@@ -433,14 +433,14 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level)
                if (!P_LEFTMOST(opaque))
                    ereport(ERROR,
                            (errcode(ERRCODE_INDEX_CORRUPTED),
-                          errmsg("block %u is not leftmost in index \"%s\"",
-                            current, RelationGetRelationName(state->rel))));
+                            errmsg("block %u is not leftmost in index \"%s\"",
+                                   current, RelationGetRelationName(state->rel))));
 
                if (level.istruerootlevel && !P_ISROOT(opaque))
                    ereport(ERROR,
                            (errcode(ERRCODE_INDEX_CORRUPTED),
-                         errmsg("block %u is not true root in index \"%s\"",
-                            current, RelationGetRelationName(state->rel))));
+                            errmsg("block %u is not true root in index \"%s\"",
+                                   current, RelationGetRelationName(state->rel))));
            }
 
            /*
@@ -488,7 +488,7 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level)
                     errmsg("left link/right link pair in index \"%s\" not in agreement",
                            RelationGetRelationName(state->rel)),
                     errdetail_internal("Block=%u left block=%u left link from block=%u.",
-                                 current, leftcurrent, opaque->btpo_prev)));
+                                       current, leftcurrent, opaque->btpo_prev)));
 
        /* Check level, which must be valid for non-ignorable page */
        if (level.level != opaque->btpo.level)
@@ -497,7 +497,7 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level)
                     errmsg("leftmost down link for level points to block in index \"%s\" whose level is not one level down",
                            RelationGetRelationName(state->rel)),
                     errdetail_internal("Block pointed to=%u expected level=%u level in pointed to block=%u.",
-                                current, level.level, opaque->btpo.level)));
+                                       current, level.level, opaque->btpo.level)));
 
        /* Verify invariants for page -- all important checks occur here */
        bt_target_page_check(state);
@@ -508,8 +508,8 @@ nextpage:
        if (current == leftcurrent || current == opaque->btpo_prev)
            ereport(ERROR,
                    (errcode(ERRCODE_INDEX_CORRUPTED),
-             errmsg("circular link chain found in block %u of index \"%s\"",
-                    current, RelationGetRelationName(state->rel))));
+                    errmsg("circular link chain found in block %u of index \"%s\"",
+                           current, RelationGetRelationName(state->rel))));
 
        leftcurrent = current;
        current = opaque->btpo_next;
@@ -665,17 +665,17 @@ bt_target_page_check(BtreeCheckState *state)
                    (errcode(ERRCODE_INDEX_CORRUPTED),
                     errmsg("item order invariant violated for index \"%s\"",
                            RelationGetRelationName(state->rel)),
-              errdetail_internal("Lower index tid=%s (points to %s tid=%s) "
-                                 "higher index tid=%s (points to %s tid=%s) "
-                                 "page lsn=%X/%X.",
-                                 itid,
-                                 P_ISLEAF(topaque) ? "heap" : "index",
-                                 htid,
-                                 nitid,
-                                 P_ISLEAF(topaque) ? "heap" : "index",
-                                 nhtid,
-                                 (uint32) (state->targetlsn >> 32),
-                                 (uint32) state->targetlsn)));
+                    errdetail_internal("Lower index tid=%s (points to %s tid=%s) "
+                                       "higher index tid=%s (points to %s tid=%s) "
+                                       "page lsn=%X/%X.",
+                                       itid,
+                                       P_ISLEAF(topaque) ? "heap" : "index",
+                                       htid,
+                                       nitid,
+                                       P_ISLEAF(topaque) ? "heap" : "index",
+                                       nhtid,
+                                       (uint32) (state->targetlsn >> 32),
+                                       (uint32) state->targetlsn)));
        }
 
        /*
@@ -824,7 +824,7 @@ bt_right_page_check_scankey(BtreeCheckState *state)
        ereport(DEBUG1,
                (errcode(ERRCODE_NO_DATA),
                 errmsg("level %u leftmost page of index \"%s\" was found deleted or half dead",
-                   opaque->btpo.level, RelationGetRelationName(state->rel)),
+                       opaque->btpo.level, RelationGetRelationName(state->rel)),
                 errdetail_internal("Deleted page found when building scankey from right sibling.")));
 
        /* Be slightly more pro-active in freeing this memory, just in case */
@@ -1053,7 +1053,7 @@ bt_downlink_check(BtreeCheckState *state, BlockNumber childblock,
                     errmsg("down-link lower bound invariant violated for index \"%s\"",
                            RelationGetRelationName(state->rel)),
                     errdetail_internal("Parent block=%u child index tid=(%u,%u) parent page lsn=%X/%X.",
-                                     state->targetblock, childblock, offset,
+                                       state->targetblock, childblock, offset,
                                        (uint32) (state->targetlsn >> 32),
                                        (uint32) state->targetlsn)));
    }
@@ -1228,21 +1228,21 @@ palloc_btree_page(BtreeCheckState *state, BlockNumber blocknum)
    if (P_ISLEAF(opaque) && !P_ISDELETED(opaque) && opaque->btpo.level != 0)
        ereport(ERROR,
                (errcode(ERRCODE_INDEX_CORRUPTED),
-           errmsg("invalid leaf page level %u for block %u in index \"%s\"",
-       opaque->btpo.level, blocknum, RelationGetRelationName(state->rel))));
+                errmsg("invalid leaf page level %u for block %u in index \"%s\"",
+                       opaque->btpo.level, blocknum, RelationGetRelationName(state->rel))));
 
    if (blocknum != BTREE_METAPAGE && !P_ISLEAF(opaque) &&
        !P_ISDELETED(opaque) && opaque->btpo.level == 0)
        ereport(ERROR,
                (errcode(ERRCODE_INDEX_CORRUPTED),
-        errmsg("invalid internal page level 0 for block %u in index \"%s\"",
-               opaque->btpo.level, RelationGetRelationName(state->rel))));
+                errmsg("invalid internal page level 0 for block %u in index \"%s\"",
+                       opaque->btpo.level, RelationGetRelationName(state->rel))));
 
    if (!P_ISLEAF(opaque) && P_HAS_GARBAGE(opaque))
        ereport(ERROR,
                (errcode(ERRCODE_INDEX_CORRUPTED),
-          errmsg("internal page block %u in index \"%s\" has garbage items",
-                 blocknum, RelationGetRelationName(state->rel))));
+                errmsg("internal page block %u in index \"%s\" has garbage items",
+                       blocknum, RelationGetRelationName(state->rel))));
 
    return page;
 }
index e0604fb80892bf0a7049a66b6dbce9efd4e67cbd..cd12a86b990b286801dcf4d14e155bc520b09417 100644 (file)
@@ -57,7 +57,7 @@ _PG_init(void)
 {
    /* Define custom GUC variables */
    DefineCustomIntVariable("auth_delay.milliseconds",
-            "Milliseconds to delay before reporting authentication failure",
+                           "Milliseconds to delay before reporting authentication failure",
                            NULL,
                            &auth_delay_milliseconds,
                            0,
index 9213ffb6a44a29371c3d88a1f016d12951ab6475..edcb91542a3e722b58a890157a5b58dcac38ccf3 100644 (file)
@@ -74,8 +74,8 @@ _PG_init(void)
 {
    /* Define custom GUC variables. */
    DefineCustomIntVariable("auto_explain.log_min_duration",
-        "Sets the minimum execution time above which plans will be logged.",
-                        "Zero prints all plans. -1 turns this feature off.",
+                           "Sets the minimum execution time above which plans will be logged.",
+                           "Zero prints all plans. -1 turns this feature off.",
                            &auto_explain_log_min_duration,
                            -1,
                            -1, INT_MAX / 1000,
@@ -120,7 +120,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 6d1b3f12a3b1cc9fdc8f4645390527139a318db8..f3df1af7811a2869373192af392e56280fda53aa 100644 (file)
@@ -111,8 +111,8 @@ typedef struct BloomOptions
  */
 typedef BlockNumber FreeBlockNumberArray[
                                         MAXALIGN_DOWN(
-       BLCKSZ - SizeOfPageHeaderData - MAXALIGN(sizeof(BloomPageOpaqueData))
-      - MAXALIGN(sizeof(uint16) * 2 + sizeof(uint32) + sizeof(BloomOptions))
+                                                      BLCKSZ - SizeOfPageHeaderData - MAXALIGN(sizeof(BloomPageOpaqueData))
+                                                      - MAXALIGN(sizeof(uint16) * 2 + sizeof(uint32) + sizeof(BloomOptions))
                                                       ) / sizeof(BlockNumber)
 ];
 
index 04abd0f6b6cd98e9470ddc62b917eed02a711829..2e060871b6a1b479d12e18a5e1b47f9f5b916de9 100644 (file)
@@ -84,7 +84,7 @@ blbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
         */
        itup = itupPtr = BloomPageGetTuple(&state, page, FirstOffsetNumber);
        itupEnd = BloomPageGetTuple(&state, page,
-                             OffsetNumberNext(BloomPageGetMaxOffset(page)));
+                                   OffsetNumberNext(BloomPageGetMaxOffset(page)));
        while (itup < itupEnd)
        {
            /* Do we have to delete this tuple? */
@@ -108,7 +108,7 @@ blbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
 
        /* Assert that we counted correctly */
        Assert(itupPtr == BloomPageGetTuple(&state, page,
-                            OffsetNumberNext(BloomPageGetMaxOffset(page))));
+                                           OffsetNumberNext(BloomPageGetMaxOffset(page))));
 
        /*
         * Add page to new notFullPage list if we will not mark page as
index 6f0c752b2e89e0a7d8229b17c5246f0207846840..2473f79ca190716c90f2922189c48d531a90dc64 100644 (file)
@@ -115,8 +115,8 @@ gin_btree_compare_prefix(FunctionCallInfo fcinfo)
                                                 data->typecmp,
                                                 fcinfo->flinfo,
                                                 PG_GET_COLLATION(),
-                                  (data->strategy == BTLessStrategyNumber ||
-                                data->strategy == BTLessEqualStrategyNumber)
+                                                (data->strategy == BTLessStrategyNumber ||
+                                                 data->strategy == BTLessEqualStrategyNumber)
                                                 ? data->datum : a,
                                                 b));
 
index 1116ca084f3ab544985dd33ee1e7dbd8c2b225aa..81131af4dc88caaa01e0442d0d178f20f00d34df 100644 (file)
@@ -203,8 +203,8 @@ Datum
 gbt_cash_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index 28c7c2ac8611bc216f06f42e6bfcd5df7ac3aa55..992ce57507312ab2aa794810cba579cfc26216fd 100644 (file)
@@ -87,8 +87,8 @@ gdb_date_dist(const void *a, const void *b, FmgrInfo *flinfo)
 {
    /* we assume the difference can't overflow */
    Datum       diff = DirectFunctionCall2(date_mi,
-                                    DateADTGetDatum(*((const DateADT *) a)),
-                                   DateADTGetDatum(*((const DateADT *) b)));
+                                          DateADTGetDatum(*((const DateADT *) a)),
+                                          DateADTGetDatum(*((const DateADT *) b)));
 
    return (float8) Abs(DatumGetInt32(diff));
 }
@@ -210,14 +210,14 @@ gbt_date_penalty(PG_FUNCTION_ARGS)
    diff = DatumGetInt32(DirectFunctionCall2(
                                             date_mi,
                                             DateADTGetDatum(newentry->upper),
-                                        DateADTGetDatum(origentry->upper)));
+                                            DateADTGetDatum(origentry->upper)));
 
    res = Max(diff, 0);
 
    diff = DatumGetInt32(DirectFunctionCall2(
                                             date_mi,
-                                          DateADTGetDatum(origentry->lower),
-                                         DateADTGetDatum(newentry->lower)));
+                                            DateADTGetDatum(origentry->lower),
+                                            DateADTGetDatum(newentry->lower)));
 
    res += Max(diff, 0);
 
@@ -227,8 +227,8 @@ gbt_date_penalty(PG_FUNCTION_ARGS)
    {
        diff = DatumGetInt32(DirectFunctionCall2(
                                                 date_mi,
-                                          DateADTGetDatum(origentry->upper),
-                                        DateADTGetDatum(origentry->lower)));
+                                                DateADTGetDatum(origentry->upper),
+                                                DateADTGetDatum(origentry->lower)));
        *result += FLT_MIN;
        *result += (float) (res / ((double) (res + diff)));
        *result *= (FLT_MAX / (((GISTENTRY *) PG_GETARG_POINTER(0))->rel->rd_att->natts + 1));
@@ -242,8 +242,8 @@ Datum
 gbt_date_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index 8bbadfe860c1a976bf8d5ed73d400bc3125857ae..0ec7d8bf884b958abe2d7d7864a7a618cc2ea2ad 100644 (file)
@@ -169,8 +169,8 @@ Datum
 gbt_enum_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index fe6993c226cda3fa78556ca48bd588252d000321..6b20f44a48f9b1c5f08a2ae3d75cc4db87411a8d 100644 (file)
@@ -196,8 +196,8 @@ Datum
 gbt_float4_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index 13153d811fdfeccb986bc18bd0a777a22c074bc9..ee114cbe4273af983569cf4930395b81ab9b70d7 100644 (file)
@@ -203,8 +203,8 @@ Datum
 gbt_float8_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index e1561b37b73d7f9f007ef8cbdd4dc5f5396aa92d..b5b593f77fa381dec4cdd3224d0fdf5a7f24197d 100644 (file)
@@ -133,7 +133,7 @@ gbt_inet_consistent(PG_FUNCTION_ARGS)
    key.upper = (GBT_NUMKEY *) &kkk->upper;
 
    PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query,
-                      &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
+                                     &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
 
@@ -165,8 +165,8 @@ Datum
 gbt_inet_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index 0a4498a693a028167e98444dd785073b61215a77..f343b8615f67d629faf7d3205547ddb464282010 100644 (file)
@@ -202,8 +202,8 @@ Datum
 gbt_int2_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index b29cbc81a3e66ee7475054f8342965d4d3627529..35bb4424379caa806235d110708c03f529095f27 100644 (file)
@@ -203,8 +203,8 @@ Datum
 gbt_int4_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index df1f5338c845023e2d50f30c0d63179a0cb46cf2..91f2d032d10917a011c12ad94d8e4f9b2b5e434a 100644 (file)
@@ -203,8 +203,8 @@ Datum
 gbt_int8_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index e4dd9e4238a0e7ab04a4604875e49433c161d7c7..61ab478c420f22354464c8c8d88d5dda7c1c5bba 100644 (file)
@@ -285,8 +285,8 @@ Datum
 gbt_intv_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index d530b4e878efb26a447a7bc176480ce139b3f963..0486c357308368f0d85e4210b030dad80d249413 100644 (file)
@@ -182,8 +182,8 @@ Datum
 gbt_macad_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index 96afbcdead436d045b128dc836c124b7682ec7d7..30a1391d733ac68e6979cfb84b03117f07403602 100644 (file)
@@ -182,8 +182,8 @@ Datum
 gbt_macad8_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index e0d6f2adf18236ea5ae100abfd15858ec2c0217f..00e701903fd4a327f3f177e3f46c1a8f72c49c8a 100644 (file)
@@ -203,8 +203,8 @@ Datum
 gbt_oid_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index 5eec8323f553ad133d9435bb75ca756db5c50a0e..bb239d4986df1278254b04a8cdbfd861f5d43214 100644 (file)
@@ -289,15 +289,15 @@ gbt_time_penalty(PG_FUNCTION_ARGS)
 
    intr = DatumGetIntervalP(DirectFunctionCall2(
                                                 time_mi_time,
-                                       TimeADTGetDatumFast(newentry->upper),
-                                    TimeADTGetDatumFast(origentry->upper)));
+                                                TimeADTGetDatumFast(newentry->upper),
+                                                TimeADTGetDatumFast(origentry->upper)));
    res = INTERVAL_TO_SEC(intr);
    res = Max(res, 0);
 
    intr = DatumGetIntervalP(DirectFunctionCall2(
                                                 time_mi_time,
-                                      TimeADTGetDatumFast(origentry->lower),
-                                     TimeADTGetDatumFast(newentry->lower)));
+                                                TimeADTGetDatumFast(origentry->lower),
+                                                TimeADTGetDatumFast(newentry->lower)));
    res2 = INTERVAL_TO_SEC(intr);
    res2 = Max(res2, 0);
 
@@ -309,8 +309,8 @@ gbt_time_penalty(PG_FUNCTION_ARGS)
    {
        intr = DatumGetIntervalP(DirectFunctionCall2(
                                                     time_mi_time,
-                                      TimeADTGetDatumFast(origentry->upper),
-                                    TimeADTGetDatumFast(origentry->lower)));
+                                                    TimeADTGetDatumFast(origentry->upper),
+                                                    TimeADTGetDatumFast(origentry->lower)));
        *result += FLT_MIN;
        *result += (float) (res / (res + INTERVAL_TO_SEC(intr)));
        *result *= (FLT_MAX / (((GISTENTRY *) PG_GETARG_POINTER(0))->rel->rd_att->natts + 1));
@@ -324,8 +324,8 @@ Datum
 gbt_time_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index 592466c948add31978d0abf47b3347645fee0909..1582cff1025b8603c018f7617ba771c65af3cef6 100644 (file)
@@ -387,8 +387,8 @@ Datum
 gbt_ts_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index b2623a95830c43c3d83e977f95ba9ce2de8914a7..2c636ad2fa86f45b06709a28def2ac8a9a49ccd0 100644 (file)
@@ -402,8 +402,8 @@ gbt_var_penalty(float *res, const GISTENTRY *o, const GISTENTRY *n,
        *res = 0.0;
    else if (!(((*tinfo->f_cmp) (nk.lower, ok.lower, collation, flinfo) >= 0 ||
                gbt_bytea_pf_match(ok.lower, nk.lower, tinfo)) &&
-            ((*tinfo->f_cmp) (nk.upper, ok.upper, collation, flinfo) <= 0 ||
-             gbt_bytea_pf_match(ok.upper, nk.upper, tinfo))))
+              ((*tinfo->f_cmp) (nk.upper, ok.upper, collation, flinfo) <= 0 ||
+               gbt_bytea_pf_match(ok.upper, nk.upper, tinfo))))
    {
        Datum       d = PointerGetDatum(0);
        double      dres;
index 58a87decc6466ed4ac6e071f4452d871ce612687..ecf357d662ce9ba7bb996636bab0fec54a4d0750 100644 (file)
@@ -150,7 +150,7 @@ gbt_uuid_consistent(PG_FUNCTION_ARGS)
 
    PG_RETURN_BOOL(
                   gbt_num_consistent(&key, (void *) query, &strategy,
-                                   GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
+                                     GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
        );
 }
 
@@ -220,8 +220,8 @@ Datum
 gbt_uuid_picksplit(PG_FUNCTION_ARGS)
 {
    PG_RETURN_POINTER(gbt_num_picksplit(
-                                   (GistEntryVector *) PG_GETARG_POINTER(0),
-                                     (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                       (GistEntryVector *) PG_GETARG_POINTER(0),
+                                       (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                        &tinfo, fcinfo->flinfo
                                        ));
 }
index 2bb2ed029d8f1f6c6b81a11d9ebfa12af84d7e8a..149558c76348951f29d08279474e19da2ca3a28b 100644 (file)
@@ -483,7 +483,7 @@ g_cube_picksplit(PG_FUNCTION_ARGS)
            union_d = cube_union_v0(datum_alpha, datum_beta);
            rt_cube_size(union_d, &size_union);
            inter_d = DatumGetNDBOX(DirectFunctionCall2(cube_inter,
-                         entryvec->vector[i].key, entryvec->vector[j].key));
+                                                       entryvec->vector[i].key, entryvec->vector[j].key));
            rt_cube_size(inter_d, &size_inter);
            size_waste = size_union - size_inter;
 
@@ -1354,15 +1354,15 @@ g_cube_distance(PG_FUNCTION_ARGS)
        {
            case CubeKNNDistanceTaxicab:
                retval = DatumGetFloat8(DirectFunctionCall2(distance_taxicab,
-                            PointerGetDatum(cube), PointerGetDatum(query)));
+                                                           PointerGetDatum(cube), PointerGetDatum(query)));
                break;
            case CubeKNNDistanceEuclid:
                retval = DatumGetFloat8(DirectFunctionCall2(cube_distance,
-                            PointerGetDatum(cube), PointerGetDatum(query)));
+                                                           PointerGetDatum(cube), PointerGetDatum(query)));
                break;
            case CubeKNNDistanceChebyshev:
                retval = DatumGetFloat8(DirectFunctionCall2(distance_chebyshev,
-                            PointerGetDatum(cube), PointerGetDatum(query)));
+                                                           PointerGetDatum(cube), PointerGetDatum(query)));
                break;
            default:
                elog(ERROR, "unrecognized cube strategy number: %d", strategy);
index 5ec3e794a2051a0651c38ffc6def080fd568ec6a..81136b131c992a54039f8b61cf2dc2938e99e228 100644 (file)
@@ -179,7 +179,7 @@ dblink_conn_not_avail(const char *conname)
 
 static void
 dblink_get_conn(char *conname_or_str,
-      PGconn *volatile *conn_p, char **conname_p, volatile bool *freeconn_p)
+               PGconn *volatile *conn_p, char **conname_p, volatile bool *freeconn_p)
 {
    remoteConn *rconn = getConnectionByName(conname_or_str);
    PGconn     *conn;
@@ -207,9 +207,9 @@ dblink_get_conn(char *conname_or_str,
 
            PQfinish(conn);
            ereport(ERROR,
-              (errcode(ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION),
-               errmsg("could not establish connection"),
-               errdetail_internal("%s", msg)));
+                   (errcode(ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION),
+                    errmsg("could not establish connection"),
+                    errdetail_internal("%s", msg)));
        }
        dblink_security_check(conn, rconn);
        if (PQclientEncoding(conn) != GetDatabaseEncoding())
@@ -869,8 +869,8 @@ materializeResult(FunctionCallInfo fcinfo, PGconn *conn, PGresult *res)
                    /* failed to determine actual type of RECORD */
                    ereport(ERROR,
                            (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                       errmsg("function returning record called in context "
-                              "that cannot accept type record")));
+                            errmsg("function returning record called in context "
+                                   "that cannot accept type record")));
                    break;
                default:
                    /* result type isn't composite */
@@ -909,7 +909,7 @@ materializeResult(FunctionCallInfo fcinfo, PGconn *conn, PGresult *res)
                nestlevel = applyRemoteGucs(conn);
 
            oldcontext = MemoryContextSwitchTo(
-                                   rsinfo->econtext->ecxt_per_query_memory);
+                                              rsinfo->econtext->ecxt_per_query_memory);
            tupstore = tuplestore_begin_heap(true, false, work_mem);
            rsinfo->setResult = tupstore;
            rsinfo->setDesc = tupdesc;
@@ -1036,7 +1036,7 @@ materializeQueryResult(FunctionCallInfo fcinfo,
            attinmeta = TupleDescGetAttInMetadata(tupdesc);
 
            oldcontext = MemoryContextSwitchTo(
-                                   rsinfo->econtext->ecxt_per_query_memory);
+                                              rsinfo->econtext->ecxt_per_query_memory);
            tupstore = tuplestore_begin_heap(true, false, work_mem);
            rsinfo->setResult = tupstore;
            rsinfo->setDesc = tupdesc;
@@ -1460,8 +1460,8 @@ dblink_exec(PG_FUNCTION_ARGS)
        {
            PQclear(res);
            ereport(ERROR,
-                 (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
-                  errmsg("statement returning results not allowed")));
+                   (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
+                    errmsg("statement returning results not allowed")));
        }
    }
    PG_CATCH();
@@ -1980,7 +1980,7 @@ dblink_fdw_validator(PG_FUNCTION_ARGS)
            ereport(ERROR,
                    (errcode(ERRCODE_FDW_OUT_OF_MEMORY),
                     errmsg("out of memory"),
-            errdetail("could not get libpq's default connection options")));
+                    errdetail("could not get libpq's default connection options")));
    }
 
    /* Validate each supplied option. */
@@ -2179,7 +2179,7 @@ get_sql_insert(Relation rel, int *pkattnums, int pknumatts, char **src_pkattvals
            appendStringInfoChar(&buf, ',');
 
        appendStringInfoString(&buf,
-                     quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname)));
+                              quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname)));
        needComma = true;
    }
 
@@ -2242,7 +2242,7 @@ get_sql_delete(Relation rel, int *pkattnums, int pknumatts, char **tgt_pkattvals
            appendStringInfoString(&buf, " AND ");
 
        appendStringInfoString(&buf,
-              quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname)));
+                              quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname)));
 
        if (tgt_pkattvals[i] != NULL)
            appendStringInfo(&buf, " = %s",
@@ -2296,7 +2296,7 @@ get_sql_update(Relation rel, int *pkattnums, int pknumatts, char **src_pkattvals
            appendStringInfoString(&buf, ", ");
 
        appendStringInfo(&buf, "%s = ",
-                     quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname)));
+                        quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname)));
 
        key = get_attnum_pk_pos(pkattnums, pknumatts, i);
 
@@ -2325,7 +2325,7 @@ get_sql_update(Relation rel, int *pkattnums, int pknumatts, char **src_pkattvals
            appendStringInfoString(&buf, " AND ");
 
        appendStringInfoString(&buf,
-              quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname)));
+                              quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname)));
 
        val = tgt_pkattvals[i];
 
@@ -2351,7 +2351,7 @@ quote_ident_cstr(char *rawstr)
 
    rawstr_text = cstring_to_text(rawstr);
    result_text = DatumGetTextPP(DirectFunctionCall1(quote_ident,
-                                             PointerGetDatum(rawstr_text)));
+                                                    PointerGetDatum(rawstr_text)));
    result = text_to_cstring(result_text);
 
    return result;
@@ -2416,7 +2416,7 @@ get_tuple_of_interest(Relation rel, int *pkattnums, int pknumatts, char **src_pk
            appendStringInfoString(&buf, "NULL");
        else
            appendStringInfoString(&buf,
-                     quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname)));
+                                  quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname)));
    }
 
    appendStringInfo(&buf, " FROM %s WHERE ", relname);
@@ -2429,7 +2429,7 @@ get_tuple_of_interest(Relation rel, int *pkattnums, int pknumatts, char **src_pk
            appendStringInfoString(&buf, " AND ");
 
        appendStringInfoString(&buf,
-              quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname)));
+                              quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname)));
 
        if (src_pkattvals[i] != NULL)
            appendStringInfo(&buf, " = %s",
@@ -2619,10 +2619,10 @@ dblink_security_check(PGconn *conn, remoteConn *rconn)
                pfree(rconn);
 
            ereport(ERROR,
-                 (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
-                  errmsg("password is required"),
-                  errdetail("Non-superuser cannot connect if the server does not request a password."),
-                  errhint("Target server's authentication method must be changed.")));
+                   (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
+                    errmsg("password is required"),
+                    errdetail("Non-superuser cannot connect if the server does not request a password."),
+                    errhint("Target server's authentication method must be changed.")));
        }
    }
 }
@@ -2661,9 +2661,9 @@ dblink_connstr_check(const char *connstr)
 
        if (!connstr_gives_password)
            ereport(ERROR,
-                 (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
-                  errmsg("password is required"),
-                  errdetail("Non-superusers must provide a password in the connection string.")));
+                   (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
+                    errmsg("password is required"),
+                    errdetail("Non-superusers must provide a password in the connection string.")));
    }
 }
 
@@ -2724,8 +2724,8 @@ dblink_res_error(PGconn *conn, const char *conname, PGresult *res,
             message_detail ? errdetail_internal("%s", message_detail) : 0,
             message_hint ? errhint("%s", message_hint) : 0,
             message_context ? errcontext("%s", message_context) : 0,
-         errcontext("Error occurred on dblink connection named \"%s\": %s.",
-                    dblink_context_conname, dblink_context_msg)));
+            errcontext("Error occurred on dblink connection named \"%s\": %s.",
+                       dblink_context_conname, dblink_context_msg)));
 }
 
 /*
@@ -2760,7 +2760,7 @@ get_connect_string(const char *servername)
            ereport(ERROR,
                    (errcode(ERRCODE_FDW_OUT_OF_MEMORY),
                     errmsg("out of memory"),
-            errdetail("could not get libpq's default connection options")));
+                    errdetail("could not get libpq's default connection options")));
    }
 
    /* first gather the server connstr options */
index 6ad6d87ce8c25ef9fcb17923d4a0f3fcc86b5db1..e6ebfd11ad43da8bfc84132d5abc436eed7a300b 100644 (file)
@@ -69,7 +69,7 @@ geo_distance_internal(Point *pt1, Point *pt2)
        longdiff = TWO_PI - longdiff;
 
    sino = sqrt(sin(fabs(lat1 - lat2) / 2.) * sin(fabs(lat1 - lat2) / 2.) +
-           cos(lat1) * cos(lat2) * sin(longdiff / 2.) * sin(longdiff / 2.));
+               cos(lat1) * cos(lat2) * sin(longdiff / 2.) * sin(longdiff / 2.));
    if (sino > 1.)
        sino = 1.;
 
index 692c7ce5f1dbbaffbb69893ac732e57a452de5f8..2396bd442fa4f61048fa35e129cfd8856a62a7f7 100644 (file)
@@ -250,7 +250,7 @@ file_fdw_validator(PG_FUNCTION_ARGS)
                     buf.len > 0
                     ? errhint("Valid options in this context are: %s",
                               buf.data)
-                 : errhint("There are no valid options in this context.")));
+                    : errhint("There are no valid options in this context.")));
        }
 
        /*
index 1dd7c7c9ce47e8925c1db0bccbbcba470f7e4e79..e03005c9232b1244738c21e17f05224472820919 100644 (file)
@@ -443,8 +443,8 @@ hstore_recv(PG_FUNCTION_ARGS)
    if (pcount < 0 || pcount > MaxAllocSize / sizeof(Pairs))
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-             errmsg("number of pairs (%d) exceeds the maximum allowed (%d)",
-                    pcount, (int) (MaxAllocSize / sizeof(Pairs)))));
+                errmsg("number of pairs (%d) exceeds the maximum allowed (%d)",
+                       pcount, (int) (MaxAllocSize / sizeof(Pairs)))));
    pairs = palloc(pcount * sizeof(Pairs));
 
    for (i = 0; i < pcount; ++i)
@@ -562,8 +562,8 @@ hstore_from_arrays(PG_FUNCTION_ARGS)
    if (key_count > MaxAllocSize / sizeof(Pairs))
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-             errmsg("number of pairs (%d) exceeds the maximum allowed (%d)",
-                    key_count, (int) (MaxAllocSize / sizeof(Pairs)))));
+                errmsg("number of pairs (%d) exceeds the maximum allowed (%d)",
+                       key_count, (int) (MaxAllocSize / sizeof(Pairs)))));
 
    /* value_array might be NULL */
 
@@ -693,8 +693,8 @@ hstore_from_array(PG_FUNCTION_ARGS)
    if (count > MaxAllocSize / sizeof(Pairs))
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-             errmsg("number of pairs (%d) exceeds the maximum allowed (%d)",
-                    count, (int) (MaxAllocSize / sizeof(Pairs)))));
+                errmsg("number of pairs (%d) exceeds the maximum allowed (%d)",
+                       count, (int) (MaxAllocSize / sizeof(Pairs)))));
 
    pairs = palloc(count * sizeof(Pairs));
 
@@ -1435,8 +1435,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));
            }
            else
            {
index 1e2dc881c14e1b6f02b955d6327c07a35a4ddbad..612be23a74fa163e82da31ac6220fe1b2a5722f7 100644 (file)
@@ -101,8 +101,8 @@ hstoreArrayToPairs(ArrayType *a, int *npairs)
    if (key_count > MaxAllocSize / sizeof(Pairs))
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-             errmsg("number of pairs (%d) exceeds the maximum allowed (%d)",
-                    key_count, (int) (MaxAllocSize / sizeof(Pairs)))));
+                errmsg("number of pairs (%d) exceeds the maximum allowed (%d)",
+                       key_count, (int) (MaxAllocSize / sizeof(Pairs)))));
 
    key_pairs = palloc(sizeof(Pairs) * key_count);
 
@@ -181,7 +181,7 @@ hstore_exists_any(PG_FUNCTION_ARGS)
    for (i = 0; i < nkeys; i++)
    {
        int         idx = hstoreFindKey(hs, &lowbound,
-                                     key_pairs[i].key, key_pairs[i].keylen);
+                                       key_pairs[i].key, key_pairs[i].keylen);
 
        if (idx >= 0)
        {
@@ -215,7 +215,7 @@ hstore_exists_all(PG_FUNCTION_ARGS)
    for (i = 0; i < nkeys; i++)
    {
        int         idx = hstoreFindKey(hs, &lowbound,
-                                     key_pairs[i].key, key_pairs[i].keylen);
+                                       key_pairs[i].key, key_pairs[i].keylen);
 
        if (idx < 0)
        {
@@ -546,8 +546,8 @@ hstore_concat(PG_FUNCTION_ARGS)
        if (difference >= 0)
        {
            HS_COPYITEM(ed, bufd, pd,
-                     HSTORE_KEY(es2, ps2, s2idx), HSTORE_KEYLEN(es2, s2idx),
-                   HSTORE_VALLEN(es2, s2idx), HSTORE_VALISNULL(es2, s2idx));
+                       HSTORE_KEY(es2, ps2, s2idx), HSTORE_KEYLEN(es2, s2idx),
+                       HSTORE_VALLEN(es2, s2idx), HSTORE_VALISNULL(es2, s2idx));
            ++s2idx;
            if (difference == 0)
                ++s1idx;
@@ -555,8 +555,8 @@ hstore_concat(PG_FUNCTION_ARGS)
        else
        {
            HS_COPYITEM(ed, bufd, pd,
-                     HSTORE_KEY(es1, ps1, s1idx), HSTORE_KEYLEN(es1, s1idx),
-                   HSTORE_VALLEN(es1, s1idx), HSTORE_VALISNULL(es1, s1idx));
+                       HSTORE_KEY(es1, ps1, s1idx), HSTORE_KEYLEN(es1, s1idx),
+                       HSTORE_VALLEN(es1, s1idx), HSTORE_VALISNULL(es1, s1idx));
            ++s1idx;
        }
    }
@@ -614,8 +614,8 @@ hstore_slice_to_array(PG_FUNCTION_ARGS)
        else
        {
            out_datums[i] = PointerGetDatum(
-                     cstring_to_text_with_len(HSTORE_VAL(entries, ptr, idx),
-                                              HSTORE_VALLEN(entries, idx)));
+                                           cstring_to_text_with_len(HSTORE_VAL(entries, ptr, idx),
+                                                                    HSTORE_VALLEN(entries, idx)));
            out_nulls[i] = false;
        }
    }
@@ -667,7 +667,7 @@ hstore_slice_to_hstore(PG_FUNCTION_ARGS)
    for (i = 0; i < nkeys; ++i)
    {
        int         idx = hstoreFindKey(hs, &lastidx,
-                                     key_pairs[i].key, key_pairs[i].keylen);
+                                       key_pairs[i].key, key_pairs[i].keylen);
 
        if (idx >= 0)
        {
@@ -760,7 +760,7 @@ hstore_avals(PG_FUNCTION_ARGS)
        else
        {
            text       *item = cstring_to_text_with_len(HSTORE_VAL(entries, base, i),
-                                                 HSTORE_VALLEN(entries, i));
+                                                       HSTORE_VALLEN(entries, i));
 
            d[i] = PointerGetDatum(item);
            nulls[i] = false;
@@ -811,7 +811,7 @@ hstore_to_array_internal(HStore *hs, int ndims)
        else
        {
            text       *item = cstring_to_text_with_len(HSTORE_VAL(entries, base, i),
-                                                 HSTORE_VALLEN(entries, i));
+                                                       HSTORE_VALLEN(entries, i));
 
            out_datums[i * 2 + 1] = PointerGetDatum(item);
            out_nulls[i * 2 + 1] = false;
index 5d9e676660fd903354ad7deeb9fcef2603e7580e..a18c64560679f380f1175479bc196a4cd58d7223 100644 (file)
@@ -506,8 +506,8 @@ bqarr_in(PG_FUNCTION_ARGS)
    if (state.num > QUERYTYPEMAXITEMS)
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-       errmsg("number of query items (%d) exceeds the maximum allowed (%d)",
-              state.num, (int) QUERYTYPEMAXITEMS)));
+                errmsg("number of query items (%d) exceeds the maximum allowed (%d)",
+                       state.num, (int) QUERYTYPEMAXITEMS)));
    commonlen = COMPUTESIZE(state.num);
 
    query = (QUERYTYPE *) palloc(commonlen);
index 888c277e60f183d73e07216ddb04f50578dd677d..79521b29b042efef51e972d28e430aacc043738f 100644 (file)
@@ -83,7 +83,7 @@ g_int_consistent(PG_FUNCTION_ARGS)
        case RTOldContainedByStrategyNumber:
            if (GIST_LEAF(entry))
                retval = inner_int_contains(query,
-                                 (ArrayType *) DatumGetPointer(entry->key));
+                                           (ArrayType *) DatumGetPointer(entry->key));
            else
                retval = inner_int_overlap((ArrayType *) DatumGetPointer(entry->key),
                                           query);
index c30d3c8269f9ec735151f1ca44316726893a5456..3637c4564ce7cacf2bd9297939c037dc72f2e7e4 100644 (file)
@@ -49,8 +49,8 @@ _int_different(PG_FUNCTION_ARGS)
    PG_RETURN_BOOL(!DatumGetBool(
                                 DirectFunctionCall2(
                                                     _int_same,
-                                      PointerGetDatum(PG_GETARG_POINTER(0)),
-                                       PointerGetDatum(PG_GETARG_POINTER(1))
+                                                    PointerGetDatum(PG_GETARG_POINTER(0)),
+                                                    PointerGetDatum(PG_GETARG_POINTER(1))
                                                     )
                                 ));
 }
index 3d92025ba561ab3a088218dc9af2e2743e9073c1..acb87d10f057aaf8203b845aa913f13c34cc7626 100644 (file)
@@ -57,7 +57,7 @@ _int_overlap_sel(PG_FUNCTION_ARGS)
 {
    PG_RETURN_DATUM(DirectFunctionCall4(arraycontsel,
                                        PG_GETARG_DATUM(0),
-                                     ObjectIdGetDatum(OID_ARRAY_OVERLAP_OP),
+                                       ObjectIdGetDatum(OID_ARRAY_OVERLAP_OP),
                                        PG_GETARG_DATUM(2),
                                        PG_GETARG_DATUM(3)));
 }
@@ -67,7 +67,7 @@ _int_contains_sel(PG_FUNCTION_ARGS)
 {
    PG_RETURN_DATUM(DirectFunctionCall4(arraycontsel,
                                        PG_GETARG_DATUM(0),
-                                    ObjectIdGetDatum(OID_ARRAY_CONTAINS_OP),
+                                       ObjectIdGetDatum(OID_ARRAY_CONTAINS_OP),
                                        PG_GETARG_DATUM(2),
                                        PG_GETARG_DATUM(3)));
 }
@@ -77,7 +77,7 @@ _int_contained_sel(PG_FUNCTION_ARGS)
 {
    PG_RETURN_DATUM(DirectFunctionCall4(arraycontsel,
                                        PG_GETARG_DATUM(0),
-                                   ObjectIdGetDatum(OID_ARRAY_CONTAINED_OP),
+                                       ObjectIdGetDatum(OID_ARRAY_CONTAINED_OP),
                                        PG_GETARG_DATUM(2),
                                        PG_GETARG_DATUM(3)));
 }
@@ -87,7 +87,7 @@ _int_overlap_joinsel(PG_FUNCTION_ARGS)
 {
    PG_RETURN_DATUM(DirectFunctionCall5(arraycontjoinsel,
                                        PG_GETARG_DATUM(0),
-                                     ObjectIdGetDatum(OID_ARRAY_OVERLAP_OP),
+                                       ObjectIdGetDatum(OID_ARRAY_OVERLAP_OP),
                                        PG_GETARG_DATUM(2),
                                        PG_GETARG_DATUM(3),
                                        PG_GETARG_DATUM(4)));
@@ -98,7 +98,7 @@ _int_contains_joinsel(PG_FUNCTION_ARGS)
 {
    PG_RETURN_DATUM(DirectFunctionCall5(arraycontjoinsel,
                                        PG_GETARG_DATUM(0),
-                                    ObjectIdGetDatum(OID_ARRAY_CONTAINS_OP),
+                                       ObjectIdGetDatum(OID_ARRAY_CONTAINS_OP),
                                        PG_GETARG_DATUM(2),
                                        PG_GETARG_DATUM(3),
                                        PG_GETARG_DATUM(4)));
@@ -109,7 +109,7 @@ _int_contained_joinsel(PG_FUNCTION_ARGS)
 {
    PG_RETURN_DATUM(DirectFunctionCall5(arraycontjoinsel,
                                        PG_GETARG_DATUM(0),
-                                   ObjectIdGetDatum(OID_ARRAY_CONTAINED_OP),
+                                       ObjectIdGetDatum(OID_ARRAY_CONTAINED_OP),
                                        PG_GETARG_DATUM(2),
                                        PG_GETARG_DATUM(3),
                                        PG_GETARG_DATUM(4)));
index d018ec6af5b4c9b8920bedce67a30b2e05c3e40c..4d845b716f0c31fb67be8284c94af2e60c97f2f6 100644 (file)
@@ -887,8 +887,8 @@ eanbadcheck:
        {
            ereport(ERROR,
                    (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
-           errmsg("invalid check digit for %s number: \"%s\", should be %c",
-                  isn_names[accept], str, (rcheck == 10) ? ('X') : (rcheck + '0'))));
+                    errmsg("invalid check digit for %s number: \"%s\", should be %c",
+                           isn_names[accept], str, (rcheck == 10) ? ('X') : (rcheck + '0'))));
        }
    }
    return false;
index c0c56a40d4fb7b0e9046f11e6ac7459cc511f57d..fdf6ebb43b10e2903750a0c4ac00119dfdcb4885 100644 (file)
@@ -53,7 +53,7 @@ array_iterator(ArrayType *la, PGCALL2 callback, void *param, ltree **found)
    while (num > 0)
    {
        if (DatumGetBool(DirectFunctionCall2(callback,
-                            PointerGetDatum(item), PointerGetDatum(param))))
+                                            PointerGetDatum(item), PointerGetDatum(param))))
        {
 
            if (found)
index 3bf5818e3a166dbc18d96e3feb97646f223ada08..229ddd0ae3d49af511a05ba3205e71c1abb12ca5 100644 (file)
@@ -356,7 +356,7 @@ lt_q_regex(PG_FUNCTION_ARGS)
    while (num > 0)
    {
        if (DatumGetBool(DirectFunctionCall2(ltq_regex,
-                            PointerGetDatum(tree), PointerGetDatum(query))))
+                                            PointerGetDatum(tree), PointerGetDatum(query))))
        {
 
            res = true;
index 7a7a154097600ada669bb7b7e0996decb2a10b83..fd86323ffe0b6625216149685e66b9edbeab665e 100644 (file)
@@ -161,7 +161,7 @@ bool ltree_execute(ITEM *curitem, void *checkval,
 int            ltree_compare(const ltree *a, const ltree *b);
 bool       inner_isparent(const ltree *c, const ltree *p);
 bool compare_subnode(ltree_level *t, char *q, int len,
-           int (*cmpptr) (const char *, const char *, size_t), bool anyend);
+               int (*cmpptr) (const char *, const char *, size_t), bool anyend);
 ltree     *lca_inner(ltree **a, int len);
 int            ltree_strncasecmp(const char *a, const char *b, size_t s);
 
index 37ee3377ff3f765f55f549a085867b0e13288559..70e78a672aca3aff549285ca5c04bb29375a29b8 100644 (file)
@@ -672,8 +672,8 @@ ltree_consistent(PG_FUNCTION_ARGS)
            query = PG_GETARG_LQUERY(1);
            if (GIST_LEAF(entry))
                res = DatumGetBool(DirectFunctionCall2(ltq_regex,
-                                             PointerGetDatum(LTG_NODE(key)),
-                                           PointerGetDatum((lquery *) query)
+                                                      PointerGetDatum(LTG_NODE(key)),
+                                                      PointerGetDatum((lquery *) query)
                                                       ));
            else
                res = (gist_qe(key, (lquery *) query) && gist_between(key, (lquery *) query));
@@ -683,8 +683,8 @@ ltree_consistent(PG_FUNCTION_ARGS)
            query = PG_GETARG_LQUERY(1);
            if (GIST_LEAF(entry))
                res = DatumGetBool(DirectFunctionCall2(ltxtq_exec,
-                                             PointerGetDatum(LTG_NODE(key)),
-                                           PointerGetDatum((lquery *) query)
+                                                      PointerGetDatum(LTG_NODE(key)),
+                                                      PointerGetDatum((lquery *) query)
                                                       ));
            else
                res = gist_qtxt(key, (ltxtquery *) query);
@@ -694,8 +694,8 @@ ltree_consistent(PG_FUNCTION_ARGS)
            query = DatumGetPointer(PG_DETOAST_DATUM(PG_GETARG_DATUM(1)));
            if (GIST_LEAF(entry))
                res = DatumGetBool(DirectFunctionCall2(lt_q_regex,
-                                             PointerGetDatum(LTG_NODE(key)),
-                                        PointerGetDatum((ArrayType *) query)
+                                                      PointerGetDatum(LTG_NODE(key)),
+                                                      PointerGetDatum((ArrayType *) query)
                                                       ));
            else
                res = arrq_cons(key, (ArrayType *) query);
index a1d4a0d38faf493072194fb5fdf98fd2565c1e58..34ca597a484cbc495e78679ffdeaea1cabcf817e 100644 (file)
@@ -61,8 +61,8 @@ ltree_in(PG_FUNCTION_ARGS)
    if (num + 1 > MaxAllocSize / sizeof(nodeitem))
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-            errmsg("number of levels (%d) exceeds the maximum allowed (%d)",
-                   num + 1, (int) (MaxAllocSize / sizeof(nodeitem)))));
+                errmsg("number of levels (%d) exceeds the maximum allowed (%d)",
+                       num + 1, (int) (MaxAllocSize / sizeof(nodeitem)))));
    list = lptr = (nodeitem *) palloc(sizeof(nodeitem) * (num + 1));
    ptr = buf;
    while (*ptr)
@@ -230,8 +230,8 @@ lquery_in(PG_FUNCTION_ARGS)
    if (num > MaxAllocSize / ITEMSIZE)
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-            errmsg("number of levels (%d) exceeds the maximum allowed (%d)",
-                   num, (int) (MaxAllocSize / ITEMSIZE))));
+                errmsg("number of levels (%d) exceeds the maximum allowed (%d)",
+                       num, (int) (MaxAllocSize / ITEMSIZE))));
    curqlevel = tmpql = (lquery_level *) palloc0(ITEMSIZE * num);
    ptr = buf;
    while (*ptr)
index ffb8234c0d7c7be450a211ddd64254e311119566..8af99decad11e7068172f199fb8d1a070fd40316 100644 (file)
@@ -211,7 +211,7 @@ add_one_elt(char *eltname, eary *eary)
    {
        eary      ->alloc *= 2;
        eary      ->array = (char **) pg_realloc(eary->array,
-                                              eary->alloc * sizeof(char *));
+                                                eary->alloc * sizeof(char *));
    }
 
    eary      ->array[eary->num] = pg_strdup(eltname);
@@ -436,7 +436,7 @@ sql_exec_dumpalltables(PGconn *conn, struct options *opts)
    snprintf(todo, sizeof(todo),
             "SELECT pg_catalog.pg_relation_filenode(c.oid) as \"Filenode\", relname as \"Table Name\" %s "
             "FROM pg_catalog.pg_class c "
-          "    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace "
+            "  LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace "
             "  LEFT JOIN pg_catalog.pg_database d ON d.datname = pg_catalog.current_database(),"
             "  pg_catalog.pg_tablespace t "
             "WHERE relkind IN (" CppAsString2(RELKIND_RELATION) ","
@@ -507,7 +507,7 @@ sql_exec_searchtables(PGconn *conn, struct options *opts)
    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_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 (" CppAsString2(RELKIND_RELATION) ","
index d52807dcdd6ab8964f16656dcc493d7009e88950..13da7616e75964893cc4894c2da600e0294bc8e5 100644 (file)
@@ -226,7 +226,7 @@ brin_page_items(PG_FUNCTION_ARGS)
            if (ItemIdIsUsed(itemId))
            {
                dtup = brin_deform_tuple(bdesc,
-                                    (BrinTuple *) PageGetItem(page, itemId),
+                                        (BrinTuple *) PageGetItem(page, itemId),
                                         NULL);
                attno = 1;
                unusedItem = false;
index 02440eca477212779b0d0faf050a370d72515904..4f834676ea297f1ba4e2c5a8fde10382e4edc0e9 100644 (file)
@@ -346,7 +346,7 @@ bt_page_items(PG_FUNCTION_ARGS)
        if (RELATION_IS_OTHER_TEMP(rel))
            ereport(ERROR,
                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-               errmsg("cannot access temporary tables of other sessions")));
+                    errmsg("cannot access temporary tables of other sessions")));
 
        if (blkno == 0)
            elog(ERROR, "block 0 is a meta page");
@@ -442,7 +442,7 @@ bt_page_items_bytea(PG_FUNCTION_ARGS)
        if (raw_page_size < SizeOfPageHeaderData)
            ereport(ERROR,
                    (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                 errmsg("input page too small (%d bytes)", raw_page_size)));
+                    errmsg("input page too small (%d bytes)", raw_page_size)));
 
        fctx = SRF_FIRSTCALL_INIT();
        mctx = MemoryContextSwitchTo(fctx->multi_call_memory_ctx);
index 993fc2d9ae15c978f4822189229cf2e1f93b7ff7..f774495b6fbe7927e213561a92ea326e575f6d89 100644 (file)
@@ -196,7 +196,7 @@ gin_leafpage_items(PG_FUNCTION_ARGS)
        if (opaq->flags != (GIN_DATA | GIN_LEAF | GIN_COMPRESSED))
            ereport(ERROR,
                    (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                errmsg("input page is not a compressed GIN data leaf page"),
+                    errmsg("input page is not a compressed GIN data leaf page"),
                     errdetail("Flags %04X, expected %04X",
                               opaq->flags,
                               (GIN_DATA | GIN_LEAF | GIN_COMPRESSED))));
index 228a147c9e81efc38ce3c8ba9da79a65a26fb799..dbe3b6ab0463230fbecd9ec5a7274007a07b369b 100644 (file)
@@ -99,7 +99,7 @@ verify_hash_page(bytea *raw_page, int flags)
            case LH_BUCKET_PAGE | LH_OVERFLOW_PAGE:
                ereport(ERROR,
                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                     errmsg("page is not a hash bucket or overflow page")));
+                        errmsg("page is not a hash bucket or overflow page")));
            case LH_OVERFLOW_PAGE:
                ereport(ERROR,
                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
index 1448effb5031e2963e97878c41c20903ca612921..72d1776a4a50f80cbe99a65594cf70b599250842 100644 (file)
@@ -84,7 +84,7 @@ text_to_bits(char *str, int len)
        else
            ereport(ERROR,
                    (errcode(ERRCODE_DATA_CORRUPTED),
-              errmsg("illegal character '%c' in t_bits string", str[off])));
+                    errmsg("illegal character '%c' in t_bits string", str[off])));
 
        if (off % 8 == 7)
            bits[off / 8] = byte;
@@ -132,7 +132,7 @@ heap_page_items(PG_FUNCTION_ARGS)
        if (raw_page_size < SizeOfPageHeaderData)
            ereport(ERROR,
                    (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                 errmsg("input page too small (%d bytes)", raw_page_size)));
+                    errmsg("input page too small (%d bytes)", raw_page_size)));
 
        fctx = SRF_FIRSTCALL_INIT();
        mctx = MemoryContextSwitchTo(fctx->multi_call_memory_ctx);
@@ -236,7 +236,7 @@ heap_page_items(PG_FUNCTION_ARGS)
                    bits_len =
                        ((tuphdr->t_infomask2 & HEAP_NATTS_MASK) / 8 + 1) * 8;
                    values[11] = CStringGetTextDatum(
-                                    bits_to_text(tuphdr->t_bits, bits_len));
+                                                    bits_to_text(tuphdr->t_bits, bits_len));
                }
                else
                    nulls[11] = true;
@@ -384,7 +384,7 @@ tuple_data_split_internal(Oid relid, char *tupdata,
    if (tupdata_len != off)
        ereport(ERROR,
                (errcode(ERRCODE_DATA_CORRUPTED),
-           errmsg("end of tuple reached without looking at all its data")));
+                errmsg("end of tuple reached without looking at all its data")));
 
    return makeArrayResult(raw_attrs, CurrentMemoryContext);
 }
index f273dfa7cb2f5e877c64f22c4e1559a440cb087e..e9d3131bda4cad99fa1e6a95fed8d74a37268f4d 100644 (file)
@@ -311,7 +311,7 @@ page_checksum(PG_FUNCTION_ARGS)
    if (raw_page_size != BLCKSZ)
        ereport(ERROR,
                (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-         errmsg("incorrect size of input page (%d bytes)", raw_page_size)));
+                errmsg("incorrect size of input page (%d bytes)", raw_page_size)));
 
    page = (PageHeader) VARDATA(raw_page);
 
index 59f73a1e6ba0b28148d22c7ec63f1bb0e8877d95..b80fd458ad731f881ee67c1f1ae811208ab1e2c5 100644 (file)
@@ -112,7 +112,7 @@ check_password(const char *username,
        if (!pwd_has_letter || !pwd_has_nonletter)
            ereport(ERROR,
                    (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-              errmsg("password must contain both letters and nonletters")));
+                    errmsg("password must contain both letters and nonletters")));
 
 #ifdef USE_CRACKLIB
        /* call cracklib to check password */
index 78d71ab0785d2d7c32a2a9bff26011d118de8c20..fec62b1a5422369c5073f9551aba5f507e358712 100644 (file)
@@ -138,8 +138,8 @@ pg_prewarm(PG_FUNCTION_ARGS)
        if (last_block < 0 || last_block >= nblocks)
            ereport(ERROR,
                    (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-           errmsg("ending block number must be between 0 and " INT64_FORMAT,
-                  nblocks - 1)));
+                    errmsg("ending block number must be between 0 and " INT64_FORMAT,
+                           nblocks - 1)));
    }
 
    /* Now we're ready to do the real work. */
index db402310895524400001a114fdecfb916ddc5a10..d7fa2a80c69188086d6a07e7344dbdfc533c4f18 100644 (file)
@@ -256,7 +256,7 @@ CustomizableCleanupPriorWALFiles(void)
                 * in case this worries you.
                 */
                if (IsXLogFileName(xlde->d_name) &&
-                 strcmp(xlde->d_name + 8, exclusiveCleanupFileName + 8) < 0)
+                   strcmp(xlde->d_name + 8, exclusiveCleanupFileName + 8) < 0)
                {
 #ifdef WIN32
                    snprintf(WALFilePath, sizeof(WALFilePath), "%s\\%s", archiveLocation, xlde->d_name);
@@ -523,7 +523,7 @@ usage(void)
           "Main intended use as restore_command in recovery.conf:\n"
           "  restore_command = 'pg_standby [OPTION]... ARCHIVELOCATION %%f %%p %%r'\n"
           "e.g.\n"
-   "  restore_command = 'pg_standby /mnt/server/archiverdir %%f %%p %%r'\n");
+          "  restore_command = 'pg_standby /mnt/server/archiverdir %%f %%p %%r'\n");
    printf("\nReport bugs to <pgsql-bugs@postgresql.org>.\n");
 }
 
index d1ed74b45e37f63ae499e7a66cbff67c955c90a2..b9d4a93690570f683fb108d141c056be9d466380 100644 (file)
@@ -358,7 +358,7 @@ _PG_init(void)
     * Define (or redefine) custom GUC variables.
     */
    DefineCustomIntVariable("pg_stat_statements.max",
-     "Sets the maximum number of statements tracked by pg_stat_statements.",
+                           "Sets the maximum number of statements tracked by pg_stat_statements.",
                            NULL,
                            &pgss_max,
                            5000,
@@ -371,7 +371,7 @@ _PG_init(void)
                            NULL);
 
    DefineCustomEnumVariable("pg_stat_statements.track",
-              "Selects which statements are tracked by pg_stat_statements.",
+                            "Selects which statements are tracked by pg_stat_statements.",
                             NULL,
                             &pgss_track,
                             PGSS_TRACK_TOP,
@@ -383,7 +383,7 @@ _PG_init(void)
                             NULL);
 
    DefineCustomBoolVariable("pg_stat_statements.track_utility",
-      "Selects whether utility commands are tracked by pg_stat_statements.",
+                            "Selects whether utility commands are tracked by pg_stat_statements.",
                             NULL,
                             &pgss_track_utility,
                             true,
@@ -394,7 +394,7 @@ _PG_init(void)
                             NULL);
 
    DefineCustomBoolVariable("pg_stat_statements.save",
-              "Save pg_stat_statements statistics across server shutdowns.",
+                            "Save pg_stat_statements statistics across server shutdowns.",
                             NULL,
                             &pgss_save,
                             true,
@@ -1940,8 +1940,8 @@ qtext_load_file(Size *buffer_size)
        if (errno != ENOENT)
            ereport(LOG,
                    (errcode_for_file_access(),
-                  errmsg("could not read pg_stat_statement file \"%s\": %m",
-                         PGSS_TEXT_FILE)));
+                    errmsg("could not read pg_stat_statement file \"%s\": %m",
+                           PGSS_TEXT_FILE)));
        return NULL;
    }
 
@@ -1985,8 +1985,8 @@ qtext_load_file(Size *buffer_size)
        if (errno)
            ereport(LOG,
                    (errcode_for_file_access(),
-                  errmsg("could not read pg_stat_statement file \"%s\": %m",
-                         PGSS_TEXT_FILE)));
+                    errmsg("could not read pg_stat_statement file \"%s\": %m",
+                           PGSS_TEXT_FILE)));
        free(buf);
        CloseTransientFile(fd);
        return NULL;
@@ -2145,8 +2145,8 @@ gc_qtexts(void)
        {
            ereport(LOG,
                    (errcode_for_file_access(),
-                 errmsg("could not write pg_stat_statement file \"%s\": %m",
-                        PGSS_TEXT_FILE)));
+                    errmsg("could not write pg_stat_statement file \"%s\": %m",
+                           PGSS_TEXT_FILE)));
            hash_seq_term(&hash_seq);
            goto gc_fail;
        }
@@ -2163,8 +2163,8 @@ gc_qtexts(void)
    if (ftruncate(fileno(qfile), extent) != 0)
        ereport(LOG,
                (errcode_for_file_access(),
-              errmsg("could not truncate pg_stat_statement file \"%s\": %m",
-                     PGSS_TEXT_FILE)));
+                errmsg("could not truncate pg_stat_statement file \"%s\": %m",
+                       PGSS_TEXT_FILE)));
 
    if (FreeFile(qfile))
    {
@@ -2230,8 +2230,8 @@ gc_fail:
    if (qfile == NULL)
        ereport(LOG,
                (errcode_for_file_access(),
-             errmsg("could not write new pg_stat_statement file \"%s\": %m",
-                    PGSS_TEXT_FILE)));
+                errmsg("could not write new pg_stat_statement file \"%s\": %m",
+                       PGSS_TEXT_FILE)));
    else
        FreeFile(qfile);
 
@@ -2291,8 +2291,8 @@ entry_reset(void)
    if (ftruncate(fileno(qfile), 0) != 0)
        ereport(LOG,
                (errcode_for_file_access(),
-              errmsg("could not truncate pg_stat_statement file \"%s\": %m",
-                     PGSS_TEXT_FILE)));
+                errmsg("could not truncate pg_stat_statement file \"%s\": %m",
+                       PGSS_TEXT_FILE)));
 
    FreeFile(qfile);
 
index ce4a2cb12f20f1053eb14b07f0503ecc147dfe02..2cc9575d9f2a5d1e8e4e25e8a1af2c9d7baac27b 100644 (file)
@@ -774,6 +774,6 @@ check_relation_relkind(Relation rel)
        rel->rd_rel->relkind != RELKIND_TOASTVALUE)
        ereport(ERROR,
                (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-          errmsg("\"%s\" is not a table, materialized view, or TOAST table",
-                 RelationGetRelationName(rel))));
+                errmsg("\"%s\" is not a table, materialized view, or TOAST table",
+                       RelationGetRelationName(rel))));
 }
index 6feaefcf7be10ff7bf54058c7c76b08ff809470c..ed69c0c6bb35ec7cc2337ec05a40a850507145f9 100644 (file)
@@ -737,7 +737,7 @@ _crypt_blowfish_rn(const char *key, const char *setting,
 
    memcpy(output, setting, 7 + 22 - 1);
    output[7 + 22 - 1] = BF_itoa64[(int)
-                        BF_atoi64[(int) setting[7 + 22 - 1] - 0x20] & 0x30];
+                                  BF_atoi64[(int) setting[7 + 22 - 1] - 0x20] & 0x30];
 
 /* This has to be bug-compatible with the original implementation, so
  * only encode 23 of the 24 bytes. :-) */
index 6dc7cbdb3a5250c71f944abfd8730d232b563d8b..740f3612532b0719985beb0629d9b2d769f6170f 100644 (file)
@@ -23,7 +23,7 @@ static unsigned char _crypt_itoa64[64 + 1] =
 
 char *
 _crypt_gensalt_traditional_rn(unsigned long count,
-                 const char *input, int size, char *output, int output_size)
+                             const char *input, int size, char *output, int output_size)
 {
    if (size < 2 || output_size < 2 + 1 || (count && count != 25))
    {
@@ -41,7 +41,7 @@ _crypt_gensalt_traditional_rn(unsigned long count,
 
 char *
 _crypt_gensalt_extended_rn(unsigned long count,
-                 const char *input, int size, char *output, int output_size)
+                          const char *input, int size, char *output, int output_size)
 {
    unsigned long value;
 
@@ -77,7 +77,7 @@ _crypt_gensalt_extended_rn(unsigned long count,
 
 char *
 _crypt_gensalt_md5_rn(unsigned long count,
-                 const char *input, int size, char *output, int output_size)
+                     const char *input, int size, char *output, int output_size)
 {
    unsigned long value;
 
@@ -159,7 +159,7 @@ BF_encode(char *dst, const BF_word *src, int size)
 
 char *
 _crypt_gensalt_blowfish_rn(unsigned long count,
-                 const char *input, int size, char *output, int output_size)
+                          const char *input, int size, char *output, int output_size)
 {
    if (size < 16 || output_size < 7 + 22 + 1 ||
        (count && (count < 4 || count > 31)))
index 058b07f04614bafe04f04abbd57007c98ed07403..0984e01a14b82452a4f89270c691020cdf684421 100644 (file)
@@ -818,7 +818,7 @@ parse_key_value_arrays(ArrayType *key_array, ArrayType *val_array,
        if (!string_is_ascii(v))
            ereport(ERROR,
                    (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-               errmsg("header key must not contain non-ASCII characters")));
+                    errmsg("header key must not contain non-ASCII characters")));
        if (strstr(v, ": "))
            ereport(ERROR,
                    (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
@@ -840,7 +840,7 @@ parse_key_value_arrays(ArrayType *key_array, ArrayType *val_array,
        if (!string_is_ascii(v))
            ereport(ERROR,
                    (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-             errmsg("header value must not contain non-ASCII characters")));
+                    errmsg("header value must not contain non-ASCII characters")));
        if (strchr(v, '\n'))
            ereport(ERROR,
                    (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
index 4ea72dcbc5e9518fcfa27f7c2bb589255725dcb7..696902a17c3c71d91146e29b8d6bdcb9d5bc8e19 100644 (file)
@@ -57,13 +57,13 @@ int         px_gen_salt(const char *salt_type, char *dst, int rounds);
 
 /* crypt-gensalt.c */
 char *_crypt_gensalt_traditional_rn(unsigned long count,
-                const char *input, int size, char *output, int output_size);
+                             const char *input, int size, char *output, int output_size);
 char *_crypt_gensalt_extended_rn(unsigned long count,
-                const char *input, int size, char *output, int output_size);
+                          const char *input, int size, char *output, int output_size);
 char *_crypt_gensalt_md5_rn(unsigned long count,
-                const char *input, int size, char *output, int output_size);
+                     const char *input, int size, char *output, int output_size);
 char *_crypt_gensalt_blowfish_rn(unsigned long count,
-                const char *input, int size, char *output, int output_size);
+                          const char *input, int size, char *output, int output_size);
 
 /* disable 'extended DES crypt' */
 /* #define DISABLE_XDES */
index 00e2015c5c956b691417238686f4037692161678..a50ef67b477b7644fe158ab5b79ccaec4158cd67 100644 (file)
@@ -153,7 +153,7 @@ pgrowlocks(PG_FUNCTION_ARGS)
            values = (char **) palloc(mydata->ncolumns * sizeof(char *));
 
            values[Atnum_tid] = (char *) DirectFunctionCall1(tidout,
-                                           PointerGetDatum(&tuple->t_self));
+                                                            PointerGetDatum(&tuple->t_self));
 
            values[Atnum_xmax] = palloc(NCHARS * sizeof(char));
            snprintf(values[Atnum_xmax], NCHARS, "%d", xmax);
index c801988cc588204f5af4ae42e41ce2535c1f419d..5bf06138a50230008238e85a72bf17d06a4edafe 100644 (file)
@@ -185,7 +185,7 @@ statapprox_heap(Relation rel, output_type *stat)
    stat->table_len = (uint64) nblocks * BLCKSZ;
 
    stat->tuple_count = vac_estimate_reltuples(rel, false, nblocks, scanned,
-                                            stat->tuple_count + misc_count);
+                                              stat->tuple_count + misc_count);
 
    /*
     * Calculate percentages if the relation has one or more pages.
index c3a95208c1249a1a1ea193fb1e9e0580a646e65a..44e322d1f9a3d3a55549ac12809f33880f146318 100644 (file)
@@ -535,7 +535,7 @@ pgstatginindex_internal(Oid relid, FunctionCallInfo fcinfo)
    if (RELATION_IS_OTHER_TEMP(rel))
        ereport(ERROR,
                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-              errmsg("cannot access temporary indexes of other sessions")));
+                errmsg("cannot access temporary indexes of other sessions")));
 
    /*
     * Read metapage
@@ -613,7 +613,7 @@ pgstathashindex(PG_FUNCTION_ARGS)
    if (RELATION_IS_OTHER_TEMP(rel))
        ereport(ERROR,
                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-              errmsg("cannot access temporary indexes of other sessions")));
+                errmsg("cannot access temporary indexes of other sessions")));
 
    /* Get the information we need from the metapage. */
    memset(&stats, 0, sizeof(stats));
@@ -648,9 +648,9 @@ pgstathashindex(PG_FUNCTION_ARGS)
                 MAXALIGN(sizeof(HashPageOpaqueData)))
            ereport(ERROR,
                    (errcode(ERRCODE_INDEX_CORRUPTED),
-                  errmsg("index \"%s\" contains corrupted page at block %u",
-                         RelationGetRelationName(rel),
-                         BufferGetBlockNumber(buf))));
+                    errmsg("index \"%s\" contains corrupted page at block %u",
+                           RelationGetRelationName(rel),
+                           BufferGetBlockNumber(buf))));
        else
        {
            HashPageOpaque opaque;
@@ -677,7 +677,7 @@ pgstathashindex(PG_FUNCTION_ARGS)
                ereport(ERROR,
                        (errcode(ERRCODE_INDEX_CORRUPTED),
                         errmsg("unexpected page type 0x%04X in HASH index \"%s\" block %u",
-                           opaque->hasho_flag, RelationGetRelationName(rel),
+                               opaque->hasho_flag, RelationGetRelationName(rel),
                                BufferGetBlockNumber(buf))));
        }
        UnlockReleaseBuffer(buf);
index 9818d2750f88645323e75ce545f284776d21e943..8c33dea84538b994313f286d7e57fe28104e80a7 100644 (file)
@@ -241,10 +241,10 @@ connect_pg_server(ForeignServer *server, UserMapping *user)
        conn = PQconnectdbParams(keywords, values, false);
        if (!conn || PQstatus(conn) != CONNECTION_OK)
            ereport(ERROR,
-              (errcode(ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION),
-               errmsg("could not connect to server \"%s\"",
-                      server->servername),
-               errdetail_internal("%s", pchomp(PQerrorMessage(conn)))));
+                   (errcode(ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION),
+                    errmsg("could not connect to server \"%s\"",
+                           server->servername),
+                    errdetail_internal("%s", pchomp(PQerrorMessage(conn)))));
 
        /*
         * Check that non-superuser has used password to establish connection;
@@ -253,10 +253,10 @@ connect_pg_server(ForeignServer *server, UserMapping *user)
         */
        if (!superuser() && !PQconnectionUsedPassword(conn))
            ereport(ERROR,
-                 (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
-                  errmsg("password is required"),
-                  errdetail("Non-superuser cannot connect if the server does not request a password."),
-                  errhint("Target server's authentication method must be changed.")));
+                   (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
+                    errmsg("password is required"),
+                    errdetail("Non-superuser cannot connect if the server does not request a password."),
+                    errhint("Target server's authentication method must be changed.")));
 
        /* Prepare new session for use */
        configure_remote_session(conn);
@@ -589,7 +589,7 @@ pgfdw_report_error(int elevel, PGresult *res, PGconn *conn,
                (errcode(sqlstate),
                 message_primary ? errmsg_internal("%s", message_primary) :
                 errmsg("could not obtain message string for remote error"),
-              message_detail ? errdetail_internal("%s", message_detail) : 0,
+                message_detail ? errdetail_internal("%s", message_detail) : 0,
                 message_hint ? errhint("%s", message_hint) : 0,
                 message_context ? errcontext("%s", message_context) : 0,
                 sql ? errcontext("Remote SQL command: %s", sql) : 0));
@@ -1070,7 +1070,7 @@ pgfdw_get_cleanup_result(PGconn *conn, TimestampTz endtime, PGresult **result)
 
                /* Sleep until there's something to do */
                wc = WaitLatchOrSocket(MyLatch,
-                             WL_LATCH_SET | WL_SOCKET_READABLE | WL_TIMEOUT,
+                                      WL_LATCH_SET | WL_SOCKET_READABLE | WL_TIMEOUT,
                                       PQsocket(conn),
                                       cur_timeout, PG_WAIT_EXTENSION);
                ResetLatch(MyLatch);
index 482a3dd3016dbc2afc0c99a83205a48134dc7358..2af83640101b97563832b29770b4726b26a8eca1 100644 (file)
@@ -168,7 +168,7 @@ static void deparseLockingClause(deparse_expr_cxt *context);
 static void appendOrderByClause(List *pathkeys, deparse_expr_cxt *context);
 static void appendConditions(List *exprs, deparse_expr_cxt *context);
 static void deparseFromExprForRel(StringInfo buf, PlannerInfo *root,
-                   RelOptInfo *joinrel, bool use_alias, List **params_list);
+                     RelOptInfo *joinrel, bool use_alias, List **params_list);
 static void deparseFromExpr(List *quals, deparse_expr_cxt *context);
 static void deparseRangeTblRef(StringInfo buf, PlannerInfo *root,
                   RelOptInfo *foreignrel, bool make_subquery,
@@ -728,7 +728,7 @@ foreign_expr_walker(Node *node,
                                                   agg->args);
                        sortcoltype = exprType((Node *) tle->expr);
                        typentry = lookup_type_cache(sortcoltype,
-                                       TYPECACHE_LT_OPR | TYPECACHE_GT_OPR);
+                                                    TYPECACHE_LT_OPR | TYPECACHE_GT_OPR);
                        /* Check shippability of non-default sort operator. */
                        if (srt->sortop != typentry->lt_opr &&
                            srt->sortop != typentry->gt_opr &&
@@ -883,8 +883,8 @@ build_tlist_to_deparse(RelOptInfo *foreignrel)
     * required for evaluating the local conditions.
     */
    tlist = add_to_flat_tlist(tlist,
-                      pull_var_clause((Node *) foreignrel->reltarget->exprs,
-                                      PVC_RECURSE_PLACEHOLDERS));
+                             pull_var_clause((Node *) foreignrel->reltarget->exprs,
+                                             PVC_RECURSE_PLACEHOLDERS));
    foreach(lc, fpinfo->local_conds)
    {
        RestrictInfo *rinfo = lfirst_node(RestrictInfo, lc);
@@ -1434,7 +1434,7 @@ deparseFromExprForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel,
         * ((outer relation) <join type> (inner relation) ON (joinclauses))
         */
        appendStringInfo(buf, "(%s %s JOIN %s ON ", join_sql_o.data,
-                      get_jointype_name(fpinfo->jointype), join_sql_i.data);
+                        get_jointype_name(fpinfo->jointype), join_sql_i.data);
 
        /* Append join clause; (TRUE) if no join clause */
        if (fpinfo->joinclauses)
@@ -1596,7 +1596,7 @@ deparseInsertSql(StringInfo buf, PlannerInfo *root,
        appendStringInfoString(buf, " ON CONFLICT DO NOTHING");
 
    deparseReturningList(buf, root, rtindex, rel,
-                      rel->trigdesc && rel->trigdesc->trig_insert_after_row,
+                        rel->trigdesc && rel->trigdesc->trig_insert_after_row,
                         returningList, retrieved_attrs);
 }
 
@@ -1638,7 +1638,7 @@ deparseUpdateSql(StringInfo buf, PlannerInfo *root,
    appendStringInfoString(buf, " WHERE ctid = $1");
 
    deparseReturningList(buf, root, rtindex, rel,
-                      rel->trigdesc && rel->trigdesc->trig_update_after_row,
+                        rel->trigdesc && rel->trigdesc->trig_update_after_row,
                         returningList, retrieved_attrs);
 }
 
@@ -1728,7 +1728,7 @@ deparseDeleteSql(StringInfo buf, PlannerInfo *root,
    appendStringInfoString(buf, " WHERE ctid = $1");
 
    deparseReturningList(buf, root, rtindex, rel,
-                      rel->trigdesc && rel->trigdesc->trig_delete_after_row,
+                        rel->trigdesc && rel->trigdesc->trig_delete_after_row,
                         returningList, retrieved_attrs);
 }
 
index ca496b9df770e125346848bf61ad4992b2b9184e..67e1c59951ad767c3cc7eb39739b6adb1f71ce3a 100644 (file)
@@ -196,7 +196,7 @@ InitPgFdwOptions(void)
        ereport(ERROR,
                (errcode(ERRCODE_FDW_OUT_OF_MEMORY),
                 errmsg("out of memory"),
-            errdetail("could not get libpq's default connection options")));
+                errdetail("could not get libpq's default connection options")));
 
    /* Count how many libpq options are available. */
    num_libpq_opts = 0;
index 3d180984617c88413138121df86b1a1ce2962ce9..7214666e108da74795ad0f762177868242759007 100644 (file)
@@ -756,10 +756,10 @@ get_useful_ecs_for_relation(PlannerInfo *root, RelOptInfo *rel)
         */
        if (bms_overlap(relids, restrictinfo->right_ec->ec_relids))
            useful_eclass_list = list_append_unique_ptr(useful_eclass_list,
-                                                    restrictinfo->right_ec);
+                                                       restrictinfo->right_ec);
        else if (bms_overlap(relids, restrictinfo->left_ec->ec_relids))
            useful_eclass_list = list_append_unique_ptr(useful_eclass_list,
-                                                     restrictinfo->left_ec);
+                                                       restrictinfo->left_ec);
    }
 
    return useful_eclass_list;
@@ -999,9 +999,9 @@ postgresGetForeignPaths(PlannerInfo *root,
            arg.current = NULL;
            clauses = generate_implied_equalities_for_column(root,
                                                             baserel,
-                                                  ec_member_matches_foreign,
+                                                            ec_member_matches_foreign,
                                                             (void *) &arg,
-                                              baserel->lateral_referencers);
+                                                            baserel->lateral_referencers);
 
            /* Done if there are no more expressions in the foreign rel */
            if (arg.current == NULL)
@@ -1332,7 +1332,7 @@ postgresBeginForeignScan(ForeignScanState *node, int eflags)
    fsstate->query = strVal(list_nth(fsplan->fdw_private,
                                     FdwScanPrivateSelectSql));
    fsstate->retrieved_attrs = (List *) list_nth(fsplan->fdw_private,
-                                              FdwScanPrivateRetrievedAttrs);
+                                                FdwScanPrivateRetrievedAttrs);
    fsstate->fetch_size = intVal(list_nth(fsplan->fdw_private,
                                          FdwScanPrivateFetchSize));
 
@@ -1710,7 +1710,7 @@ postgresBeginForeignModify(ModifyTableState *mtstate,
    fmstate->has_returning = intVal(list_nth(fdw_private,
                                             FdwModifyPrivateHasReturning));
    fmstate->retrieved_attrs = (List *) list_nth(fdw_private,
-                                            FdwModifyPrivateRetrievedAttrs);
+                                                FdwModifyPrivateRetrievedAttrs);
 
    /* Create context for per-tuple temp workspace. */
    fmstate->temp_cxt = AllocSetContextCreate(estate->es_query_cxt,
@@ -2311,11 +2311,11 @@ postgresBeginDirectModify(ForeignScanState *node, int eflags)
    dmstate->query = strVal(list_nth(fsplan->fdw_private,
                                     FdwDirectModifyPrivateUpdateSql));
    dmstate->has_returning = intVal(list_nth(fsplan->fdw_private,
-                                       FdwDirectModifyPrivateHasReturning));
+                                            FdwDirectModifyPrivateHasReturning));
    dmstate->retrieved_attrs = (List *) list_nth(fsplan->fdw_private,
-                                      FdwDirectModifyPrivateRetrievedAttrs);
+                                                FdwDirectModifyPrivateRetrievedAttrs);
    dmstate->set_processed = intVal(list_nth(fsplan->fdw_private,
-                                       FdwDirectModifyPrivateSetProcessed));
+                                            FdwDirectModifyPrivateSetProcessed));
 
    /* Create context for per-tuple temp workspace. */
    dmstate->temp_cxt = AllocSetContextCreate(estate->es_query_cxt,
@@ -2725,8 +2725,8 @@ estimate_path_cost_size(PlannerInfo *root,
            /* Get number of grouping columns and possible number of groups */
            numGroupCols = list_length(root->parse->groupClause);
            numGroups = estimate_num_groups(root,
-                           get_sortgrouplist_exprs(root->parse->groupClause,
-                                                   fpinfo->grouped_tlist),
+                                           get_sortgrouplist_exprs(root->parse->groupClause,
+                                                                   fpinfo->grouped_tlist),
                                            input_rows, NULL);
 
            /*
@@ -3763,7 +3763,7 @@ analyze_row_processor(PGresult *res, int row, PgFdwAnalyzeState *astate)
        astate->rows[pos] = make_tuple_from_result_row(res, row,
                                                       astate->rel,
                                                       astate->attinmeta,
-                                                    astate->retrieved_attrs,
+                                                      astate->retrieved_attrs,
                                                       NULL,
                                                       astate->temp_cxt);
 
@@ -3836,8 +3836,8 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
        if (PQntuples(res) != 1)
            ereport(ERROR,
                    (errcode(ERRCODE_FDW_SCHEMA_NOT_FOUND),
-             errmsg("schema \"%s\" is not present on foreign server \"%s\"",
-                    stmt->remote_schema, server->servername)));
+                    errmsg("schema \"%s\" is not present on foreign server \"%s\"",
+                           stmt->remote_schema, server->servername)));
 
        PQclear(res);
        res = NULL;
@@ -4205,23 +4205,23 @@ foreign_join_ok(PlannerInfo *root, RelOptInfo *joinrel, JoinType jointype,
    {
        case JOIN_INNER:
            fpinfo->remote_conds = list_concat(fpinfo->remote_conds,
-                                         list_copy(fpinfo_i->remote_conds));
+                                              list_copy(fpinfo_i->remote_conds));
            fpinfo->remote_conds = list_concat(fpinfo->remote_conds,
-                                         list_copy(fpinfo_o->remote_conds));
+                                              list_copy(fpinfo_o->remote_conds));
            break;
 
        case JOIN_LEFT:
            fpinfo->joinclauses = list_concat(fpinfo->joinclauses,
-                                         list_copy(fpinfo_i->remote_conds));
+                                             list_copy(fpinfo_i->remote_conds));
            fpinfo->remote_conds = list_concat(fpinfo->remote_conds,
-                                         list_copy(fpinfo_o->remote_conds));
+                                              list_copy(fpinfo_o->remote_conds));
            break;
 
        case JOIN_RIGHT:
            fpinfo->joinclauses = list_concat(fpinfo->joinclauses,
-                                         list_copy(fpinfo_o->remote_conds));
+                                             list_copy(fpinfo_o->remote_conds));
            fpinfo->remote_conds = list_concat(fpinfo->remote_conds,
-                                         list_copy(fpinfo_i->remote_conds));
+                                              list_copy(fpinfo_i->remote_conds));
            break;
 
        case JOIN_FULL:
index 61e72937eee07490f95e616979ef2813b31f48e0..4fc18130e19485b1160b98707a45bd1eb6a61450 100644 (file)
@@ -558,7 +558,7 @@ Datum
 seg_same(PG_FUNCTION_ARGS)
 {
    int         cmp = DatumGetInt32(
-      DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
+                                   DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
 
    PG_RETURN_BOOL(cmp == 0);
 }
@@ -848,7 +848,7 @@ Datum
 seg_lt(PG_FUNCTION_ARGS)
 {
    int         cmp = DatumGetInt32(
-      DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
+                                   DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
 
    PG_RETURN_BOOL(cmp < 0);
 }
@@ -857,7 +857,7 @@ Datum
 seg_le(PG_FUNCTION_ARGS)
 {
    int         cmp = DatumGetInt32(
-      DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
+                                   DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
 
    PG_RETURN_BOOL(cmp <= 0);
 }
@@ -866,7 +866,7 @@ Datum
 seg_gt(PG_FUNCTION_ARGS)
 {
    int         cmp = DatumGetInt32(
-      DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
+                                   DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
 
    PG_RETURN_BOOL(cmp > 0);
 }
@@ -875,7 +875,7 @@ Datum
 seg_ge(PG_FUNCTION_ARGS)
 {
    int         cmp = DatumGetInt32(
-      DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
+                                   DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
 
    PG_RETURN_BOOL(cmp >= 0);
 }
@@ -885,7 +885,7 @@ Datum
 seg_different(PG_FUNCTION_ARGS)
 {
    int         cmp = DatumGetInt32(
-      DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
+                                   DirectFunctionCall2(seg_cmp, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1)));
 
    PG_RETURN_BOOL(cmp != 0);
 }
index 6da6a23647ad6a9dad1761e15656a8a62cd12d4e..5daa60c4128faf4c89d00529c04c088233e417f5 100644 (file)
@@ -108,7 +108,7 @@ sepgsql_object_access(ObjectAccessType access,
                    case DatabaseRelationId:
                        Assert(!is_internal);
                        sepgsql_database_post_create(objectId,
-                                   sepgsql_context_info.createdb_dtemplate);
+                                                    sepgsql_context_info.createdb_dtemplate);
                        break;
 
                    case NamespaceRelationId:
@@ -395,7 +395,7 @@ _PG_init(void)
    if (IsUnderPostmaster)
        ereport(ERROR,
                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-            errmsg("sepgsql must be loaded via shared_preload_libraries")));
+                errmsg("sepgsql must be loaded via shared_preload_libraries")));
 
    /*
     * Check availability of SELinux on the platform. If disabled, we cannot
index f55b9de1da7bd4f77a8c7b6f613da034534ec7a8..cbb9249be7a5f4d08d8dc4c49e5cde2b7ba18ef0 100644 (file)
@@ -477,7 +477,7 @@ sepgsql_get_label(Oid classId, Oid objectId, int32 subId)
        if (security_get_initial_context_raw("unlabeled", &unlabeled) < 0)
            ereport(ERROR,
                    (errcode(ERRCODE_INTERNAL_ERROR),
-              errmsg("SELinux: failed to get initial security label: %m")));
+                    errmsg("SELinux: failed to get initial security label: %m")));
        PG_TRY();
        {
            label = pstrdup(unlabeled);
@@ -510,7 +510,7 @@ sepgsql_object_relabel(const ObjectAddress *object, const char *seclabel)
        security_check_context_raw((security_context_t) seclabel) < 0)
        ereport(ERROR,
                (errcode(ERRCODE_INVALID_NAME),
-              errmsg("SELinux: invalid security label: \"%s\"", seclabel)));
+                errmsg("SELinux: invalid security label: \"%s\"", seclabel)));
 
    /*
     * Do actual permission checks for each object classes
@@ -925,7 +925,7 @@ sepgsql_restorecon(PG_FUNCTION_ARGS)
    if (!superuser())
        ereport(ERROR,
                (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-         errmsg("SELinux: must be superuser to restore initial contexts")));
+                errmsg("SELinux: must be superuser to restore initial contexts")));
 
    /*
     * Open selabel_lookup(3) stuff. It provides a set of mapping between an
@@ -945,7 +945,7 @@ sepgsql_restorecon(PG_FUNCTION_ARGS)
    if (!sehnd)
        ereport(ERROR,
                (errcode(ERRCODE_INTERNAL_ERROR),
-              errmsg("SELinux: failed to initialize labeling handle: %m")));
+                errmsg("SELinux: failed to initialize labeling handle: %m")));
    PG_TRY();
    {
        exec_object_restorecon(sehnd, DatabaseRelationId);
index 73564edaa796ae43f5e18e7de3cc314c985d323f..14faa5fac60c8e4e0e0a26df685f0adfcee22f0d 100644 (file)
@@ -106,7 +106,7 @@ sepgsql_proc_post_create(Oid functionId)
    initStringInfo(&audit_name);
    nsp_name = get_namespace_name(proForm->pronamespace);
    appendStringInfo(&audit_name, "%s(",
-           quote_qualified_identifier(nsp_name, NameStr(proForm->proname)));
+                    quote_qualified_identifier(nsp_name, NameStr(proForm->proname)));
    for (i = 0; i < proForm->pronargs; i++)
    {
        if (i > 0)
index ffb00716c622b159e036cce7e8988bd9e608bc90..f0915918dbaf2cca9dd3a5431c8a9f5727ac1014 100644 (file)
@@ -182,7 +182,7 @@ sepgsql_avc_unlabeled(void)
        if (security_get_initial_context_raw("unlabeled", &unlabeled) < 0)
            ereport(ERROR,
                    (errcode(ERRCODE_INTERNAL_ERROR),
-              errmsg("SELinux: failed to get initial security label: %m")));
+                    errmsg("SELinux: failed to get initial security label: %m")));
        PG_TRY();
        {
            avc_unlabeled = MemoryContextStrdup(avc_mem_cxt, unlabeled);
index 692d99ca5b35dc5557d26c9ed77b51ca4ea99296..46205c7613671049117e8b9995f350e4e5fe1528 100644 (file)
@@ -175,7 +175,7 @@ check_primary_key(PG_FUNCTION_ARGS)
        for (i = 0; i < nkeys; i++)
        {
            snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), "%s = $%d %s",
-                 args[i + nkeys + 1], i + 1, (i < nkeys - 1) ? "and " : "");
+                    args[i + nkeys + 1], i + 1, (i < nkeys - 1) ? "and " : "");
        }
 
        /* Prepare plan for query */
index 42846436eb5651bea3ae6a6600bea127c1f958a3..5ba3988e270405bcc6dd87a9f330546f79dbb0cb 100644 (file)
@@ -484,8 +484,8 @@ ssl_extension_info(PG_FUNCTION_ARGS)
        if (nid == NID_undef)
            ereport(ERROR,
                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-           errmsg("unknown OpenSSL extension in certificate at position %d",
-                  call_cntr)));
+                    errmsg("unknown OpenSSL extension in certificate at position %d",
+                           call_cntr)));
        values[0] = CStringGetTextDatum(OBJ_nid2sn(nid));
        nulls[0] = false;
 
index b5e1ad29e2ef2e342b9fce2b599eb66f12f636c8..0bc8177b61b570774920c31fc8e03c23e71affd3 100644 (file)
@@ -684,7 +684,7 @@ crosstab_hash(PG_FUNCTION_ARGS)
                                                crosstab_hash,
                                                tupdesc,
                                                per_query_ctx,
-                            rsinfo->allowedModes & SFRM_Materialize_Random);
+                                               rsinfo->allowedModes & SFRM_Materialize_Random);
 
    /*
     * SFRM_Materialize mode expects us to return a NULL Datum. The actual
@@ -1046,7 +1046,7 @@ connectby_text(PG_FUNCTION_ARGS)
                                  show_branch,
                                  show_serial,
                                  per_query_ctx,
-                             rsinfo->allowedModes & SFRM_Materialize_Random,
+                                 rsinfo->allowedModes & SFRM_Materialize_Random,
                                  attinmeta);
    rsinfo->setDesc = tupdesc;
 
@@ -1126,7 +1126,7 @@ connectby_text_serial(PG_FUNCTION_ARGS)
                                  show_branch,
                                  show_serial,
                                  per_query_ctx,
-                             rsinfo->allowedModes & SFRM_Materialize_Random,
+                                 rsinfo->allowedModes & SFRM_Materialize_Random,
                                  attinmeta);
    rsinfo->setDesc = tupdesc;
 
@@ -1475,17 +1475,17 @@ validateConnectbyTupleDesc(TupleDesc tupdesc, bool show_branch, bool show_serial
    if (show_branch && show_serial && tupdesc->attrs[4]->atttypid != INT4OID)
        ereport(ERROR,
                (errcode(ERRCODE_DATATYPE_MISMATCH),
-             errmsg("query-specified return tuple not valid for Connectby: "
-                    "fifth column must be type %s",
-                    format_type_be(INT4OID))));
+                errmsg("query-specified return tuple not valid for Connectby: "
+                       "fifth column must be type %s",
+                       format_type_be(INT4OID))));
 
    /* check that the type of the fifth column is INT4 */
    if (!show_branch && show_serial && tupdesc->attrs[3]->atttypid != INT4OID)
        ereport(ERROR,
                (errcode(ERRCODE_DATATYPE_MISMATCH),
-             errmsg("query-specified return tuple not valid for Connectby: "
-                    "fourth column must be type %s",
-                    format_type_be(INT4OID))));
+                errmsg("query-specified return tuple not valid for Connectby: "
+                       "fourth column must be type %s",
+                       format_type_be(INT4OID))));
 
    /* OK, the tupdesc is valid for our purposes */
 }
@@ -1525,8 +1525,8 @@ compatConnectbyTupleDescs(TupleDesc ret_tupdesc, TupleDesc sql_tupdesc)
                 errmsg("invalid return type"),
                 errdetail("SQL key field type %s does " \
                           "not match return key field type %s.",
-                      format_type_with_typemod(ret_atttypid, ret_atttypmod),
-                   format_type_with_typemod(sql_atttypid, sql_atttypmod))));
+                          format_type_with_typemod(ret_atttypid, ret_atttypmod),
+                          format_type_with_typemod(sql_atttypid, sql_atttypmod))));
 
    ret_atttypid = ret_tupdesc->attrs[1]->atttypid;
    sql_atttypid = sql_tupdesc->attrs[1]->atttypid;
@@ -1539,8 +1539,8 @@ compatConnectbyTupleDescs(TupleDesc ret_tupdesc, TupleDesc sql_tupdesc)
                 errmsg("invalid return type"),
                 errdetail("SQL parent key field type %s does " \
                           "not match return parent key field type %s.",
-                      format_type_with_typemod(ret_atttypid, ret_atttypmod),
-                   format_type_with_typemod(sql_atttypid, sql_atttypmod))));
+                          format_type_with_typemod(ret_atttypid, ret_atttypmod),
+                          format_type_with_typemod(sql_atttypid, sql_atttypmod))));
 
    /* OK, the two tupdescs are compatible for our purposes */
 }
index 5106d424b40445de4d4e37b7ec9927f6f1f752c3..0b9acbf84880d112759bc116b6d5f8f4bae0db15 100644 (file)
@@ -73,7 +73,7 @@ triggered_change_notification(PG_FUNCTION_ARGS)
    if (!CALLED_AS_TRIGGER(fcinfo))
        ereport(ERROR,
                (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
-       errmsg("triggered_change_notification: must be called as trigger")));
+                errmsg("triggered_change_notification: must be called as trigger")));
 
    /* and that it's called after the change */
    if (!TRIGGER_FIRED_AFTER(trigdata->tg_event))
index 21cfd673c66bc8ab74760e2c036722d3380c430c..a1a7c2ae0cc657054126a35d160f5eb88f6d0b6d 100644 (file)
@@ -126,8 +126,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)
        {
@@ -136,8 +136,8 @@ 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)
        {
@@ -148,8 +148,8 @@ pg_decode_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt,
            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;
@@ -162,8 +162,8 @@ pg_decode_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt,
            else if (!parse_bool(strVal(elem->arg), &data->skip_empty_xacts))
                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, "only-local") == 0)
        {
@@ -173,8 +173,8 @@ pg_decode_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt,
            else if (!parse_bool(strVal(elem->arg), &data->only_local))
                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
        {
@@ -421,8 +421,8 @@ pg_decode_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn,
    appendStringInfoString(ctx->out,
                           quote_qualified_identifier(
                                                      get_namespace_name(
-                             get_rel_namespace(RelationGetRelid(relation))),
-                                             NameStr(class_form->relname)));
+                                                                        get_rel_namespace(RelationGetRelid(relation))),
+                                                     NameStr(class_form->relname)));
    appendStringInfoChar(ctx->out, ':');
 
    switch (change->action)
index 6a34cfd3edfbf5323fe539917bf1a948398f1a23..e08cca1707f71780f443edf8ab647ec24302d2a2 100644 (file)
@@ -67,7 +67,7 @@ placeChar(TrieChar *node, const unsigned char *str, int lenstr,
        if (curnode->replaceTo)
            ereport(WARNING,
                    (errcode(ERRCODE_CONFIG_FILE_ERROR),
-               errmsg("duplicate source strings, first one will be used")));
+                    errmsg("duplicate source strings, first one will be used")));
        else
        {
            curnode->replacelen = replacelen;
@@ -389,9 +389,9 @@ unaccent_dict(PG_FUNCTION_ARGS)
    dict = lookup_ts_dictionary_cache(dictOid);
 
    res = (TSLexeme *) DatumGetPointer(FunctionCall4(&(dict->lexize),
-                                            PointerGetDatum(dict->dictData),
-                                          PointerGetDatum(VARDATA_ANY(str)),
-                                      Int32GetDatum(VARSIZE_ANY_EXHDR(str)),
+                                                    PointerGetDatum(dict->dictData),
+                                                    PointerGetDatum(VARDATA_ANY(str)),
+                                                    Int32GetDatum(VARSIZE_ANY_EXHDR(str)),
                                                     PointerGetDatum(NULL)));
 
    PG_FREE_IF_COPY(str, strArg);
index a48818d944a2b851a4d1ace3e52f23d87cf2f6c7..95e580df0886e726058ec40bb03a0e680c253801 100644 (file)
@@ -187,7 +187,7 @@ pgxmlNodeSetToText(xmlNodeSetPtr nodeset,
            if (plainsep != NULL)
            {
                xmlBufferWriteCHAR(buf,
-                             xmlXPathCastNodeToString(nodeset->nodeTab[i]));
+                                  xmlXPathCastNodeToString(nodeset->nodeTab[i]));
 
                /* If this isn't the last entry, write the plain sep. */
                if (i < (nodeset->nodeNr) - 1)
@@ -579,8 +579,8 @@ xpath_table(PG_FUNCTION_ARGS)
    if (!(rsinfo->allowedModes & SFRM_Materialize))
        ereport(ERROR,
                (errcode(ERRCODE_SYNTAX_ERROR),
-              errmsg("xpath_table requires Materialize mode, but it is not "
-                     "allowed in this context")));
+                errmsg("xpath_table requires Materialize mode, but it is not "
+                       "allowed in this context")));
 
    /*
     * The tuplestore must exist in a higher context than this function call
index fb49b98f5a13b0ab2ecb4dc6d353550f0211b049..2189bca86ff63b6b544e2e9ea248d9a0a322a27a 100644 (file)
@@ -219,7 +219,7 @@ parse_params(text *paramstr)
        {
            max_params *= 2;
            params = (const char **) repalloc(params,
-                                         (max_params + 1) * sizeof(char *));
+                                             (max_params + 1) * sizeof(char *));
        }
        params[nparams++] = pos;
        pos = strstr(pos, nvsep);
index b0e89ace5e21584acc3a0cf7744e63c52cef049a..efebeb035ac15bf2775400a9290c28d254bb97b7 100644 (file)
@@ -473,7 +473,7 @@ bringetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
                     */
                    Assert((key->sk_flags & SK_ISNULL) ||
                           (key->sk_collation ==
-                     bdesc->bd_tupdesc->attrs[keyattno - 1]->attcollation));
+                           bdesc->bd_tupdesc->attrs[keyattno - 1]->attcollation));
 
                    /* First time this column? look up consistent function */
                    if (consistentFn[keyattno - 1].fn_oid == InvalidOid)
@@ -1116,7 +1116,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 
        page = BufferGetPage(state->bs_currentInsertBuf);
        RecordPageWithFreeSpace(state->bs_irel,
-                           BufferGetBlockNumber(state->bs_currentInsertBuf),
+                               BufferGetBlockNumber(state->bs_currentInsertBuf),
                                PageGetFreeSpace(page));
        ReleaseBuffer(state->bs_currentInsertBuf);
    }
index bc16dd79812cf4c1db1b340b4f1467476b42a4c8..9c0a058ccb087f195fb6ccfe06c54edc9df93486 100644 (file)
@@ -312,7 +312,7 @@ brin_inclusion_consistent(PG_FUNCTION_ARGS)
 
        case RTLeftStrategyNumber:
            finfo = inclusion_get_strategy_procinfo(bdesc, attno, subtype,
-                                                 RTOverRightStrategyNumber);
+                                                   RTOverRightStrategyNumber);
            result = FunctionCall2Coll(finfo, colloid, unionval, query);
            PG_RETURN_BOOL(!DatumGetBool(result));
 
@@ -336,7 +336,7 @@ brin_inclusion_consistent(PG_FUNCTION_ARGS)
 
        case RTBelowStrategyNumber:
            finfo = inclusion_get_strategy_procinfo(bdesc, attno, subtype,
-                                                 RTOverAboveStrategyNumber);
+                                                   RTOverAboveStrategyNumber);
            result = FunctionCall2Coll(finfo, colloid, unionval, query);
            PG_RETURN_BOOL(!DatumGetBool(result));
 
@@ -354,7 +354,7 @@ brin_inclusion_consistent(PG_FUNCTION_ARGS)
 
        case RTAboveStrategyNumber:
            finfo = inclusion_get_strategy_procinfo(bdesc, attno, subtype,
-                                                 RTOverBelowStrategyNumber);
+                                                   RTOverBelowStrategyNumber);
            result = FunctionCall2Coll(finfo, colloid, unionval, query);
            PG_RETURN_BOOL(!DatumGetBool(result));
 
@@ -686,7 +686,7 @@ inclusion_get_strategy_procinfo(BrinDesc *bdesc, uint16 attno, Oid subtype,
                 strategynum, attr->atttypid, subtype, opfamily);
 
        oprid = DatumGetObjectId(SysCacheGetAttr(AMOPSTRATEGY, tuple,
-                                            Anum_pg_amop_amopopr, &isNull));
+                                                Anum_pg_amop_amopopr, &isNull));
        ReleaseSysCache(tuple);
        Assert(!isNull && RegProcedureIsValid(oprid));
 
index 8f7a0c75b81dc6e7688da8facb283dc50fd1cde1..62fd90aabe7ec5e671e39a4a9637feccb5405f0b 100644 (file)
@@ -212,7 +212,7 @@ brin_minmax_consistent(PG_FUNCTION_ARGS)
                break;
            /* max() >= scankey */
            finfo = minmax_get_strategy_procinfo(bdesc, attno, subtype,
-                                              BTGreaterEqualStrategyNumber);
+                                                BTGreaterEqualStrategyNumber);
            matches = FunctionCall2Coll(finfo, colloid, column->bv_values[1],
                                        value);
            break;
@@ -358,7 +358,7 @@ minmax_get_strategy_procinfo(BrinDesc *bdesc, uint16 attno, Oid subtype,
                 strategynum, attr->atttypid, subtype, opfamily);
 
        oprid = DatumGetObjectId(SysCacheGetAttr(AMOPSTRATEGY, tuple,
-                                            Anum_pg_amop_amopopr, &isNull));
+                                                Anum_pg_amop_amopopr, &isNull));
        ReleaseSysCache(tuple);
        Assert(!isNull && RegProcedureIsValid(oprid));
 
index bd08f0e396e87dfd8f8df1c93c67b31f8292dbbd..80f803e438eb9f118d5cf7e46933997e84b47063 100644 (file)
@@ -73,8 +73,8 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
    {
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-           errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
-                  newsz, BrinMaxItemSize, RelationGetRelationName(idxrel))));
+                errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
+                       newsz, BrinMaxItemSize, RelationGetRelationName(idxrel))));
        return false;           /* keep compiler quiet */
    }
 
@@ -355,8 +355,8 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
    {
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-           errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
-                itemsz, BrinMaxItemSize, RelationGetRelationName(idxrel))));
+                errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
+                       itemsz, BrinMaxItemSize, RelationGetRelationName(idxrel))));
        return InvalidOffsetNumber; /* keep compiler quiet */
    }
 
@@ -821,8 +821,8 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 
            ereport(ERROR,
                    (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-           errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
-                  itemsz, freespace, RelationGetRelationName(irel))));
+                    errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
+                           itemsz, freespace, RelationGetRelationName(irel))));
            return InvalidBuffer;   /* keep compiler quiet */
        }
 
index c87bc03a9eebe69b04cec77b8a06b8972784a35a..22f2076887ed17045dad1fb904375be88f3021cf 100644 (file)
@@ -260,7 +260,7 @@ brinGetTupleForHeapBlock(BrinRevmap *revmap, BlockNumber heapBlk,
        if (ItemPointerIsValid(&previptr) && ItemPointerEquals(&previptr, iptr))
            ereport(ERROR,
                    (errcode(ERRCODE_INDEX_CORRUPTED),
-           errmsg_internal("corrupted BRIN index: inconsistent range map")));
+                    errmsg_internal("corrupted BRIN index: inconsistent range map")));
        previptr = *iptr;
 
        blk = ItemPointerGetBlockNumber(iptr);
@@ -598,10 +598,10 @@ revmap_physical_extend(BrinRevmap *revmap)
    if (!PageIsNew(page) && !BRIN_IS_REGULAR_PAGE(page))
        ereport(ERROR,
                (errcode(ERRCODE_INDEX_CORRUPTED),
-         errmsg("unexpected page type 0x%04X in BRIN index \"%s\" block %u",
-                BrinPageType(page),
-                RelationGetRelationName(irel),
-                BufferGetBlockNumber(buf))));
+                errmsg("unexpected page type 0x%04X in BRIN index \"%s\" block %u",
+                       BrinPageType(page),
+                       RelationGetRelationName(irel),
+                       BufferGetBlockNumber(buf))));
 
    /* If the page is in use, evacuate it and restart */
    if (brin_start_evacuating_page(irel, buf))
index e2e1d23377a6a0dbcbaf0662479494d77141997f..ed5b4b108dac8e4d2d7d3dcf9374f13f97761b4f 100644 (file)
@@ -68,7 +68,7 @@ brtuple_disk_tupdesc(BrinDesc *brdesc)
        {
            for (j = 0; j < brdesc->bd_info[i]->oi_nstored; j++)
                TupleDescInitEntry(tupdesc, attno++, NULL,
-                                brdesc->bd_info[i]->oi_typcache[j]->type_id,
+                                  brdesc->bd_info[i]->oi_typcache[j]->type_id,
                                   -1, 0);
        }
 
index 2846ec8b34f3ff5673f69b17f328da6f0c5f9911..37a21057d001964ffb51e5523bb8dfce34f51ea9 100644 (file)
@@ -80,7 +80,7 @@ index_form_tuple(TupleDesc tupleDescriptor,
        {
            untoasted_values[i] =
                PointerGetDatum(heap_tuple_fetch_attr((struct varlena *)
-                                               DatumGetPointer(values[i])));
+                                                     DatumGetPointer(values[i])));
            untoasted_free[i] = true;
        }
 
@@ -89,7 +89,7 @@ index_form_tuple(TupleDesc tupleDescriptor,
         * try to compress it in-line.
         */
        if (!VARATT_IS_EXTENDED(DatumGetPointer(untoasted_values[i])) &&
-       VARSIZE(DatumGetPointer(untoasted_values[i])) > TOAST_INDEX_TARGET &&
+           VARSIZE(DatumGetPointer(untoasted_values[i])) > TOAST_INDEX_TARGET &&
            (att->attstorage == 'x' || att->attstorage == 'm'))
        {
            Datum       cvalue = toast_compress_datum(untoasted_values[i]);
index a6adf6e637c732565a2ec78f0ea2fdaf0044ff7b..ec10762529d7823e66d0d03573254ed23823a657 100644 (file)
@@ -537,7 +537,7 @@ add_reloption_kind(void)
    if (last_assigned_kind >= RELOPT_KIND_MAX)
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-           errmsg("user-defined relation parameter types limit exceeded")));
+                errmsg("user-defined relation parameter types limit exceeded")));
    last_assigned_kind <<= 1;
    return (relopt_kind) last_assigned_kind;
 }
@@ -567,7 +567,7 @@ add_reloption(relopt_gen *newoption)
        {
            max_custom_options *= 2;
            custom_options = repalloc(custom_options,
-                                 max_custom_options * sizeof(relopt_gen *));
+                                     max_custom_options * sizeof(relopt_gen *));
        }
        MemoryContextSwitchTo(oldcxt);
    }
@@ -818,7 +818,7 @@ transformRelOptions(Datum oldOptions, List *defList, char *namspace,
            if (def->arg != NULL)
                ereport(ERROR,
                        (errcode(ERRCODE_SYNTAX_ERROR),
-                   errmsg("RESET must not include values for parameters")));
+                        errmsg("RESET must not include values for parameters")));
        }
        else
        {
@@ -1137,8 +1137,8 @@ parse_one_reloption(relopt_value *option, char *text_str, int text_len,
                if (validate && !parsed)
                    ereport(ERROR,
                            (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                       errmsg("invalid value for boolean option \"%s\": %s",
-                              option->gen->name, value)));
+                            errmsg("invalid value for boolean option \"%s\": %s",
+                                   option->gen->name, value)));
            }
            break;
        case RELOPT_TYPE_INT:
@@ -1149,16 +1149,16 @@ parse_one_reloption(relopt_value *option, char *text_str, int text_len,
                if (validate && !parsed)
                    ereport(ERROR,
                            (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                       errmsg("invalid value for integer option \"%s\": %s",
-                              option->gen->name, value)));
+                            errmsg("invalid value for integer option \"%s\": %s",
+                                   option->gen->name, value)));
                if (validate && (option->values.int_val < optint->min ||
                                 option->values.int_val > optint->max))
                    ereport(ERROR,
                            (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                          errmsg("value %s out of bounds for option \"%s\"",
-                                 value, option->gen->name),
-                    errdetail("Valid values are between \"%d\" and \"%d\".",
-                              optint->min, optint->max)));
+                            errmsg("value %s out of bounds for option \"%s\"",
+                                   value, option->gen->name),
+                            errdetail("Valid values are between \"%d\" and \"%d\".",
+                                      optint->min, optint->max)));
            }
            break;
        case RELOPT_TYPE_REAL:
@@ -1175,10 +1175,10 @@ parse_one_reloption(relopt_value *option, char *text_str, int text_len,
                                 option->values.real_val > optreal->max))
                    ereport(ERROR,
                            (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                          errmsg("value %s out of bounds for option \"%s\"",
-                                 value, option->gen->name),
-                    errdetail("Valid values are between \"%f\" and \"%f\".",
-                              optreal->min, optreal->max)));
+                            errmsg("value %s out of bounds for option \"%s\"",
+                                   value, option->gen->name),
+                            errdetail("Valid values are between \"%f\" and \"%f\".",
+                                      optreal->min, optreal->max)));
            }
            break;
        case RELOPT_TYPE_STRING:
index 93ed3272ea932b13c3d959ce4b6326b932d088b5..2e5ea479763f32d6dc637e1c27d5975d124f293f 100644 (file)
@@ -685,7 +685,7 @@ dataBeginPlaceToPageLeaf(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)",
@@ -1468,7 +1468,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
@@ -1595,7 +1595,7 @@ leafRepackItems(disassembledLeaf *leaf, ItemPointer remaining)
                {
                    seginfo->seg = ginCompressPostingList(seginfo->items,
                                                          seginfo->nitems,
-                                               GinPostingListSegmentMaxSize,
+                                                         GinPostingListSegmentMaxSize,
                                                          &npacked);
                }
                if (npacked != seginfo->nitems)
@@ -1610,7 +1610,7 @@ leafRepackItems(disassembledLeaf *leaf, ItemPointer remaining)
                        pfree(seginfo->seg);
                    seginfo->seg = ginCompressPostingList(seginfo->items,
                                                          seginfo->nitems,
-                                            GinPostingListSegmentTargetSize,
+                                                         GinPostingListSegmentTargetSize,
                                                          &npacked);
                    if (seginfo->action != GIN_SEGMENT_INSERT)
                        seginfo->action = GIN_SEGMENT_REPLACE;
index 8c9859ce8e38bca0b42f554f06f2ec338fcdf158..d5cc70258ac7a0d6d4744e5a749d01d1e29575f9 100644 (file)
@@ -107,9 +107,9 @@ GinFormTuple(GinState *ginstate,
        if (errorTooBig)
            ereport(ERROR,
                    (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-           errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
-                  (Size) newsize, (Size) GinMaxItemSize,
-                  RelationGetRelationName(ginstate->index))));
+                    errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
+                           (Size) newsize, (Size) GinMaxItemSize,
+                           RelationGetRelationName(ginstate->index))));
        pfree(itup);
        return NULL;
    }
@@ -256,7 +256,7 @@ entryIsMoveRight(GinBtree btree, Page page)
    key = gintuple_get_key(btree->ginstate, itup, &category);
 
    if (ginCompareAttEntries(btree->ginstate,
-                  btree->entryAttnum, btree->entryKey, btree->entryCategory,
+                            btree->entryAttnum, btree->entryKey, btree->entryCategory,
                             attnum, key, category) > 0)
        return TRUE;
 
index 03a54346aabc95444e39977435cbd5a8ed7a948b..59e435465acba6883f71d3124a889c7be5949cab 100644 (file)
@@ -482,7 +482,7 @@ ginHeapTupleFastCollect(GinState *ginstate,
    {
        collector->lentuples *= 2;
        collector->tuples = (IndexTuple *) repalloc(collector->tuples,
-                                 sizeof(IndexTuple) * collector->lentuples);
+                                                   sizeof(IndexTuple) * collector->lentuples);
    }
 
    /*
@@ -874,7 +874,7 @@ ginInsertCleanup(GinState *ginstate, bool full_clean,
             */
            ginBeginBAScan(&accum);
            while ((list = ginGetBAEntry(&accum,
-                                 &attnum, &key, &category, &nlist)) != NULL)
+                                        &attnum, &key, &category, &nlist)) != NULL)
            {
                ginEntryInsert(ginstate, attnum, key, category,
                               list, nlist, NULL);
@@ -904,7 +904,7 @@ ginInsertCleanup(GinState *ginstate, bool full_clean,
 
                ginBeginBAScan(&accum);
                while ((list = ginGetBAEntry(&accum,
-                                 &attnum, &key, &category, &nlist)) != NULL)
+                                            &attnum, &key, &category, &nlist)) != NULL)
                    ginEntryInsert(ginstate, attnum, key, category,
                                   list, nlist, NULL);
            }
@@ -989,7 +989,7 @@ gin_clean_pending_list(PG_FUNCTION_ARGS)
        ereport(ERROR,
                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
                 errmsg("recovery is in progress"),
-        errhint("GIN pending list cannot be cleaned up during recovery.")));
+                errhint("GIN pending list cannot be cleaned up during recovery.")));
 
    /* Must be a GIN index */
    if (indexRel->rd_rel->relkind != RELKIND_INDEX ||
@@ -1007,7 +1007,7 @@ gin_clean_pending_list(PG_FUNCTION_ARGS)
    if (RELATION_IS_OTHER_TEMP(indexRel))
        ereport(ERROR,
                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-              errmsg("cannot access temporary indexes of other sessions")));
+                errmsg("cannot access temporary indexes of other sessions")));
 
    /* User must own the index (comparable to privileges needed for VACUUM) */
    if (!pg_class_ownercheck(indexoid, GetUserId()))
index 610d386ff8a99c022aacff6650386237f5e23187..56a5bf47b8cd5bfc619fb6593bd873bf2471db1a 100644 (file)
@@ -179,11 +179,11 @@ collectMatchBitmap(GinBtreeData *btree, GinBtreeStack *stack,
             *----------
             */
            cmp = DatumGetInt32(FunctionCall4Coll(&btree->ginstate->comparePartialFn[attnum - 1],
-                              btree->ginstate->supportCollation[attnum - 1],
+                                                 btree->ginstate->supportCollation[attnum - 1],
                                                  scanEntry->queryKey,
                                                  idatum,
-                                        UInt16GetDatum(scanEntry->strategy),
-                                   PointerGetDatum(scanEntry->extra_data)));
+                                                 UInt16GetDatum(scanEntry->strategy),
+                                                 PointerGetDatum(scanEntry->extra_data)));
 
            if (cmp > 0)
                return true;
@@ -628,7 +628,7 @@ entryLoadMoreItems(GinState *ginstate, GinScanEntry entry,
        {
            ItemPointerSet(&entry->btree.itemptr,
                           GinItemPointerGetBlockNumber(&advancePast),
-             OffsetNumberNext(GinItemPointerGetOffsetNumber(&advancePast)));
+                          OffsetNumberNext(GinItemPointerGetOffsetNumber(&advancePast)));
        }
        entry->btree.fullScan = false;
        stack = ginFindLeafPage(&entry->btree, true, snapshot);
@@ -990,7 +990,7 @@ keyGetItem(GinState *ginstate, MemoryContext tempCtx, GinScanKey key,
        Assert(GinItemPointerGetOffsetNumber(&minItem) > 0);
        ItemPointerSet(&advancePast,
                       GinItemPointerGetBlockNumber(&minItem),
-                 OffsetNumberPrev(GinItemPointerGetOffsetNumber(&minItem)));
+                      OffsetNumberPrev(GinItemPointerGetOffsetNumber(&minItem)));
    }
 
    /*
@@ -1249,7 +1249,7 @@ scanGetItem(IndexScanDesc scan, ItemPointerData advancePast,
                    GinItemPointerGetBlockNumber(&key->curItem))
                {
                    ItemPointerSet(&advancePast,
-                                GinItemPointerGetBlockNumber(&key->curItem),
+                                  GinItemPointerGetBlockNumber(&key->curItem),
                                   InvalidOffsetNumber);
                }
            }
@@ -1461,11 +1461,11 @@ matchPartialInPendingList(GinState *ginstate, Page page,
         *----------
         */
        cmp = DatumGetInt32(FunctionCall4Coll(&ginstate->comparePartialFn[entry->attnum - 1],
-                              ginstate->supportCollation[entry->attnum - 1],
+                                             ginstate->supportCollation[entry->attnum - 1],
                                              entry->queryKey,
                                              datum[off - 1],
                                              UInt16GetDatum(entry->strategy),
-                                       PointerGetDatum(entry->extra_data)));
+                                             PointerGetDatum(entry->extra_data)));
        if (cmp == 0)
            return true;
        else if (cmp > 0)
index d90faae65dd1eee4bdfa2e288e53ff6fc00cb936..5378011f5045c893f200d6c18cbc5959c3e2da37 100644 (file)
@@ -292,7 +292,7 @@ ginBuildCallback(Relation index, HeapTuple htup, Datum *values,
 
        ginBeginBAScan(&buildstate->accum);
        while ((list = ginGetBAEntry(&buildstate->accum,
-                                 &attnum, &key, &category, &nlist)) != NULL)
+                                    &attnum, &key, &category, &nlist)) != NULL)
        {
            /* there could be many entries, so be willing to abort here */
            CHECK_FOR_INTERRUPTS();
@@ -380,7 +380,7 @@ ginbuild(Relation heap, Relation index, IndexInfo *indexInfo)
     * ginExtractEntries(), and can be reset after each tuple
     */
    buildstate.funcCtx = AllocSetContextCreate(CurrentMemoryContext,
-                    "Gin build temporary context for user-defined function",
+                                              "Gin build temporary context for user-defined function",
                                               ALLOCSET_DEFAULT_SIZES);
 
    buildstate.accum.ginstate = &buildstate.ginstate;
index a940a9374a129d53b614b32d8849ec9ca48db43f..5b8ad9a25aac89e1408bf660c0ffdccd244c19ed 100644 (file)
@@ -83,9 +83,9 @@ directBoolConsistentFn(GinScanKey key)
                                          key->query,
                                          UInt32GetDatum(key->nuserentries),
                                          PointerGetDatum(key->extra_data),
-                                      PointerGetDatum(&key->recheckCurItem),
+                                         PointerGetDatum(&key->recheckCurItem),
                                          PointerGetDatum(key->queryValues),
-                                    PointerGetDatum(key->queryCategories)));
+                                         PointerGetDatum(key->queryCategories)));
 }
 
 /*
@@ -95,15 +95,15 @@ static GinTernaryValue
 directTriConsistentFn(GinScanKey key)
 {
    return DatumGetGinTernaryValue(FunctionCall7Coll(
-                                                 key->triConsistentFmgrInfo,
+                                                    key->triConsistentFmgrInfo,
                                                     key->collation,
-                                             PointerGetDatum(key->entryRes),
-                                              UInt16GetDatum(key->strategy),
+                                                    PointerGetDatum(key->entryRes),
+                                                    UInt16GetDatum(key->strategy),
                                                     key->query,
-                                          UInt32GetDatum(key->nuserentries),
-                                           PointerGetDatum(key->extra_data),
-                                          PointerGetDatum(key->queryValues),
-                                    PointerGetDatum(key->queryCategories)));
+                                                    UInt32GetDatum(key->nuserentries),
+                                                    PointerGetDatum(key->extra_data),
+                                                    PointerGetDatum(key->queryValues),
+                                                    PointerGetDatum(key->queryCategories)));
 }
 
 /*
@@ -117,15 +117,15 @@ shimBoolConsistentFn(GinScanKey key)
    GinTernaryValue result;
 
    result = DatumGetGinTernaryValue(FunctionCall7Coll(
-                                                 key->triConsistentFmgrInfo,
+                                                      key->triConsistentFmgrInfo,
                                                       key->collation,
-                                             PointerGetDatum(key->entryRes),
-                                              UInt16GetDatum(key->strategy),
+                                                      PointerGetDatum(key->entryRes),
+                                                      UInt16GetDatum(key->strategy),
                                                       key->query,
-                                          UInt32GetDatum(key->nuserentries),
-                                           PointerGetDatum(key->extra_data),
-                                          PointerGetDatum(key->queryValues),
-                                    PointerGetDatum(key->queryCategories)));
+                                                      UInt32GetDatum(key->nuserentries),
+                                                      PointerGetDatum(key->extra_data),
+                                                      PointerGetDatum(key->queryValues),
+                                                      PointerGetDatum(key->queryCategories)));
    if (result == GIN_MAYBE)
    {
        key->recheckCurItem = true;
index 25758b9b5dd197050b8fc1ac88b6045d0ede2b64..7ceea7a741b0a74bcf3abd673ceceeb6c3539c06 100644 (file)
@@ -310,11 +310,11 @@ ginNewScanKey(IndexScanDesc scan)
        /* OK to call the extractQueryFn */
        queryValues = (Datum *)
            DatumGetPointer(FunctionCall7Coll(&so->ginstate.extractQueryFn[skey->sk_attno - 1],
-                          so->ginstate.supportCollation[skey->sk_attno - 1],
+                                             so->ginstate.supportCollation[skey->sk_attno - 1],
                                              skey->sk_argument,
                                              PointerGetDatum(&nQueryValues),
-                                          UInt16GetDatum(skey->sk_strategy),
-                                          PointerGetDatum(&partial_matches),
+                                             UInt16GetDatum(skey->sk_strategy),
+                                             PointerGetDatum(&partial_matches),
                                              PointerGetDatum(&extra_data),
                                              PointerGetDatum(&nullFlags),
                                              PointerGetDatum(&searchMode)));
index d03d59da6a73f9ae5cc667082da723f8042360ee..91e4a8cf700d526c8b435df00740d265195bd8e9 100644 (file)
@@ -131,8 +131,8 @@ initGinState(GinState *state, Relation index)
            if (!OidIsValid(typentry->cmp_proc_finfo.fn_oid))
                ereport(ERROR,
                        (errcode(ERRCODE_UNDEFINED_FUNCTION),
-               errmsg("could not identify a comparison function for type %s",
-                      format_type_be(origTupdesc->attrs[i]->atttypid))));
+                        errmsg("could not identify a comparison function for type %s",
+                               format_type_be(origTupdesc->attrs[i]->atttypid))));
            fmgr_info_copy(&(state->compareFn[i]),
                           &(typentry->cmp_proc_finfo),
                           CurrentMemoryContext);
@@ -153,14 +153,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);
        }
 
@@ -178,7 +178,7 @@ initGinState(GinState *state, Relation index)
        if (index_getprocid(index, i + 1, GIN_COMPARE_PARTIAL_PROC) != InvalidOid)
        {
            fmgr_info_copy(&(state->comparePartialFn[i]),
-                  index_getprocinfo(index, i + 1, GIN_COMPARE_PARTIAL_PROC),
+                          index_getprocinfo(index, i + 1, GIN_COMPARE_PARTIAL_PROC),
                           CurrentMemoryContext);
            state->canPartialMatch[i] = true;
        }
@@ -392,7 +392,7 @@ ginCompareEntries(GinState *ginstate, OffsetNumber attnum,
 
    /* both not null, so safe to call the compareFn */
    return DatumGetInt32(FunctionCall2Coll(&ginstate->compareFn[attnum - 1],
-                                     ginstate->supportCollation[attnum - 1],
+                                          ginstate->supportCollation[attnum - 1],
                                           a, b));
 }
 
@@ -499,7 +499,7 @@ ginExtractEntries(GinState *ginstate, OffsetNumber attnum,
    nullFlags = NULL;           /* in case extractValue doesn't set it */
    entries = (Datum *)
        DatumGetPointer(FunctionCall3Coll(&ginstate->extractValueFn[attnum - 1],
-                                     ginstate->supportCollation[attnum - 1],
+                                         ginstate->supportCollation[attnum - 1],
                                          value,
                                          PointerGetDatum(nentries),
                                          PointerGetDatum(&nullFlags)));
@@ -602,7 +602,7 @@ ginoptions(Datum reloptions, bool validate)
    static const relopt_parse_elt tab[] = {
        {"fastupdate", RELOPT_TYPE_BOOL, offsetof(GinOptions, useFastUpdate)},
        {"gin_pending_list_limit", RELOPT_TYPE_INT, offsetof(GinOptions,
-                                                    pendingListCleanupSize)}
+                                                            pendingListCleanupSize)}
    };
 
    options = parseRelOptions(reloptions, validate, RELOPT_KIND_GIN,
index afef753ede531ec3a3fbb4d06118998eafa198fe..565525bbdfceb95407137fd962f3d58bcf8fdf38 100644 (file)
@@ -28,7 +28,7 @@
 /* non-export function prototypes */
 static void gistfixsplit(GISTInsertState *state, GISTSTATE *giststate);
 static bool gistinserttuple(GISTInsertState *state, GISTInsertStack *stack,
-            GISTSTATE *giststate, IndexTuple tuple, OffsetNumber oldoffnum);
+               GISTSTATE *giststate, IndexTuple tuple, OffsetNumber oldoffnum);
 static bool gistinserttuples(GISTInsertState *state, GISTInsertStack *stack,
                 GISTSTATE *giststate,
                 IndexTuple *tuples, int ntup, OffsetNumber oldoffnum,
@@ -1170,7 +1170,7 @@ gistfixsplit(GISTInsertState *state, GISTSTATE *giststate)
  */
 static bool
 gistinserttuple(GISTInsertState *state, GISTInsertStack *stack,
-             GISTSTATE *giststate, IndexTuple tuple, OffsetNumber oldoffnum)
+               GISTSTATE *giststate, IndexTuple tuple, OffsetNumber oldoffnum)
 {
    return gistinserttuples(state, stack, giststate, &tuple, 1, oldoffnum,
                            InvalidBuffer, InvalidBuffer, false, false);
@@ -1360,9 +1360,9 @@ gistSplit(Relation r,
    if (len == 1)
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-           errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
-                  IndexTupleSize(itup[0]), GiSTPageSize,
-                  RelationGetRelationName(r))));
+                errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
+                       IndexTupleSize(itup[0]), GiSTPageSize,
+                       RelationGetRelationName(r))));
 
    memset(v.spl_lisnull, TRUE, sizeof(bool) * giststate->tupdesc->natts);
    memset(v.spl_risnull, TRUE, sizeof(bool) * giststate->tupdesc->natts);
@@ -1471,7 +1471,7 @@ initGISTstate(Relation index)
        /* opclasses are not required to provide a Distance method */
        if (OidIsValid(index_getprocid(index, i + 1, GIST_DISTANCE_PROC)))
            fmgr_info_copy(&(giststate->distanceFn[i]),
-                        index_getprocinfo(index, i + 1, GIST_DISTANCE_PROC),
+                          index_getprocinfo(index, i + 1, GIST_DISTANCE_PROC),
                           scanCxt);
        else
            giststate->distanceFn[i].fn_oid = InvalidOid;
index c24643df0365d485adc7e2cd215877ac790d7beb..4756a70ae6de0458d10d244ef8a9254b29bbf74b 100644 (file)
@@ -248,7 +248,7 @@ gistValidateBufferingOption(char *value)
        ereport(ERROR,
                (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                 errmsg("invalid value for \"buffering\" option"),
-             errdetail("Valid values are \"on\", \"off\", and \"auto\".")));
+                errdetail("Valid values are \"on\", \"off\", and \"auto\".")));
    }
 }
 
@@ -1083,7 +1083,7 @@ gistGetMaxLevel(Relation index)
         * everywhere, so we just pick the first one.
         */
        itup = (IndexTuple) PageGetItem(page,
-                                    PageGetItemId(page, FirstOffsetNumber));
+                                       PageGetItemId(page, FirstOffsetNumber));
        blkno = ItemPointerGetBlockNumber(&(itup->t_tid));
        UnlockReleaseBuffer(buffer);
 
@@ -1143,7 +1143,7 @@ gistInitParentMap(GISTBuildState *buildstate)
    buildstate->parentMap = hash_create("gistbuild parent map",
                                        1024,
                                        &hashCtl,
-                                     HASH_ELEM | HASH_BLOBS | HASH_CONTEXT);
+                                       HASH_ELEM | HASH_BLOBS | HASH_CONTEXT);
 }
 
 static void
index f558729fbf0867176302bfed63179b89d96e6632..88cee2028daf59353f184230120ad1d9f215dbf5 100644 (file)
@@ -102,7 +102,7 @@ gistInitBuildBuffers(int pagesPerBuffer, int levelStep, int maxLevel)
     */
    gfbb->loadedBuffersLen = 32;
    gfbb->loadedBuffers = (GISTNodeBuffer **) palloc(gfbb->loadedBuffersLen *
-                                                  sizeof(GISTNodeBuffer *));
+                                                    sizeof(GISTNodeBuffer *));
    gfbb->loadedBuffersCount = 0;
 
    gfbb->rootlevel = maxLevel;
index 15b89fd8ade73bbbb68c382c4d56fc5073f1a834..08990f5a1be7daaae2aa84e07b595e56af488aa7 100644 (file)
@@ -910,64 +910,64 @@ gist_box_leaf_consistent(BOX *key, BOX *query, StrategyNumber strategy)
        case RTLeftStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_left,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTOverLeftStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_overleft,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTOverlapStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_overlap,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTOverRightStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_overright,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTRightStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_right,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTSameStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_same,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTContainsStrategyNumber:
        case RTOldContainsStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_contain,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTContainedByStrategyNumber:
        case RTOldContainedByStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_contained,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTOverBelowStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_overbelow,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTBelowStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_below,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTAboveStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_above,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTOverAboveStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_overabove,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        default:
            elog(ERROR, "unrecognized strategy number: %d", strategy);
@@ -997,60 +997,60 @@ rtree_internal_consistent(BOX *key, BOX *query, StrategyNumber strategy)
        case RTLeftStrategyNumber:
            retval = !DatumGetBool(DirectFunctionCall2(box_overright,
                                                       PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                      PointerGetDatum(query)));
            break;
        case RTOverLeftStrategyNumber:
            retval = !DatumGetBool(DirectFunctionCall2(box_right,
                                                       PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                      PointerGetDatum(query)));
            break;
        case RTOverlapStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_overlap,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTOverRightStrategyNumber:
            retval = !DatumGetBool(DirectFunctionCall2(box_left,
                                                       PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                      PointerGetDatum(query)));
            break;
        case RTRightStrategyNumber:
            retval = !DatumGetBool(DirectFunctionCall2(box_overleft,
                                                       PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                      PointerGetDatum(query)));
            break;
        case RTSameStrategyNumber:
        case RTContainsStrategyNumber:
        case RTOldContainsStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_contain,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTContainedByStrategyNumber:
        case RTOldContainedByStrategyNumber:
            retval = DatumGetBool(DirectFunctionCall2(box_overlap,
                                                      PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                     PointerGetDatum(query)));
            break;
        case RTOverBelowStrategyNumber:
            retval = !DatumGetBool(DirectFunctionCall2(box_above,
                                                       PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                      PointerGetDatum(query)));
            break;
        case RTBelowStrategyNumber:
            retval = !DatumGetBool(DirectFunctionCall2(box_overabove,
                                                       PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                      PointerGetDatum(query)));
            break;
        case RTAboveStrategyNumber:
            retval = !DatumGetBool(DirectFunctionCall2(box_overbelow,
                                                       PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                      PointerGetDatum(query)));
            break;
        case RTOverAboveStrategyNumber:
            retval = !DatumGetBool(DirectFunctionCall2(box_below,
                                                       PointerGetDatum(key),
-                                                   PointerGetDatum(query)));
+                                                      PointerGetDatum(query)));
            break;
        default:
            elog(ERROR, "unrecognized strategy number: %d", strategy);
@@ -1419,11 +1419,11 @@ gist_point_consistent(PG_FUNCTION_ARGS)
                POLYGON    *query = PG_GETARG_POLYGON_P(1);
 
                result = DatumGetBool(DirectFunctionCall5(
-                                                       gist_poly_consistent,
-                                                     PointerGetDatum(entry),
-                                                    PolygonPGetDatum(query),
-                                     Int16GetDatum(RTOverlapStrategyNumber),
-                                              0, PointerGetDatum(recheck)));
+                                                         gist_poly_consistent,
+                                                         PointerGetDatum(entry),
+                                                         PolygonPGetDatum(query),
+                                                         Int16GetDatum(RTOverlapStrategyNumber),
+                                                         0, PointerGetDatum(recheck)));
 
                if (GIST_LEAF(entry) && result)
                {
@@ -1437,8 +1437,8 @@ gist_point_consistent(PG_FUNCTION_ARGS)
                           && box->high.y == box->low.y);
                    result = DatumGetBool(DirectFunctionCall2(
                                                              poly_contain_pt,
-                                                    PolygonPGetDatum(query),
-                                               PointPGetDatum(&box->high)));
+                                                             PolygonPGetDatum(query),
+                                                             PointPGetDatum(&box->high)));
                    *recheck = false;
                }
            }
@@ -1448,11 +1448,11 @@ gist_point_consistent(PG_FUNCTION_ARGS)
                CIRCLE     *query = PG_GETARG_CIRCLE_P(1);
 
                result = DatumGetBool(DirectFunctionCall5(
-                                                     gist_circle_consistent,
-                                                     PointerGetDatum(entry),
-                                                     CirclePGetDatum(query),
-                                     Int16GetDatum(RTOverlapStrategyNumber),
-                                              0, PointerGetDatum(recheck)));
+                                                         gist_circle_consistent,
+                                                         PointerGetDatum(entry),
+                                                         CirclePGetDatum(query),
+                                                         Int16GetDatum(RTOverlapStrategyNumber),
+                                                         0, PointerGetDatum(recheck)));
 
                if (GIST_LEAF(entry) && result)
                {
@@ -1465,9 +1465,9 @@ gist_point_consistent(PG_FUNCTION_ARGS)
                    Assert(box->high.x == box->low.x
                           && box->high.y == box->low.y);
                    result = DatumGetBool(DirectFunctionCall2(
-                                                          circle_contain_pt,
-                                                     CirclePGetDatum(query),
-                                               PointPGetDatum(&box->high)));
+                                                             circle_contain_pt,
+                                                             CirclePGetDatum(query),
+                                                             PointPGetDatum(&box->high)));
                    *recheck = false;
                }
            }
index cffc5ddc7571cd2b3213620cd24ce5b0225d8725..617f42c317e1559158d3cef7c39fb56c202ea31d 100644 (file)
@@ -443,8 +443,8 @@ gistUserPicksplit(Relation r, GistEntryVector *entryvec, int attno, GistSplitVec
         */
        ereport(DEBUG1,
                (errcode(ERRCODE_INTERNAL_ERROR),
-             errmsg("picksplit method for column %d of index \"%s\" failed",
-                    attno + 1, RelationGetRelationName(r)),
+                errmsg("picksplit method for column %d of index \"%s\" failed",
+                       attno + 1, RelationGetRelationName(r)),
                 errhint("The index is not optimal. To optimize it, contact a developer, or try to use the column as the second one in the CREATE INDEX command.")));
 
        /*
index cbdaec9d2b34d73a60c7682e3486836212cdc50f..b6ccc1a66a132cdf4e8d52f89015823a7576771c 100644 (file)
@@ -552,7 +552,7 @@ gistdentryinit(GISTSTATE *giststate, int nkey, GISTENTRY *e,
        gistentryinit(*e, k, r, pg, o, l);
        dep = (GISTENTRY *)
            DatumGetPointer(FunctionCall1Coll(&giststate->decompressFn[nkey],
-                                          giststate->supportCollation[nkey],
+                                             giststate->supportCollation[nkey],
                                              PointerGetDatum(e)));
        /* decompressFn may just return the given pointer */
        if (dep != e)
@@ -587,7 +587,7 @@ gistFormTuple(GISTSTATE *giststate, Relation r,
                          isleaf);
            cep = (GISTENTRY *)
                DatumGetPointer(FunctionCall1Coll(&giststate->compressFn[i],
-                                             giststate->supportCollation[i],
+                                                 giststate->supportCollation[i],
                                                  PointerGetDatum(&centry)));
            compatt[i] = cep->key;
        }
@@ -733,9 +733,9 @@ gistcheckpage(Relation rel, Buffer buf)
    if (PageIsNew(page))
        ereport(ERROR,
                (errcode(ERRCODE_INDEX_CORRUPTED),
-            errmsg("index \"%s\" contains unexpected zero page at block %u",
-                   RelationGetRelationName(rel),
-                   BufferGetBlockNumber(buf)),
+                errmsg("index \"%s\" contains unexpected zero page at block %u",
+                       RelationGetRelationName(rel),
+                       BufferGetBlockNumber(buf)),
                 errhint("Please REINDEX it.")));
 
    /*
index 01c8d8006c0322bb371b6fc1b16c8655968a675a..dc08db97db0dd54ebbd9015f52e642a9bf4b7073 100644 (file)
@@ -81,7 +81,7 @@ restart_insert:
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
                 errmsg("index row size %zu exceeds hash maximum %zu",
                        itemsz, HashMaxItemSize(metapage)),
-           errhint("Values larger than a buffer page cannot be indexed.")));
+                errhint("Values larger than a buffer page cannot be indexed.")));
 
    /* Lock the primary bucket page for the target bucket. */
    buf = _hash_getbucketbuf_from_hashkey(rel, hashkey, HASH_WRITE,
index 8468efee02089e630fd9c6a2c1d7516f349f3830..c206e704d4d1d326dd4429421b26e5acb15c7013 100644 (file)
@@ -534,7 +534,7 @@ _hash_freeovflpage(Relation rel, Buffer bucketbuf, Buffer ovflbuf,
            prevbuf = _hash_getbuf_with_strategy(rel,
                                                 prevblkno,
                                                 HASH_WRITE,
-                                          LH_BUCKET_PAGE | LH_OVERFLOW_PAGE,
+                                                LH_BUCKET_PAGE | LH_OVERFLOW_PAGE,
                                                 bstrategy);
    }
    if (BlockNumberIsValid(nextblkno))
@@ -972,7 +972,7 @@ readpage:
 
                        XLogRegisterBuffer(2, rbuf, REGBUF_STANDARD);
                        XLogRegisterBufData(2, (char *) deletable,
-                                         ndeletable * sizeof(OffsetNumber));
+                                           ndeletable * sizeof(OffsetNumber));
 
                        recptr = XLogInsert(RM_HASH_ID, XLOG_HASH_MOVE_PAGE_CONTENTS);
 
index 4544889294a80c37ba8d2758f3d154693092ad1f..1cb18a75138606fd93551bf84f3bbdaab719da7c 100644 (file)
@@ -923,7 +923,7 @@ restart_expand:
            XLogRegisterBufData(2, (char *) &metap->hashm_ovflpoint,
                                sizeof(uint32));
            XLogRegisterBufData(2,
-                      (char *) &metap->hashm_spares[metap->hashm_ovflpoint],
+                               (char *) &metap->hashm_spares[metap->hashm_ovflpoint],
                                sizeof(uint32));
        }
 
index 62e37b6de594e9865cc7b76086adde4732c6c4a2..9b803af7c2554317d8496334882184242670e264 100644 (file)
@@ -235,9 +235,9 @@ _hash_checkpage(Relation rel, Buffer buf, int flags)
    if (PageIsNew(page))
        ereport(ERROR,
                (errcode(ERRCODE_INDEX_CORRUPTED),
-            errmsg("index \"%s\" contains unexpected zero page at block %u",
-                   RelationGetRelationName(rel),
-                   BufferGetBlockNumber(buf)),
+                errmsg("index \"%s\" contains unexpected zero page at block %u",
+                       RelationGetRelationName(rel),
+                       BufferGetBlockNumber(buf)),
                 errhint("Please REINDEX it.")));
 
    /*
@@ -258,9 +258,9 @@ _hash_checkpage(Relation rel, Buffer buf, int flags)
        if ((opaque->hasho_flag & flags) == 0)
            ereport(ERROR,
                    (errcode(ERRCODE_INDEX_CORRUPTED),
-                  errmsg("index \"%s\" contains corrupted page at block %u",
-                         RelationGetRelationName(rel),
-                         BufferGetBlockNumber(buf)),
+                    errmsg("index \"%s\" contains corrupted page at block %u",
+                           RelationGetRelationName(rel),
+                           BufferGetBlockNumber(buf)),
                     errhint("Please REINDEX it.")));
    }
 
index 5357a77dc2d98d2a939333b5b4bc19b85fe6c46a..9766723deb3784170b37b368b5d46ddf608cadf9 100644 (file)
@@ -1426,7 +1426,7 @@ heap_beginscan_bm(Relation relation, Snapshot snapshot,
 HeapScanDesc
 heap_beginscan_sampling(Relation relation, Snapshot snapshot,
                        int nkeys, ScanKey key,
-                     bool allow_strat, bool allow_sync, bool allow_pagemode)
+                       bool allow_strat, bool allow_sync, bool allow_pagemode)
 {
    return heap_beginscan_internal(relation, snapshot, nkeys, key, NULL,
                                   allow_strat, allow_sync, allow_pagemode,
@@ -2244,7 +2244,7 @@ heap_get_latest_tid(Relation relation,
         * tuple.  Check for XMIN match.
         */
        if (TransactionIdIsValid(priorXmax) &&
-         !TransactionIdEquals(priorXmax, HeapTupleHeaderGetXmin(tp.t_data)))
+           !TransactionIdEquals(priorXmax, HeapTupleHeaderGetXmin(tp.t_data)))
        {
            UnlockReleaseBuffer(buffer);
            break;
@@ -3735,8 +3735,8 @@ l2:
                 */
                if (xmax_infomask_changed(oldtup.t_data->t_infomask,
                                          infomask) ||
-               !TransactionIdEquals(HeapTupleHeaderGetRawXmax(oldtup.t_data),
-                                    xwait))
+                   !TransactionIdEquals(HeapTupleHeaderGetRawXmax(oldtup.t_data),
+                                        xwait))
                    goto l2;
            }
 
@@ -3815,7 +3815,7 @@ l2:
             */
            if (xmax_infomask_changed(oldtup.t_data->t_infomask, infomask) ||
                !TransactionIdEquals(xwait,
-                                  HeapTupleHeaderGetRawXmax(oldtup.t_data)))
+                                    HeapTupleHeaderGetRawXmax(oldtup.t_data)))
                goto l2;
 
            /* Otherwise check if it committed or aborted */
@@ -4002,7 +4002,7 @@ l2:
                                  oldtup.t_data->t_infomask,
                                  oldtup.t_data->t_infomask2,
                                  xid, *lockmode, false,
-                             &xmax_lock_old_tuple, &infomask_lock_old_tuple,
+                                 &xmax_lock_old_tuple, &infomask_lock_old_tuple,
                                  &infomask2_lock_old_tuple);
 
        Assert(HEAP_XMAX_IS_LOCKED_ONLY(infomask_lock_old_tuple));
@@ -4177,7 +4177,7 @@ l2:
     * logged.
     */
    old_key_tuple = ExtractReplicaIdentity(relation, &oldtup,
-                                      bms_overlap(modified_attrs, id_attrs),
+                                          bms_overlap(modified_attrs, id_attrs),
                                           &old_key_copied);
 
    /* NO EREPORT(ERROR) from here till changes are logged */
@@ -4433,7 +4433,7 @@ HeapDetermineModifiedColumns(Relation relation, Bitmapset *interesting_cols,
        if (!heap_tuple_attr_equals(RelationGetDescr(relation),
                                    attnum, oldtup, newtup))
            modified = bms_add_member(modified,
-                               attnum - FirstLowInvalidHeapAttributeNumber);
+                                     attnum - FirstLowInvalidHeapAttributeNumber);
    }
 
    return modified;
@@ -4829,7 +4829,7 @@ l3:
                /* if the xmax changed in the meantime, start over */
                if (xmax_infomask_changed(tuple->t_data->t_infomask, infomask) ||
                    !TransactionIdEquals(
-                                   HeapTupleHeaderGetRawXmax(tuple->t_data),
+                                        HeapTupleHeaderGetRawXmax(tuple->t_data),
                                         xwait))
                    goto l3;
                /* otherwise, we're good */
@@ -4915,11 +4915,11 @@ l3:
                {
                    case LockWaitBlock:
                        MultiXactIdWait((MultiXactId) xwait, status, infomask,
-                                 relation, &tuple->t_self, XLTW_Lock, NULL);
+                                       relation, &tuple->t_self, XLTW_Lock, NULL);
                        break;
                    case LockWaitSkip:
                        if (!ConditionalMultiXactIdWait((MultiXactId) xwait,
-                                                 status, infomask, relation,
+                                                       status, infomask, relation,
                                                        NULL))
                        {
                            result = HeapTupleWouldBlock;
@@ -4930,12 +4930,12 @@ l3:
                        break;
                    case LockWaitError:
                        if (!ConditionalMultiXactIdWait((MultiXactId) xwait,
-                                                 status, infomask, relation,
+                                                       status, infomask, relation,
                                                        NULL))
                            ereport(ERROR,
                                    (errcode(ERRCODE_LOCK_NOT_AVAILABLE),
                                     errmsg("could not obtain lock on row in relation \"%s\"",
-                                       RelationGetRelationName(relation))));
+                                           RelationGetRelationName(relation))));
 
                        break;
                }
@@ -4973,7 +4973,7 @@ l3:
                            ereport(ERROR,
                                    (errcode(ERRCODE_LOCK_NOT_AVAILABLE),
                                     errmsg("could not obtain lock on row in relation \"%s\"",
-                                       RelationGetRelationName(relation))));
+                                           RelationGetRelationName(relation))));
                        break;
                }
            }
@@ -5224,8 +5224,8 @@ heap_acquire_tuplock(Relation relation, ItemPointer tid, LockTupleMode mode,
            if (!ConditionalLockTupleTuplock(relation, tid, mode))
                ereport(ERROR,
                        (errcode(ERRCODE_LOCK_NOT_AVAILABLE),
-                   errmsg("could not obtain lock on row in relation \"%s\"",
-                          RelationGetRelationName(relation))));
+                        errmsg("could not obtain lock on row in relation \"%s\"",
+                               RelationGetRelationName(relation))));
            break;
    }
    *have_tuple_lock = true;
@@ -5351,7 +5351,7 @@ l5:
        {
            if (HEAP_XMAX_IS_LOCKED_ONLY(old_infomask) ||
                !TransactionIdDidCommit(MultiXactIdGetUpdateXid(xmax,
-                                                             old_infomask)))
+                                                               old_infomask)))
            {
                /*
                 * Reset these bits and restart; otherwise fall through to
@@ -5741,7 +5741,7 @@ l4:
                Assert(!HEAP_LOCKED_UPGRADED(mytup.t_data->t_infomask));
 
                nmembers = GetMultiXactIdMembers(rawxmax, &members, false,
-                                    HEAP_XMAX_IS_LOCKED_ONLY(old_infomask));
+                                                HEAP_XMAX_IS_LOCKED_ONLY(old_infomask));
                for (i = 0; i < nmembers; i++)
                {
                    result = test_lockmode_for_conflict(members[i].status,
@@ -7236,7 +7236,7 @@ heap_tuple_needs_freeze(HeapTupleHeader tuple, TransactionId cutoff_xid,
            /* need to check whether any member of the mxact is too old */
 
            nmembers = GetMultiXactIdMembers(multi, &members, false,
-                               HEAP_XMAX_IS_LOCKED_ONLY(tuple->t_infomask));
+                                            HEAP_XMAX_IS_LOCKED_ONLY(tuple->t_infomask));
 
            for (i = 0; i < nmembers; i++)
            {
@@ -7639,7 +7639,7 @@ log_heap_update(Relation reln, Buffer oldbuf,
    {
        XLogRegisterBufData(0,
                            ((char *) newtup->t_data) + SizeofHeapTupleHeader,
-                         newtup->t_len - SizeofHeapTupleHeader - suffixlen);
+                           newtup->t_len - SizeofHeapTupleHeader - suffixlen);
    }
    else
    {
@@ -7651,14 +7651,14 @@ log_heap_update(Relation reln, Buffer oldbuf,
        if (newtup->t_data->t_hoff - SizeofHeapTupleHeader > 0)
        {
            XLogRegisterBufData(0,
-                          ((char *) newtup->t_data) + SizeofHeapTupleHeader,
-                            newtup->t_data->t_hoff - SizeofHeapTupleHeader);
+                               ((char *) newtup->t_data) + SizeofHeapTupleHeader,
+                               newtup->t_data->t_hoff - SizeofHeapTupleHeader);
        }
 
        /* data after common prefix */
        XLogRegisterBufData(0,
-             ((char *) newtup->t_data) + newtup->t_data->t_hoff + prefixlen,
-            newtup->t_len - newtup->t_data->t_hoff - prefixlen - suffixlen);
+                           ((char *) newtup->t_data) + newtup->t_data->t_hoff + prefixlen,
+                           newtup->t_len - newtup->t_data->t_hoff - prefixlen - suffixlen);
    }
 
    /* We need to log a tuple identity */
index 5b7c57d56858b5f6f96941e10a695d38aff69eec..52231ac41784d8713b705361f165e695faa16bba 100644 (file)
@@ -407,7 +407,7 @@ heap_prune_chain(Relation relation, Buffer buffer, OffsetNumber rootoffnum,
            {
                heap_prune_record_unused(prstate, rootoffnum);
                HeapTupleHeaderAdvanceLatestRemovedXid(htup,
-                                                &prstate->latestRemovedXid);
+                                                      &prstate->latestRemovedXid);
                ndeleted++;
            }
 
@@ -540,7 +540,7 @@ heap_prune_chain(Relation relation, Buffer buffer, OffsetNumber rootoffnum,
        {
            latestdead = offnum;
            HeapTupleHeaderAdvanceLatestRemovedXid(htup,
-                                                &prstate->latestRemovedXid);
+                                                  &prstate->latestRemovedXid);
        }
        else if (!recent_dead)
            break;
index fa5e78a067cb8ba6337eeb32e253f8867ba9bc3d..458180bc95fe5f7bc691ae474f65aa7389c42ba2 100644 (file)
@@ -1628,7 +1628,7 @@ toast_save_datum(Relation rel, Datum value,
            {
                toast_pointer.va_valueid =
                    GetNewOidWithIndex(toastrel,
-                                    RelationGetRelid(toastidxs[validIndex]),
+                                      RelationGetRelid(toastidxs[validIndex]),
                                       (AttrNumber) 1);
            } while (toastid_valueid_exists(rel->rd_toastoid,
                                            toast_pointer.va_valueid));
@@ -2168,7 +2168,7 @@ toast_fetch_datum_slice(struct varlena *attr, int32 sliceoffset, int32 length)
    init_toast_snapshot(&SnapshotToast);
    nextidx = startchunk;
    toastscan = systable_beginscan_ordered(toastrel, toastidxs[validIndex],
-                                       &SnapshotToast, nscankeys, toastkey);
+                                          &SnapshotToast, nscankeys, toastkey);
    while ((ttup = systable_getnext_ordered(toastscan, ForwardScanDirection)) != NULL)
    {
        /*
index e5616ce0511656958eacfa7687ec170a8460319d..4c2a13aebaeaae723ebcba874a3e54306a48cad8 100644 (file)
@@ -592,7 +592,7 @@ vm_readbuf(Relation rel, BlockNumber blkno, bool extend)
    {
        if (smgrexists(rel->rd_smgr, VISIBILITYMAP_FORKNUM))
            rel->rd_smgr->smgr_vm_nblocks = smgrnblocks(rel->rd_smgr,
-                                                     VISIBILITYMAP_FORKNUM);
+                                                       VISIBILITYMAP_FORKNUM);
        else
            rel->rd_smgr->smgr_vm_nblocks = 0;
    }
index cacd74a978d7e0c84c8c71407fbc83911e4e842b..bef4255369a6c7a4c125a93fac242df99a80a545 100644 (file)
@@ -431,7 +431,7 @@ index_parallelscan_estimate(Relation indexRelation, Snapshot snapshot)
     */
    if (indexRelation->rd_amroutine->amestimateparallelscan != NULL)
        nbytes = add_size(nbytes,
-                     indexRelation->rd_amroutine->amestimateparallelscan());
+                         indexRelation->rd_amroutine->amestimateparallelscan());
 
    return nbytes;
 }
@@ -751,7 +751,7 @@ index_bulk_delete(IndexVacuumInfo *info,
    CHECK_REL_PROCEDURE(ambulkdelete);
 
    return indexRelation->rd_amroutine->ambulkdelete(info, stats,
-                                                  callback, callback_state);
+                                                    callback, callback_state);
 }
 
 /* ----------------
index df8f44ae8085e90a9cb7979b0db9b9d9eae285cc..4aca7e4db8f8cef3b7e3dede0d456f50f42084f5 100644 (file)
@@ -428,10 +428,10 @@ _bt_check_unique(Relation rel, IndexTuple itup, Relation heapRel,
                                (errcode(ERRCODE_UNIQUE_VIOLATION),
                                 errmsg("duplicate key value violates unique constraint \"%s\"",
                                        RelationGetRelationName(rel)),
-                              key_desc ? errdetail("Key %s already exists.",
-                                                   key_desc) : 0,
+                                key_desc ? errdetail("Key %s already exists.",
+                                                     key_desc) : 0,
                                 errtableconstraint(heapRel,
-                                            RelationGetRelationName(rel))));
+                                                   RelationGetRelationName(rel))));
                    }
                }
                else if (all_dead)
@@ -497,7 +497,7 @@ _bt_check_unique(Relation rel, IndexTuple itup, Relation heapRel,
                (errcode(ERRCODE_INTERNAL_ERROR),
                 errmsg("failed to re-find tuple within index \"%s\"",
                        RelationGetRelationName(rel)),
-        errhint("This may be because of a non-immutable index expression."),
+                errhint("This may be because of a non-immutable index expression."),
                 errtableconstraint(heapRel,
                                    RelationGetRelationName(rel))));
 
@@ -574,12 +574,12 @@ _bt_findinsertloc(Relation rel,
    if (itemsz > BTMaxItemSize(page))
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-           errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
-                  itemsz, BTMaxItemSize(page),
-                  RelationGetRelationName(rel)),
-       errhint("Values larger than 1/3 of a buffer page cannot be indexed.\n"
-               "Consider a function index of an MD5 hash of the value, "
-               "or use full text indexing."),
+                errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
+                       itemsz, BTMaxItemSize(page),
+                       RelationGetRelationName(rel)),
+                errhint("Values larger than 1/3 of a buffer page cannot be indexed.\n"
+                        "Consider a function index of an MD5 hash of the value, "
+                        "or use full text indexing."),
                 errtableconstraint(heapRel,
                                    RelationGetRelationName(rel))));
 
@@ -1194,7 +1194,7 @@ _bt_split(Relation rel, Buffer buf, Buffer cbuf, OffsetNumber firstright,
        {
            memset(rightpage, 0, BufferGetPageSize(rbuf));
            elog(ERROR, "right sibling's left-link doesn't match: "
-              "block %u links to %u instead of expected %u in index \"%s\"",
+                "block %u links to %u instead of expected %u in index \"%s\"",
                 oopaque->btpo_next, sopaque->btpo_prev, origpagenumber,
                 RelationGetRelationName(rel));
        }
@@ -1327,7 +1327,7 @@ _bt_split(Relation rel, Buffer buf, Buffer cbuf, OffsetNumber firstright,
         * _bt_restore_page().
         */
        XLogRegisterBufData(1,
-                    (char *) rightpage + ((PageHeader) rightpage)->pd_upper,
+                           (char *) rightpage + ((PageHeader) rightpage)->pd_upper,
                            ((PageHeader) rightpage)->pd_special - ((PageHeader) rightpage)->pd_upper);
 
        if (isroot)
@@ -2052,7 +2052,7 @@ _bt_newroot(Relation rel, Buffer lbuf, Buffer rbuf)
         * some new func in page API.
         */
        XLogRegisterBufData(0,
-                      (char *) rootpage + ((PageHeader) rootpage)->pd_upper,
+                           (char *) rootpage + ((PageHeader) rootpage)->pd_upper,
                            ((PageHeader) rootpage)->pd_special -
                            ((PageHeader) rootpage)->pd_upper);
 
index f815fd40b20e98a88cb2fb5c71005ea125a459c9..5c817b6510523342d0904db6a6b221e8a8ce8fcb 100644 (file)
@@ -513,9 +513,9 @@ _bt_checkpage(Relation rel, Buffer buf)
    if (PageIsNew(page))
        ereport(ERROR,
                (errcode(ERRCODE_INDEX_CORRUPTED),
-            errmsg("index \"%s\" contains unexpected zero page at block %u",
-                   RelationGetRelationName(rel),
-                   BufferGetBlockNumber(buf)),
+                errmsg("index \"%s\" contains unexpected zero page at block %u",
+                       RelationGetRelationName(rel),
+                       BufferGetBlockNumber(buf)),
                 errhint("Please REINDEX it.")));
 
    /*
@@ -1067,7 +1067,7 @@ _bt_lock_branch_parent(Relation rel, BlockNumber child, BTStack stack,
            }
 
            return _bt_lock_branch_parent(rel, parent, stack->bts_parent,
-                                       topparent, topoff, target, rightsib);
+                                         topparent, topoff, target, rightsib);
        }
        else
        {
@@ -1150,8 +1150,8 @@ _bt_pagedel(Relation rel, Buffer buf)
            if (P_ISHALFDEAD(opaque))
                ereport(LOG,
                        (errcode(ERRCODE_INDEX_CORRUPTED),
-                   errmsg("index \"%s\" contains a half-dead internal page",
-                          RelationGetRelationName(rel)),
+                        errmsg("index \"%s\" contains a half-dead internal page",
+                               RelationGetRelationName(rel)),
                         errhint("This can be caused by an interrupted VACUUM in version 9.3 or older, before upgrade. Please REINDEX it.")));
            _bt_relbuf(rel, buf);
            return ndeleted;
index 2de1625a12c97fffd9b4b455c0fc1c82714d026b..642c8943e71cb9579dcb5ac642c606348c35ac78 100644 (file)
@@ -681,11 +681,11 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
                    ScanKeyEntryInitialize(chosen,
                                           (SK_SEARCHNOTNULL | SK_ISNULL |
                                            (impliesNN->sk_flags &
-                                         (SK_BT_DESC | SK_BT_NULLS_FIRST))),
+                                            (SK_BT_DESC | SK_BT_NULLS_FIRST))),
                                           curattr,
-                                ((impliesNN->sk_flags & SK_BT_NULLS_FIRST) ?
-                                 BTGreaterStrategyNumber :
-                                 BTLessStrategyNumber),
+                                          ((impliesNN->sk_flags & SK_BT_NULLS_FIRST) ?
+                                           BTGreaterStrategyNumber :
+                                           BTLessStrategyNumber),
                                           InvalidOid,
                                           InvalidOid,
                                           InvalidOid,
index 168756cc78f02f688e1f3a5a77072b0c5fa48cd8..bf6c03c7b2ab31812ae0bc2ca6ce03ae93d5e627 100644 (file)
@@ -345,7 +345,7 @@ _bt_pagestate(BTWriteState *wstate, uint32 level)
        state->btps_full = (BLCKSZ * (100 - BTREE_NONLEAF_FILLFACTOR) / 100);
    else
        state->btps_full = RelationGetTargetPageFreeSpace(wstate->index,
-                                                  BTREE_DEFAULT_FILLFACTOR);
+                                                         BTREE_DEFAULT_FILLFACTOR);
    /* no parent level, yet */
    state->btps_next = NULL;
 
@@ -485,12 +485,12 @@ _bt_buildadd(BTWriteState *wstate, BTPageState *state, IndexTuple itup)
    if (itupsz > BTMaxItemSize(npage))
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-           errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
-                  itupsz, BTMaxItemSize(npage),
-                  RelationGetRelationName(wstate->index)),
-       errhint("Values larger than 1/3 of a buffer page cannot be indexed.\n"
-               "Consider a function index of an MD5 hash of the value, "
-               "or use full text indexing."),
+                errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
+                       itupsz, BTMaxItemSize(npage),
+                       RelationGetRelationName(wstate->index)),
+                errhint("Values larger than 1/3 of a buffer page cannot be indexed.\n"
+                        "Consider a function index of an MD5 hash of the value, "
+                        "or use full text indexing."),
                 errtableconstraint(wstate->heap,
                                    RelationGetRelationName(wstate->index))));
 
index 5b259a31d99a6e822b9bf5fee4616f9447dc19f6..dbfb775dec84f5a1ffb125345672410ba791f584 100644 (file)
@@ -336,7 +336,7 @@ _bt_preprocess_array_keys(IndexScanDesc scan)
         * successive primitive indexscans produce data in index order.
         */
        num_elems = _bt_sort_array_elements(scan, cur,
-                       (indoption[cur->sk_attno - 1] & INDOPTION_DESC) != 0,
+                                           (indoption[cur->sk_attno - 1] & INDOPTION_DESC) != 0,
                                            elem_values, num_nonnulls);
 
        /*
@@ -1163,7 +1163,7 @@ _bt_compare_scankey_args(IndexScanDesc scan, ScanKey op,
            *result = DatumGetBool(OidFunctionCall2Coll(cmp_proc,
                                                        op->sk_collation,
                                                        leftarg->sk_argument,
-                                                    rightarg->sk_argument));
+                                                       rightarg->sk_argument));
            return true;
        }
    }
index 637ebf30f8594382991bc4887429801f07042952..8eb5275a8b4833b26aee0d963f54887edeced780 100644 (file)
@@ -66,7 +66,7 @@ brin_desc(StringInfo buf, XLogReaderState *record)
        xl_brin_desummarize *xlrec = (xl_brin_desummarize *) rec;
 
        appendStringInfo(buf, "pagesPerRange %u, heapBlk %u, page offset %u",
-                    xlrec->pagesPerRange, xlrec->heapBlk, xlrec->regOffset);
+                        xlrec->pagesPerRange, xlrec->heapBlk, xlrec->regOffset);
    }
 }
 
index df51f3ce1f50f37e5f3d91f8edc43219e13b3152..02c887496ef43d23fb6e56fbd07eb7e3ad1386f7 100644 (file)
@@ -89,8 +89,8 @@ gin_desc(StringInfo buf, XLogReaderState *record)
                ginxlogInsert *xlrec = (ginxlogInsert *) rec;
 
                appendStringInfo(buf, "isdata: %c isleaf: %c",
-                             (xlrec->flags & GIN_INSERT_ISDATA) ? 'T' : 'F',
-                            (xlrec->flags & GIN_INSERT_ISLEAF) ? 'T' : 'F');
+                                (xlrec->flags & GIN_INSERT_ISDATA) ? 'T' : 'F',
+                                (xlrec->flags & GIN_INSERT_ISLEAF) ? 'T' : 'F');
                if (!(xlrec->flags & GIN_INSERT_ISLEAF))
                {
                    char       *payload = rec + sizeof(ginxlogInsert);
@@ -126,9 +126,9 @@ gin_desc(StringInfo buf, XLogReaderState *record)
                        (ginxlogInsertDataInternal *) payload;
 
                        appendStringInfo(buf, " pitem: %u-%u/%u",
-                            PostingItemGetBlockNumber(&insertData->newitem),
-                        ItemPointerGetBlockNumber(&insertData->newitem.key),
-                       ItemPointerGetOffsetNumber(&insertData->newitem.key));
+                                        PostingItemGetBlockNumber(&insertData->newitem),
+                                        ItemPointerGetBlockNumber(&insertData->newitem.key),
+                                        ItemPointerGetOffsetNumber(&insertData->newitem.key));
                    }
                }
            }
@@ -138,10 +138,10 @@ gin_desc(StringInfo buf, XLogReaderState *record)
                ginxlogSplit *xlrec = (ginxlogSplit *) rec;
 
                appendStringInfo(buf, "isrootsplit: %c",
-               (((ginxlogSplit *) rec)->flags & GIN_SPLIT_ROOT) ? 'T' : 'F');
+                                (((ginxlogSplit *) rec)->flags & GIN_SPLIT_ROOT) ? 'T' : 'F');
                appendStringInfo(buf, " isdata: %c isleaf: %c",
-                             (xlrec->flags & GIN_INSERT_ISDATA) ? 'T' : 'F',
-                            (xlrec->flags & GIN_INSERT_ISLEAF) ? 'T' : 'F');
+                                (xlrec->flags & GIN_INSERT_ISDATA) ? 'T' : 'F',
+                                (xlrec->flags & GIN_INSERT_ISLEAF) ? 'T' : 'F');
            }
            break;
        case XLOG_GIN_VACUUM_PAGE:
index 35d86dc8935768507b00229f853d9b27e8f6710a..3e9236122b41099ebcde1ce254f4be45d413925f 100644 (file)
@@ -51,7 +51,7 @@ hash_desc(StringInfo buf, XLogReaderState *record)
                xl_hash_add_ovfl_page *xlrec = (xl_hash_add_ovfl_page *) rec;
 
                appendStringInfo(buf, "bmsize %d, bmpage_found %c",
-                          xlrec->bmsize, (xlrec->bmpage_found) ? 'T' : 'F');
+                                xlrec->bmsize, (xlrec->bmpage_found) ? 'T' : 'F');
                break;
            }
        case XLOG_HASH_SPLIT_ALLOCATE_PAGE:
@@ -60,7 +60,7 @@ hash_desc(StringInfo buf, XLogReaderState *record)
 
                appendStringInfo(buf, "new_bucket %u, meta_page_masks_updated %c, issplitpoint_changed %c",
                                 xlrec->new_bucket,
-                   (xlrec->flags & XLH_SPLIT_META_UPDATE_MASKS) ? 'T' : 'F',
+                                (xlrec->flags & XLH_SPLIT_META_UPDATE_MASKS) ? 'T' : 'F',
                                 (xlrec->flags & XLH_SPLIT_META_UPDATE_SPLITPOINT) ? 'T' : 'F');
                break;
            }
@@ -69,7 +69,7 @@ hash_desc(StringInfo buf, XLogReaderState *record)
                xl_hash_split_complete *xlrec = (xl_hash_split_complete *) rec;
 
                appendStringInfo(buf, "old_bucket_flag %u, new_bucket_flag %u",
-                            xlrec->old_bucket_flag, xlrec->new_bucket_flag);
+                                xlrec->old_bucket_flag, xlrec->new_bucket_flag);
                break;
            }
        case XLOG_HASH_MOVE_PAGE_CONTENTS:
index 8287751e48cc11a68e5969116bcf0784ca087c27..0b971c2aee4cad55c095c8a4a7a56b9193f0a9d4 100644 (file)
@@ -26,7 +26,7 @@ logicalmsg_desc(StringInfo buf, XLogReaderState *record)
        xl_logical_message *xlrec = (xl_logical_message *) rec;
 
        appendStringInfo(buf, "%s message size %zu bytes",
-                xlrec->transactional ? "transactional" : "nontransactional",
+                        xlrec->transactional ? "transactional" : "nontransactional",
                         xlrec->message_size);
    }
 }
index fbde9d65554ac3fe28f41d25c47c288f77aaff88..ad6bba6130bd0d3c1d969961452b0597f5900c5f 100644 (file)
@@ -93,7 +93,7 @@ btree_desc(StringInfo buf, XLogReaderState *record)
 
                appendStringInfo(buf, "rel %u/%u/%u; latestRemovedXid %u",
                                 xlrec->node.spcNode, xlrec->node.dbNode,
-                              xlrec->node.relNode, xlrec->latestRemovedXid);
+                                xlrec->node.relNode, xlrec->latestRemovedXid);
                break;
            }
    }
index 24d6cb58fdeec425967485588e8a0b34a665ebb5..41ed84b16853333e6243f63df2a2c50d4e5d5fc4 100644 (file)
@@ -76,7 +76,7 @@ spg_desc(StringInfo buf, XLogReaderState *record)
            break;
        case XLOG_SPGIST_VACUUM_REDIRECT:
            appendStringInfo(buf, "newest XID %u",
-                        ((spgxlogVacuumRedirect *) rec)->newestRedirectXid);
+                            ((spgxlogVacuumRedirect *) rec)->newestRedirectXid);
            break;
    }
 }
index 735f8c598fc512009a1c47b8c241909002001728..3aafa79e524d54c68cfd9e5aebaced931221349b 100644 (file)
@@ -205,8 +205,8 @@ xact_desc_commit(StringInfo buf, uint8 info, xl_xact_commit *xlrec, RepOriginId
    if (parsed.nmsgs > 0)
    {
        standby_desc_invalidations(
-                   buf, parsed.nmsgs, parsed.msgs, parsed.dbId, parsed.tsId,
-                         XactCompletionRelcacheInitFileInval(parsed.xinfo));
+                                  buf, parsed.nmsgs, parsed.msgs, parsed.dbId, parsed.tsId,
+                                  XactCompletionRelcacheInitFileInval(parsed.xinfo));
    }
 
    if (XactCompletionForceSyncCommit(parsed.xinfo))
index 2bf6de3332a285aba7b6b5c73a7ce19809dc0913..f72f0760173b1411332b9e9f9b1d947042617cfa 100644 (file)
@@ -48,7 +48,7 @@ xlog_desc(StringInfo buf, XLogReaderState *record)
                         "oldest xid %u in DB %u; oldest multi %u in DB %u; "
                         "oldest/newest commit timestamp xid: %u/%u; "
                         "oldest running xid %u; %s",
-               (uint32) (checkpoint->redo >> 32), (uint32) checkpoint->redo,
+                        (uint32) (checkpoint->redo >> 32), (uint32) checkpoint->redo,
                         checkpoint->ThisTimeLineID,
                         checkpoint->PrevTimeLineID,
                         checkpoint->fullPageWrites ? "true" : "false",
@@ -63,7 +63,7 @@ xlog_desc(StringInfo buf, XLogReaderState *record)
                         checkpoint->oldestCommitTsXid,
                         checkpoint->newestCommitTsXid,
                         checkpoint->oldestActiveXid,
-                (info == XLOG_CHECKPOINT_SHUTDOWN) ? "shutdown" : "online");
+                        (info == XLOG_CHECKPOINT_SHUTDOWN) ? "shutdown" : "online");
    }
    else if (info == XLOG_NEXTOID)
    {
index 8c420633f423f2ab1c4d55b3d63a0d040274acf1..b0702a7f927253e36a81f63a8d241296b832f34e 100644 (file)
@@ -189,7 +189,7 @@ saveNodeLink(Relation index, SPPageDesc *parent,
    SpGistInnerTuple innerTuple;
 
    innerTuple = (SpGistInnerTuple) PageGetItem(parent->page,
-                               PageGetItemId(parent->page, parent->offnum));
+                                               PageGetItemId(parent->page, parent->offnum));
 
    spgUpdateNodeLink(innerTuple, parent->node, blkno, offnum);
 
@@ -201,7 +201,7 @@ saveNodeLink(Relation index, SPPageDesc *parent,
  */
 static void
 addLeafTuple(Relation index, SpGistState *state, SpGistLeafTuple leafTuple,
-          SPPageDesc *current, SPPageDesc *parent, bool isNulls, bool isNew)
+            SPPageDesc *current, SPPageDesc *parent, bool isNulls, bool isNew)
 {
    spgxlogAddLeaf xlrec;
 
@@ -222,7 +222,7 @@ addLeafTuple(Relation index, SpGistState *state, SpGistLeafTuple leafTuple,
        /* Tuple is not part of a chain */
        leafTuple->nextOffset = InvalidOffsetNumber;
        current->offnum = SpGistPageAddNewItem(state, current->page,
-                                          (Item) leafTuple, leafTuple->size,
+                                              (Item) leafTuple, leafTuple->size,
                                               NULL, false);
 
        xlrec.offnumLeaf = current->offnum;
@@ -250,7 +250,7 @@ addLeafTuple(Relation index, SpGistState *state, SpGistLeafTuple leafTuple,
        OffsetNumber offnum;
 
        head = (SpGistLeafTuple) PageGetItem(current->page,
-                             PageGetItemId(current->page, current->offnum));
+                                            PageGetItemId(current->page, current->offnum));
        if (head->tupstate == SPGIST_LIVE)
        {
            leafTuple->nextOffset = head->nextOffset;
@@ -263,7 +263,7 @@ addLeafTuple(Relation index, SpGistState *state, SpGistLeafTuple leafTuple,
             * and set new second element
             */
            head = (SpGistLeafTuple) PageGetItem(current->page,
-                             PageGetItemId(current->page, current->offnum));
+                                                PageGetItemId(current->page, current->offnum));
            head->nextOffset = offnum;
 
            xlrec.offnumLeaf = offnum;
@@ -467,7 +467,7 @@ moveLeafs(Relation index, SpGistState *state,
        for (i = 0; i < nDelete; i++)
        {
            it = (SpGistLeafTuple) PageGetItem(current->page,
-                                 PageGetItemId(current->page, toDelete[i]));
+                                              PageGetItemId(current->page, toDelete[i]));
            Assert(it->tupstate == SPGIST_LIVE);
 
            /*
@@ -505,7 +505,7 @@ moveLeafs(Relation index, SpGistState *state,
     * be any concurrent scan so we need not provide a redirect.
     */
    spgPageIndexMultiDelete(state, current->page, toDelete, nDelete,
-                      state->isBuild ? SPGIST_PLACEHOLDER : SPGIST_REDIRECT,
+                           state->isBuild ? SPGIST_PLACEHOLDER : SPGIST_REDIRECT,
                            SPGIST_PLACEHOLDER,
                            nblkno, r);
 
@@ -570,7 +570,7 @@ setRedirectionTuple(SPPageDesc *current, OffsetNumber position,
    SpGistDeadTuple dt;
 
    dt = (SpGistDeadTuple) PageGetItem(current->page,
-                                    PageGetItemId(current->page, position));
+                                      PageGetItemId(current->page, position));
    Assert(dt->tupstate == SPGIST_REDIRECT);
    Assert(ItemPointerGetBlockNumber(&dt->pointer) == SPGIST_METAPAGE_BLKNO);
    ItemPointerSet(&dt->pointer, blkno, offnum);
@@ -754,7 +754,7 @@ doPickSplit(Relation index, SpGistState *state,
            SpGistLeafTuple it;
 
            it = (SpGistLeafTuple) PageGetItem(current->page,
-                                           PageGetItemId(current->page, i));
+                                              PageGetItemId(current->page, i));
            if (it->tupstate == SPGIST_LIVE)
            {
                in.datums[nToInsert] = SGLTDATUM(it, state);
@@ -779,7 +779,7 @@ doPickSplit(Relation index, SpGistState *state,
 
            Assert(i >= FirstOffsetNumber && i <= max);
            it = (SpGistLeafTuple) PageGetItem(current->page,
-                                           PageGetItemId(current->page, i));
+                                              PageGetItemId(current->page, i));
            if (it->tupstate == SPGIST_LIVE)
            {
                in.datums[nToInsert] = SGLTDATUM(it, state);
@@ -957,9 +957,9 @@ doPickSplit(Relation index, SpGistState *state,
    {
        /* Send tuple to page with next triple parity (see README) */
        newInnerBuffer = SpGistGetBuffer(index,
-                                      GBUF_INNER_PARITY(parent->blkno + 1) |
+                                        GBUF_INNER_PARITY(parent->blkno + 1) |
                                         (isNulls ? GBUF_NULLS : 0),
-                                      innerTuple->size + sizeof(ItemIdData),
+                                        innerTuple->size + sizeof(ItemIdData),
                                         &xlrec.initInner);
    }
    else
@@ -1025,7 +1025,7 @@ doPickSplit(Relation index, SpGistState *state,
        int         newspace;
 
        newLeafBuffer = SpGistGetBuffer(index,
-                                     GBUF_LEAF | (isNulls ? GBUF_NULLS : 0),
+                                       GBUF_LEAF | (isNulls ? GBUF_NULLS : 0),
                                        Min(totalLeafSizes,
                                            SPGIST_PAGE_CAPACITY),
                                        &xlrec.initDest);
@@ -1576,7 +1576,7 @@ spgAddNodeAction(Relation index, SpGistState *state,
         */
        current->buffer = SpGistGetBuffer(index,
                                          GBUF_INNER_PARITY(current->blkno),
-                                   newInnerTuple->size + sizeof(ItemIdData),
+                                         newInnerTuple->size + sizeof(ItemIdData),
                                          &xlrec.newPage);
        current->blkno = BufferGetBlockNumber(current->buffer);
        current->page = BufferGetPage(current->buffer);
@@ -1758,7 +1758,7 @@ spgSplitNodeAction(Relation index, SpGistState *state,
 
    postfixTuple = spgFormInnerTuple(state,
                                     out->result.splitTuple.postfixHasPrefix,
-                                  out->result.splitTuple.postfixPrefixDatum,
+                                    out->result.splitTuple.postfixPrefixDatum,
                                     innerTuple->nNodes, nodes);
 
    /* Postfix tuple is allTheSame if original tuple was */
@@ -1834,7 +1834,7 @@ spgSplitNodeAction(Relation index, SpGistState *state,
    spgUpdateNodeLink(prefixTuple, out->result.splitTuple.childNodeN,
                      postfixBlkno, postfixOffset);
    prefixTuple = (SpGistInnerTuple) PageGetItem(current->page,
-                             PageGetItemId(current->page, current->offnum));
+                                                PageGetItemId(current->page, current->offnum));
    spgUpdateNodeLink(prefixTuple, out->result.splitTuple.childNodeN,
                      postfixBlkno, postfixOffset);
 
@@ -1930,11 +1930,11 @@ spgdoinsert(Relation index, SpGistState *state,
    if (leafSize > SPGIST_PAGE_CAPACITY && !state->config.longValuesOK)
        ereport(ERROR,
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-           errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
-                  leafSize - sizeof(ItemIdData),
-                  SPGIST_PAGE_CAPACITY - sizeof(ItemIdData),
-                  RelationGetRelationName(index)),
-           errhint("Values larger than a buffer page cannot be indexed.")));
+                errmsg("index row size %zu exceeds maximum %zu for index \"%s\"",
+                       leafSize - sizeof(ItemIdData),
+                       SPGIST_PAGE_CAPACITY - sizeof(ItemIdData),
+                       RelationGetRelationName(index)),
+                errhint("Values larger than a buffer page cannot be indexed.")));
 
    /* Initialize "current" to the appropriate root page */
    current.blkno = isnull ? SPGIST_NULL_BLKNO : SPGIST_ROOT_BLKNO;
@@ -2035,7 +2035,7 @@ spgdoinsert(Relation index, SpGistState *state,
            }
            else if ((sizeToSplit =
                      checkSplitConditions(index, state, &current,
-                                   &nToSplit)) < SPGIST_PAGE_CAPACITY / 2 &&
+                                          &nToSplit)) < SPGIST_PAGE_CAPACITY / 2 &&
                     nToSplit < 64 &&
                     leafTuple->size + sizeof(ItemIdData) + sizeToSplit <= SPGIST_PAGE_CAPACITY)
            {
@@ -2084,7 +2084,7 @@ spgdoinsert(Relation index, SpGistState *state,
            CHECK_FOR_INTERRUPTS();
 
            innerTuple = (SpGistInnerTuple) PageGetItem(current.page,
-                               PageGetItemId(current.page, current.offnum));
+                                                       PageGetItemId(current.page, current.offnum));
 
            in.datum = datum;
            in.leafDatum = leafDatum;
index 9a3725991648d2b6b29e54d1b14ddbb2c2af9bf8..e4b2c29b0ed3fbf97304e997109f9fd8eddc2a6e 100644 (file)
@@ -134,7 +134,7 @@ spgbuild(Relation heap, Relation index, IndexInfo *indexInfo)
    buildstate.spgstate.isBuild = true;
 
    buildstate.tmpCtx = AllocSetContextCreate(CurrentMemoryContext,
-                                          "SP-GiST build temporary context",
+                                             "SP-GiST build temporary context",
                                              ALLOCSET_DEFAULT_SIZES);
 
    reltuples = IndexBuildHeapScan(heap, index, indexInfo, true,
index 6ad73f448d8422da6bbb207bbf800b575c3872c8..773774555fc312d238b4ef12decd042abe686461 100644 (file)
@@ -253,8 +253,8 @@ spg_quad_inner_consistent(PG_FUNCTION_ARGS)
                boxQuery = DatumGetBoxP(in->scankeys[i].sk_argument);
 
                if (DatumGetBool(DirectFunctionCall2(box_contain_pt,
-                                                  PointerGetDatum(boxQuery),
-                                                PointerGetDatum(centroid))))
+                                                    PointerGetDatum(boxQuery),
+                                                    PointerGetDatum(centroid))))
                {
                    /* centroid is in box, so all quadrants are OK */
                }
index e1f9d872781a8893c8f362d392b9c2d7d893bba9..7965b5846d9c85ddd880b55d71366911e87aa32f 100644 (file)
@@ -442,7 +442,7 @@ redirect:
            MemoryContext oldCtx;
 
            innerTuple = (SpGistInnerTuple) PageGetItem(page,
-                                               PageGetItemId(page, offset));
+                                                       PageGetItemId(page, offset));
 
            if (innerTuple->tupstate != SPGIST_LIVE)
            {
index e57ac49c6b4f2461294b8e60b94b00d70d5a26b2..8656af453c1a23cdfa0f13e4f33a8e4c117ea104 100644 (file)
@@ -705,7 +705,7 @@ spgFormInnerTuple(SpGistState *state, bool hasPrefix, Datum prefix,
                 errmsg("SP-GiST inner tuple size %zu exceeds maximum %zu",
                        (Size) size,
                        SPGIST_PAGE_CAPACITY - sizeof(ItemIdData)),
-           errhint("Values larger than a buffer page cannot be indexed.")));
+                errhint("Values larger than a buffer page cannot be indexed.")));
 
    /*
     * Check for overflow of header fields --- probably can't fail if the
@@ -848,7 +848,7 @@ SpGistPageAddNewItem(SpGistState *state, Page page, Item item, Size size,
            for (; i <= maxoff; i++)
            {
                SpGistDeadTuple it = (SpGistDeadTuple) PageGetItem(page,
-                                                    PageGetItemId(page, i));
+                                                                  PageGetItemId(page, i));
 
                if (it->tupstate == SPGIST_PLACEHOLDER)
                {
index 508d3e083fd57545e14d6d83a388b8988d923841..d7d5e90ef3a959564eea27061af2cd8d02ee3909 100644 (file)
@@ -750,7 +750,7 @@ spgprocesspending(spgBulkDeleteState *bds)
 
                    offset = ItemPointerGetOffsetNumber(&nitem->tid);
                    innerTuple = (SpGistInnerTuple) PageGetItem(page,
-                                               PageGetItemId(page, offset));
+                                                               PageGetItemId(page, offset));
                    if (innerTuple->tupstate == SPGIST_LIVE)
                    {
                        SpGistNodeTuple node;
@@ -766,7 +766,7 @@ spgprocesspending(spgBulkDeleteState *bds)
                    {
                        /* transfer attention to redirect point */
                        spgAddPendingTID(bds,
-                                  &((SpGistDeadTuple) innerTuple)->pointer);
+                                        &((SpGistDeadTuple) innerTuple)->pointer);
                    }
                    else
                        elog(ERROR, "unexpected SPGiST tuple state: %d",
index c007601efdebe20dc6ba67baf1d13f7c946acb31..c440d2171591e8caef8a30dc1d1e913de231a2c9 100644 (file)
@@ -54,7 +54,7 @@ addOrReplaceTuple(Page page, Item tuple, int size, OffsetNumber offset)
    if (offset <= PageGetMaxOffsetNumber(page))
    {
        SpGistDeadTuple dt = (SpGistDeadTuple) PageGetItem(page,
-                                               PageGetItemId(page, offset));
+                                                          PageGetItemId(page, offset));
 
        if (dt->tupstate != SPGIST_PLACEHOLDER)
            elog(ERROR, "SPGiST tuple to be replaced is not a placeholder");
@@ -130,7 +130,7 @@ spgRedoAddLeaf(XLogReaderState *record)
    {
        buffer = XLogInitBufferForRedo(record, 0);
        SpGistInitBuffer(buffer,
-                    SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0));
+                        SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0));
        action = BLK_NEEDS_REDO;
    }
    else
@@ -153,7 +153,7 @@ spgRedoAddLeaf(XLogReaderState *record)
                SpGistLeafTuple head;
 
                head = (SpGistLeafTuple) PageGetItem(page,
-                               PageGetItemId(page, xldata->offnumHeadLeaf));
+                                                    PageGetItemId(page, xldata->offnumHeadLeaf));
                Assert(head->nextOffset == leafTupleHdr.nextOffset);
                head->nextOffset = xldata->offnumLeaf;
            }
@@ -164,7 +164,7 @@ spgRedoAddLeaf(XLogReaderState *record)
            PageIndexTupleDelete(page, xldata->offnumLeaf);
            if (PageAddItem(page,
                            (Item) leafTuple, leafTupleHdr.size,
-                    xldata->offnumLeaf, false, false) != xldata->offnumLeaf)
+                           xldata->offnumLeaf, false, false) != xldata->offnumLeaf)
                elog(ERROR, "failed to add item of size %u to SPGiST index page",
                     leafTupleHdr.size);
        }
@@ -188,7 +188,7 @@ spgRedoAddLeaf(XLogReaderState *record)
            page = BufferGetPage(buffer);
 
            tuple = (SpGistInnerTuple) PageGetItem(page,
-                                 PageGetItemId(page, xldata->offnumParent));
+                                                  PageGetItemId(page, xldata->offnumParent));
 
            spgUpdateNodeLink(tuple, xldata->nodeI,
                              blknoLeaf, xldata->offnumLeaf);
@@ -241,7 +241,7 @@ spgRedoMoveLeafs(XLogReaderState *record)
    {
        buffer = XLogInitBufferForRedo(record, 1);
        SpGistInitBuffer(buffer,
-                    SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0));
+                        SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0));
        action = BLK_NEEDS_REDO;
    }
    else
@@ -283,7 +283,7 @@ spgRedoMoveLeafs(XLogReaderState *record)
        page = BufferGetPage(buffer);
 
        spgPageIndexMultiDelete(&state, page, toDelete, xldata->nMoves,
-                       state.isBuild ? SPGIST_PLACEHOLDER : SPGIST_REDIRECT,
+                               state.isBuild ? SPGIST_PLACEHOLDER : SPGIST_REDIRECT,
                                SPGIST_PLACEHOLDER,
                                blknoDst,
                                toInsert[nInsert - 1]);
@@ -302,7 +302,7 @@ spgRedoMoveLeafs(XLogReaderState *record)
        page = BufferGetPage(buffer);
 
        tuple = (SpGistInnerTuple) PageGetItem(page,
-                                 PageGetItemId(page, xldata->offnumParent));
+                                              PageGetItemId(page, xldata->offnumParent));
 
        spgUpdateNodeLink(tuple, xldata->nodeI,
                          blknoDst, toInsert[nInsert - 1]);
@@ -396,7 +396,7 @@ spgRedoAddNode(XLogReaderState *record)
                SpGistInnerTuple parentTuple;
 
                parentTuple = (SpGistInnerTuple) PageGetItem(page,
-                                 PageGetItemId(page, xldata->offnumParent));
+                                                            PageGetItemId(page, xldata->offnumParent));
 
                spgUpdateNodeLink(parentTuple, xldata->nodeI,
                                  blknoNew, xldata->offnumNew);
@@ -443,7 +443,7 @@ spgRedoAddNode(XLogReaderState *record)
                SpGistInnerTuple parentTuple;
 
                parentTuple = (SpGistInnerTuple) PageGetItem(page,
-                                 PageGetItemId(page, xldata->offnumParent));
+                                                            PageGetItemId(page, xldata->offnumParent));
 
                spgUpdateNodeLink(parentTuple, xldata->nodeI,
                                  blknoNew, xldata->offnumNew);
@@ -467,7 +467,7 @@ spgRedoAddNode(XLogReaderState *record)
                page = BufferGetPage(buffer);
 
                parentTuple = (SpGistInnerTuple) PageGetItem(page,
-                                 PageGetItemId(page, xldata->offnumParent));
+                                                            PageGetItemId(page, xldata->offnumParent));
 
                spgUpdateNodeLink(parentTuple, xldata->nodeI,
                                  blknoNew, xldata->offnumNew);
@@ -543,7 +543,7 @@ spgRedoSplitTuple(XLogReaderState *record)
 
        PageIndexTupleDelete(page, xldata->offnumPrefix);
        if (PageAddItem(page, (Item) prefixTuple, prefixTupleHdr.size,
-                xldata->offnumPrefix, false, false) != xldata->offnumPrefix)
+                       xldata->offnumPrefix, false, false) != xldata->offnumPrefix)
            elog(ERROR, "failed to add item of size %u to SPGiST index page",
                 prefixTupleHdr.size);
 
@@ -613,7 +613,7 @@ spgRedoPickSplit(XLogReaderState *record)
        srcPage = (Page) BufferGetPage(srcBuffer);
 
        SpGistInitBuffer(srcBuffer,
-                    SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0));
+                        SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0));
        /* don't update LSN etc till we're done with it */
    }
    else
@@ -666,7 +666,7 @@ spgRedoPickSplit(XLogReaderState *record)
        destPage = (Page) BufferGetPage(destBuffer);
 
        SpGistInitBuffer(destBuffer,
-                    SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0));
+                        SPGIST_LEAF | (xldata->storesNulls ? SPGIST_NULLS : 0));
        /* don't update LSN etc till we're done with it */
    }
    else
@@ -735,7 +735,7 @@ spgRedoPickSplit(XLogReaderState *record)
            SpGistInnerTuple parent;
 
            parent = (SpGistInnerTuple) PageGetItem(page,
-                                 PageGetItemId(page, xldata->offnumParent));
+                                                   PageGetItemId(page, xldata->offnumParent));
            spgUpdateNodeLink(parent, xldata->nodeI,
                              blknoInner, xldata->offnumInner);
        }
@@ -767,7 +767,7 @@ spgRedoPickSplit(XLogReaderState *record)
            page = BufferGetPage(parentBuffer);
 
            parent = (SpGistInnerTuple) PageGetItem(page,
-                                 PageGetItemId(page, xldata->offnumParent));
+                                                   PageGetItemId(page, xldata->offnumParent));
            spgUpdateNodeLink(parent, xldata->nodeI,
                              blknoInner, xldata->offnumInner);
 
@@ -852,7 +852,7 @@ spgRedoVacuumLeaf(XLogReaderState *record)
            SpGistLeafTuple lt;
 
            lt = (SpGistLeafTuple) PageGetItem(page,
-                                          PageGetItemId(page, chainSrc[i]));
+                                              PageGetItemId(page, chainSrc[i]));
            Assert(lt->tupstate == SPGIST_LIVE);
            lt->nextOffset = chainDest[i];
        }
@@ -929,7 +929,7 @@ spgRedoVacuumRedirect(XLogReaderState *record)
            SpGistDeadTuple dt;
 
            dt = (SpGistDeadTuple) PageGetItem(page,
-                                 PageGetItemId(page, itemToPlaceholder[i]));
+                                              PageGetItemId(page, itemToPlaceholder[i]));
            Assert(dt->tupstate == SPGIST_REDIRECT);
            dt->tupstate = SPGIST_PLACEHOLDER;
            ItemPointerSetInvalid(&dt->pointer);
index ed1b1d8ce451fd09ad28403a1c2cba6227a399e5..c34e7e1945f869cb637fbf10f560791cda9686d4 100644 (file)
@@ -147,7 +147,7 @@ static void set_status_by_pages(int nsubxids, TransactionId *subxids,
  */
 void
 TransactionIdSetTreeStatus(TransactionId xid, int nsubxids,
-                   TransactionId *subxids, XidStatus status, XLogRecPtr lsn)
+                          TransactionId *subxids, XidStatus status, XLogRecPtr lsn)
 {
    int         pageno = TransactionIdToPage(xid);  /* get page of parent */
    int         i;
index 7646c23c4e7fa6e24a75cddb8263b95bf46bdd20..827d976db83568d02d51f9d03cd5a7fa1ecf91d5 100644 (file)
@@ -292,7 +292,7 @@ TransactionIdGetCommitTsData(TransactionId xid, TimestampTz *ts,
    if (!TransactionIdIsValid(xid))
        ereport(ERROR,
                (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-       errmsg("cannot retrieve commit timestamp for transaction %u", xid)));
+                errmsg("cannot retrieve commit timestamp for transaction %u", xid)));
    else if (!TransactionIdIsNormal(xid))
    {
        /* frozen and bootstrap xids are always committed far in the past */
@@ -877,7 +877,7 @@ AdvanceOldestCommitTsXid(TransactionId oldestXact)
 {
    LWLockAcquire(CommitTsLock, LW_EXCLUSIVE);
    if (ShmemVariableCache->oldestCommitTsXid != InvalidTransactionId &&
-   TransactionIdPrecedes(ShmemVariableCache->oldestCommitTsXid, oldestXact))
+       TransactionIdPrecedes(ShmemVariableCache->oldestCommitTsXid, oldestXact))
        ShmemVariableCache->oldestCommitTsXid = oldestXact;
    LWLockRelease(CommitTsLock);
 }
index 1a7824b5d44dad342734d7fa6e39b0e0c96d3ce6..682eef420bb26102043b14e75f421d637b12298f 100644 (file)
@@ -999,15 +999,15 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset)
                        (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
                         errmsg("database is not accepting commands that generate new MultiXactIds to avoid wraparound data loss in database \"%s\"",
                                oldest_datname),
-                errhint("Execute a database-wide VACUUM in that database.\n"
-                        "You might also need to commit or roll back old prepared transactions.")));
+                        errhint("Execute a database-wide VACUUM in that database.\n"
+                                "You might also need to commit or roll back old prepared transactions.")));
            else
                ereport(ERROR,
                        (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
                         errmsg("database is not accepting commands that generate new MultiXactIds to avoid wraparound data loss in database with OID %u",
                                oldest_datoid),
-                errhint("Execute a database-wide VACUUM in that database.\n"
-                        "You might also need to commit or roll back old prepared transactions.")));
+                        errhint("Execute a database-wide VACUUM in that database.\n"
+                                "You might also need to commit or roll back old prepared transactions.")));
        }
 
        /*
@@ -1030,8 +1030,8 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset)
                                       multiWrapLimit - result,
                                       oldest_datname,
                                       multiWrapLimit - result),
-                errhint("Execute a database-wide VACUUM in that database.\n"
-                        "You might also need to commit or roll back old prepared transactions.")));
+                        errhint("Execute a database-wide VACUUM in that database.\n"
+                                "You might also need to commit or roll back old prepared transactions.")));
            else
                ereport(WARNING,
                        (errmsg_plural("database with OID %u must be vacuumed before %u more MultiXactId is used",
@@ -1039,8 +1039,8 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset)
                                       multiWrapLimit - result,
                                       oldest_datoid,
                                       multiWrapLimit - result),
-                errhint("Execute a database-wide VACUUM in that database.\n"
-                        "You might also need to commit or roll back old prepared transactions.")));
+                        errhint("Execute a database-wide VACUUM in that database.\n"
+                                "You might also need to commit or roll back old prepared transactions.")));
        }
 
        /* Re-acquire lock and start over */
@@ -1098,9 +1098,9 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset)
                 errmsg("multixact \"members\" limit exceeded"),
                 errdetail_plural("This command would create a multixact with %u members, but the remaining space is only enough for %u member.",
                                  "This command would create a multixact with %u members, but the remaining space is only enough for %u members.",
-                           MultiXactState->offsetStopLimit - nextOffset - 1,
+                                 MultiXactState->offsetStopLimit - nextOffset - 1,
                                  nmembers,
-                          MultiXactState->offsetStopLimit - nextOffset - 1),
+                                 MultiXactState->offsetStopLimit - nextOffset - 1),
                 errhint("Execute a database-wide VACUUM in database with OID %u with reduced vacuum_multixact_freeze_min_age and vacuum_multixact_freeze_table_age settings.",
                         MultiXactState->oldestMultiXactDB)));
    }
@@ -1134,9 +1134,9 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset)
                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
                 errmsg_plural("database with OID %u must be vacuumed before %d more multixact member is used",
                               "database with OID %u must be vacuumed before %d more multixact members are used",
-                    MultiXactState->offsetStopLimit - nextOffset + nmembers,
+                              MultiXactState->offsetStopLimit - nextOffset + nmembers,
                               MultiXactState->oldestMultiXactDB,
-                   MultiXactState->offsetStopLimit - nextOffset + nmembers),
+                              MultiXactState->offsetStopLimit - nextOffset + nmembers),
                 errhint("Execute a database-wide VACUUM in that database with reduced vacuum_multixact_freeze_min_age and vacuum_multixact_freeze_table_age settings.")));
 
    ExtendMultiXactMember(nextOffset, nmembers);
@@ -1274,8 +1274,8 @@ GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **members,
    {
        ereport(ERROR,
                (errcode(ERRCODE_INTERNAL_ERROR),
-        errmsg("MultiXactId %u does no longer exist -- apparent wraparound",
-               multi)));
+                errmsg("MultiXactId %u does no longer exist -- apparent wraparound",
+                       multi)));
        return -1;
    }
 
@@ -2265,8 +2265,8 @@ SetMultiXactIdLimit(MultiXactId oldest_datminmxid, Oid oldest_datoid,
 
    /* Log the info */
    ereport(DEBUG1,
-    (errmsg("MultiXactId wrap limit is %u, limited by database with OID %u",
-            multiWrapLimit, oldest_datoid)));
+           (errmsg("MultiXactId wrap limit is %u, limited by database with OID %u",
+                   multiWrapLimit, oldest_datoid)));
 
    /*
     * Computing the actual limits is only possible once the data directory is
@@ -2618,7 +2618,7 @@ SetOffsetVacuumLimit(bool is_startup)
    {
        /* move back to start of the corresponding segment */
        offsetStopLimit = oldestOffset - (oldestOffset %
-                     (MULTIXACT_MEMBERS_PER_PAGE * SLRU_PAGES_PER_SEGMENT));
+                                         (MULTIXACT_MEMBERS_PER_PAGE * SLRU_PAGES_PER_SEGMENT));
 
        /* always leave one segment before the wraparound point */
        offsetStopLimit -= (MULTIXACT_MEMBERS_PER_PAGE * SLRU_PAGES_PER_SEGMENT);
@@ -2628,8 +2628,8 @@ SetOffsetVacuumLimit(bool is_startup)
                    (errmsg("MultiXact member wraparound protections are now enabled")));
 
        ereport(DEBUG1,
-       (errmsg("MultiXact member stop limit is now %u based on MultiXact %u",
-               offsetStopLimit, oldestMultiXactId)));
+               (errmsg("MultiXact member stop limit is now %u based on MultiXact %u",
+                       offsetStopLimit, oldestMultiXactId)));
    }
    else if (prevOldestOffsetKnown)
    {
@@ -2915,7 +2915,7 @@ PerformOffsetsTruncation(MultiXactId oldestMulti, MultiXactId newOldestMulti)
     * detection.
     */
    SimpleLruTruncate(MultiXactOffsetCtl,
-              MultiXactIdToOffsetPage(PreviousMultiXactId(newOldestMulti)));
+                     MultiXactIdToOffsetPage(PreviousMultiXactId(newOldestMulti)));
 }
 
 /*
@@ -3191,7 +3191,7 @@ WriteMZeroPageXlogRec(int pageno, uint8 info)
 static void
 WriteMTruncateXlogRec(Oid oldestMultiDB,
                      MultiXactId startTruncOff, MultiXactId endTruncOff,
-               MultiXactOffset startTruncMemb, MultiXactOffset endTruncMemb)
+                     MultiXactOffset startTruncMemb, MultiXactOffset endTruncMemb)
 {
    XLogRecPtr  recptr;
    xl_multixact_truncate xlrec;
index 98793bda668a2020e0bdf57ddfa1f76999dda304..17b10383e448ffc8da04cbed37f942cde2c2bfe7 100644 (file)
@@ -574,7 +574,7 @@ WaitForParallelWorkersToExit(ParallelContext *pcxt)
        if (status == BGWH_POSTMASTER_DIED)
            ereport(FATAL,
                    (errcode(ERRCODE_ADMIN_SHUTDOWN),
-                errmsg("postmaster exited during a parallel transaction")));
+                    errmsg("postmaster exited during a parallel transaction")));
 
        /* Release memory. */
        pfree(pcxt->worker[i].bgwhandle);
@@ -760,8 +760,8 @@ HandleParallelMessages(void)
                }
                else
                    ereport(ERROR,
-                         (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-                          errmsg("lost connection to parallel worker")));
+                           (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+                            errmsg("lost connection to parallel worker")));
            }
        }
    }
@@ -970,7 +970,7 @@ ParallelWorkerMain(Datum main_arg)
    if (toc == NULL)
        ereport(ERROR,
                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-          errmsg("invalid magic number in dynamic shared memory segment")));
+                errmsg("invalid magic number in dynamic shared memory segment")));
 
    /* Look up fixed parallel state. */
    fps = shm_toc_lookup(toc, PARALLEL_KEY_FIXED, false);
index aba45b0a85dd1a96fd062c66ab79e119bee56454..93ec653dd6047bfa20d0d69dc010a5ece3735a21 100644 (file)
@@ -907,22 +907,22 @@ SlruReportIOError(SlruCtl ctl, int pageno, TransactionId xid)
            ereport(ERROR,
                    (errcode_for_file_access(),
                     errmsg("could not access status of transaction %u", xid),
-                errdetail("Could not seek in file \"%s\" to offset %u: %m.",
-                          path, offset)));
+                    errdetail("Could not seek in file \"%s\" to offset %u: %m.",
+                              path, offset)));
            break;
        case SLRU_READ_FAILED:
            ereport(ERROR,
                    (errcode_for_file_access(),
                     errmsg("could not access status of transaction %u", xid),
-              errdetail("Could not read from file \"%s\" at offset %u: %m.",
-                        path, offset)));
+                    errdetail("Could not read from file \"%s\" at offset %u: %m.",
+                              path, offset)));
            break;
        case SLRU_WRITE_FAILED:
            ereport(ERROR,
                    (errcode_for_file_access(),
                     errmsg("could not access status of transaction %u", xid),
-               errdetail("Could not write to file \"%s\" at offset %u: %m.",
-                         path, offset)));
+                    errdetail("Could not write to file \"%s\" at offset %u: %m.",
+                              path, offset)));
            break;
        case SLRU_FSYNC_FAILED:
            ereport(ERROR,
@@ -1192,8 +1192,8 @@ restart:;
    {
        LWLockRelease(shared->ControlLock);
        ereport(LOG,
-         (errmsg("could not truncate directory \"%s\": apparent wraparound",
-                 ctl->Dir)));
+               (errmsg("could not truncate directory \"%s\": apparent wraparound",
+                       ctl->Dir)));
        return;
    }
 
index 188008b4ca3b9a874df3cd9ced03e4d8405bae8a..63db8a981dce5aea56b2685796ac112d94c1b034 100644 (file)
@@ -151,12 +151,12 @@ readTimeLineHistory(TimeLineID targetTLI)
        if (nfields != 3)
            ereport(FATAL,
                    (errmsg("syntax error in history file: %s", fline),
-              errhint("Expected a write-ahead log switchpoint location.")));
+                    errhint("Expected a write-ahead log switchpoint location.")));
 
        if (result && tli <= lasttli)
            ereport(FATAL,
                    (errmsg("invalid data in history file: %s", fline),
-                  errhint("Timeline IDs must be in increasing sequence.")));
+                    errhint("Timeline IDs must be in increasing sequence.")));
 
        lasttli = tli;
 
@@ -177,7 +177,7 @@ readTimeLineHistory(TimeLineID targetTLI)
    if (result && targetTLI <= lasttli)
        ereport(FATAL,
                (errmsg("invalid data in history file \"%s\"", path),
-           errhint("Timeline IDs must be less than child timeline's ID.")));
+                errhint("Timeline IDs must be less than child timeline's ID.")));
 
    /*
     * Create one more entry for the "tip" of the timeline, which has no entry
@@ -367,7 +367,7 @@ writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
 
                ereport(ERROR,
                        (errcode_for_file_access(),
-                    errmsg("could not write to file \"%s\": %m", tmppath)));
+                        errmsg("could not write to file \"%s\": %m", tmppath)));
            }
            pgstat_report_wait_end();
        }
index 9e6933e9e836cbfebe0902c6315077b3db269dce..ba03d9687e566dcddc78a6ac357c0abd42b43ba2 100644 (file)
@@ -388,7 +388,7 @@ MarkAsPreparing(TransactionId xid, const char *gid,
        ereport(ERROR,
                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
                 errmsg("prepared transactions are disabled"),
-             errhint("Set max_prepared_transactions to a nonzero value.")));
+                errhint("Set max_prepared_transactions to a nonzero value.")));
 
    /* on first call, register the exit hook */
    if (!twophaseExitRegistered)
@@ -584,13 +584,13 @@ LockGXact(const char *gid, Oid user)
        if (gxact->locking_backend != InvalidBackendId)
            ereport(ERROR,
                    (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-               errmsg("prepared transaction with identifier \"%s\" is busy",
-                      gid)));
+                    errmsg("prepared transaction with identifier \"%s\" is busy",
+                           gid)));
 
        if (user != gxact->owner && !superuser_arg(user))
            ereport(ERROR,
                    (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-                 errmsg("permission denied to finish prepared transaction"),
+                    errmsg("permission denied to finish prepared transaction"),
                     errhint("Must be superuser or the user that prepared the transaction.")));
 
        /*
@@ -602,7 +602,7 @@ LockGXact(const char *gid, Oid user)
        if (MyDatabaseId != proc->databaseId)
            ereport(ERROR,
                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                 errmsg("prepared transaction belongs to another database"),
+                    errmsg("prepared transaction belongs to another database"),
                     errhint("Connect to the database where the transaction was prepared to finish it.")));
 
        /* OK for me to lock it */
@@ -618,8 +618,8 @@ LockGXact(const char *gid, Oid user)
 
    ereport(ERROR,
            (errcode(ERRCODE_UNDEFINED_OBJECT),
-        errmsg("prepared transaction with identifier \"%s\" does not exist",
-               gid)));
+            errmsg("prepared transaction with identifier \"%s\" does not exist",
+                   gid)));
 
    /* NOTREACHED */
    return NULL;
@@ -1304,7 +1304,7 @@ XlogReadTwoPhaseData(XLogRecPtr lsn, char **buf, int *len)
        ereport(ERROR,
                (errcode(ERRCODE_OUT_OF_MEMORY),
                 errmsg("out of memory"),
-            errdetail("Failed while allocating a WAL reading processor.")));
+                errdetail("Failed while allocating a WAL reading processor.")));
 
    record = XLogReadRecord(xlogreader, lsn, &errormsg);
    if (record == NULL)
@@ -1318,9 +1318,9 @@ XlogReadTwoPhaseData(XLogRecPtr lsn, char **buf, int *len)
        (XLogRecGetInfo(xlogreader) & XLOG_XACT_OPMASK) != XLOG_XACT_PREPARE)
        ereport(ERROR,
                (errcode_for_file_access(),
-       errmsg("expected two-phase state data is not present in WAL at %X/%X",
-              (uint32) (lsn >> 32),
-              (uint32) lsn)));
+                errmsg("expected two-phase state data is not present in WAL at %X/%X",
+                       (uint32) (lsn >> 32),
+                       (uint32) lsn)));
 
    if (len != NULL)
        *len = XLogRecGetDataLen(xlogreader);
@@ -1555,8 +1555,8 @@ RemoveTwoPhaseFile(TransactionId xid, bool giveWarning)
        if (errno != ENOENT || giveWarning)
            ereport(WARNING,
                    (errcode_for_file_access(),
-                  errmsg("could not remove two-phase state file \"%s\": %m",
-                         path)));
+                    errmsg("could not remove two-phase state file \"%s\": %m",
+                           path)));
 }
 
 /*
@@ -2058,8 +2058,8 @@ ProcessTwoPhaseBuffer(TransactionId xid,
        else
        {
            ereport(WARNING,
-           (errmsg("removing future two-phase state from memory for \"%u\"",
-                   xid)));
+                   (errmsg("removing future two-phase state from memory for \"%u\"",
+                           xid)));
            PrepareRedoRemove(xid, true);
        }
        return NULL;
@@ -2072,8 +2072,8 @@ ProcessTwoPhaseBuffer(TransactionId xid,
        if (buf == NULL)
        {
            ereport(WARNING,
-                 (errmsg("removing corrupt two-phase state file for \"%u\"",
-                         xid)));
+                   (errmsg("removing corrupt two-phase state file for \"%u\"",
+                           xid)));
            RemoveTwoPhaseFile(xid, true);
            return NULL;
        }
@@ -2091,15 +2091,15 @@ ProcessTwoPhaseBuffer(TransactionId xid,
        if (fromdisk)
        {
            ereport(WARNING,
-                 (errmsg("removing corrupt two-phase state file for \"%u\"",
-                         xid)));
+                   (errmsg("removing corrupt two-phase state file for \"%u\"",
+                           xid)));
            RemoveTwoPhaseFile(xid, true);
        }
        else
        {
            ereport(WARNING,
-           (errmsg("removing corrupt two-phase state from memory for \"%u\"",
-                   xid)));
+                   (errmsg("removing corrupt two-phase state from memory for \"%u\"",
+                           xid)));
            PrepareRedoRemove(xid, true);
        }
        pfree(buf);
@@ -2192,7 +2192,7 @@ RecordTransactionCommitPrepared(TransactionId xid,
                                 nchildren, children, nrels, rels,
                                 ninvalmsgs, invalmsgs,
                                 initfileinval, false,
-                       MyXactFlags | XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK,
+                                MyXactFlags | XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK,
                                 xid);
 
 
@@ -2277,7 +2277,7 @@ RecordTransactionAbortPrepared(TransactionId xid,
    recptr = XactLogAbortRecord(GetCurrentTimestamp(),
                                nchildren, children,
                                nrels, rels,
-                       MyXactFlags | XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK,
+                               MyXactFlags | XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK,
                                xid);
 
    /* Always flush, since we're about to remove the 2PC state file */
index b02dd6fbd25a8dfdd30b2c6578ec24617ef7958b..15e05591b743c4ac108275b1a4ca37e24e4e6b2f 100644 (file)
@@ -399,11 +399,11 @@ SetTransactionIdLimit(TransactionId oldest_datfrozenxid, Oid oldest_datoid)
 
        if (oldest_datname)
            ereport(WARNING,
-           (errmsg("database \"%s\" must be vacuumed within %u transactions",
-                   oldest_datname,
-                   xidWrapLimit - curXid),
-            errhint("To avoid a database shutdown, execute a database-wide VACUUM in that database.\n"
-                    "You might also need to commit or roll back old prepared transactions.")));
+                   (errmsg("database \"%s\" must be vacuumed within %u transactions",
+                           oldest_datname,
+                           xidWrapLimit - curXid),
+                    errhint("To avoid a database shutdown, execute a database-wide VACUUM in that database.\n"
+                            "You might also need to commit or roll back old prepared transactions.")));
        else
            ereport(WARNING,
                    (errmsg("database with OID %u must be vacuumed within %u transactions",
index e14be6b314a81cc5c114db70b7924d927b69accb..b0aa69fe4b43de546f0b4dedae97c313f2f4812f 100644 (file)
@@ -1482,7 +1482,7 @@ AtSubCommit_childXids(void)
                                   new_maxChildXids * sizeof(TransactionId));
        else
            new_childXids = repalloc(s->parent->childXids,
-                                  new_maxChildXids * sizeof(TransactionId));
+                                    new_maxChildXids * sizeof(TransactionId));
 
        s->parent->childXids = new_childXids;
        s->parent->maxChildXids = new_maxChildXids;
@@ -2275,7 +2275,7 @@ PrepareTransaction(void)
    if (XactHasExportedSnapshots())
        ereport(ERROR,
                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-       errmsg("cannot PREPARE a transaction that has exported snapshots")));
+                errmsg("cannot PREPARE a transaction that has exported snapshots")));
 
    /* Prevent cancel/die interrupt while cleaning up */
    HOLD_INTERRUPTS();
@@ -3760,7 +3760,7 @@ DefineSavepoint(char *name)
    if (IsInParallelMode())
        ereport(ERROR,
                (errcode(ERRCODE_INVALID_TRANSACTION_STATE),
-           errmsg("cannot define savepoints during a parallel operation")));
+                errmsg("cannot define savepoints during a parallel operation")));
 
    switch (s->blockState)
    {
@@ -3827,7 +3827,7 @@ ReleaseSavepoint(List *options)
    if (IsInParallelMode())
        ereport(ERROR,
                (errcode(ERRCODE_INVALID_TRANSACTION_STATE),
-          errmsg("cannot release savepoints during a parallel operation")));
+                errmsg("cannot release savepoints during a parallel operation")));
 
    switch (s->blockState)
    {
@@ -3940,7 +3940,7 @@ RollbackToSavepoint(List *options)
    if (IsInParallelMode())
        ereport(ERROR,
                (errcode(ERRCODE_INVALID_TRANSACTION_STATE),
-       errmsg("cannot rollback to savepoints during a parallel operation")));
+                errmsg("cannot rollback to savepoints during a parallel operation")));
 
    switch (s->blockState)
    {
@@ -4068,7 +4068,7 @@ BeginInternalSubTransaction(char *name)
    if (IsInParallelMode())
        ereport(ERROR,
                (errcode(ERRCODE_INVALID_TRANSACTION_STATE),
-       errmsg("cannot start subtransactions during a parallel operation")));
+                errmsg("cannot start subtransactions during a parallel operation")));
 
    switch (s->blockState)
    {
@@ -4135,7 +4135,7 @@ ReleaseCurrentSubTransaction(void)
    if (IsInParallelMode())
        ereport(ERROR,
                (errcode(ERRCODE_INVALID_TRANSACTION_STATE),
-       errmsg("cannot commit subtransactions during a parallel operation")));
+                errmsg("cannot commit subtransactions during a parallel operation")));
 
    if (s->blockState != TBLOCK_SUBINPROGRESS)
        elog(ERROR, "ReleaseCurrentSubTransaction: unexpected state %s",
@@ -5412,13 +5412,13 @@ xact_redo_commit(xl_xact_parsed_commit *parsed,
         * recovered. It's unlikely but it's good to be safe.
         */
        TransactionIdAsyncCommitTree(
-                             xid, parsed->nsubxacts, parsed->subxacts, lsn);
+                                    xid, parsed->nsubxacts, parsed->subxacts, lsn);
 
        /*
         * We must mark clog before we update the ProcArray.
         */
        ExpireTreeKnownAssignedTransactionIds(
-                         xid, parsed->nsubxacts, parsed->subxacts, max_xid);
+                                             xid, parsed->nsubxacts, parsed->subxacts, max_xid);
 
        /*
         * Send any cache invalidations attached to the commit. We must
@@ -5427,7 +5427,7 @@ xact_redo_commit(xl_xact_parsed_commit *parsed,
         */
        ProcessCommittedInvalidationMessages(
                                             parsed->msgs, parsed->nmsgs,
-                         XactCompletionRelcacheInitFileInval(parsed->xinfo),
+                                            XactCompletionRelcacheInitFileInval(parsed->xinfo),
                                             parsed->dbId, parsed->tsId);
 
        /*
@@ -5566,7 +5566,7 @@ xact_redo_abort(xl_xact_parsed_abort *parsed, TransactionId xid)
         * We must update the ProcArray after we have marked clog.
         */
        ExpireTreeKnownAssignedTransactionIds(
-                         xid, parsed->nsubxacts, parsed->subxacts, max_xid);
+                                             xid, parsed->nsubxacts, parsed->subxacts, max_xid);
 
        /*
         * There are no flat files that need updating, nor invalidation
index 106210a883903a9664ef8846bda4f3ad6782e862..48eecfc84a1f1a05702550bed0689c81727de070 100644 (file)
@@ -1432,7 +1432,7 @@ checkXLogConsistency(XLogReaderState *record)
        if (memcmp(replay_image_masked, master_image_masked, BLCKSZ) != 0)
        {
            elog(FATAL,
-              "inconsistent page found, rel %u/%u/%u, forknum %u, blkno %u",
+                "inconsistent page found, rel %u/%u/%u, forknum %u, blkno %u",
                 rnode.spcNode, rnode.dbNode, rnode.relNode,
                 forknum, blkno);
        }
@@ -1677,7 +1677,7 @@ WALInsertLockUpdateInsertingAt(XLogRecPtr insertingAt)
         * WALInsertLockAcquireExclusive.
         */
        LWLockUpdateVar(&WALInsertLocks[NUM_XLOGINSERT_LOCKS - 1].l.lock,
-                    &WALInsertLocks[NUM_XLOGINSERT_LOCKS - 1].l.insertingAt,
+                       &WALInsertLocks[NUM_XLOGINSERT_LOCKS - 1].l.insertingAt,
                        insertingAt);
    }
    else
@@ -2452,9 +2452,9 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
                if (lseek(openLogFile, (off_t) startoffset, SEEK_SET) < 0)
                    ereport(PANIC,
                            (errcode_for_file_access(),
-                    errmsg("could not seek in log file %s to offset %u: %m",
-                           XLogFileNameP(ThisTimeLineID, openLogSegNo),
-                           startoffset)));
+                            errmsg("could not seek in log file %s to offset %u: %m",
+                                   XLogFileNameP(ThisTimeLineID, openLogSegNo),
+                                   startoffset)));
                openLogOff = startoffset;
            }
 
@@ -2476,7 +2476,7 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
                            (errcode_for_file_access(),
                             errmsg("could not write to log file %s "
                                    "at offset %u, length %zu: %m",
-                                XLogFileNameP(ThisTimeLineID, openLogSegNo),
+                                   XLogFileNameP(ThisTimeLineID, openLogSegNo),
                                    openLogOff, nbytes)));
                }
                nleft -= written;
@@ -2723,7 +2723,7 @@ UpdateMinRecoveryPoint(XLogRecPtr lsn, bool force)
 
        if (!force && newMinRecoveryPoint < lsn)
            elog(WARNING,
-              "xlog min recovery request %X/%X is past current point %X/%X",
+                "xlog min recovery request %X/%X is past current point %X/%X",
                 (uint32) (lsn >> 32), (uint32) lsn,
                 (uint32) (newMinRecoveryPoint >> 32),
                 (uint32) newMinRecoveryPoint);
@@ -2738,10 +2738,10 @@ UpdateMinRecoveryPoint(XLogRecPtr lsn, bool force)
            minRecoveryPointTLI = newMinRecoveryPointTLI;
 
            ereport(DEBUG2,
-               (errmsg("updated min recovery point to %X/%X on timeline %u",
-                       (uint32) (minRecoveryPoint >> 32),
-                       (uint32) minRecoveryPoint,
-                       newMinRecoveryPointTLI)));
+                   (errmsg("updated min recovery point to %X/%X on timeline %u",
+                           (uint32) (minRecoveryPoint >> 32),
+                           (uint32) minRecoveryPoint,
+                           newMinRecoveryPointTLI)));
        }
    }
    LWLockRelease(ControlFileLock);
@@ -2781,7 +2781,7 @@ XLogFlush(XLogRecPtr record)
        elog(LOG, "xlog flush request %X/%X; write %X/%X; flush %X/%X",
             (uint32) (record >> 32), (uint32) record,
             (uint32) (LogwrtResult.Write >> 32), (uint32) LogwrtResult.Write,
-          (uint32) (LogwrtResult.Flush >> 32), (uint32) LogwrtResult.Flush);
+            (uint32) (LogwrtResult.Flush >> 32), (uint32) LogwrtResult.Flush);
 #endif
 
    START_CRIT_SECTION();
@@ -2913,9 +2913,9 @@ XLogFlush(XLogRecPtr record)
     */
    if (LogwrtResult.Flush < record)
        elog(ERROR,
-       "xlog flush request %X/%X is not satisfied --- flushed only to %X/%X",
+            "xlog flush request %X/%X is not satisfied --- flushed only to %X/%X",
             (uint32) (record >> 32), (uint32) record,
-          (uint32) (LogwrtResult.Flush >> 32), (uint32) LogwrtResult.Flush);
+            (uint32) (LogwrtResult.Flush >> 32), (uint32) LogwrtResult.Flush);
 }
 
 /*
@@ -3032,7 +3032,7 @@ XLogBackgroundFlush(void)
             (uint32) (WriteRqst.Write >> 32), (uint32) WriteRqst.Write,
             (uint32) (WriteRqst.Flush >> 32), (uint32) WriteRqst.Flush,
             (uint32) (LogwrtResult.Write >> 32), (uint32) LogwrtResult.Write,
-          (uint32) (LogwrtResult.Flush >> 32), (uint32) LogwrtResult.Flush);
+            (uint32) (LogwrtResult.Flush >> 32), (uint32) LogwrtResult.Flush);
 #endif
 
    START_CRIT_SECTION();
@@ -3531,7 +3531,7 @@ XLogFileOpen(XLogSegNo segno)
    if (fd < 0)
        ereport(PANIC,
                (errcode_for_file_access(),
-           errmsg("could not open write-ahead log file \"%s\": %m", path)));
+                errmsg("could not open write-ahead log file \"%s\": %m", path)));
 
    return fd;
 }
@@ -4025,8 +4025,8 @@ RemoveXlogFile(const char *segname, XLogRecPtr PriorRedoPtr, XLogRecPtr endptr)
        {
            ereport(LOG,
                    (errcode_for_file_access(),
-              errmsg("could not rename old write-ahead log file \"%s\": %m",
-                     path)));
+                    errmsg("could not rename old write-ahead log file \"%s\": %m",
+                           path)));
            return;
        }
        rc = durable_unlink(newpath, LOG);
@@ -4180,7 +4180,7 @@ ReadRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr, int emode,
            if (errormsg)
                ereport(emode_for_corrupt_record(emode,
                                                 RecPtr ? RecPtr : EndRecPtr),
-               (errmsg_internal("%s", errormsg) /* already translated */ ));
+                       (errmsg_internal("%s", errormsg) /* already translated */ ));
        }
 
        /*
@@ -4197,10 +4197,10 @@ ReadRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr, int emode,
            XLogFileName(fname, xlogreader->readPageTLI, segno);
            ereport(emode_for_corrupt_record(emode,
                                             RecPtr ? RecPtr : EndRecPtr),
-           (errmsg("unexpected timeline ID %u in log segment %s, offset %u",
-                   xlogreader->latestPageTLI,
-                   fname,
-                   offset)));
+                   (errmsg("unexpected timeline ID %u in log segment %s, offset %u",
+                           xlogreader->latestPageTLI,
+                           fname,
+                           offset)));
            record = NULL;
        }
 
@@ -4494,8 +4494,8 @@ ReadControlFile(void)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
                 errdetail("The database cluster was initialized with PG_CONTROL_VERSION %d (0x%08x),"
-        " but the server was compiled with PG_CONTROL_VERSION %d (0x%08x).",
-           ControlFile->pg_control_version, ControlFile->pg_control_version,
+                          " but the server was compiled with PG_CONTROL_VERSION %d (0x%08x).",
+                          ControlFile->pg_control_version, ControlFile->pg_control_version,
                           PG_CONTROL_VERSION, PG_CONTROL_VERSION),
                 errhint("This could be a problem of mismatched byte ordering.  It looks like you need to initdb.")));
 
@@ -4503,8 +4503,8 @@ ReadControlFile(void)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
                 errdetail("The database cluster was initialized with PG_CONTROL_VERSION %d,"
-                 " but the server was compiled with PG_CONTROL_VERSION %d.",
-                       ControlFile->pg_control_version, PG_CONTROL_VERSION),
+                          " but the server was compiled with PG_CONTROL_VERSION %d.",
+                          ControlFile->pg_control_version, PG_CONTROL_VERSION),
                 errhint("It looks like you need to initdb.")));
 
    /* Now check the CRC. */
@@ -4527,15 +4527,15 @@ ReadControlFile(void)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
                 errdetail("The database cluster was initialized with CATALOG_VERSION_NO %d,"
-                 " but the server was compiled with CATALOG_VERSION_NO %d.",
-                       ControlFile->catalog_version_no, CATALOG_VERSION_NO),
+                          " but the server was compiled with CATALOG_VERSION_NO %d.",
+                          ControlFile->catalog_version_no, CATALOG_VERSION_NO),
                 errhint("It looks like you need to initdb.")));
    if (ControlFile->maxAlign != MAXIMUM_ALIGNOF)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
-          errdetail("The database cluster was initialized with MAXALIGN %d,"
-                    " but the server was compiled with MAXALIGN %d.",
-                    ControlFile->maxAlign, MAXIMUM_ALIGNOF),
+                errdetail("The database cluster was initialized with MAXALIGN %d,"
+                          " but the server was compiled with MAXALIGN %d.",
+                          ControlFile->maxAlign, MAXIMUM_ALIGNOF),
                 errhint("It looks like you need to initdb.")));
    if (ControlFile->floatFormat != FLOATFORMAT_VALUE)
        ereport(FATAL,
@@ -4545,58 +4545,58 @@ ReadControlFile(void)
    if (ControlFile->blcksz != BLCKSZ)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
-            errdetail("The database cluster was initialized with BLCKSZ %d,"
-                      " but the server was compiled with BLCKSZ %d.",
-                      ControlFile->blcksz, BLCKSZ),
+                errdetail("The database cluster was initialized with BLCKSZ %d,"
+                          " but the server was compiled with BLCKSZ %d.",
+                          ControlFile->blcksz, BLCKSZ),
                 errhint("It looks like you need to recompile or initdb.")));
    if (ControlFile->relseg_size != RELSEG_SIZE)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
-       errdetail("The database cluster was initialized with RELSEG_SIZE %d,"
-                 " but the server was compiled with RELSEG_SIZE %d.",
-                 ControlFile->relseg_size, RELSEG_SIZE),
+                errdetail("The database cluster was initialized with RELSEG_SIZE %d,"
+                          " but the server was compiled with RELSEG_SIZE %d.",
+                          ControlFile->relseg_size, RELSEG_SIZE),
                 errhint("It looks like you need to recompile or initdb.")));
    if (ControlFile->xlog_blcksz != XLOG_BLCKSZ)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
-       errdetail("The database cluster was initialized with XLOG_BLCKSZ %d,"
-                 " but the server was compiled with XLOG_BLCKSZ %d.",
-                 ControlFile->xlog_blcksz, XLOG_BLCKSZ),
+                errdetail("The database cluster was initialized with XLOG_BLCKSZ %d,"
+                          " but the server was compiled with XLOG_BLCKSZ %d.",
+                          ControlFile->xlog_blcksz, XLOG_BLCKSZ),
                 errhint("It looks like you need to recompile or initdb.")));
    if (ControlFile->xlog_seg_size != XLOG_SEG_SIZE)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
                 errdetail("The database cluster was initialized with XLOG_SEG_SIZE %d,"
-                      " but the server was compiled with XLOG_SEG_SIZE %d.",
+                          " but the server was compiled with XLOG_SEG_SIZE %d.",
                           ControlFile->xlog_seg_size, XLOG_SEG_SIZE),
                 errhint("It looks like you need to recompile or initdb.")));
    if (ControlFile->nameDataLen != NAMEDATALEN)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
-       errdetail("The database cluster was initialized with NAMEDATALEN %d,"
-                 " but the server was compiled with NAMEDATALEN %d.",
-                 ControlFile->nameDataLen, NAMEDATALEN),
+                errdetail("The database cluster was initialized with NAMEDATALEN %d,"
+                          " but the server was compiled with NAMEDATALEN %d.",
+                          ControlFile->nameDataLen, NAMEDATALEN),
                 errhint("It looks like you need to recompile or initdb.")));
    if (ControlFile->indexMaxKeys != INDEX_MAX_KEYS)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
                 errdetail("The database cluster was initialized with INDEX_MAX_KEYS %d,"
-                     " but the server was compiled with INDEX_MAX_KEYS %d.",
+                          " but the server was compiled with INDEX_MAX_KEYS %d.",
                           ControlFile->indexMaxKeys, INDEX_MAX_KEYS),
                 errhint("It looks like you need to recompile or initdb.")));
    if (ControlFile->toast_max_chunk_size != TOAST_MAX_CHUNK_SIZE)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
                 errdetail("The database cluster was initialized with TOAST_MAX_CHUNK_SIZE %d,"
-               " but the server was compiled with TOAST_MAX_CHUNK_SIZE %d.",
-             ControlFile->toast_max_chunk_size, (int) TOAST_MAX_CHUNK_SIZE),
+                          " but the server was compiled with TOAST_MAX_CHUNK_SIZE %d.",
+                          ControlFile->toast_max_chunk_size, (int) TOAST_MAX_CHUNK_SIZE),
                 errhint("It looks like you need to recompile or initdb.")));
    if (ControlFile->loblksize != LOBLKSIZE)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
-         errdetail("The database cluster was initialized with LOBLKSIZE %d,"
-                   " but the server was compiled with LOBLKSIZE %d.",
-                   ControlFile->loblksize, (int) LOBLKSIZE),
+                errdetail("The database cluster was initialized with LOBLKSIZE %d,"
+                          " but the server was compiled with LOBLKSIZE %d.",
+                          ControlFile->loblksize, (int) LOBLKSIZE),
                 errhint("It looks like you need to recompile or initdb.")));
 
 #ifdef USE_FLOAT4_BYVAL
@@ -4604,14 +4604,14 @@ ReadControlFile(void)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
                 errdetail("The database cluster was initialized without USE_FLOAT4_BYVAL"
-                     " but the server was compiled with USE_FLOAT4_BYVAL."),
+                          " but the server was compiled with USE_FLOAT4_BYVAL."),
                 errhint("It looks like you need to recompile or initdb.")));
 #else
    if (ControlFile->float4ByVal != false)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
-       errdetail("The database cluster was initialized with USE_FLOAT4_BYVAL"
-                 " but the server was compiled without USE_FLOAT4_BYVAL."),
+                errdetail("The database cluster was initialized with USE_FLOAT4_BYVAL"
+                          " but the server was compiled without USE_FLOAT4_BYVAL."),
                 errhint("It looks like you need to recompile or initdb.")));
 #endif
 
@@ -4620,14 +4620,14 @@ ReadControlFile(void)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
                 errdetail("The database cluster was initialized without USE_FLOAT8_BYVAL"
-                     " but the server was compiled with USE_FLOAT8_BYVAL."),
+                          " but the server was compiled with USE_FLOAT8_BYVAL."),
                 errhint("It looks like you need to recompile or initdb.")));
 #else
    if (ControlFile->float8ByVal != false)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
-       errdetail("The database cluster was initialized with USE_FLOAT8_BYVAL"
-                 " but the server was compiled without USE_FLOAT8_BYVAL."),
+                errdetail("The database cluster was initialized with USE_FLOAT8_BYVAL"
+                          " but the server was compiled without USE_FLOAT8_BYVAL."),
                 errhint("It looks like you need to recompile or initdb.")));
 #endif
 
@@ -5072,7 +5072,7 @@ BootStrapXLOG(void)
            errno = ENOSPC;
        ereport(PANIC,
                (errcode_for_file_access(),
-             errmsg("could not write bootstrap write-ahead log file: %m")));
+                errmsg("could not write bootstrap write-ahead log file: %m")));
    }
    pgstat_report_wait_end();
 
@@ -5080,13 +5080,13 @@ BootStrapXLOG(void)
    if (pg_fsync(openLogFile) != 0)
        ereport(PANIC,
                (errcode_for_file_access(),
-             errmsg("could not fsync bootstrap write-ahead log file: %m")));
+                errmsg("could not fsync bootstrap write-ahead log file: %m")));
    pgstat_report_wait_end();
 
    if (close(openLogFile))
        ereport(PANIC,
                (errcode_for_file_access(),
-             errmsg("could not close bootstrap write-ahead log file: %m")));
+                errmsg("could not close bootstrap write-ahead log file: %m")));
 
    openLogFile = -1;
 
@@ -5208,9 +5208,9 @@ readRecoveryCommandFile(void)
            else
                ereport(ERROR,
                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-               errmsg("invalid value for recovery parameter \"%s\": \"%s\"",
-                      "recovery_target_action",
-                      item->value),
+                        errmsg("invalid value for recovery parameter \"%s\": \"%s\"",
+                               "recovery_target_action",
+                               item->value),
                         errhint("Valid values are \"pause\", \"promote\", and \"shutdown\".")));
 
            ereport(DEBUG2,
@@ -5236,10 +5236,10 @@ readRecoveryCommandFile(void)
            }
            if (rtli)
                ereport(DEBUG2,
-                  (errmsg_internal("recovery_target_timeline = %u", rtli)));
+                       (errmsg_internal("recovery_target_timeline = %u", rtli)));
            else
                ereport(DEBUG2,
-                    (errmsg_internal("recovery_target_timeline = latest")));
+                       (errmsg_internal("recovery_target_timeline = latest")));
        }
        else if (strcmp(item->name, "recovery_target_xid") == 0)
        {
@@ -5248,8 +5248,8 @@ readRecoveryCommandFile(void)
            if (errno == EINVAL || errno == ERANGE)
                ereport(FATAL,
                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                 errmsg("recovery_target_xid is not a valid number: \"%s\"",
-                        item->value)));
+                        errmsg("recovery_target_xid is not a valid number: \"%s\"",
+                               item->value)));
            ereport(DEBUG2,
                    (errmsg_internal("recovery_target_xid = %u",
                                     recoveryTargetXid)));
@@ -5264,12 +5264,12 @@ readRecoveryCommandFile(void)
             */
            recoveryTargetTime =
                DatumGetTimestampTz(DirectFunctionCall3(timestamptz_in,
-                                               CStringGetDatum(item->value),
-                                               ObjectIdGetDatum(InvalidOid),
+                                                       CStringGetDatum(item->value),
+                                                       ObjectIdGetDatum(InvalidOid),
                                                        Int32GetDatum(-1)));
            ereport(DEBUG2,
                    (errmsg_internal("recovery_target_time = '%s'",
-                                  timestamptz_to_str(recoveryTargetTime))));
+                                    timestamptz_to_str(recoveryTargetTime))));
        }
        else if (strcmp(item->name, "recovery_target_name") == 0)
        {
@@ -5310,10 +5310,10 @@ readRecoveryCommandFile(void)
            else
                ereport(ERROR,
                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-               errmsg("invalid value for recovery parameter \"%s\": \"%s\"",
-                      "recovery_target",
-                      item->value),
-                      errhint("The only allowed value is \"immediate\".")));
+                        errmsg("invalid value for recovery parameter \"%s\": \"%s\"",
+                               "recovery_target",
+                               item->value),
+                        errhint("The only allowed value is \"immediate\".")));
            ereport(DEBUG2,
                    (errmsg_internal("recovery_target = '%s'",
                                     item->value)));
@@ -5422,7 +5422,7 @@ readRecoveryCommandFile(void)
    if (StandbyModeRequested && !IsUnderPostmaster)
        ereport(FATAL,
                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-           errmsg("standby mode is not supported by single-user servers")));
+                errmsg("standby mode is not supported by single-user servers")));
 
    /* Enable fetching from archive recovery area */
    ArchiveRecoveryRequested = true;
@@ -5642,9 +5642,9 @@ recoveryStopsBefore(XLogReaderState *record)
        recoveryStopTime = 0;
        recoveryStopName[0] = '\0';
        ereport(LOG,
-            (errmsg("recovery stopping before WAL location (LSN) \"%X/%X\"",
-                    (uint32) (recoveryStopLSN >> 32),
-                    (uint32) recoveryStopLSN)));
+               (errmsg("recovery stopping before WAL location (LSN) \"%X/%X\"",
+                       (uint32) (recoveryStopLSN >> 32),
+                       (uint32) recoveryStopLSN)));
        return true;
    }
 
@@ -5781,9 +5781,9 @@ recoveryStopsAfter(XLogReaderState *record)
            strlcpy(recoveryStopName, recordRestorePointData->rp_name, MAXFNAMELEN);
 
            ereport(LOG,
-               (errmsg("recovery stopping at restore point \"%s\", time %s",
-                       recoveryStopName,
-                       timestamptz_to_str(recoveryStopTime))));
+                   (errmsg("recovery stopping at restore point \"%s\", time %s",
+                           recoveryStopName,
+                           timestamptz_to_str(recoveryStopTime))));
            return true;
        }
    }
@@ -5799,9 +5799,9 @@ recoveryStopsAfter(XLogReaderState *record)
        recoveryStopTime = 0;
        recoveryStopName[0] = '\0';
        ereport(LOG,
-             (errmsg("recovery stopping after WAL location (LSN) \"%X/%X\"",
-                     (uint32) (recoveryStopLSN >> 32),
-                     (uint32) recoveryStopLSN)));
+               (errmsg("recovery stopping after WAL location (LSN) \"%X/%X\"",
+                       (uint32) (recoveryStopLSN >> 32),
+                       (uint32) recoveryStopLSN)));
        return true;
    }
 
@@ -6239,20 +6239,20 @@ StartupXLOG(void)
                        str_time(ControlFile->time))));
    else if (ControlFile->state == DB_IN_CRASH_RECOVERY)
        ereport(LOG,
-          (errmsg("database system was interrupted while in recovery at %s",
-                  str_time(ControlFile->time)),
-           errhint("This probably means that some data is corrupted and"
-                   " you will have to use the last backup for recovery.")));
+               (errmsg("database system was interrupted while in recovery at %s",
+                       str_time(ControlFile->time)),
+                errhint("This probably means that some data is corrupted and"
+                        " you will have to use the last backup for recovery.")));
    else if (ControlFile->state == DB_IN_ARCHIVE_RECOVERY)
        ereport(LOG,
                (errmsg("database system was interrupted while in recovery at log time %s",
                        str_time(ControlFile->checkPointCopy.time)),
                 errhint("If this has occurred more than once some data might be corrupted"
-             " and you might need to choose an earlier recovery target.")));
+                        " and you might need to choose an earlier recovery target.")));
    else if (ControlFile->state == DB_IN_PRODUCTION)
        ereport(LOG,
-             (errmsg("database system was interrupted; last known up at %s",
-                     str_time(ControlFile->time))));
+               (errmsg("database system was interrupted; last known up at %s",
+                       str_time(ControlFile->time))));
 
    /* This is just to allow attaching to startup process with a debugger */
 #ifdef XLOG_REPLAY_DELAY
@@ -6347,7 +6347,7 @@ StartupXLOG(void)
        ereport(ERROR,
                (errcode(ERRCODE_OUT_OF_MEMORY),
                 errmsg("out of memory"),
-            errdetail("Failed while allocating a WAL reading processor.")));
+                errdetail("Failed while allocating a WAL reading processor.")));
    xlogreader->system_identifier = ControlFile->system_identifier;
 
    /*
@@ -6382,7 +6382,7 @@ StartupXLOG(void)
            wasShutdown = ((record->xl_info & ~XLR_INFO_MASK) == XLOG_CHECKPOINT_SHUTDOWN);
            ereport(DEBUG1,
                    (errmsg("checkpoint record is at %X/%X",
-                  (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc)));
+                           (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc)));
            InRecovery = true;  /* force recovery even if SHUTDOWNED */
 
            /*
@@ -6428,8 +6428,8 @@ StartupXLOG(void)
                if (symlink(ti->path, linkloc) < 0)
                    ereport(ERROR,
                            (errcode_for_file_access(),
-                         errmsg("could not create symbolic link \"%s\": %m",
-                                linkloc)));
+                            errmsg("could not create symbolic link \"%s\": %m",
+                                   linkloc)));
 
                pfree(ti->oid);
                pfree(ti->path);
@@ -6460,16 +6460,16 @@ StartupXLOG(void)
            unlink(TABLESPACE_MAP_OLD);
            if (durable_rename(TABLESPACE_MAP, TABLESPACE_MAP_OLD, DEBUG1) == 0)
                ereport(LOG,
-               (errmsg("ignoring file \"%s\" because no file \"%s\" exists",
-                       TABLESPACE_MAP, BACKUP_LABEL_FILE),
-                errdetail("File \"%s\" was renamed to \"%s\".",
-                          TABLESPACE_MAP, TABLESPACE_MAP_OLD)));
+                       (errmsg("ignoring file \"%s\" because no file \"%s\" exists",
+                               TABLESPACE_MAP, BACKUP_LABEL_FILE),
+                        errdetail("File \"%s\" was renamed to \"%s\".",
+                                  TABLESPACE_MAP, TABLESPACE_MAP_OLD)));
            else
                ereport(LOG,
-               (errmsg("ignoring file \"%s\" because no file \"%s\" exists",
-                       TABLESPACE_MAP, BACKUP_LABEL_FILE),
-                errdetail("Could not rename file \"%s\" to \"%s\": %m.",
-                          TABLESPACE_MAP, TABLESPACE_MAP_OLD)));
+                       (errmsg("ignoring file \"%s\" because no file \"%s\" exists",
+                               TABLESPACE_MAP, BACKUP_LABEL_FILE),
+                        errdetail("Could not rename file \"%s\" to \"%s\": %m.",
+                                  TABLESPACE_MAP, TABLESPACE_MAP_OLD)));
        }
 
        /*
@@ -6510,7 +6510,7 @@ StartupXLOG(void)
        {
            ereport(DEBUG1,
                    (errmsg("checkpoint record is at %X/%X",
-                  (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc)));
+                           (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc)));
        }
        else if (StandbyMode)
        {
@@ -6529,12 +6529,12 @@ StartupXLOG(void)
            {
                ereport(LOG,
                        (errmsg("using previous checkpoint record at %X/%X",
-                  (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc)));
+                               (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc)));
                InRecovery = true;  /* force recovery even if SHUTDOWNED */
            }
            else
                ereport(PANIC,
-                    (errmsg("could not locate a valid checkpoint record")));
+                       (errmsg("could not locate a valid checkpoint record")));
        }
        memcpy(&checkPoint, XLogRecGetData(xlogreader), sizeof(CheckPoint));
        wasShutdown = ((record->xl_info & ~XLR_INFO_MASK) == XLOG_CHECKPOINT_SHUTDOWN);
@@ -6587,7 +6587,7 @@ StartupXLOG(void)
     * history, too.
     */
    if (!XLogRecPtrIsInvalid(ControlFile->minRecoveryPoint) &&
-     tliOfPointInHistory(ControlFile->minRecoveryPoint - 1, expectedTLEs) !=
+       tliOfPointInHistory(ControlFile->minRecoveryPoint - 1, expectedTLEs) !=
        ControlFile->minRecoveryPointTLI)
        ereport(FATAL,
                (errmsg("requested timeline %u does not contain minimum recovery point %X/%X on timeline %u",
@@ -6600,7 +6600,7 @@ StartupXLOG(void)
 
    ereport(DEBUG1,
            (errmsg_internal("redo record is at %X/%X; shutdown %s",
-                 (uint32) (checkPoint.redo >> 32), (uint32) checkPoint.redo,
+                            (uint32) (checkPoint.redo >> 32), (uint32) checkPoint.redo,
                             wasShutdown ? "TRUE" : "FALSE")));
    ereport(DEBUG1,
            (errmsg_internal("next transaction ID: %u:%u; next OID: %u",
@@ -6608,13 +6608,13 @@ StartupXLOG(void)
                             checkPoint.nextOid)));
    ereport(DEBUG1,
            (errmsg_internal("next MultiXactId: %u; next MultiXactOffset: %u",
-                        checkPoint.nextMulti, checkPoint.nextMultiOffset)));
+                            checkPoint.nextMulti, checkPoint.nextMultiOffset)));
    ereport(DEBUG1,
-      (errmsg_internal("oldest unfrozen transaction ID: %u, in database %u",
-                       checkPoint.oldestXid, checkPoint.oldestXidDB)));
+           (errmsg_internal("oldest unfrozen transaction ID: %u, in database %u",
+                            checkPoint.oldestXid, checkPoint.oldestXidDB)));
    ereport(DEBUG1,
            (errmsg_internal("oldest MultiXactId: %u, in database %u",
-                        checkPoint.oldestMulti, checkPoint.oldestMultiDB)));
+                            checkPoint.oldestMulti, checkPoint.oldestMultiDB)));
    ereport(DEBUG1,
            (errmsg_internal("commit timestamp Xid oldest/newest: %u/%u",
                             checkPoint.oldestCommitTsXid,
@@ -6804,7 +6804,7 @@ StartupXLOG(void)
                    ereport(FATAL,
                            (errmsg("backup_label contains data inconsistent with control file"),
                             errhint("This means that the backup is corrupted and you will "
-                              "have to use another backup for recovery.")));
+                                    "have to use another backup for recovery.")));
                ControlFile->backupEndPoint = ControlFile->minRecoveryPoint;
            }
        }
@@ -7010,7 +7010,7 @@ StartupXLOG(void)
 
            ereport(LOG,
                    (errmsg("redo starts at %X/%X",
-                        (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr)));
+                           (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr)));
 
            /*
             * main redo apply loop
@@ -7021,15 +7021,15 @@ StartupXLOG(void)
 
 #ifdef WAL_DEBUG
                if (XLOG_DEBUG ||
-                (rmid == RM_XACT_ID && trace_recovery_messages <= DEBUG2) ||
+                   (rmid == RM_XACT_ID && trace_recovery_messages <= DEBUG2) ||
                    (rmid != RM_XACT_ID && trace_recovery_messages <= DEBUG3))
                {
                    StringInfoData buf;
 
                    initStringInfo(&buf);
                    appendStringInfo(&buf, "REDO @ %X/%X; LSN %X/%X: ",
-                           (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr,
-                            (uint32) (EndRecPtr >> 32), (uint32) EndRecPtr);
+                                    (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr,
+                                    (uint32) (EndRecPtr >> 32), (uint32) EndRecPtr);
                    xlog_outrec(&buf, xlogreader);
                    appendStringInfoString(&buf, " - ");
                    xlog_outdesc(&buf, xlogreader);
@@ -7282,12 +7282,12 @@ StartupXLOG(void)
 
            ereport(LOG,
                    (errmsg("redo done at %X/%X",
-                        (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr)));
+                           (uint32) (ReadRecPtr >> 32), (uint32) ReadRecPtr)));
            xtime = GetLatestXTime();
            if (xtime)
                ereport(LOG,
-                    (errmsg("last completed transaction was at log time %s",
-                            timestamptz_to_str(xtime))));
+                       (errmsg("last completed transaction was at log time %s",
+                               timestamptz_to_str(xtime))));
 
            InRedo = false;
        }
@@ -7378,7 +7378,7 @@ StartupXLOG(void)
                         errhint("Online backup started with pg_start_backup() must be ended with pg_stop_backup(), and all WAL up to that point must be available at recovery.")));
            else
                ereport(FATAL,
-                     (errmsg("WAL ends before consistent recovery point")));
+                       (errmsg("WAL ends before consistent recovery point")));
        }
    }
 
@@ -8026,7 +8026,7 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr,
        {
            case 1:
                ereport(LOG,
-               (errmsg("invalid primary checkpoint link in control file")));
+                       (errmsg("invalid primary checkpoint link in control file")));
                break;
            case 2:
                ereport(LOG,
@@ -8034,7 +8034,7 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr,
                break;
            default:
                ereport(LOG,
-                  (errmsg("invalid checkpoint link in backup_label file")));
+                       (errmsg("invalid checkpoint link in backup_label file")));
                break;
        }
        return NULL;
@@ -8078,7 +8078,7 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr,
                break;
            default:
                ereport(LOG,
-               (errmsg("invalid resource manager ID in checkpoint record")));
+                       (errmsg("invalid resource manager ID in checkpoint record")));
                break;
        }
        return NULL;
@@ -8091,11 +8091,11 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr,
        {
            case 1:
                ereport(LOG,
-                  (errmsg("invalid xl_info in primary checkpoint record")));
+                       (errmsg("invalid xl_info in primary checkpoint record")));
                break;
            case 2:
                ereport(LOG,
-                (errmsg("invalid xl_info in secondary checkpoint record")));
+                       (errmsg("invalid xl_info in secondary checkpoint record")));
                break;
            default:
                ereport(LOG,
@@ -8110,11 +8110,11 @@ ReadCheckpointRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr,
        {
            case 1:
                ereport(LOG,
-                   (errmsg("invalid length of primary checkpoint record")));
+                       (errmsg("invalid length of primary checkpoint record")));
                break;
            case 2:
                ereport(LOG,
-                 (errmsg("invalid length of secondary checkpoint record")));
+                       (errmsg("invalid length of secondary checkpoint record")));
                break;
            default:
                ereport(LOG,
@@ -9099,7 +9099,7 @@ CreateRestartPoint(int flags)
    if (!RecoveryInProgress())
    {
        ereport(DEBUG2,
-             (errmsg("skipping restartpoint, recovery has already ended")));
+               (errmsg("skipping restartpoint, recovery has already ended")));
        LWLockRelease(CheckpointLock);
        return false;
    }
@@ -9299,9 +9299,9 @@ CreateRestartPoint(int flags)
    xtime = GetLatestXTime();
    ereport((log_checkpoints ? LOG : DEBUG2),
            (errmsg("recovery restart point at %X/%X",
-        (uint32) (lastCheckPoint.redo >> 32), (uint32) lastCheckPoint.redo),
-          xtime ? errdetail("last completed transaction was at log time %s",
-                            timestamptz_to_str(xtime)) : 0));
+                   (uint32) (lastCheckPoint.redo >> 32), (uint32) lastCheckPoint.redo),
+            xtime ? errdetail("last completed transaction was at log time %s",
+                              timestamptz_to_str(xtime)) : 0));
 
    LWLockRelease(CheckpointLock);
 
@@ -9573,8 +9573,8 @@ checkTimeLineSwitch(XLogRecPtr lsn, TimeLineID newTLI, TimeLineID prevTLI)
     */
    if (newTLI < ThisTimeLineID || !tliInHistory(newTLI, expectedTLEs))
        ereport(PANIC,
-        (errmsg("unexpected timeline ID %u (after %u) in checkpoint record",
-                newTLI, ThisTimeLineID)));
+               (errmsg("unexpected timeline ID %u (after %u) in checkpoint record",
+                       newTLI, ThisTimeLineID)));
 
    /*
     * If we have not yet reached min recovery point, and we're about to
@@ -9665,7 +9665,7 @@ xlog_redo(XLogReaderState *record)
            !XLogRecPtrIsInvalid(ControlFile->backupStartPoint) &&
            XLogRecPtrIsInvalid(ControlFile->backupEndPoint))
            ereport(PANIC,
-           (errmsg("online backup was canceled, recovery cannot continue")));
+                   (errmsg("online backup was canceled, recovery cannot continue")));
 
        /*
         * If we see a shutdown checkpoint, we know that nothing was running
@@ -10068,7 +10068,7 @@ assign_xlog_sync_method(int new_sync_method, void *extra)
                ereport(PANIC,
                        (errcode_for_file_access(),
                         errmsg("could not fsync log segment %s: %m",
-                             XLogFileNameP(ThisTimeLineID, openLogSegNo))));
+                               XLogFileNameP(ThisTimeLineID, openLogSegNo))));
            pgstat_report_wait_end();
            if (get_sync_bit(sync_method) != get_sync_bit(new_sync_method))
                XLogFileClose();
@@ -10100,8 +10100,8 @@ issue_xlog_fsync(int fd, XLogSegNo segno)
            if (pg_fsync_writethrough(fd) != 0)
                ereport(PANIC,
                        (errcode_for_file_access(),
-                     errmsg("could not fsync write-through log file %s: %m",
-                            XLogFileNameP(ThisTimeLineID, segno))));
+                        errmsg("could not fsync write-through log file %s: %m",
+                               XLogFileNameP(ThisTimeLineID, segno))));
            break;
 #endif
 #ifdef HAVE_FDATASYNC
@@ -10209,7 +10209,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p,
    if (!backup_started_in_recovery && !XLogIsNeeded())
        ereport(ERROR,
                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-             errmsg("WAL level not sufficient for making an online backup"),
+                errmsg("WAL level not sufficient for making an online backup"),
                 errhint("wal_level must be set to \"replica\" or \"logical\" at server start.")));
 
    if (strlen(backupidstr) > MAXPGPATH)
@@ -10347,13 +10347,13 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p,
 
                if (!checkpointfpw || startpoint <= recptr)
                    ereport(ERROR,
-                         (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-                          errmsg("WAL generated with full_page_writes=off was replayed "
-                                 "since last restartpoint"),
-                          errhint("This means that the backup being taken on the standby "
-                                  "is corrupt and should not be used. "
-                                  "Enable full_page_writes and run CHECKPOINT on the master, "
-                                  "and then try an online backup again.")));
+                           (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+                            errmsg("WAL generated with full_page_writes=off was replayed "
+                                   "since last restartpoint"),
+                            errhint("This means that the backup being taken on the standby "
+                                    "is corrupt and should not be used. "
+                                    "Enable full_page_writes and run CHECKPOINT on the master, "
+                                    "and then try an online backup again.")));
 
                /*
                 * During recovery, since we don't use the end-of-backup WAL
@@ -10477,7 +10477,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p,
             */
            ereport(WARNING,
                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                 errmsg("tablespaces are not supported on this platform")));
+                    errmsg("tablespaces are not supported on this platform")));
 #endif
        }
 
@@ -10493,9 +10493,9 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p,
                    "%Y-%m-%d %H:%M:%S %Z",
                    pg_localtime(&stamp_time, log_timezone));
        appendStringInfo(labelfile, "START WAL LOCATION: %X/%X (file %s)\n",
-            (uint32) (startpoint >> 32), (uint32) startpoint, xlogfilename);
+                        (uint32) (startpoint >> 32), (uint32) startpoint, xlogfilename);
        appendStringInfo(labelfile, "CHECKPOINT LOCATION: %X/%X\n",
-                    (uint32) (checkpointloc >> 32), (uint32) checkpointloc);
+                        (uint32) (checkpointloc >> 32), (uint32) checkpointloc);
        appendStringInfo(labelfile, "BACKUP METHOD: %s\n",
                         exclusive ? "pg_start_backup" : "streamed");
        appendStringInfo(labelfile, "BACKUP FROM: %s\n",
@@ -10562,10 +10562,10 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p,
                }
                else
                    ereport(ERROR,
-                         (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-                          errmsg("a backup is already in progress"),
-                          errhint("If you're sure there is no backup in progress, remove file \"%s\" and try again.",
-                                  TABLESPACE_MAP)));
+                           (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+                            errmsg("a backup is already in progress"),
+                            errhint("If you're sure there is no backup in progress, remove file \"%s\" and try again.",
+                                    TABLESPACE_MAP)));
 
                fp = AllocateFile(TABLESPACE_MAP, "w");
 
@@ -10727,7 +10727,7 @@ do_pg_stop_backup(char *labelfile, bool waitforarchive, TimeLineID *stoptli_p)
    if (!backup_started_in_recovery && !XLogIsNeeded())
        ereport(ERROR,
                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-             errmsg("WAL level not sufficient for making an online backup"),
+                errmsg("WAL level not sufficient for making an online backup"),
                 errhint("wal_level must be set to \"replica\" or \"logical\" at server start.")));
 
    if (exclusive)
@@ -10906,12 +10906,12 @@ do_pg_stop_backup(char *labelfile, bool waitforarchive, TimeLineID *stoptli_p)
        if (startpoint <= recptr)
            ereport(ERROR,
                    (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-              errmsg("WAL generated with full_page_writes=off was replayed "
-                     "during online backup"),
-            errhint("This means that the backup being taken on the standby "
-                    "is corrupt and should not be used. "
-                "Enable full_page_writes and run CHECKPOINT on the master, "
-                    "and then try an online backup again.")));
+                    errmsg("WAL generated with full_page_writes=off was replayed "
+                           "during online backup"),
+                    errhint("This means that the backup being taken on the standby "
+                            "is corrupt and should not be used. "
+                            "Enable full_page_writes and run CHECKPOINT on the master, "
+                            "and then try an online backup again.")));
 
 
        LWLockAcquire(ControlFileLock, LW_SHARED);
@@ -10960,7 +10960,7 @@ do_pg_stop_backup(char *labelfile, bool waitforarchive, TimeLineID *stoptli_p)
                 errmsg("could not create file \"%s\": %m",
                        histfilepath)));
    fprintf(fp, "START WAL LOCATION: %X/%X (file %s)\n",
-       (uint32) (startpoint >> 32), (uint32) startpoint, startxlogfilename);
+           (uint32) (startpoint >> 32), (uint32) startpoint, startxlogfilename);
    fprintf(fp, "STOP WAL LOCATION: %X/%X (file %s)\n",
            (uint32) (stoppoint >> 32), (uint32) stoppoint, stopxlogfilename);
    /* transfer remaining lines from label to history file */
@@ -11287,7 +11287,7 @@ read_tablespace_map(List **tablespaces)
            if (sscanf(str, "%s %n", tbsoid, &n) != 1)
                ereport(FATAL,
                        (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-                    errmsg("invalid data in file \"%s\"", TABLESPACE_MAP)));
+                        errmsg("invalid data in file \"%s\"", TABLESPACE_MAP)));
            tbslinkpath = str + n;
            i = 0;
 
@@ -11760,7 +11760,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
                     */
                    now = GetCurrentTimestamp();
                    if (!TimestampDifferenceExceeds(last_fail_time, now,
-                                               wal_retrieve_retry_interval))
+                                                   wal_retrieve_retry_interval))
                    {
                        long        secs,
                                    wait_time;
@@ -11771,7 +11771,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
                            (secs * 1000 + usecs / 1000);
 
                        WaitLatch(&XLogCtl->recoveryWakeupLatch,
-                            WL_LATCH_SET | WL_TIMEOUT | WL_POSTMASTER_DEATH,
+                                 WL_LATCH_SET | WL_TIMEOUT | WL_POSTMASTER_DEATH,
                                  wait_time, WAIT_EVENT_RECOVERY_WAL_STREAM);
                        ResetLatch(&XLogCtl->recoveryWakeupLatch);
                        now = GetCurrentTimestamp();
@@ -11825,7 +11825,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
                 * file from pg_wal.
                 */
                readFile = XLogFileReadAnyTLI(readSegNo, DEBUG2,
-                        currentSource == XLOG_FROM_ARCHIVE ? XLOG_FROM_ANY :
+                                             currentSource == XLOG_FROM_ARCHIVE ? XLOG_FROM_ANY :
                                              currentSource);
                if (readFile >= 0)
                    return true;    /* success! */
index c46325dfaf261979efc50ff2f2860e5ae35a243e..f9b49ba49842db17497fc83292d8aa7a0fc16856 100644 (file)
@@ -110,7 +110,7 @@ pg_start_backup(PG_FUNCTION_ARGS)
        MemoryContextSwitchTo(oldcontext);
 
        startpoint = do_pg_start_backup(backupidstr, fast, NULL, label_file,
-                                   dir, NULL, tblspc_map_file, false, true);
+                                       dir, NULL, tblspc_map_file, false, true);
 
        before_shmem_exit(nonexclusive_base_backup_cleanup, (Datum) 0);
    }
@@ -326,7 +326,7 @@ pg_create_restore_point(PG_FUNCTION_ARGS)
    if (!XLogIsNeeded())
        ereport(ERROR,
                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
-            errmsg("WAL level not sufficient for creating a restore point"),
+                errmsg("WAL level not sufficient for creating a restore point"),
                 errhint("wal_level must be set to \"replica\" or \"logical\" at server start.")));
 
    restore_name_str = text_to_cstring(restore_name);
@@ -528,7 +528,7 @@ pg_walfile_name(PG_FUNCTION_ARGS)
        ereport(ERROR,
                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
                 errmsg("recovery is in progress"),
-         errhint("pg_walfile_name() cannot be executed during recovery.")));
+                errhint("pg_walfile_name() cannot be executed during recovery.")));
 
    XLByteToPrevSeg(locationpoint, xlogsegno);
    XLogFileName(xlogfilename, ThisTimeLineID, xlogsegno);
@@ -684,13 +684,13 @@ pg_backup_start_time(PG_FUNCTION_ARGS)
    if (ferror(lfp))
        ereport(ERROR,
                (errcode_for_file_access(),
-              errmsg("could not read file \"%s\": %m", BACKUP_LABEL_FILE)));
+                errmsg("could not read file \"%s\": %m", BACKUP_LABEL_FILE)));
 
    /* Close the backup label file. */
    if (FreeFile(lfp))
        ereport(ERROR,
                (errcode_for_file_access(),
-             errmsg("could not close file \"%s\": %m", BACKUP_LABEL_FILE)));
+                errmsg("could not close file \"%s\": %m", BACKUP_LABEL_FILE)));
 
    if (strlen(backup_start_time) == 0)
        ereport(ERROR,
index c9cc6636d3fd039754d15727587483f0d6530597..3af03ecdb122f78cd6957c54a332bd4621bb7c86 100644 (file)
@@ -175,7 +175,7 @@ XLogEnsureRecordSpace(int max_block_id, int ndatas)
         * they are included in WAL data, but initialize it all for tidiness.
         */
        MemSet(&registered_buffers[max_registered_buffers], 0,
-           (nbuffers - max_registered_buffers) * sizeof(registered_buffer));
+              (nbuffers - max_registered_buffers) * sizeof(registered_buffer));
        max_registered_buffers = nbuffers;
    }
 
@@ -1039,7 +1039,7 @@ InitXLogInsert(void)
    {
        registered_buffers = (registered_buffer *)
            MemoryContextAllocZero(xloginsert_cxt,
-                 sizeof(registered_buffer) * (XLR_NORMAL_MAX_BLOCK_ID + 1));
+                                  sizeof(registered_buffer) * (XLR_NORMAL_MAX_BLOCK_ID + 1));
        max_registered_buffers = XLR_NORMAL_MAX_BLOCK_ID + 1;
    }
    if (rdatas == NULL)
index d6b857f109350159585430ceabf418dd761870cd..0781a7b9de926439c910dc2ce9a3d8df33264f15 100644 (file)
@@ -30,7 +30,7 @@ static bool allocate_recordbuf(XLogReaderState *state, uint32 reclength);
 static bool ValidXLogPageHeader(XLogReaderState *state, XLogRecPtr recptr,
                    XLogPageHeader hdr);
 static bool ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr,
-                XLogRecPtr PrevRecPtr, XLogRecord *record, bool randAccess);
+                     XLogRecPtr PrevRecPtr, XLogRecord *record, bool randAccess);
 static bool ValidXLogRecord(XLogReaderState *state, XLogRecord *record,
                XLogRecPtr recptr);
 static int ReadPageInternal(XLogReaderState *state, XLogRecPtr pageptr,
@@ -254,7 +254,7 @@ XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg)
     */
    readOff = ReadPageInternal(state,
                               targetPagePtr,
-                         Min(targetRecOff + SizeOfXLogRecord, XLOG_BLCKSZ));
+                              Min(targetRecOff + SizeOfXLogRecord, XLOG_BLCKSZ));
    if (readOff < 0)
        goto err;
 
@@ -322,7 +322,7 @@ XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg)
        if (total_len < SizeOfXLogRecord)
        {
            report_invalid_record(state,
-                        "invalid record length at %X/%X: wanted %u, got %u",
+                                 "invalid record length at %X/%X: wanted %u, got %u",
                                  (uint32) (RecPtr >> 32), (uint32) RecPtr,
                                  (uint32) SizeOfXLogRecord, total_len);
            goto err;
@@ -365,8 +365,8 @@ XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg)
 
            /* Wait for the next page to become available */
            readOff = ReadPageInternal(state, targetPagePtr,
-                                Min(total_len - gotlen + SizeOfXLogShortPHD,
-                                    XLOG_BLCKSZ));
+                                      Min(total_len - gotlen + SizeOfXLogShortPHD,
+                                          XLOG_BLCKSZ));
 
            if (readOff < 0)
                goto err;
@@ -379,7 +379,7 @@ XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg)
            {
                report_invalid_record(state,
                                      "there is no contrecord flag at %X/%X",
-                                  (uint32) (RecPtr >> 32), (uint32) RecPtr);
+                                     (uint32) (RecPtr >> 32), (uint32) RecPtr);
                goto err;
            }
 
@@ -393,7 +393,7 @@ XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg)
                report_invalid_record(state,
                                      "invalid contrecord length %u at %X/%X",
                                      pageHeader->xlp_rem_len,
-                                  (uint32) (RecPtr >> 32), (uint32) RecPtr);
+                                     (uint32) (RecPtr >> 32), (uint32) RecPtr);
                goto err;
            }
 
@@ -445,7 +445,7 @@ XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg)
    {
        /* Wait for the record data to become available */
        readOff = ReadPageInternal(state, targetPagePtr,
-                                Min(targetRecOff + total_len, XLOG_BLCKSZ));
+                                  Min(targetRecOff + total_len, XLOG_BLCKSZ));
        if (readOff < 0)
            goto err;
 
@@ -622,7 +622,7 @@ ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr,
    if (record->xl_tot_len < SizeOfXLogRecord)
    {
        report_invalid_record(state,
-                        "invalid record length at %X/%X: wanted %u, got %u",
+                             "invalid record length at %X/%X: wanted %u, got %u",
                              (uint32) (RecPtr >> 32), (uint32) RecPtr,
                              (uint32) SizeOfXLogRecord, record->xl_tot_len);
        return false;
@@ -644,7 +644,7 @@ ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr,
        if (!(record->xl_prev < RecPtr))
        {
            report_invalid_record(state,
-                           "record with incorrect prev-link %X/%X at %X/%X",
+                                 "record with incorrect prev-link %X/%X at %X/%X",
                                  (uint32) (record->xl_prev >> 32),
                                  (uint32) record->xl_prev,
                                  (uint32) (RecPtr >> 32), (uint32) RecPtr);
@@ -661,7 +661,7 @@ ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr,
        if (record->xl_prev != PrevRecPtr)
        {
            report_invalid_record(state,
-                           "record with incorrect prev-link %X/%X at %X/%X",
+                                 "record with incorrect prev-link %X/%X at %X/%X",
                                  (uint32) (record->xl_prev >> 32),
                                  (uint32) record->xl_prev,
                                  (uint32) (RecPtr >> 32), (uint32) RecPtr);
@@ -698,7 +698,7 @@ ValidXLogRecord(XLogReaderState *state, XLogRecord *record, XLogRecPtr recptr)
    if (!EQ_CRC32C(record->xl_crc, crc))
    {
        report_invalid_record(state,
-              "incorrect resource manager data checksum in record at %X/%X",
+                             "incorrect resource manager data checksum in record at %X/%X",
                              (uint32) (recptr >> 32), (uint32) recptr);
        return false;
    }
@@ -731,7 +731,7 @@ ValidXLogPageHeader(XLogReaderState *state, XLogRecPtr recptr,
        XLogFileName(fname, state->readPageTLI, segno);
 
        report_invalid_record(state,
-                   "invalid magic number %04X in log segment %s, offset %u",
+                             "invalid magic number %04X in log segment %s, offset %u",
                              hdr->xlp_magic,
                              fname,
                              offset);
@@ -745,7 +745,7 @@ ValidXLogPageHeader(XLogReaderState *state, XLogRecPtr recptr,
        XLogFileName(fname, state->readPageTLI, segno);
 
        report_invalid_record(state,
-                      "invalid info bits %04X in log segment %s, offset %u",
+                             "invalid info bits %04X in log segment %s, offset %u",
                              hdr->xlp_info,
                              fname,
                              offset);
@@ -796,7 +796,7 @@ ValidXLogPageHeader(XLogReaderState *state, XLogRecPtr recptr,
 
        /* hmm, first page of file doesn't have a long header? */
        report_invalid_record(state,
-                      "invalid info bits %04X in log segment %s, offset %u",
+                             "invalid info bits %04X in log segment %s, offset %u",
                              hdr->xlp_info,
                              fname,
                              offset);
@@ -810,8 +810,8 @@ ValidXLogPageHeader(XLogReaderState *state, XLogRecPtr recptr,
        XLogFileName(fname, state->readPageTLI, segno);
 
        report_invalid_record(state,
-                   "unexpected pageaddr %X/%X in log segment %s, offset %u",
-             (uint32) (hdr->xlp_pageaddr >> 32), (uint32) hdr->xlp_pageaddr,
+                             "unexpected pageaddr %X/%X in log segment %s, offset %u",
+                             (uint32) (hdr->xlp_pageaddr >> 32), (uint32) hdr->xlp_pageaddr,
                              fname,
                              offset);
        return false;
@@ -1103,14 +1103,14 @@ DecodeXLogRecord(XLogReaderState *state, XLogRecord *record, char **errormsg)
            if (blk->has_data && blk->data_len == 0)
            {
                report_invalid_record(state,
-                     "BKPBLOCK_HAS_DATA set, but no data included at %X/%X",
+                                     "BKPBLOCK_HAS_DATA set, but no data included at %X/%X",
                                      (uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr);
                goto err;
            }
            if (!blk->has_data && blk->data_len != 0)
            {
                report_invalid_record(state,
-                "BKPBLOCK_HAS_DATA not set, but data length is %u at %X/%X",
+                                     "BKPBLOCK_HAS_DATA not set, but data length is %u at %X/%X",
                                      (unsigned int) blk->data_len,
                                      (uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr);
                goto err;
@@ -1208,7 +1208,7 @@ DecodeXLogRecord(XLogReaderState *state, XLogRecord *record, char **errormsg)
                if (rnode == NULL)
                {
                    report_invalid_record(state,
-                       "BKPBLOCK_SAME_REL set but no previous rel at %X/%X",
+                                         "BKPBLOCK_SAME_REL set but no previous rel at %X/%X",
                                          (uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr);
                    goto err;
                }
@@ -1289,7 +1289,7 @@ DecodeXLogRecord(XLogReaderState *state, XLogRecord *record, char **errormsg)
 shortdata_err:
    report_invalid_record(state,
                          "record with invalid length at %X/%X",
-            (uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr);
+                         (uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr);
 err:
    *errormsg = state->errormsg_buf;
 
@@ -1305,7 +1305,7 @@ err:
  */
 bool
 XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id,
-               RelFileNode *rnode, ForkNumber *forknum, BlockNumber *blknum)
+                  RelFileNode *rnode, ForkNumber *forknum, BlockNumber *blknum)
 {
    DecodedBkpBlock *bkpb;
 
index 7430a1f77b456f58f8319e459d8580764aa901a2..bbae733d658be6ebed17ff8e0e844a069ccf35ea 100644 (file)
@@ -359,7 +359,7 @@ XLogReadBufferForRedoExtended(XLogReaderState *record,
    {
        Assert(XLogRecHasBlockImage(record, block_id));
        *buf = XLogReadBufferExtended(rnode, forknum, blkno,
-          get_cleanup_lock ? RBM_ZERO_AND_CLEANUP_LOCK : RBM_ZERO_AND_LOCK);
+                                     get_cleanup_lock ? RBM_ZERO_AND_CLEANUP_LOCK : RBM_ZERO_AND_LOCK);
        page = BufferGetPage(*buf);
        if (!RestoreBlockImage(record, block_id, page))
            elog(ERROR, "failed to restore block image");
@@ -721,8 +721,8 @@ XLogRead(char *buf, TimeLineID tli, XLogRecPtr startptr, Size count)
 
                ereport(ERROR,
                        (errcode_for_file_access(),
-                 errmsg("could not seek in log segment %s to offset %u: %m",
-                        path, startoff)));
+                        errmsg("could not seek in log segment %s to offset %u: %m",
+                               path, startoff)));
            }
            sendOff = startoff;
        }
index b9573973d2979a2dd4285b5f044cf44d14aa60a6..b3f0b3cc92271e58d0e7ceea26fcf61d0999860f 100644 (file)
@@ -845,7 +845,7 @@ InsertOneNull(int i)
    Assert(i >= 0 && i < MAXATTR);
    if (boot_reldesc->rd_att->attrs[i]->attnotnull)
        elog(ERROR,
-       "NULL value specified for not-null column \"%s\" of relation \"%s\"",
+            "NULL value specified for not-null column \"%s\" of relation \"%s\"",
             NameStr(boot_reldesc->rd_att->attrs[i]->attname),
             RelationGetRelationName(boot_reldesc));
    values[i] = PointerGetDatum(NULL);
index de0a1ba833f0d5933cc718638a49a046e96326d0..b7b5e49c9f039d5cbf556ed42768c63a6e1fdc59 100644 (file)
@@ -212,8 +212,8 @@ merge_acl_with_grant(Acl *old_acl, bool is_grant,
         * option, while REVOKE GRANT OPTION revokes only the option.
         */
        ACLITEM_SET_PRIVS_GOPTIONS(aclitem,
-                   (is_grant || !grant_option) ? privileges : ACL_NO_RIGHTS,
-                  (!is_grant || grant_option) ? privileges : ACL_NO_RIGHTS);
+                                  (is_grant || !grant_option) ? privileges : ACL_NO_RIGHTS,
+                                  (!is_grant || grant_option) ? privileges : ACL_NO_RIGHTS);
 
        newer_acl = aclupdate(new_acl, &aclitem, modechg, ownerId, behavior);
 
@@ -370,8 +370,8 @@ restrict_and_check_grant(bool is_grant, AclMode avail_goptions, bool all_privs,
            else
                ereport(WARNING,
                        (errcode(ERRCODE_WARNING_PRIVILEGE_NOT_REVOKED),
-                    errmsg("not all privileges could be revoked for \"%s\"",
-                           objname)));
+                        errmsg("not all privileges could be revoked for \"%s\"",
+                               objname)));
        }
    }
 
@@ -994,7 +994,7 @@ ExecAlterDefaultPrivilegesStmt(ParseState *pstate, AlterDefaultPrivilegesStmt *s
            if (privnode->cols)
                ereport(ERROR,
                        (errcode(ERRCODE_INVALID_GRANT_OPERATION),
-                   errmsg("default privileges cannot be set for columns")));
+                        errmsg("default privileges cannot be set for columns")));
 
            if (privnode->priv_name == NULL)    /* parser mistake? */
                elog(ERROR, "AccessPriv node must specify privilege");
@@ -2383,7 +2383,7 @@ ExecGrant_ForeignServer(InternalGrant *istmt)
        this_privileges =
            restrict_and_check_grant(istmt->is_grant, avail_goptions,
                                     istmt->all_privs, istmt->privileges,
-                                  srvid, grantorId, ACL_KIND_FOREIGN_SERVER,
+                                    srvid, grantorId, ACL_KIND_FOREIGN_SERVER,
                                     NameStr(pg_server_tuple->srvname),
                                     0, NULL);
 
@@ -2603,7 +2603,7 @@ ExecGrant_Language(InternalGrant *istmt)
                     errmsg("language \"%s\" is not trusted",
                            NameStr(pg_language_tuple->lanname)),
                     errdetail("GRANT and REVOKE are not allowed on untrusted languages, "
-                  "because only superusers can use untrusted languages.")));
+                              "because only superusers can use untrusted languages.")));
 
        /*
         * Get owner ID and working copy of existing ACL. If there's no ACL,
@@ -3117,7 +3117,7 @@ ExecGrant_Type(InternalGrant *istmt)
            ereport(ERROR,
                    (errcode(ERRCODE_INVALID_GRANT_OPERATION),
                     errmsg("cannot set privileges of array types"),
-               errhint("Set the privileges of the element type instead.")));
+                    errhint("Set the privileges of the element type instead.")));
 
        /* Used GRANT DOMAIN on a non-domain? */
        if (istmt->objtype == ACL_OBJECT_DOMAIN &&
@@ -3433,8 +3433,8 @@ aclcheck_error_col(AclResult aclerr, AclObjectKind objectkind,
        case ACLCHECK_NO_PRIV:
            ereport(ERROR,
                    (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-            errmsg("permission denied for column \"%s\" of relation \"%s\"",
-                   colname, objectname)));
+                    errmsg("permission denied for column \"%s\" of relation \"%s\"",
+                           colname, objectname)));
            break;
        case ACLCHECK_NOT_OWNER:
            /* relation msg is OK since columns don't have separate owners */
@@ -4866,8 +4866,8 @@ pg_ts_config_ownercheck(Oid cfg_oid, Oid roleid)
    if (!HeapTupleIsValid(tuple))
        ereport(ERROR,
                (errcode(ERRCODE_UNDEFINED_OBJECT),
-              errmsg("text search configuration with OID %u does not exist",
-                     cfg_oid)));
+                errmsg("text search configuration with OID %u does not exist",
+                       cfg_oid)));
 
    ownerId = ((Form_pg_ts_config) GETSTRUCT(tuple))->cfgowner;
 
index b12b36ed345a391c022b5e19d984c45760b82158..1a7645d341f9feadf194efa39f0bf8e0607ba2f3 100644 (file)
@@ -956,8 +956,8 @@ reportDependentObjects(const ObjectAddresses *targetObjects,
        if (origObject)
            ereport(ERROR,
                    (errcode(ERRCODE_DEPENDENT_OBJECTS_STILL_EXIST),
-                 errmsg("cannot drop %s because other objects depend on it",
-                        getObjectDescription(origObject)),
+                    errmsg("cannot drop %s because other objects depend on it",
+                           getObjectDescription(origObject)),
                     errdetail("%s", clientdetail.data),
                     errdetail_log("%s", logdetail.data),
                     errhint("Use DROP ... CASCADE to drop the dependent objects too.")));
@@ -1632,8 +1632,8 @@ find_expr_references_walker(Node *node,
                case REGROLEOID:
                    ereport(ERROR,
                            (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                       errmsg("constant of the type %s cannot be used here",
-                              "regrole")));
+                            errmsg("constant of the type %s cannot be used here",
+                                   "regrole")));
                    break;
            }
        }
index 8052dcc2881f598a1c4c6d0f7fafe3f4696c2b20..a376b99f1ed49f21f6d0e03a8de0cdf288e8cad9 100644 (file)
@@ -282,7 +282,7 @@ heap_create(const char *relname,
                (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
                 errmsg("permission denied to create \"%s.%s\"",
                        get_namespace_name(relnamespace), relname),
-       errdetail("System catalog modifications are currently disallowed.")));
+                errdetail("System catalog modifications are currently disallowed.")));
 
    /*
     * Decide if we need storage or not, and handle a couple other special
@@ -534,8 +534,8 @@ CheckAttributeType(const char *attname,
        if (list_member_oid(containing_rowtypes, atttypid))
            ereport(ERROR,
                    (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
-               errmsg("composite type %s cannot be made a member of itself",
-                      format_type_be(atttypid))));
+                    errmsg("composite type %s cannot be made a member of itself",
+                           format_type_be(atttypid))));
 
        containing_rowtypes = lcons_oid(atttypid, containing_rowtypes);
 
@@ -578,7 +578,7 @@ CheckAttributeType(const char *attname,
                (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
                 errmsg("no collation was derived for column \"%s\" with collatable type %s",
                        attname, format_type_be(atttypid)),
-       errhint("Use the COLLATE clause to set the collation explicitly.")));
+                errhint("Use the COLLATE clause to set the collation explicitly.")));
 }
 
 /*
@@ -1081,9 +1081,9 @@ heap_create_with_catalog(const char *relname,
            ereport(ERROR,
                    (errcode(ERRCODE_DUPLICATE_OBJECT),
                     errmsg("type \"%s\" already exists", relname),
-              errhint("A relation has an associated type of the same name, "
-                      "so you must use a name that doesn't conflict "
-                      "with any existing type.")));
+                    errhint("A relation has an associated type of the same name, "
+                            "so you must use a name that doesn't conflict "
+                            "with any existing type.")));
    }
 
    /*
@@ -1923,8 +1923,8 @@ StoreAttrDefault(Relation rel, AttrNumber attnum,
     * Also deparse it to form the mostly-obsolete adsrc field.
     */
    adsrc = deparse_expression(expr,
-                           deparse_context_for(RelationGetRelationName(rel),
-                                               RelationGetRelid(rel)),
+                              deparse_context_for(RelationGetRelationName(rel),
+                                                  RelationGetRelid(rel)),
                               false, false);
 
    /*
@@ -2031,8 +2031,8 @@ StoreRelCheck(Relation rel, char *ccname, Node *expr,
     * Also deparse it to form the mostly-obsolete consrc field.
     */
    ccsrc = deparse_expression(expr,
-                           deparse_context_for(RelationGetRelationName(rel),
-                                               RelationGetRelid(rel)),
+                              deparse_context_for(RelationGetRelationName(rel),
+                                                  RelationGetRelid(rel)),
                               false, false);
 
    /*
@@ -2075,8 +2075,8 @@ StoreRelCheck(Relation rel, char *ccname, Node *expr,
        rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
        ereport(ERROR,
                (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
-       errmsg("cannot add NO INHERIT constraint to partitioned table \"%s\"",
-              RelationGetRelationName(rel))));
+                errmsg("cannot add NO INHERIT constraint to partitioned table \"%s\"",
+                       RelationGetRelationName(rel))));
 
    /*
     * Create the Check Constraint
@@ -2501,8 +2501,8 @@ MergeWithExistingConstraint(Relation rel, char *ccname, Node *expr,
            if (!found || !allow_merge)
                ereport(ERROR,
                        (errcode(ERRCODE_DUPLICATE_OBJECT),
-               errmsg("constraint \"%s\" for relation \"%s\" already exists",
-                      ccname, RelationGetRelationName(rel))));
+                        errmsg("constraint \"%s\" for relation \"%s\" already exists",
+                               ccname, RelationGetRelationName(rel))));
 
            /* If the child constraint is "no inherit" then cannot merge */
            if (con->connoinherit)
@@ -2534,8 +2534,8 @@ MergeWithExistingConstraint(Relation rel, char *ccname, Node *expr,
 
            /* OK to update the tuple */
            ereport(NOTICE,
-              (errmsg("merging constraint \"%s\" with inherited definition",
-                      ccname)));
+                   (errmsg("merging constraint \"%s\" with inherited definition",
+                           ccname)));
 
            tup = heap_copytuple(tup);
            con = (Form_pg_constraint) GETSTRUCT(tup);
@@ -2650,7 +2650,7 @@ cookDefault(ParseState *pstate,
    if (contain_var_clause(expr))
        ereport(ERROR,
                (errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
-             errmsg("cannot use column references in default expression")));
+                errmsg("cannot use column references in default expression")));
 
    /*
     * transformExpr() should have already rejected subqueries, aggregates,
@@ -2680,7 +2680,7 @@ cookDefault(ParseState *pstate,
                            attname,
                            format_type_be(atttypid),
                            format_type_be(type_id)),
-              errhint("You will need to rewrite or cast the expression.")));
+                    errhint("You will need to rewrite or cast the expression.")));
    }
 
    /*
@@ -2727,8 +2727,8 @@ cookConstraint(ParseState *pstate,
    if (list_length(pstate->p_rtable) != 1)
        ereport(ERROR,
                (errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
-           errmsg("only table \"%s\" can be referenced in check constraint",
-                  relname)));
+                errmsg("only table \"%s\" can be referenced in check constraint",
+                       relname)));
 
    return expr;
 }
@@ -2976,9 +2976,9 @@ heap_truncate_check_FKs(List *relations, bool tempTables)
                             errmsg("cannot truncate a table referenced in a foreign key constraint"),
                             errdetail("Table \"%s\" references \"%s\".",
                                       relname2, relname),
-                          errhint("Truncate table \"%s\" at the same time, "
-                                  "or use TRUNCATE ... CASCADE.",
-                                  relname2)));
+                            errhint("Truncate table \"%s\" at the same time, "
+                                    "or use TRUNCATE ... CASCADE.",
+                                    relname2)));
            }
        }
    }
index 549a2d19c65e4a58b7702166e10ff8e42af89cee..027abd56b0d1814a99fd65eb640f1457bba39371 100644 (file)
@@ -207,8 +207,8 @@ index_check_primary_key(Relation heapRel,
    {
        ereport(ERROR,
                (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
-            errmsg("multiple primary keys for table \"%s\" are not allowed",
-                   RelationGetRelationName(heapRel))));
+                errmsg("multiple primary keys for table \"%s\" are not allowed",
+                       RelationGetRelationName(heapRel))));
    }
 
    /*
@@ -232,7 +232,7 @@ index_check_primary_key(Relation heapRel,
            continue;
 
        atttuple = SearchSysCache2(ATTNUM,
-                                ObjectIdGetDatum(RelationGetRelid(heapRel)),
+                                  ObjectIdGetDatum(RelationGetRelid(heapRel)),
                                   Int16GetDatum(attnum));
        if (!HeapTupleIsValid(atttuple))
            elog(ERROR, "cache lookup failed for attribute %d of relation %u",
@@ -325,7 +325,7 @@ ConstructTupleDescriptor(Relation heapRelation,
                 * here we are indexing on a system attribute (-1...-n)
                 */
                from = SystemAttributeDefinition(atnum,
-                                          heapRelation->rd_rel->relhasoids);
+                                                heapRelation->rd_rel->relhasoids);
            }
            else
            {
@@ -1038,7 +1038,7 @@ index_create(Relation heapRelation,
        if (indexInfo->ii_Expressions)
        {
            recordDependencyOnSingleRelExpr(&myself,
-                                         (Node *) indexInfo->ii_Expressions,
+                                           (Node *) indexInfo->ii_Expressions,
                                            heapRelationId,
                                            DEPENDENCY_NORMAL,
                                            DEPENDENCY_AUTO, false);
@@ -3329,7 +3329,7 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence,
    if (RELATION_IS_OTHER_TEMP(iRel))
        ereport(ERROR,
                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-              errmsg("cannot reindex temporary tables of other sessions")));
+                errmsg("cannot reindex temporary tables of other sessions")));
 
    /*
     * Also check for active uses of the index in the current transaction; we
index 29385019172a260ad8b4cc58d2c145a6630c4bdf..64f6feef9dac6f35d4ef76f14b08630d0dd8183e 100644 (file)
@@ -217,7 +217,7 @@ static bool MatchNamedCall(HeapTuple proctup, int nargs, List *argnames,
 Oid
 RangeVarGetRelidExtended(const RangeVar *relation, LOCKMODE lockmode,
                         bool missing_ok, bool nowait,
-                      RangeVarGetRelidCallback callback, void *callback_arg)
+                        RangeVarGetRelidCallback callback, void *callback_arg)
 {
    uint64      inval_count;
    Oid         relId;
@@ -2751,14 +2751,14 @@ DeconstructQualifiedName(List *names,
            if (strcmp(catalogname, get_database_name(MyDatabaseId)) != 0)
                ereport(ERROR,
                        (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                 errmsg("cross-database references are not implemented: %s",
-                        NameListToString(names))));
+                        errmsg("cross-database references are not implemented: %s",
+                               NameListToString(names))));
            break;
        default:
            ereport(ERROR,
                    (errcode(ERRCODE_SYNTAX_ERROR),
-               errmsg("improper qualified name (too many dotted names): %s",
-                      NameListToString(names))));
+                    errmsg("improper qualified name (too many dotted names): %s",
+                           NameListToString(names))));
            break;
    }
 
@@ -2888,7 +2888,7 @@ CheckSetNamespace(Oid oldNspOid, Oid nspOid)
    if (isAnyTempNamespace(nspOid) || isAnyTempNamespace(oldNspOid))
        ereport(ERROR,
                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-           errmsg("cannot move objects into or out of temporary schemas")));
+                errmsg("cannot move objects into or out of temporary schemas")));
 
    /* same for TOAST schema */
    if (nspOid == PG_TOAST_NAMESPACE || oldNspOid == PG_TOAST_NAMESPACE)
@@ -2998,8 +2998,8 @@ makeRangeVarFromNameList(List *names)
        default:
            ereport(ERROR,
                    (errcode(ERRCODE_SYNTAX_ERROR),
-                errmsg("improper relation name (too many dotted names): %s",
-                       NameListToString(names))));
+                    errmsg("improper relation name (too many dotted names): %s",
+                           NameListToString(names))));
            break;
    }
 
@@ -3099,7 +3099,7 @@ bool
 isTempOrTempToastNamespace(Oid namespaceId)
 {
    if (OidIsValid(myTempNamespace) &&
-    (myTempNamespace == namespaceId || myTempToastNamespace == namespaceId))
+       (myTempNamespace == namespaceId || myTempToastNamespace == namespaceId))
        return true;
    return false;
 }
index b882d5f0e1468f0a52db4d15c0946ff0caa84b7d..6cac2dfd1db6ced3006ca8525100e059cfca1c95 100644 (file)
@@ -853,13 +853,13 @@ get_object_address(ObjectType objtype, Node *object,
 
                    objlist = castNode(List, object);
                    domaddr = get_object_address_type(OBJECT_DOMAIN,
-                                           linitial_node(TypeName, objlist),
+                                                     linitial_node(TypeName, objlist),
                                                      missing_ok);
                    constrname = strVal(lsecond(objlist));
 
                    address.classId = ConstraintRelationId;
                    address.objectId = get_domain_constraint_oid(domaddr.objectId,
-                                                    constrname, missing_ok);
+                                                                constrname, missing_ok);
                    address.objectSubId = 0;
 
                }
@@ -877,7 +877,7 @@ get_object_address(ObjectType objtype, Node *object,
            case OBJECT_PUBLICATION:
            case OBJECT_SUBSCRIPTION:
                address = get_object_address_unqualified(objtype,
-                                              (Value *) object, missing_ok);
+                                                        (Value *) object, missing_ok);
                break;
            case OBJECT_TYPE:
            case OBJECT_DOMAIN:
@@ -1622,11 +1622,11 @@ get_object_address_opf_member(ObjectType objtype,
                    if (!missing_ok)
                        ereport(ERROR,
                                (errcode(ERRCODE_UNDEFINED_OBJECT),
-                         errmsg("operator %d (%s, %s) of %s does not exist",
-                                membernum,
-                                TypeNameToString(typenames[0]),
-                                TypeNameToString(typenames[1]),
-                                getObjectDescription(&famaddr))));
+                                errmsg("operator %d (%s, %s) of %s does not exist",
+                                       membernum,
+                                       TypeNameToString(typenames[0]),
+                                       TypeNameToString(typenames[1]),
+                                       getObjectDescription(&famaddr))));
                }
                else
                {
@@ -1653,11 +1653,11 @@ get_object_address_opf_member(ObjectType objtype,
                    if (!missing_ok)
                        ereport(ERROR,
                                (errcode(ERRCODE_UNDEFINED_OBJECT),
-                         errmsg("function %d (%s, %s) of %s does not exist",
-                                membernum,
-                                TypeNameToString(typenames[0]),
-                                TypeNameToString(typenames[1]),
-                                getObjectDescription(&famaddr))));
+                                errmsg("function %d (%s, %s) of %s does not exist",
+                                       membernum,
+                                       TypeNameToString(typenames[0]),
+                                       TypeNameToString(typenames[1]),
+                                       getObjectDescription(&famaddr))));
                }
                else
                {
@@ -1848,7 +1848,7 @@ get_object_address_defacl(List *object, bool missing_ok)
        default:
            ereport(ERROR,
                    (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-             errmsg("unrecognized default ACL object type \"%c\"", objtype),
+                    errmsg("unrecognized default ACL object type \"%c\"", objtype),
                     errhint("Valid object types are \"%c\", \"%c\", \"%c\", \"%c\", \"%c\".",
                             DEFACLOBJ_RELATION,
                             DEFACLOBJ_SEQUENCE,
@@ -1905,8 +1905,8 @@ not_found:
        else
            ereport(ERROR,
                    (errcode(ERRCODE_UNDEFINED_OBJECT),
-                  errmsg("default ACL for user \"%s\" on %s does not exist",
-                         username, objtype_str)));
+                    errmsg("default ACL for user \"%s\" on %s does not exist",
+                           username, objtype_str)));
    }
    return address;
 }
@@ -2045,9 +2045,9 @@ pg_get_object_address(PG_FUNCTION_ARGS)
            if (nulls[i])
                ereport(ERROR,
                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                   errmsg("name or argument lists may not contain nulls")));
+                        errmsg("name or argument lists may not contain nulls")));
            args = lappend(args,
-                       typeStringToTypeName(TextDatumGetCString(elems[i])));
+                          typeStringToTypeName(TextDatumGetCString(elems[i])));
        }
    }
    else
@@ -2071,7 +2071,7 @@ pg_get_object_address(PG_FUNCTION_ARGS)
            if (list_length(args) != 1)
                ereport(ERROR,
                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                     errmsg("argument list length must be exactly %d", 1)));
+                        errmsg("argument list length must be exactly %d", 1)));
            break;
        case OBJECT_OPFAMILY:
        case OBJECT_OPCLASS:
@@ -2091,7 +2091,7 @@ pg_get_object_address(PG_FUNCTION_ARGS)
            if (list_length(args) != 2)
                ereport(ERROR,
                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                     errmsg("argument list length must be exactly %d", 2)));
+                        errmsg("argument list length must be exactly %d", 2)));
            break;
        default:
            break;
@@ -2665,7 +2665,7 @@ getObjectDescription(const ObjectAddress *object)
            if (object->objectSubId != 0)
                appendStringInfo(&buffer, _(" column %s"),
                                 get_relid_attribute_name(object->objectId,
-                                                      object->objectSubId));
+                                                         object->objectSubId));
            break;
 
        case OCLASS_PROC:
@@ -2772,7 +2772,7 @@ getObjectDescription(const ObjectAddress *object)
                    elog(ERROR, "cache lookup failed for conversion %u",
                         object->objectId);
                appendStringInfo(&buffer, _("conversion %s"),
-                NameStr(((Form_pg_conversion) GETSTRUCT(conTup))->conname));
+                                NameStr(((Form_pg_conversion) GETSTRUCT(conTup))->conname));
                ReleaseSysCache(conTup);
                break;
            }
@@ -2861,7 +2861,7 @@ getObjectDescription(const ObjectAddress *object)
 
                appendStringInfo(&buffer, _("operator class %s for access method %s"),
                                 quote_qualified_identifier(nspname,
-                                                 NameStr(opcForm->opcname)),
+                                                           NameStr(opcForm->opcname)),
                                 NameStr(amForm->amname));
 
                ReleaseSysCache(amTup);
@@ -2883,7 +2883,7 @@ getObjectDescription(const ObjectAddress *object)
                    elog(ERROR, "cache lookup failed for access method %u",
                         object->objectId);
                appendStringInfo(&buffer, _("access method %s"),
-                            NameStr(((Form_pg_am) GETSTRUCT(tup))->amname));
+                                NameStr(((Form_pg_am) GETSTRUCT(tup))->amname));
                ReleaseSysCache(tup);
                break;
            }
@@ -3100,7 +3100,7 @@ getObjectDescription(const ObjectAddress *object)
                    elog(ERROR, "cache lookup failed for text search parser %u",
                         object->objectId);
                appendStringInfo(&buffer, _("text search parser %s"),
-                    NameStr(((Form_pg_ts_parser) GETSTRUCT(tup))->prsname));
+                                NameStr(((Form_pg_ts_parser) GETSTRUCT(tup))->prsname));
                ReleaseSysCache(tup);
                break;
            }
@@ -3115,7 +3115,7 @@ getObjectDescription(const ObjectAddress *object)
                    elog(ERROR, "cache lookup failed for text search dictionary %u",
                         object->objectId);
                appendStringInfo(&buffer, _("text search dictionary %s"),
-                     NameStr(((Form_pg_ts_dict) GETSTRUCT(tup))->dictname));
+                                NameStr(((Form_pg_ts_dict) GETSTRUCT(tup))->dictname));
                ReleaseSysCache(tup);
                break;
            }
@@ -3130,7 +3130,7 @@ getObjectDescription(const ObjectAddress *object)
                    elog(ERROR, "cache lookup failed for text search template %u",
                         object->objectId);
                appendStringInfo(&buffer, _("text search template %s"),
-                 NameStr(((Form_pg_ts_template) GETSTRUCT(tup))->tmplname));
+                                NameStr(((Form_pg_ts_template) GETSTRUCT(tup))->tmplname));
                ReleaseSysCache(tup);
                break;
            }
@@ -3145,7 +3145,7 @@ getObjectDescription(const ObjectAddress *object)
                    elog(ERROR, "cache lookup failed for text search configuration %u",
                         object->objectId);
                appendStringInfo(&buffer, _("text search configuration %s"),
-                    NameStr(((Form_pg_ts_config) GETSTRUCT(tup))->cfgname));
+                                NameStr(((Form_pg_ts_config) GETSTRUCT(tup))->cfgname));
                ReleaseSysCache(tup);
                break;
            }
@@ -3259,33 +3259,33 @@ getObjectDescription(const ObjectAddress *object)
                    case DEFACLOBJ_RELATION:
                        appendStringInfo(&buffer,
                                         _("default privileges on new relations belonging to role %s"),
-                              GetUserNameFromId(defacl->defaclrole, false));
+                                        GetUserNameFromId(defacl->defaclrole, false));
                        break;
                    case DEFACLOBJ_SEQUENCE:
                        appendStringInfo(&buffer,
                                         _("default privileges on new sequences belonging to role %s"),
-                              GetUserNameFromId(defacl->defaclrole, false));
+                                        GetUserNameFromId(defacl->defaclrole, false));
                        break;
                    case DEFACLOBJ_FUNCTION:
                        appendStringInfo(&buffer,
                                         _("default privileges on new functions belonging to role %s"),
-                              GetUserNameFromId(defacl->defaclrole, false));
+                                        GetUserNameFromId(defacl->defaclrole, false));
                        break;
                    case DEFACLOBJ_TYPE:
                        appendStringInfo(&buffer,
                                         _("default privileges on new types belonging to role %s"),
-                              GetUserNameFromId(defacl->defaclrole, false));
+                                        GetUserNameFromId(defacl->defaclrole, false));
                        break;
                    case DEFACLOBJ_NAMESPACE:
                        appendStringInfo(&buffer,
                                         _("default privileges on new schemas belonging to role %s"),
-                              GetUserNameFromId(defacl->defaclrole, false));
+                                        GetUserNameFromId(defacl->defaclrole, false));
                        break;
                    default:
                        /* shouldn't get here */
                        appendStringInfo(&buffer,
-                               _("default privileges belonging to role %s"),
-                              GetUserNameFromId(defacl->defaclrole, false));
+                                        _("default privileges belonging to role %s"),
+                                        GetUserNameFromId(defacl->defaclrole, false));
                        break;
                }
 
@@ -3293,7 +3293,7 @@ getObjectDescription(const ObjectAddress *object)
                {
                    appendStringInfo(&buffer,
                                     _(" in schema %s"),
-                               get_namespace_name(defacl->defaclnamespace));
+                                    get_namespace_name(defacl->defaclnamespace));
                }
 
                systable_endscan(rcscan);
@@ -3323,7 +3323,7 @@ getObjectDescription(const ObjectAddress *object)
                    elog(ERROR, "cache lookup failed for event trigger %u",
                         object->objectId);
                appendStringInfo(&buffer, _("event trigger %s"),
-                NameStr(((Form_pg_event_trigger) GETSTRUCT(tup))->evtname));
+                                NameStr(((Form_pg_event_trigger) GETSTRUCT(tup))->evtname));
                ReleaseSysCache(tup);
                break;
            }
@@ -3631,7 +3631,7 @@ pg_identify_object(PG_FUNCTION_ARGS)
                                          RelationGetDescr(catalog), &isnull);
                if (isnull)
                    elog(ERROR, "invalid null namespace in object %u/%u/%d",
-                    address.classId, address.objectId, address.objectSubId);
+                        address.classId, address.objectId, address.objectSubId);
            }
 
            /*
@@ -3646,7 +3646,7 @@ pg_identify_object(PG_FUNCTION_ARGS)
                    Datum       nameDatum;
 
                    nameDatum = heap_getattr(objtup, nameAttnum,
-                                        RelationGetDescr(catalog), &isnull);
+                                            RelationGetDescr(catalog), &isnull);
                    if (isnull)
                        elog(ERROR, "invalid null name in object %u/%u/%d",
                             address.classId, address.objectId, address.objectSubId);
@@ -4091,7 +4091,7 @@ getObjectIdentityParts(const ObjectAddress *object,
 
        case OCLASS_PROC:
            appendStringInfoString(&buffer,
-                              format_procedure_qualified(object->objectId));
+                                  format_procedure_qualified(object->objectId));
            if (objname)
                format_procedure_parts(object->objectId, objname, objargs);
            break;
@@ -4124,8 +4124,8 @@ getObjectIdentityParts(const ObjectAddress *object,
                castForm = (Form_pg_cast) GETSTRUCT(tup);
 
                appendStringInfo(&buffer, "(%s AS %s)",
-                             format_type_be_qualified(castForm->castsource),
-                            format_type_be_qualified(castForm->casttarget));
+                                format_type_be_qualified(castForm->castsource),
+                                format_type_be_qualified(castForm->casttarget));
 
                if (objname)
                {
@@ -4152,7 +4152,7 @@ getObjectIdentityParts(const ObjectAddress *object,
                schema = get_namespace_name_or_temp(coll->collnamespace);
                appendStringInfoString(&buffer,
                                       quote_qualified_identifier(schema,
-                                                  NameStr(coll->collname)));
+                                                                 NameStr(coll->collname)));
                if (objname)
                    *objname = list_make2(schema,
                                          pstrdup(NameStr(coll->collname)));
@@ -4191,7 +4191,7 @@ getObjectIdentityParts(const ObjectAddress *object,
 
                    appendStringInfo(&buffer, "%s on %s",
                                     quote_identifier(NameStr(con->conname)),
-                         getObjectIdentityParts(&domain, objname, objargs));
+                                    getObjectIdentityParts(&domain, objname, objargs));
 
                    if (objname)
                        *objargs = lappend(*objargs, pstrdup(NameStr(con->conname)));
@@ -4216,7 +4216,7 @@ getObjectIdentityParts(const ObjectAddress *object,
                schema = get_namespace_name_or_temp(conForm->connamespace);
                appendStringInfoString(&buffer,
                                       quote_qualified_identifier(schema,
-                                                NameStr(conForm->conname)));
+                                                                 NameStr(conForm->conname)));
                if (objname)
                    *objname = list_make2(schema,
                                          pstrdup(NameStr(conForm->conname)));
@@ -4277,7 +4277,7 @@ getObjectIdentityParts(const ObjectAddress *object,
                         object->objectId);
                langForm = (Form_pg_language) GETSTRUCT(langTup);
                appendStringInfoString(&buffer,
-                              quote_identifier(NameStr(langForm->lanname)));
+                                      quote_identifier(NameStr(langForm->lanname)));
                if (objname)
                    *objname = list_make1(pstrdup(NameStr(langForm->lanname)));
                ReleaseSysCache(langTup);
@@ -4292,7 +4292,7 @@ getObjectIdentityParts(const ObjectAddress *object,
 
        case OCLASS_OPERATOR:
            appendStringInfoString(&buffer,
-                               format_operator_qualified(object->objectId));
+                                  format_operator_qualified(object->objectId));
            if (objname)
                format_operator_parts(object->objectId, objname, objargs);
            break;
@@ -4322,7 +4322,7 @@ getObjectIdentityParts(const ObjectAddress *object,
 
                appendStringInfo(&buffer, "%s USING %s",
                                 quote_qualified_identifier(schema,
-                                                 NameStr(opcForm->opcname)),
+                                                           NameStr(opcForm->opcname)),
                                 quote_identifier(NameStr(amForm->amname)));
                if (objname)
                    *objname = list_make3(pstrdup(NameStr(amForm->amname)),
@@ -4391,7 +4391,7 @@ getObjectIdentityParts(const ObjectAddress *object,
                if (objname)
                {
                    *objname = lappend(*objname,
-                                    psprintf("%d", amopForm->amopstrategy));
+                                      psprintf("%d", amopForm->amopstrategy));
                    *objargs = list_make2(ltype, rtype);
                }
 
@@ -4542,10 +4542,10 @@ getObjectIdentityParts(const ObjectAddress *object,
                schema = get_namespace_name_or_temp(formStatistic->stxnamespace);
                appendStringInfoString(&buffer,
                                       quote_qualified_identifier(schema,
-                                          NameStr(formStatistic->stxname)));
+                                                                 NameStr(formStatistic->stxname)));
                if (objname)
                    *objname = list_make2(schema,
-                                  pstrdup(NameStr(formStatistic->stxname)));
+                                         pstrdup(NameStr(formStatistic->stxname)));
                ReleaseSysCache(tup);
            }
            break;
@@ -4565,10 +4565,10 @@ getObjectIdentityParts(const ObjectAddress *object,
                schema = get_namespace_name_or_temp(formParser->prsnamespace);
                appendStringInfoString(&buffer,
                                       quote_qualified_identifier(schema,
-                                             NameStr(formParser->prsname)));
+                                                                 NameStr(formParser->prsname)));
                if (objname)
                    *objname = list_make2(schema,
-                                     pstrdup(NameStr(formParser->prsname)));
+                                         pstrdup(NameStr(formParser->prsname)));
                ReleaseSysCache(tup);
                break;
            }
@@ -4588,10 +4588,10 @@ getObjectIdentityParts(const ObjectAddress *object,
                schema = get_namespace_name_or_temp(formDict->dictnamespace);
                appendStringInfoString(&buffer,
                                       quote_qualified_identifier(schema,
-                                              NameStr(formDict->dictname)));
+                                                                 NameStr(formDict->dictname)));
                if (objname)
                    *objname = list_make2(schema,
-                                      pstrdup(NameStr(formDict->dictname)));
+                                         pstrdup(NameStr(formDict->dictname)));
                ReleaseSysCache(tup);
                break;
            }
@@ -4611,10 +4611,10 @@ getObjectIdentityParts(const ObjectAddress *object,
                schema = get_namespace_name_or_temp(formTmpl->tmplnamespace);
                appendStringInfoString(&buffer,
                                       quote_qualified_identifier(schema,
-                                              NameStr(formTmpl->tmplname)));
+                                                                 NameStr(formTmpl->tmplname)));
                if (objname)
                    *objname = list_make2(schema,
-                                      pstrdup(NameStr(formTmpl->tmplname)));
+                                         pstrdup(NameStr(formTmpl->tmplname)));
                ReleaseSysCache(tup);
                break;
            }
@@ -4634,7 +4634,7 @@ getObjectIdentityParts(const ObjectAddress *object,
                schema = get_namespace_name_or_temp(formCfg->cfgnamespace);
                appendStringInfoString(&buffer,
                                       quote_qualified_identifier(schema,
-                                                NameStr(formCfg->cfgname)));
+                                                                 NameStr(formCfg->cfgname)));
                if (objname)
                    *objname = list_make2(schema,
                                          pstrdup(NameStr(formCfg->cfgname)));
@@ -4853,7 +4853,7 @@ getObjectIdentityParts(const ObjectAddress *object,
                         object->objectId);
                trigForm = (Form_pg_event_trigger) GETSTRUCT(tup);
                appendStringInfoString(&buffer,
-                              quote_identifier(NameStr(trigForm->evtname)));
+                                      quote_identifier(NameStr(trigForm->evtname)));
                ReleaseSysCache(tup);
                break;
            }
@@ -5043,7 +5043,7 @@ getRelationIdentity(StringInfo buffer, Oid relid, List **object)
    schema = get_namespace_name_or_temp(relForm->relnamespace);
    appendStringInfoString(buffer,
                           quote_qualified_identifier(schema,
-                                                NameStr(relForm->relname)));
+