mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Standard pgindent run for 8.1.
This commit is contained in:
contrib
btree_gist
btree_cash.cbtree_date.cbtree_float4.cbtree_float8.cbtree_inet.cbtree_int2.cbtree_int4.cbtree_int8.cbtree_interval.cbtree_macaddr.cbtree_oid.cbtree_text.cbtree_time.cbtree_ts.cbtree_utils_num.hbtree_utils_var.cbtree_utils_var.h
chkpass
cube
dbase
dblink
dbmirror
earthdistance
fulltextindex
fuzzystrmatch
intagg
intarray
ltree
mSQL-interface
oid2name
pg_buffercache
pg_trgm
pgbench
pgcrypto
crypt-blowfish.ccrypt-des.ccrypt-gensalt.ccrypt-md5.cfortuna.cfortuna.hinternal.cmbuf.cmbuf.hmd5.hopenssl.cpgcrypto.cpgp-armor.cpgp-cfb.cpgp-compress.cpgp-decrypt.cpgp-encrypt.cpgp-info.cpgp-mpi-internal.cpgp-mpi-openssl.cpgp-mpi.cpgp-pgsql.cpgp-pubdec.cpgp-pubenc.cpgp-pubkey.cpgp-s2k.cpgp.cpgp.hpx-crypt.cpx-crypt.hpx.cpx.hrandom.crijndael.csha2.csha2.h
pgstattuple
seg
spi
tablefunc
tsearch2
dict.cdict.hdict_ex.cdict_ispell.cdict_snowball.cdict_syn.cgistidx.cgistidx.h
ispell
prs_dcfg.cquery.crank.csnowball
stopword.cts_cfg.cts_stat.ctsvector.ctsvector.htsvector_op.cwparser.cwparser_def.cvacuumlo
xml2
src
backend
access
common
gist
hash
heap
index
nbtree
rtree
transam
bootstrap
catalog
aclchk.ccatalog.cdependency.cheap.cindex.cindexing.cnamespace.cpg_aggregate.cpg_constraint.cpg_conversion.cpg_depend.cpg_operator.cpg_proc.cpg_shdepend.cpg_type.c
commands
aggregatecmds.calter.canalyze.casync.ccluster.ccomment.cconversioncmds.ccopy.cdbcommands.cdefine.cexplain.cfunctioncmds.cindexcmds.clockcmds.copclasscmds.coperatorcmds.cportalcmds.cprepare.cproclang.cschemacmds.csequence.ctablecmds.ctablespace.ctrigger.ctypecmds.cuser.cvacuum.cvacuumlazy.cvariable.cview.c
executor
execAmi.cexecGrouping.cexecJunk.cexecMain.cexecProcnode.cexecQual.cexecScan.cexecTuples.cexecUtils.cfunctions.cinstrument.cnodeAgg.cnodeAppend.cnodeBitmapAnd.cnodeBitmapHeapscan.cnodeBitmapIndexscan.cnodeBitmapOr.cnodeFunctionscan.cnodeGroup.cnodeHash.cnodeHashjoin.cnodeIndexscan.cnodeLimit.cnodeMaterial.cnodeMergejoin.cnodeNestloop.cnodeResult.cnodeSeqscan.cnodeSetOp.cnodeSort.cnodeSubplan.cnodeSubqueryscan.cnodeTidscan.cnodeUnique.cspi.c
lib
libpq
main
nodes
optimizer
geqo
path
plan
prep
util
parser
analyze.ckeywords.cparse_agg.cparse_clause.cparse_coerce.cparse_expr.cparse_func.cparse_node.cparse_oper.cparse_relation.cparse_target.cparse_type.cscansup.c
port
postmaster
regex
rewrite
storage
buffer
file
freespace
ipc
large_object
lmgr
page
smgr
tcop
utils
adt
acl.carray_userfuncs.carrayfuncs.cascii.ccash.cchar.cdate.cdatetime.cdatum.cdbsize.cencode.cfloat.cformat_type.cformatting.cgenfile.cgeo_ops.cinet_net_ntop.cinet_net_pton.cint.cint8.clike.clike_match.clockfuncs.cmac.cmisc.cnabstime.cname.cnetwork.cnumeric.cnumutils.coid.coracle_compat.cpg_locale.cpg_lzcompress.cpgstatfuncs.cquote.cregexp.cregproc.cri_triggers.crowtypes.cruleutils.cselfuncs.ctimestamp.cvarbit.cvarchar.cvarlena.c
cache
error
fmgr
hash
init
mb
conv.cencnames.cmbutils.cwchar.c
conversion_procs
euc_jp_and_sjis
euc_tw_and_big5
utf8_and_cyrillic
utf8_and_euc_cn
utf8_and_euc_jp
utf8_and_euc_kr
utf8_and_euc_tw
utf8_and_gb18030
utf8_and_iso8859
utf8_and_johab
utf8_and_win1250
utf8_and_win1252
utf8_and_win1256
utf8_and_win1258
utf8_and_win874
misc
mmgr
resowner
sort
time
bin
initdb
pg_config
pg_controldata
pg_ctl
pg_dump
common.cdumputils.cpg_backup.hpg_backup_archiver.cpg_backup_archiver.hpg_backup_custom.cpg_backup_db.cpg_backup_files.cpg_backup_null.cpg_backup_tar.cpg_dump.cpg_dump.hpg_dump_sort.cpg_dumpall.cpg_restore.c
pg_resetxlog
pgevent
psql
command.ccommon.ccommon.hcopy.cdescribe.chelp.cinput.clarge_obj.cmainloop.cmbprint.cprint.cprint.hprompt.csettings.hstartup.cstringutils.ctab-complete.cvariables.c
scripts
include
access
genam.hgist.hgist_private.hhash.hheapam.hhio.hhtup.hitup.hmultixact.hnbtree.hrelscan.hslru.htransam.htupmacs.htwophase.htwophase_rmgr.hxact.hxlog.h
c.hcatalog
catalog.hdependency.hheap.hindex.hindexing.hnamespace.hpg_aggregate.hpg_am.hpg_amop.hpg_attribute.hpg_authid.hpg_autovacuum.hpg_cast.hpg_class.hpg_constraint.hpg_control.hpg_database.hpg_index.hpg_inherits.hpg_language.hpg_listener.hpg_namespace.hpg_operator.hpg_proc.hpg_shdepend.hpg_statistic.hpg_type.h
commands
executor
execdebug.hexecutor.hfunctions.hhashjoin.hinstrument.hnodeHash.hnodeHashjoin.hnodeIndexscan.hspi.hspi_priv.htuptable.h
fmgr.hfuncapi.hgetaddrinfo.hlib
libpq
mb
miscadmin.hnodes
optimizer
parser
pgstat.hpgtime.hport.hport
postmaster
regex
storage
backendid.hbuf_internals.hbufmgr.hfd.hitemptr.hlmgr.hlock.hlwlock.hpg_shmem.hproc.hprocarray.hsinval.hsinvaladt.hsmgr.h
tcop
utils
interfaces
ecpg
compatlib
ecpglib
include
pgtypeslib
preproc
libpq
pl
plperl
plpgsql
plpython
tcl
port
copydir.ccrypt.cdirmod.cexec.cgetaddrinfo.cgetopt.cgetopt_long.cgetrusage.cinet_aton.cisinf.cmemcmp.cnoblock.copen.cpath.cqsort.csnprintf.csprompt.cstrtol.cthread.cunsetenv.c
test
timezone
tools
tutorial
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.34 2005/08/22 17:38:20 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.35 2005/10/15 02:49:15 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -42,8 +42,8 @@ CreateSchemaCommand(CreateSchemaStmt *stmt)
|
||||
Oid namespaceId;
|
||||
List *parsetree_list;
|
||||
ListCell *parsetree_item;
|
||||
Oid owner_uid;
|
||||
Oid saved_uid;
|
||||
Oid owner_uid;
|
||||
Oid saved_uid;
|
||||
AclResult aclresult;
|
||||
|
||||
saved_uid = GetUserId();
|
||||
@ -60,8 +60,8 @@ CreateSchemaCommand(CreateSchemaStmt *stmt)
|
||||
* To create a schema, must have schema-create privilege on the current
|
||||
* database and must be able to become the target role (this does not
|
||||
* imply that the target role itself must have create-schema privilege).
|
||||
* The latter provision guards against "giveaway" attacks. Note that
|
||||
* a superuser will always have both of these privileges a fortiori.
|
||||
* The latter provision guards against "giveaway" attacks. Note that a
|
||||
* superuser will always have both of these privileges a fortiori.
|
||||
*/
|
||||
aclresult = pg_database_aclcheck(MyDatabaseId, saved_uid, ACL_CREATE);
|
||||
if (aclresult != ACLCHECK_OK)
|
||||
@ -75,15 +75,15 @@ CreateSchemaCommand(CreateSchemaStmt *stmt)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_RESERVED_NAME),
|
||||
errmsg("unacceptable schema name \"%s\"", schemaName),
|
||||
errdetail("The prefix \"pg_\" is reserved for system schemas.")));
|
||||
errdetail("The prefix \"pg_\" is reserved for system schemas.")));
|
||||
|
||||
/*
|
||||
* If the requested authorization is different from the current user,
|
||||
* temporarily set the current user so that the object(s) will be
|
||||
* created with the correct ownership.
|
||||
* temporarily set the current user so that the object(s) will be created
|
||||
* with the correct ownership.
|
||||
*
|
||||
* (The setting will revert to session user on error or at the end of
|
||||
* this routine.)
|
||||
* (The setting will revert to session user on error or at the end of this
|
||||
* routine.)
|
||||
*/
|
||||
if (saved_uid != owner_uid)
|
||||
SetUserId(owner_uid);
|
||||
@ -95,19 +95,18 @@ CreateSchemaCommand(CreateSchemaStmt *stmt)
|
||||
CommandCounterIncrement();
|
||||
|
||||
/*
|
||||
* Temporarily make the new namespace be the front of the search path,
|
||||
* as well as the default creation target namespace. This will be
|
||||
* undone at the end of this routine, or upon error.
|
||||
* Temporarily make the new namespace be the front of the search path, as
|
||||
* well as the default creation target namespace. This will be undone at
|
||||
* the end of this routine, or upon error.
|
||||
*/
|
||||
PushSpecialNamespace(namespaceId);
|
||||
|
||||
/*
|
||||
* Examine the list of commands embedded in the CREATE SCHEMA command,
|
||||
* and reorganize them into a sequentially executable order with no
|
||||
* forward references. Note that the result is still a list of raw
|
||||
* parsetrees in need of parse analysis --- we cannot, in general, run
|
||||
* analyze.c on one statement until we have actually executed the
|
||||
* prior ones.
|
||||
* Examine the list of commands embedded in the CREATE SCHEMA command, and
|
||||
* reorganize them into a sequentially executable order with no forward
|
||||
* references. Note that the result is still a list of raw parsetrees in
|
||||
* need of parse analysis --- we cannot, in general, run analyze.c on one
|
||||
* statement until we have actually executed the prior ones.
|
||||
*/
|
||||
parsetree_list = analyzeCreateSchemaStmt(stmt);
|
||||
|
||||
@ -174,8 +173,8 @@ RemoveSchema(List *names, DropBehavior behavior)
|
||||
namespaceName);
|
||||
|
||||
/*
|
||||
* Do the deletion. Objects contained in the schema are removed by
|
||||
* means of their dependency links to the schema.
|
||||
* Do the deletion. Objects contained in the schema are removed by means
|
||||
* of their dependency links to the schema.
|
||||
*/
|
||||
object.classId = NamespaceRelationId;
|
||||
object.objectId = namespaceId;
|
||||
@ -254,7 +253,7 @@ RenameSchema(const char *oldname, const char *newname)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_RESERVED_NAME),
|
||||
errmsg("unacceptable schema name \"%s\"", newname),
|
||||
errdetail("The prefix \"pg_\" is reserved for system schemas.")));
|
||||
errdetail("The prefix \"pg_\" is reserved for system schemas.")));
|
||||
|
||||
/* rename */
|
||||
namestrcpy(&(((Form_pg_namespace) GETSTRUCT(tup))->nspname), newname);
|
||||
@ -302,21 +301,21 @@ AlterSchemaOwner(const char *name, Oid newOwnerId)
|
||||
AclResult aclresult;
|
||||
|
||||
/* Otherwise, must be owner of the existing object */
|
||||
if (!pg_namespace_ownercheck(HeapTupleGetOid(tup),GetUserId()))
|
||||
if (!pg_namespace_ownercheck(HeapTupleGetOid(tup), GetUserId()))
|
||||
aclcheck_error(ACLCHECK_NOT_OWNER, ACL_KIND_NAMESPACE,
|
||||
name);
|
||||
|
||||
/* Must be able to become new owner */
|
||||
check_is_member_of_role(GetUserId(),newOwnerId);
|
||||
check_is_member_of_role(GetUserId(), newOwnerId);
|
||||
|
||||
/*
|
||||
* must have create-schema rights
|
||||
*
|
||||
* NOTE: This is different from other alter-owner checks in
|
||||
* that the current user is checked for create privileges
|
||||
* instead of the destination owner. This is consistent
|
||||
* with the CREATE case for schemas. Because superusers
|
||||
* will always have this right, we need no special case for them.
|
||||
* NOTE: This is different from other alter-owner checks in that the
|
||||
* current user is checked for create privileges instead of the
|
||||
* destination owner. This is consistent with the CREATE case for
|
||||
* schemas. Because superusers will always have this right, we need
|
||||
* no special case for them.
|
||||
*/
|
||||
aclresult = pg_database_aclcheck(MyDatabaseId, GetUserId(),
|
||||
ACL_CREATE);
|
||||
|
Reference in New Issue
Block a user