Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
b99c63cf
Commit
b99c63cf
authored
Aug 18, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now that names are null terminated, no need to do all that NAMEDATALEN stuff.
parent
022903f2
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
207 additions
and
220 deletions
+207
-220
src/backend/access/common/printtup.c
src/backend/access/common/printtup.c
+2
-3
src/backend/access/common/tupdesc.c
src/backend/access/common/tupdesc.c
+6
-13
src/backend/access/hash/hashpage.c
src/backend/access/hash/hashpage.c
+11
-11
src/backend/bootstrap/bootstrap.c
src/backend/bootstrap/bootstrap.c
+6
-8
src/backend/catalog/catalog.c
src/backend/catalog/catalog.c
+2
-2
src/backend/catalog/pg_operator.c
src/backend/catalog/pg_operator.c
+3
-3
src/backend/commands/cluster.c
src/backend/commands/cluster.c
+5
-5
src/backend/commands/command.c
src/backend/commands/command.c
+9
-9
src/backend/commands/creatinh.c
src/backend/commands/creatinh.c
+2
-2
src/backend/commands/explain.c
src/backend/commands/explain.c
+2
-2
src/backend/commands/remove.c
src/backend/commands/remove.c
+3
-3
src/backend/commands/rename.c
src/backend/commands/rename.c
+23
-23
src/backend/commands/vacuum.c
src/backend/commands/vacuum.c
+37
-37
src/backend/executor/execMain.c
src/backend/executor/execMain.c
+3
-7
src/backend/executor/execUtils.c
src/backend/executor/execUtils.c
+2
-2
src/backend/libpq/be-dumpdata.c
src/backend/libpq/be-dumpdata.c
+2
-2
src/backend/nodes/outfuncs.c
src/backend/nodes/outfuncs.c
+6
-6
src/backend/parser/analyze.c
src/backend/parser/analyze.c
+4
-4
src/backend/parser/dbcommands.c
src/backend/parser/dbcommands.c
+3
-3
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/bufmgr.c
+5
-5
src/backend/storage/smgr/md.c
src/backend/storage/smgr/md.c
+9
-9
src/backend/storage/smgr/smgr.c
src/backend/storage/smgr/smgr.c
+21
-21
src/backend/tcop/aclchk.c
src/backend/tcop/aclchk.c
+27
-27
src/backend/tcop/utility.c
src/backend/tcop/utility.c
+7
-7
src/backend/utils/adt/name.c
src/backend/utils/adt/name.c
+3
-2
src/backend/utils/cache/relcache.c
src/backend/utils/cache/relcache.c
+4
-4
No files found.
src/backend/access/common/printtup.c
View file @
b99c63cf
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.1
3 1997/01/10 20:16:22
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.1
4 1997/08/18 20:51:30
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -131,9 +131,8 @@ printatt(unsigned attributeId,
AttributeTupleForm
attributeP
,
char
*
value
)
{
printf
(
"
\t
%2d: %
.*
s%s%s%s
\t
(typeid = %u, len = %d, byval = %c)
\n
"
,
printf
(
"
\t
%2d: %s%s%s%s
\t
(typeid = %u, len = %d, byval = %c)
\n
"
,
attributeId
,
NAMEDATALEN
,
/* attname is a char16 */
attributeP
->
attname
.
data
,
value
!=
NULL
?
" =
\"
"
:
""
,
value
!=
NULL
?
value
:
""
,
...
...
src/backend/access/common/tupdesc.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.1
2 1997/08/03 02:34:19
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.1
3 1997/08/18 20:51:31
momjian Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
...
...
@@ -347,18 +347,11 @@ BuildDescForRelation(List *schema, char *relname)
arry
=
entry
->
typename
->
arrayBounds
;
attisset
=
entry
->
typename
->
setof
;
if
(
arry
!=
NIL
)
{
char
buf
[
20
];
strNcpy
(
typename
,
entry
->
typename
->
name
,
NAMEDATALEN
-
1
);
if
(
arry
!=
NIL
)
attdim
=
length
(
arry
);
/* array of XXX is _XXX (inherited from release 3) */
sprintf
(
buf
,
"_%.*s"
,
NAMEDATALEN
,
entry
->
typename
->
name
);
strcpy
(
typename
,
buf
);
}
else
{
strcpy
(
typename
,
entry
->
typename
->
name
);
else
attdim
=
0
;
}
if
(
!
TupleDescInitEntry
(
desc
,
attnum
,
attname
,
typename
,
attdim
,
attisset
))
{
...
...
@@ -372,8 +365,8 @@ BuildDescForRelation(List *schema, char *relname)
if
(
!
strcmp
(
typename
,
relname
))
{
TupleDescMakeSelfReference
(
desc
,
attnum
,
relname
);
}
else
elog
(
WARN
,
"DefineRelation: no such type %
.*
s"
,
NAMEDATALEN
,
typename
);
elog
(
WARN
,
"DefineRelation: no such type %s"
,
typename
);
}
/*
...
...
src/backend/access/hash/hashpage.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.
8 1997/08/12 22:51:37
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.
9 1997/08/18 20:51:34
momjian Exp $
*
* NOTES
* Postgres hash pages look like ordinary relation pages. The opaque
...
...
@@ -195,8 +195,8 @@ _hash_getbuf(Relation rel, BlockNumber blkno, int access)
_hash_setpagelock
(
rel
,
blkno
,
access
);
break
;
default:
elog
(
WARN
,
"_hash_getbuf: invalid access (%d) on new blk: %
.*
s"
,
access
,
NAMEDATALEN
,
RelationGetRelationName
(
rel
));
elog
(
WARN
,
"_hash_getbuf: invalid access (%d) on new blk: %s"
,
access
,
RelationGetRelationName
(
rel
));
break
;
}
buf
=
ReadBuffer
(
rel
,
blkno
);
...
...
@@ -221,8 +221,8 @@ _hash_relbuf(Relation rel, Buffer buf, int access)
_hash_unsetpagelock
(
rel
,
blkno
,
access
);
break
;
default:
elog
(
WARN
,
"_hash_relbuf: invalid access (%d) on blk %x: %
.*
s"
,
access
,
blkno
,
NAMEDATALEN
,
RelationGetRelationName
(
rel
));
elog
(
WARN
,
"_hash_relbuf: invalid access (%d) on blk %x: %s"
,
access
,
blkno
,
RelationGetRelationName
(
rel
));
}
ReleaseBuffer
(
buf
);
...
...
@@ -279,8 +279,8 @@ _hash_chgbufaccess(Relation rel,
_hash_relbuf
(
rel
,
*
bufp
,
from_access
);
break
;
default:
elog
(
WARN
,
"_hash_chgbufaccess: invalid access (%d) on blk %x: %
.*
s"
,
from_access
,
blkno
,
NAMEDATALEN
,
RelationGetRelationName
(
rel
));
elog
(
WARN
,
"_hash_chgbufaccess: invalid access (%d) on blk %x: %s"
,
from_access
,
blkno
,
RelationGetRelationName
(
rel
));
break
;
}
*
bufp
=
_hash_getbuf
(
rel
,
blkno
,
to_access
);
...
...
@@ -325,8 +325,8 @@ _hash_setpagelock(Relation rel,
RelationSetSingleRLockPage
(
rel
,
&
iptr
);
break
;
default:
elog
(
WARN
,
"_hash_setpagelock: invalid access (%d) on blk %x: %
.*
s"
,
access
,
blkno
,
NAMEDATALEN
,
RelationGetRelationName
(
rel
));
elog
(
WARN
,
"_hash_setpagelock: invalid access (%d) on blk %x: %s"
,
access
,
blkno
,
RelationGetRelationName
(
rel
));
break
;
}
}
...
...
@@ -350,8 +350,8 @@ _hash_unsetpagelock(Relation rel,
RelationUnsetSingleRLockPage
(
rel
,
&
iptr
);
break
;
default:
elog
(
WARN
,
"_hash_unsetpagelock: invalid access (%d) on blk %x: %
.*
s"
,
access
,
blkno
,
NAMEDATALEN
,
RelationGetRelationName
(
rel
));
elog
(
WARN
,
"_hash_unsetpagelock: invalid access (%d) on blk %x: %s"
,
access
,
blkno
,
RelationGetRelationName
(
rel
));
break
;
}
}
...
...
src/backend/bootstrap/bootstrap.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.
19 1997/08/12 22:52:0
4 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.
20 1997/08/18 20:51:4
4 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -510,8 +510,8 @@ boot_openrel(char *relname)
if
(
DebugMode
)
{
AttributeTupleForm
at
=
attrtypes
[
i
];
printf
(
"create attribute %d name %
.*
s len %d num %d type %d
\n
"
,
i
,
NAMEDATALEN
,
at
->
attname
.
data
,
at
->
attlen
,
at
->
attnum
,
printf
(
"create attribute %d name %s len %d num %d type %d
\n
"
,
i
,
at
->
attname
.
data
,
at
->
attlen
,
at
->
attnum
,
at
->
atttypid
);
fflush
(
stdout
);
...
...
@@ -572,16 +572,14 @@ DefineAttr(char *name, char *type, int attnum)
if
(
Typ
!=
(
struct
typmap
**
)
NULL
)
{
attrtypes
[
attnum
]
->
atttypid
=
Ap
->
am_oid
;
namestrcpy
(
&
attrtypes
[
attnum
]
->
attname
,
name
);
if
(
!
Quiet
)
printf
(
"<%.*s %s> "
,
NAMEDATALEN
,
attrtypes
[
attnum
]
->
attname
.
data
,
type
);
if
(
!
Quiet
)
printf
(
"<%s %s> "
,
attrtypes
[
attnum
]
->
attname
.
data
,
type
);
attrtypes
[
attnum
]
->
attnum
=
1
+
attnum
;
/* fillatt */
attlen
=
attrtypes
[
attnum
]
->
attlen
=
Ap
->
am_typ
.
typlen
;
attrtypes
[
attnum
]
->
attbyval
=
Ap
->
am_typ
.
typbyval
;
}
else
{
attrtypes
[
attnum
]
->
atttypid
=
Procid
[
t
].
oid
;
namestrcpy
(
&
attrtypes
[
attnum
]
->
attname
,
name
);
if
(
!
Quiet
)
printf
(
"<%.*s %s> "
,
NAMEDATALEN
,
attrtypes
[
attnum
]
->
attname
.
data
,
type
);
if
(
!
Quiet
)
printf
(
"<%s %s> "
,
attrtypes
[
attnum
]
->
attname
.
data
,
type
);
attrtypes
[
attnum
]
->
attnum
=
1
+
attnum
;
/* fillatt */
attlen
=
attrtypes
[
attnum
]
->
attlen
=
Procid
[
t
].
len
;
attrtypes
[
attnum
]
->
attbyval
=
(
attlen
==
1
)
||
(
attlen
==
2
)
||
(
attlen
==
4
);
...
...
@@ -775,7 +773,7 @@ gettype(char *type)
}
}
if
(
DebugMode
)
printf
(
"bootstrap.c: External Type: %
.*s
\n
"
,
NAMEDATALEN
,
type
);
printf
(
"bootstrap.c: External Type: %
s
\n
"
,
type
);
rdesc
=
heap_openr
(
TypeRelationName
);
sdesc
=
heap_beginscan
(
rdesc
,
0
,
NowTimeQual
,
0
,
(
ScanKey
)
NULL
);
i
=
0
;
...
...
src/backend/catalog/catalog.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.
6 1997/01/10 20:16:34
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.
7 1997/08/18 20:51:59
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -33,7 +33,7 @@ relpath(char relname[])
if
(
IsSharedSystemRelationName
(
relname
))
{
path
=
(
char
*
)
palloc
(
strlen
(
DataDir
)
+
sizeof
(
NameData
)
+
2
);
sprintf
(
path
,
"%s/%
.*s"
,
DataDir
,
NAMEDATALEN
,
relname
);
sprintf
(
path
,
"%s/%
s"
,
DataDir
,
relname
);
return
(
path
);
}
return
(
relname
);
...
...
src/backend/catalog/pg_operator.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.1
0 1997/08/12 22:52:11
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.1
1 1997/08/18 20:52:04
momjian Exp $
*
* NOTES
* these routines moved here from commands/define.c and somewhat cleaned up.
...
...
@@ -483,8 +483,8 @@ OperatorDef(char *operatorName,
rightTypeName
);
if
(
OidIsValid
(
operatorObjectId
)
&&
!
definedOK
)
elog
(
WARN
,
"OperatorDef: operator
\"
%
-.*
s
\"
already defined"
,
NAMEDATALEN
,
operatorName
);
elog
(
WARN
,
"OperatorDef: operator
\"
%s
\"
already defined"
,
operatorName
);
if
(
leftTypeName
)
leftTypeId
=
TypeGet
(
leftTypeName
,
&
leftDefined
);
...
...
src/backend/commands/cluster.c
View file @
b99c63cf
...
...
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.1
1 1997/08/03 02:34:45
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.1
2 1997/08/18 20:52:07
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -116,15 +116,15 @@ cluster(char oldrelname[], char oldindexname[])
OldHeap
=
heap_openr
(
oldrelname
);
if
(
!
RelationIsValid
(
OldHeap
))
{
elog
(
WARN
,
"cluster: unknown relation:
\"
%
-.*
s
\"
"
,
NAMEDATALEN
,
oldrelname
);
elog
(
WARN
,
"cluster: unknown relation:
\"
%s
\"
"
,
oldrelname
);
}
OIDOldHeap
=
OldHeap
->
rd_id
;
/* Get OID for the index scan */
OldIndex
=
index_openr
(
oldindexname
);
/* Open old index relation */
if
(
!
RelationIsValid
(
OldIndex
))
{
elog
(
WARN
,
"cluster: unknown index:
\"
%
-.*
s
\"
"
,
NAMEDATALEN
,
oldindexname
);
elog
(
WARN
,
"cluster: unknown index:
\"
%s
\"
"
,
oldindexname
);
}
OIDOldIndex
=
OldIndex
->
rd_id
;
/* OID for the index scan */
...
...
src/backend/commands/command.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.
8 1997/08/12 22:52:18
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.
9 1997/08/18 20:52:11
momjian Exp $
*
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
...
...
@@ -117,8 +117,8 @@ PerformPortalFetch(char *name,
*/
portal
=
GetPortalByName
(
name
);
if
(
!
PortalIsValid
(
portal
))
{
elog
(
NOTICE
,
"PerformPortalFetch: portal
\"
%
-.*
s
\"
not found"
,
NAMEDATALEN
,
name
);
elog
(
NOTICE
,
"PerformPortalFetch: portal
\"
%s
\"
not found"
,
name
);
return
;
}
...
...
@@ -202,8 +202,8 @@ PerformPortalClose(char *name, CommandDest dest)
*/
portal
=
GetPortalByName
(
name
);
if
(
!
PortalIsValid
(
portal
))
{
elog
(
NOTICE
,
"PerformPortalClose: portal
\"
%
-.*
s
\"
not found"
,
NAMEDATALEN
,
name
);
elog
(
NOTICE
,
"PerformPortalClose: portal
\"
%s
\"
not found"
,
name
);
return
;
}
...
...
@@ -272,8 +272,8 @@ PerformAddAttribute(char *relationName,
* normally, only the owner of a class can change its schema.
*/
if
(
IsSystemRelationName
(
relationName
))
elog
(
WARN
,
"PerformAddAttribute: class
\"
%
-.*
s
\"
is a system catalog"
,
NAMEDATALEN
,
relationName
);
elog
(
WARN
,
"PerformAddAttribute: class
\"
%s
\"
is a system catalog"
,
relationName
);
#ifndef NO_SECURITY
if
(
!
pg_ownercheck
(
userName
,
relationName
,
RELNAME
))
elog
(
WARN
,
"PerformAddAttribute: you do not own class
\"
%s
\"
"
,
...
...
@@ -296,8 +296,8 @@ PerformAddAttribute(char *relationName,
relrdesc
=
heap_openr
(
relationName
);
if
(
!
RelationIsValid
(
relrdesc
))
{
elog
(
WARN
,
"PerformAddAttribute: unknown relation:
\"
%
-.*
s
\"
"
,
NAMEDATALEN
,
relationName
);
elog
(
WARN
,
"PerformAddAttribute: unknown relation:
\"
%s
\"
"
,
relationName
);
}
myrelid
=
relrdesc
->
rd_id
;
heap_close
(
relrdesc
);
...
...
src/backend/commands/creatinh.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.1
0 1997/08/12 22:52:20
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.1
1 1997/08/18 20:52:16
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -549,7 +549,7 @@ MakeArchiveName(Oid relationId)
* of the relation they archive. Create a string containing
* this name and find the reldesc for the archive relation.
*/
arch
=
palloc
(
NAMEDATALEN
);
arch
=
palloc
(
NAMEDATALEN
);
sprintf
(
arch
,
"a,%d"
,
relationId
);
return
arch
;
...
...
src/backend/commands/explain.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.
9 1997/04/05 06:42:32 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.
10 1997/08/18 20:52:17 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -177,7 +177,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
case
T_IndexScan
:
if
(((
Scan
*
)
plan
)
->
scanrelid
>
0
)
{
RangeTblEntry
*
rte
=
nth
(((
Scan
*
)
plan
)
->
scanrelid
-
1
,
es
->
rtable
);
sprintf
(
buf
,
" on %
.*s"
,
NAMEDATALEN
,
rte
->
refname
);
sprintf
(
buf
,
" on %
s"
,
rte
->
refname
);
appendStringInfo
(
str
,
buf
);
}
break
;
...
...
src/backend/commands/remove.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.
9 1997/06/03 06:23:24 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.
10 1997/08/18 20:52:17 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -393,8 +393,8 @@ RemoveFunction(char *functionName, /* function name to be removed */
/* ok, function has been found */
if
(
the_proc
->
prolang
==
INTERNALlanguageId
)
elog
(
WARN
,
"RemoveFunction: function
\"
%
-.*
s
\"
is built-in"
,
NAMEDATALEN
,
functionName
);
elog
(
WARN
,
"RemoveFunction: function
\"
%s
\"
is built-in"
,
functionName
);
ItemPointerCopy
(
&
tup
->
t_ctid
,
&
itemPointerData
);
heap_delete
(
relation
,
&
itemPointerData
);
...
...
src/backend/commands/rename.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.
6 1997/08/12 22:52:27
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.
7 1997/08/18 20:52:18
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -78,13 +78,13 @@ renameatt(char *relname,
* normally, only the owner of a class can change its schema.
*/
if
(
IsSystemRelationName
(
relname
))
elog
(
WARN
,
"renameatt: class
\"
%
-.*
s
\"
is a system catalog"
,
NAMEDATALEN
,
relname
);
elog
(
WARN
,
"renameatt: class
\"
%s
\"
is a system catalog"
,
relname
);
#ifndef NO_SECURITY
if
(
!
IsBootstrapProcessingMode
()
&&
!
pg_ownercheck
(
userName
,
relname
,
RELNAME
))
elog
(
WARN
,
"renameatt: you do not own class
\"
%
-.*
s
\"
"
,
NAMEDATALEN
,
relname
);
elog
(
WARN
,
"renameatt: you do not own class
\"
%s
\"
"
,
relname
);
#endif
/*
...
...
@@ -102,8 +102,8 @@ renameatt(char *relname,
relrdesc
=
heap_openr
(
relname
);
if
(
!
RelationIsValid
(
relrdesc
))
{
elog
(
WARN
,
"renameatt: unknown relation:
\"
%
-.*
s
\"
"
,
NAMEDATALEN
,
relname
);
elog
(
WARN
,
"renameatt: unknown relation:
\"
%s
\"
"
,
relname
);
}
myrelid
=
relrdesc
->
rd_id
;
heap_close
(
relrdesc
);
...
...
@@ -139,8 +139,8 @@ renameatt(char *relname,
reltup
=
ClassNameIndexScan
(
relrdesc
,
relname
);
if
(
!
PointerIsValid
(
reltup
))
{
heap_close
(
relrdesc
);
elog
(
WARN
,
"renameatt: relation
\"
%
-.*
s
\"
nonexistent"
,
NAMEDATALEN
,
relname
);
elog
(
WARN
,
"renameatt: relation
\"
%s
\"
nonexistent"
,
relname
);
return
;
}
heap_close
(
relrdesc
);
...
...
@@ -149,20 +149,20 @@ renameatt(char *relname,
oldatttup
=
AttributeNameIndexScan
(
attrdesc
,
reltup
->
t_oid
,
oldattname
);
if
(
!
PointerIsValid
(
oldatttup
))
{
heap_close
(
attrdesc
);
elog
(
WARN
,
"renameatt: attribute
\"
%
-.*
s
\"
nonexistent"
,
NAMEDATALEN
,
oldattname
);
elog
(
WARN
,
"renameatt: attribute
\"
%s
\"
nonexistent"
,
oldattname
);
}
if
(((
AttributeTupleForm
)
GETSTRUCT
(
oldatttup
))
->
attnum
<
0
)
{
elog
(
WARN
,
"renameatt: system attribute
\"
%
-.*
s
\"
not renamed"
,
NAMEDATALEN
,
oldattname
);
elog
(
WARN
,
"renameatt: system attribute
\"
%s
\"
not renamed"
,
oldattname
);
}
newatttup
=
AttributeNameIndexScan
(
attrdesc
,
reltup
->
t_oid
,
newattname
);
if
(
PointerIsValid
(
newatttup
))
{
pfree
(
oldatttup
);
heap_close
(
attrdesc
);
elog
(
WARN
,
"renameatt: attribute
\"
%
-.*
s
\"
exists"
,
NAMEDATALEN
,
newattname
);
elog
(
WARN
,
"renameatt: attribute
\"
%s
\"
exists"
,
newattname
);
}
namestrcpy
(
&
(((
AttributeTupleForm
)(
GETSTRUCT
(
oldatttup
)))
->
attname
),
...
...
@@ -207,13 +207,13 @@ renamerel(char oldrelname[], char newrelname[])
Relation
idescs
[
Num_pg_class_indices
];
if
(
IsSystemRelationName
(
oldrelname
))
{
elog
(
WARN
,
"renamerel: system relation
\"
%
-.*
s
\"
not renamed"
,
NAMEDATALEN
,
oldrelname
);
elog
(
WARN
,
"renamerel: system relation
\"
%s
\"
not renamed"
,
oldrelname
);
return
;
}
if
(
IsSystemRelationName
(
newrelname
))
{
elog
(
WARN
,
"renamerel: Illegal class name:
\"
%
-.*
s
\"
-- pg_ is reserved for system catalogs"
,
NAMEDATALEN
,
newrelname
);
elog
(
WARN
,
"renamerel: Illegal class name:
\"
%s
\"
-- pg_ is reserved for system catalogs"
,
newrelname
);
return
;
}
...
...
@@ -222,16 +222,16 @@ renamerel(char oldrelname[], char newrelname[])
if
(
!
PointerIsValid
(
oldreltup
))
{
heap_close
(
relrdesc
);
elog
(
WARN
,
"renamerel: relation
\"
%
-.*
s
\"
does not exist"
,
NAMEDATALEN
,
oldrelname
);
elog
(
WARN
,
"renamerel: relation
\"
%s
\"
does not exist"
,
oldrelname
);
}
newreltup
=
ClassNameIndexScan
(
relrdesc
,
newrelname
);
if
(
PointerIsValid
(
newreltup
))
{
pfree
(
oldreltup
);
heap_close
(
relrdesc
);
elog
(
WARN
,
"renamerel: relation
\"
%
-.*
s
\"
exists"
,
NAMEDATALEN
,
newrelname
);
elog
(
WARN
,
"renamerel: relation
\"
%s
\"
exists"
,
newrelname
);
}
/* rename the directory first, so if this fails the rename's not done */
...
...
src/backend/commands/vacuum.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.3
8 1997/08/12 22:52:29
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.3
9 1997/08/18 20:52:21
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -318,8 +318,8 @@ vc_getrels(NameData *VacRelP)
(
rname
[
3
]
==
'v'
||
rname
[
3
]
==
'x'
)
&&
rname
[
4
]
>=
'0'
&&
rname
[
4
]
<=
'9'
)
{
elog
(
NOTICE
,
"Rel %
.*
s: can't vacuum LargeObjects now"
,
NAMEDATALEN
,
rname
);
elog
(
NOTICE
,
"Rel %s: can't vacuum LargeObjects now"
,
rname
);
ReleaseBuffer
(
buf
);
continue
;
}
...
...
@@ -446,8 +446,8 @@ vc_vacone (Oid relid, bool analyze, List *va_cols)
List
*
le
;
if
(
length
(
va_cols
)
>
attr_cnt
)
elog
(
WARN
,
"vacuum: too many attributes specified for relation %
.*
s"
,
NAMEDATALEN
,
(
RelationGetRelationName
(
onerel
))
->
data
);
elog
(
WARN
,
"vacuum: too many attributes specified for relation %s"
,
(
RelationGetRelationName
(
onerel
))
->
data
);
attnums
=
(
int
*
)
palloc
(
attr_cnt
*
sizeof
(
int
));
foreach
(
le
,
va_cols
)
{
...
...
@@ -462,8 +462,8 @@ vc_vacone (Oid relid, bool analyze, List *va_cols)
attnums
[
tcnt
++
]
=
i
;
else
{
elog
(
WARN
,
"vacuum: there is no attribute %s in %
.*
s"
,
col
,
NAMEDATALEN
,
(
RelationGetRelationName
(
onerel
))
->
data
);
elog
(
WARN
,
"vacuum: there is no attribute %s in %s"
,
col
,
(
RelationGetRelationName
(
onerel
))
->
data
);
}
}
attr_cnt
=
tcnt
;
...
...
@@ -657,8 +657,8 @@ vc_scanheap (VRelStats *vacrelstats, Relation onerel,
vpc
->
vpd_noff
=
0
;
if
(
PageIsNew
(
page
))
{
elog
(
NOTICE
,
"Rel %
.*
s: Uninitialized page %u - fixing"
,
NAMEDATALEN
,
relname
,
blkno
);
elog
(
NOTICE
,
"Rel %s: Uninitialized page %u - fixing"
,
relname
,
blkno
);
PageInit
(
page
,
BufferGetPageSize
(
buf
),
0
);
vpc
->
vpd_free
=
((
PageHeader
)
page
)
->
pd_upper
-
((
PageHeader
)
page
)
->
pd_lower
;
frsize
+=
(
vpc
->
vpd_free
-
sizeof
(
ItemIdData
));
...
...
@@ -718,8 +718,8 @@ vc_scanheap (VRelStats *vacrelstats, Relation onerel,
}
else
{
elog
(
NOTICE
,
"Rel %
.*
s: TID %u/%u: InsertTransactionInProgress %u - can't shrink relation"
,
NAMEDATALEN
,
relname
,
blkno
,
offnum
,
htup
->
t_xmin
);
elog
(
NOTICE
,
"Rel %s: TID %u/%u: InsertTransactionInProgress %u - can't shrink relation"
,
relname
,
blkno
,
offnum
,
htup
->
t_xmin
);
do_shrinking
=
false
;
}
}
...
...
@@ -743,8 +743,8 @@ vc_scanheap (VRelStats *vacrelstats, Relation onerel,
}
else
{
elog
(
NOTICE
,
"Rel %
.*
s: TID %u/%u: DeleteTransactionInProgress %u - can't shrink relation"
,
NAMEDATALEN
,
relname
,
blkno
,
offnum
,
htup
->
t_xmax
);
elog
(
NOTICE
,
"Rel %s: TID %u/%u: DeleteTransactionInProgress %u - can't shrink relation"
,
relname
,
blkno
,
offnum
,
htup
->
t_xmax
);
do_shrinking
=
false
;
}
}
...
...
@@ -754,9 +754,9 @@ vc_scanheap (VRelStats *vacrelstats, Relation onerel,
*/
if
(
!
TransactionIdIsValid
((
TransactionId
)
htup
->
t_xmin
)
)
{
elog
(
NOTICE
,
"Rel %
.*
s: TID %u/%u: INSERT_TRANSACTION_ID IS INVALID. \
elog
(
NOTICE
,
"Rel %s: TID %u/%u: INSERT_TRANSACTION_ID IS INVALID. \
DELETE_TRANSACTION_ID_VALID %d, TUPGONE %d."
,
NAMEDATALEN
,
relname
,
blkno
,
offnum
,
relname
,
blkno
,
offnum
,
TransactionIdIsValid
((
TransactionId
)
htup
->
t_xmax
),
tupgone
);
}
...
...
@@ -769,8 +769,8 @@ DELETE_TRANSACTION_ID_VALID %d, TUPGONE %d.",
if
(
!
ItemPointerIsValid
(
itemptr
)
||
BlockIdGetBlockNumber
(
&
(
itemptr
->
ip_blkid
))
!=
blkno
)
{
elog
(
NOTICE
,
"Rel %
.*
s: TID %u/%u: TID IN TUPLEHEADER %u/%u IS NOT THE SAME. TUPGONE %d."
,
NAMEDATALEN
,
relname
,
blkno
,
offnum
,
elog
(
NOTICE
,
"Rel %s: TID %u/%u: TID IN TUPLEHEADER %u/%u IS NOT THE SAME. TUPGONE %d."
,
relname
,
blkno
,
offnum
,
BlockIdGetBlockNumber
(
&
(
itemptr
->
ip_blkid
)),
itemptr
->
ip_posid
,
tupgone
);
}
...
...
@@ -780,14 +780,14 @@ DELETE_TRANSACTION_ID_VALID %d, TUPGONE %d.",
*/
if
(
htup
->
t_len
!=
itemid
->
lp_len
)
{
elog
(
NOTICE
,
"Rel %
.*
s: TID %u/%u: TUPLE_LEN IN PAGEHEADER %u IS NOT THE SAME AS IN TUPLEHEADER %u. TUPGONE %d."
,
NAMEDATALEN
,
relname
,
blkno
,
offnum
,
elog
(
NOTICE
,
"Rel %s: TID %u/%u: TUPLE_LEN IN PAGEHEADER %u IS NOT THE SAME AS IN TUPLEHEADER %u. TUPGONE %d."
,
relname
,
blkno
,
offnum
,
itemid
->
lp_len
,
htup
->
t_len
,
tupgone
);
}
if
(
!
OidIsValid
(
htup
->
t_oid
)
)
{
elog
(
NOTICE
,
"Rel %
.*
s: TID %u/%u: OID IS INVALID. TUPGONE %d."
,
NAMEDATALEN
,
relname
,
blkno
,
offnum
,
tupgone
);
elog
(
NOTICE
,
"Rel %s: TID %u/%u: OID IS INVALID. TUPGONE %d."
,
relname
,
blkno
,
offnum
,
tupgone
);
}
if
(
tupgone
)
{
...
...
@@ -890,9 +890,9 @@ DELETE_TRANSACTION_ID_VALID %d, TUPGONE %d.",
getrusage
(
RUSAGE_SELF
,
&
ru1
);
elog
(
MESSAGE_LEVEL
,
"Rel %
.*
s: Pages %u: Changed %u, Reapped %u, Empty %u, New %u; \
elog
(
MESSAGE_LEVEL
,
"Rel %s: Pages %u: Changed %u, Reapped %u, Empty %u, New %u; \
Tup %u: Vac %u, Crash %u, UnUsed %u, MinLen %u, MaxLen %u; Re-using: Free/Avail. Space %u/%u; EndEmpty/Avail. Pages %u/%u. Elapsed %u/%u sec."
,
NAMEDATALEN
,
relname
,
relname
,
nblocks
,
nchpg
,
Vvpl
->
vpl_npages
,
nempg
,
nnepg
,
ntups
,
nvac
,
ncrash
,
nunused
,
min_tlen
,
max_tlen
,
frsize
,
frsusf
,
nemend
,
Fvpl
->
vpl_npages
,
...
...
@@ -1246,9 +1246,9 @@ failed to add item with len = %u to page %u (free space %u, nusd %u, noff %u)",
getrusage
(
RUSAGE_SELF
,
&
ru1
);
elog
(
MESSAGE_LEVEL
,
"Rel %
.*
s: Pages: %u --> %u; Tuple(s) moved: %u. \
elog
(
MESSAGE_LEVEL
,
"Rel %s: Pages: %u --> %u; Tuple(s) moved: %u. \
Elapsed %u/%u sec."
,
NAMEDATALEN
,
(
RelationGetRelationName
(
onerel
))
->
data
,
(
RelationGetRelationName
(
onerel
))
->
data
,
nblocks
,
blkno
,
nmoved
,
ru1
.
ru_stime
.
tv_sec
-
ru0
.
ru_stime
.
tv_sec
,
ru1
.
ru_utime
.
tv_sec
-
ru0
.
ru_utime
.
tv_sec
);
...
...
@@ -1371,8 +1371,8 @@ vc_vacheap (VRelStats *vacrelstats, Relation onerel, VPageList Vvpl)
{
Assert
(
vacrelstats
->
npages
>=
Vvpl
->
vpl_nemend
);
nblocks
=
vacrelstats
->
npages
-
Vvpl
->
vpl_nemend
;
elog
(
MESSAGE_LEVEL
,
"Rel %
.*
s: Pages: %u --> %u."
,
NAMEDATALEN
,
(
RelationGetRelationName
(
onerel
))
->
data
,
elog
(
MESSAGE_LEVEL
,
"Rel %s: Pages: %u --> %u."
,
(
RelationGetRelationName
(
onerel
))
->
data
,
vacrelstats
->
npages
,
nblocks
);
/*
...
...
@@ -1451,14 +1451,14 @@ vc_scanoneind (Relation indrel, int nhtups)
getrusage
(
RUSAGE_SELF
,
&
ru1
);
elog
(
MESSAGE_LEVEL
,
"Ind %
.*
s: Pages %u; Tuples %u. Elapsed %u/%u sec."
,
NAMEDATALEN
,
indrel
->
rd_rel
->
relname
.
data
,
nipages
,
nitups
,
elog
(
MESSAGE_LEVEL
,
"Ind %s: Pages %u; Tuples %u. Elapsed %u/%u sec."
,
indrel
->
rd_rel
->
relname
.
data
,
nipages
,
nitups
,
ru1
.
ru_stime
.
tv_sec
-
ru0
.
ru_stime
.
tv_sec
,
ru1
.
ru_utime
.
tv_sec
-
ru0
.
ru_utime
.
tv_sec
);
if
(
nitups
!=
nhtups
)
elog
(
NOTICE
,
"Ind %
.*
s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u)"
,
NAMEDATALEN
,
indrel
->
rd_rel
->
relname
.
data
,
nitups
,
nhtups
);
elog
(
NOTICE
,
"Ind %s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u)"
,
indrel
->
rd_rel
->
relname
.
data
,
nitups
,
nhtups
);
}
/* vc_scanoneind */
...
...
@@ -1508,8 +1508,8 @@ vc_vaconeind(VPageList vpl, Relation indrel, int nhtups)
#endif
if
(
vp
->
vpd_noff
==
0
)
{
/* this is EmptyPage !!! */
elog
(
NOTICE
,
"Ind %
.*
s: pointer to EmptyPage (blk %u off %u) - fixing"
,
NAMEDATALEN
,
indrel
->
rd_rel
->
relname
.
data
,
elog
(
NOTICE
,
"Ind %s: pointer to EmptyPage (blk %u off %u) - fixing"
,
indrel
->
rd_rel
->
relname
.
data
,
vp
->
vpd_blkno
,
ItemPointerGetOffsetNumber
(
heapptr
));
}
++
nvac
;
...
...
@@ -1530,14 +1530,14 @@ vc_vaconeind(VPageList vpl, Relation indrel, int nhtups)
getrusage
(
RUSAGE_SELF
,
&
ru1
);
elog
(
MESSAGE_LEVEL
,
"Ind %
.*
s: Pages %u; Tuples %u: Deleted %u. Elapsed %u/%u sec."
,
NAMEDATALEN
,
indrel
->
rd_rel
->
relname
.
data
,
nipages
,
nitups
,
nvac
,
elog
(
MESSAGE_LEVEL
,
"Ind %s: Pages %u; Tuples %u: Deleted %u. Elapsed %u/%u sec."
,
indrel
->
rd_rel
->
relname
.
data
,
nipages
,
nitups
,
nvac
,
ru1
.
ru_stime
.
tv_sec
-
ru0
.
ru_stime
.
tv_sec
,
ru1
.
ru_utime
.
tv_sec
-
ru0
.
ru_utime
.
tv_sec
);
if
(
nitups
!=
nhtups
)
elog
(
NOTICE
,
"Ind %
.*
s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u)"
,
NAMEDATALEN
,
indrel
->
rd_rel
->
relname
.
data
,
nitups
,
nhtups
);
elog
(
NOTICE
,
"Ind %s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u)"
,
indrel
->
rd_rel
->
relname
.
data
,
nitups
,
nhtups
);
}
/* vc_vaconeind */
...
...
src/backend/executor/execMain.c
View file @
b99c63cf
...
...
@@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.1
4 1997/08/12 22:52:33
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.1
5 1997/08/18 20:52:25
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -308,9 +308,9 @@ ExecCheckPerms(CmdType operation,
if
(
!
HeapTupleIsValid
(
htp
))
elog
(
WARN
,
"ExecCheckPerms: bogus RT relid: %d"
,
relid
);
str
n
cpy
(
rname
.
data
,
str
N
cpy
(
rname
.
data
,
((
Form_pg_class
)
GETSTRUCT
(
htp
))
->
relname
.
data
,
NAMEDATALEN
);
NAMEDATALEN
-
1
);
if
(
i
==
resultRelation
)
{
/* this is the result relation */
qvars
=
pull_varnos
(
parseTree
->
qual
);
tvars
=
pull_varnos
((
Node
*
)
parseTree
->
targetList
);
...
...
@@ -348,10 +348,6 @@ ExecCheckPerms(CmdType operation,
++
i
;
}
if
(
!
ok
)
{
/*
elog(WARN, "%s on \"%-.*s\": permission denied", opstr,
NAMEDATALEN, rname.data);
*/
elog
(
WARN
,
"%s: %s"
,
rname
.
data
,
aclcheck_error_strings
[
aclcheck_result
]);
}
}
...
...
src/backend/executor/execUtils.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.
9 1997/06/13 03:24:26 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.
10 1997/08/18 20:52:27 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -491,7 +491,7 @@ ExecSetTypeInfo(int index,
att->attrelid = 0; /* dummy value */
if (attName != (char *) NULL)
str
ncpy(att->attname.data, attName, NAMEDATALEN
);
str
Ncpy(att->attname.data, attName, NAMEDATALEN-1
);
else
memset(att->attname.data,0,NAMEDATALEN);
...
...
src/backend/libpq/be-dumpdata.c
View file @
b99c63cf
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-dumpdata.c,v 1.
4 1996/11/10 03:00:23
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-dumpdata.c,v 1.
5 1997/08/18 20:52:31
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -189,7 +189,7 @@ be_typeinit(PortalEntry *entry,
if
(
natts
>
0
)
{
group
->
types
=
pbuf_addTypes
(
natts
);
for
(
i
=
0
;
i
<
natts
;
++
i
)
{
strncpy
(
group
->
types
[
i
].
name
,
attrs
[
i
]
->
attname
.
data
,
NAMEDATALEN
);
strncpy
(
group
->
types
[
i
].
name
,
attrs
[
i
]
->
attname
.
data
,
NAMEDATALEN
);
group
->
types
[
i
].
adtid
=
attrs
[
i
]
->
atttypid
;
group
->
types
[
i
].
adtsize
=
attrs
[
i
]
->
attlen
;
}
...
...
src/backend/nodes/outfuncs.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.
5 1996/12/26 17:46:56
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.
6 1997/08/18 20:52:43
momjian Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
...
...
@@ -501,7 +501,7 @@ _outResdom(StringInfo str, Resdom *node)
appendStringInfo
(
str
,
buf
);
sprintf
(
buf
,
" :reslen %d"
,
node
->
reslen
);
appendStringInfo
(
str
,
buf
);
sprintf
(
buf
,
" :resname
\"
%
.*s
\"
"
,
NAMEDATALEN
,
sprintf
(
buf
,
" :resname
\"
%
s
\"
"
,
((
node
->
resname
)
?
((
char
*
)
node
->
resname
)
:
"null"
));
appendStringInfo
(
str
,
buf
);
sprintf
(
buf
,
" :reskey %d"
,
node
->
reskey
);
...
...
@@ -643,7 +643,7 @@ _outAggreg(StringInfo str, Aggreg *node)
sprintf
(
buf
,
"AGGREG"
);
appendStringInfo
(
str
,
buf
);
sprintf
(
buf
,
" :aggname
\"
%
.*s
\"
"
,
NAMEDATALEN
,
(
char
*
)
node
->
aggname
);
sprintf
(
buf
,
" :aggname
\"
%
s
\"
"
,
(
char
*
)
node
->
aggname
);
appendStringInfo
(
str
,
buf
);
sprintf
(
buf
,
" :basetype %u"
,
node
->
basetype
);
appendStringInfo
(
str
,
buf
);
...
...
@@ -789,7 +789,7 @@ _outParam(StringInfo str, Param *node)
appendStringInfo
(
str
,
buf
);
sprintf
(
buf
,
" :paramid %hd"
,
node
->
paramid
);
appendStringInfo
(
str
,
buf
);
sprintf
(
buf
,
" :paramname
\"
%
.*s
\"
"
,
NAMEDATALEN
,
node
->
paramname
);
sprintf
(
buf
,
" :paramname
\"
%
s
\"
"
,
node
->
paramname
);
appendStringInfo
(
str
,
buf
);
sprintf
(
buf
,
" :paramtype %u"
,
node
->
paramtype
);
appendStringInfo
(
str
,
buf
);
...
...
@@ -932,14 +932,14 @@ _outRangeTblEntry(StringInfo str, RangeTblEntry *node)
sprintf
(
buf
,
"RTE"
);
appendStringInfo
(
str
,
buf
);
sprintf
(
buf
,
" :relname
\"
%
.*s
\"
"
,
NAMEDATALEN
,
sprintf
(
buf
,
" :relname
\"
%
s
\"
"
,
((
node
->
relname
)
?
((
char
*
)
node
->
relname
)
:
"null"
));
appendStringInfo
(
str
,
buf
);
sprintf
(
buf
,
" :inh %d "
,
node
->
inh
);
appendStringInfo
(
str
,
buf
);
sprintf
(
buf
,
" :refname
\"
%
.*s
\"
"
,
NAMEDATALEN
,
sprintf
(
buf
,
" :refname
\"
%
s
\"
"
,
((
node
->
refname
)
?
((
char
*
)
node
->
refname
)
:
"null"
));
appendStringInfo
(
str
,
buf
);
...
...
src/backend/parser/analyze.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.3
2 1997/08/12 22:53:17
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.3
3 1997/08/18 20:53:00
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1374,10 +1374,10 @@ make_targetlist_expr(ParseState *pstate,
attrlen
);
}
else
{
/* currently, we can't handle casting of expressions */
elog
(
WARN
,
"parser: attribute '%s' is of type '%
.*s' but expression is of type '%.*
s'"
,
elog
(
WARN
,
"parser: attribute '%s' is of type '%
s' but expression is of type '%
s'"
,
colname
,
NAMEDATALEN
,
get_id_typname
(
attrtype
),
NAMEDATALEN
,
get_id_typname
(
type_id
));
get_id_typname
(
attrtype
),
get_id_typname
(
type_id
));
}
}
...
...
src/backend/parser/dbcommands.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/dbcommands.c,v 1.
4 1997/08/18 02:14:44
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/dbcommands.c,v 1.
5 1997/08/18 20:53:03
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -170,8 +170,8 @@ check_permissions(char *command,
/* Check to make sure user has permission to use createdb */
if
(
!
use_createdb
)
{
elog
(
WARN
,
"user
\"
%
-.*
s
\"
is not allowed to create/destroy databases"
,
NAMEDATALEN
,
userName
);
elog
(
WARN
,
"user
\"
%s
\"
is not allowed to create/destroy databases"
,
userName
);
}
/* Make sure we are not mucking with the template database */
...
...
src/backend/storage/buffer/bufmgr.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.1
7 1997/08/18 02:14:49
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.1
8 1997/08/18 20:53:08
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1419,9 +1419,9 @@ PrintBufferDescs()
if
(
IsUnderPostmaster
)
{
SpinAcquire
(
BufMgrLock
);
for
(
i
=
0
;
i
<
NBuffers
;
++
i
,
++
buf
)
{
elog
(
NOTICE
,
"[%02d] (freeNext=%d, freePrev=%d, relname=%
.*
s, \
elog
(
NOTICE
,
"[%02d] (freeNext=%d, freePrev=%d, relname=%s, \
blockNum=%d, flags=0x%x, refcount=%d %d)"
,
i
,
buf
->
freeNext
,
buf
->
freePrev
,
NAMEDATALEN
,
i
,
buf
->
freeNext
,
buf
->
freePrev
,
buf
->
sb_relname
,
buf
->
tag
.
blockNum
,
buf
->
flags
,
buf
->
refcount
,
PrivateRefCount
[
i
]);
}
...
...
@@ -1445,9 +1445,9 @@ PrintPinnedBufs()
SpinAcquire
(
BufMgrLock
);
for
(
i
=
0
;
i
<
NBuffers
;
++
i
,
++
buf
)
{
if
(
PrivateRefCount
[
i
]
>
0
)
elog
(
NOTICE
,
"[%02d] (freeNext=%d, freePrev=%d, relname=%
.*
s, \
elog
(
NOTICE
,
"[%02d] (freeNext=%d, freePrev=%d, relname=%s, \
blockNum=%d, flags=0x%x, refcount=%d %d)
\n
"
,
i
,
buf
->
freeNext
,
buf
->
freePrev
,
NAMEDATALEN
,
buf
->
sb_relname
,
i
,
buf
->
freeNext
,
buf
->
freePrev
,
buf
->
sb_relname
,
buf
->
tag
.
blockNum
,
buf
->
flags
,
buf
->
refcount
,
PrivateRefCount
[
i
]);
}
...
...
src/backend/storage/smgr/md.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.1
7 1997/08/12 22:54:13
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.1
8 1997/08/18 20:53:14
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -468,17 +468,17 @@ mdblindwrt(char *dbstr,
if
(
dbid
==
(
Oid
)
0
)
{
path
=
(
char
*
)
palloc
(
strlen
(
DataDir
)
+
sizeof
(
NameData
)
+
2
+
nchars
);
if
(
segno
==
0
)
sprintf
(
path
,
"%s/%
.*s"
,
DataDir
,
NAMEDATALEN
,
relstr
);
sprintf
(
path
,
"%s/%
s"
,
DataDir
,
relstr
);
else
sprintf
(
path
,
"%s/%
.*s.%d"
,
DataDir
,
NAMEDATALEN
,
relstr
,
segno
);
sprintf
(
path
,
"%s/%
s.%d"
,
DataDir
,
relstr
,
segno
);
}
else
{
path
=
(
char
*
)
palloc
(
strlen
(
DataDir
)
+
strlen
(
"/base/"
)
+
2
*
sizeof
(
NameData
)
+
2
+
nchars
);
if
(
segno
==
0
)
sprintf
(
path
,
"%s/base/%
.*s/%.*s"
,
DataDir
,
NAMEDATALEN
,
dbstr
,
NAMEDATALEN
,
relstr
);
sprintf
(
path
,
"%s/base/%
s/%s"
,
DataDir
,
dbstr
,
relstr
);
else
sprintf
(
path
,
"%s/base/%
.*s/%.*s.%d"
,
DataDir
,
NAMEDATALEN
,
dbstr
,
NAMEDATALEN
,
relstr
,
segno
);
sprintf
(
path
,
"%s/base/%
s/%s.%d"
,
DataDir
,
dbstr
,
relstr
,
segno
);
}
if
((
fd
=
open
(
path
,
O_RDWR
,
0600
))
<
0
)
...
...
@@ -563,8 +563,8 @@ mdtruncate (Relation reln, int nblocks)
curnblk
=
mdnblocks
(
reln
);
if
(
curnblk
/
RELSEG_SIZE
>
0
)
{
elog
(
NOTICE
,
"Can't truncate multi-segments relation %
.*
s"
,
NAMEDATALEN
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
elog
(
NOTICE
,
"Can't truncate multi-segments relation %s"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
curnblk
);
}
...
...
src/backend/storage/smgr/smgr.c
View file @
b99c63cf
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.
6 1997/05/22 17:08:35 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.
7 1997/08/18 20:53:18 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -125,8 +125,8 @@ smgrcreate(int16 which, Relation reln)
int
fd
;
if
((
fd
=
(
*
(
smgrsw
[
which
].
smgr_create
))(
reln
))
<
0
)
elog
(
WARN
,
"cannot open %
.*
s"
,
NAMEDATALEN
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
elog
(
WARN
,
"cannot open %s"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
fd
);
}
...
...
@@ -142,8 +142,8 @@ smgrunlink(int16 which, Relation reln)
int
status
;
if
((
status
=
(
*
(
smgrsw
[
which
].
smgr_unlink
))(
reln
))
==
SM_FAIL
)
elog
(
WARN
,
"cannot unlink %
.*
s"
,
NAMEDATALEN
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
elog
(
WARN
,
"cannot unlink %s"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
status
);
}
...
...
@@ -162,8 +162,8 @@ smgrextend(int16 which, Relation reln, char *buffer)
status
=
(
*
(
smgrsw
[
which
].
smgr_extend
))(
reln
,
buffer
);
if
(
status
==
SM_FAIL
)
elog
(
WARN
,
"%
.*
s: cannot extend"
,
NAMEDATALEN
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
elog
(
WARN
,
"%s: cannot extend"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
status
);
}
...
...
@@ -180,8 +180,8 @@ smgropen(int16 which, Relation reln)
int
fd
;
if
((
fd
=
(
*
(
smgrsw
[
which
].
smgr_open
))(
reln
))
<
0
)
elog
(
WARN
,
"cannot open %
.*
s"
,
NAMEDATALEN
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
elog
(
WARN
,
"cannot open %s"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
fd
);
}
...
...
@@ -202,8 +202,8 @@ int
smgrclose
(
int16
which
,
Relation
reln
)
{
if
((
*
(
smgrsw
[
which
].
smgr_close
))(
reln
)
==
SM_FAIL
)
elog
(
WARN
,
"cannot close %
.*
s"
,
NAMEDATALEN
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
elog
(
WARN
,
"cannot close %s"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
SM_SUCCESS
);
}
...
...
@@ -226,8 +226,8 @@ smgrread(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
status
=
(
*
(
smgrsw
[
which
].
smgr_read
))(
reln
,
blocknum
,
buffer
);
if
(
status
==
SM_FAIL
)
elog
(
WARN
,
"cannot read block %d of %
.*
s"
,
blocknum
,
NAMEDATALEN
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
elog
(
WARN
,
"cannot read block %d of %s"
,
blocknum
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
status
);
}
...
...
@@ -248,8 +248,8 @@ smgrwrite(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
status
=
(
*
(
smgrsw
[
which
].
smgr_write
))(
reln
,
blocknum
,
buffer
);
if
(
status
==
SM_FAIL
)
elog
(
WARN
,
"cannot write block %d of %
.*
s"
,
blocknum
,
NAMEDATALEN
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
elog
(
WARN
,
"cannot write block %d of %s"
,
blocknum
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
status
);
}
...
...
@@ -265,8 +265,8 @@ smgrflush(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
status
=
(
*
(
smgrsw
[
which
].
smgr_flush
))(
reln
,
blocknum
,
buffer
);
if
(
status
==
SM_FAIL
)
elog
(
WARN
,
"cannot flush block %d of %
.*
s to stable store"
,
blocknum
,
NAMEDATALEN
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
elog
(
WARN
,
"cannot flush block %d of %s to stable store"
,
blocknum
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
status
);
}
...
...
@@ -325,8 +325,8 @@ smgrnblocks(int16 which, Relation reln)
int
nblocks
;
if
((
nblocks
=
(
*
(
smgrsw
[
which
].
smgr_nblocks
))(
reln
))
<
0
)
elog
(
WARN
,
"cannot count blocks for %
.*
s"
,
NAMEDATALEN
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
elog
(
WARN
,
"cannot count blocks for %s"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]));
return
(
nblocks
);
}
...
...
@@ -347,8 +347,8 @@ smgrtruncate(int16 which, Relation reln, int nblocks)
if
(
smgrsw
[
which
].
smgr_truncate
)
{
if
((
newblks
=
(
*
(
smgrsw
[
which
].
smgr_truncate
))(
reln
,
nblocks
))
<
0
)
elog
(
WARN
,
"cannot truncate %
.*
s to %d blocks"
,
NAMEDATALEN
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]),
nblocks
);
elog
(
WARN
,
"cannot truncate %s to %d blocks"
,
&
(
reln
->
rd_rel
->
relname
.
data
[
0
]),
nblocks
);
}
return
(
newblks
);
...
...
src/backend/tcop/aclchk.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.1
1 1997/08/12 22:54:17
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.1
2 1997/08/18 20:53:29
momjian Exp $
*
* NOTES
* See acl.h.
...
...
@@ -356,8 +356,8 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
htp
=
SearchSysCacheTuple
(
USENAME
,
PointerGetDatum
(
usename
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
htp
))
elog
(
WARN
,
"pg_aclcheck: user
\"
%
-.*
s
\"
not found"
,
NAMEDATALEN
,
usename
);
elog
(
WARN
,
"pg_aclcheck: user
\"
%s
\"
not found"
,
usename
);
id
=
(
AclId
)
((
Form_pg_user
)
GETSTRUCT
(
htp
))
->
usesysid
;
/* for the 'pg_database' relation, check the usecreatedb
...
...
@@ -379,8 +379,8 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
if
(((
mode
&
ACL_WR
)
||
(
mode
&
ACL_AP
))
&&
IsSystemRelationName
(
relname
)
&&
!
((
Form_pg_user
)
GETSTRUCT
(
htp
))
->
usecatupd
)
{
elog
(
DEBUG
,
"pg_aclcheck: catalog update to
\"
%
-.*
s
\"
: permission denied"
,
NAMEDATALEN
,
relname
);
elog
(
DEBUG
,
"pg_aclcheck: catalog update to
\"
%s
\"
: permission denied"
,
relname
);
return
ACLCHECK_NO_PRIV
;
}
...
...
@@ -389,8 +389,8 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
*/
if
(((
Form_pg_user
)
GETSTRUCT
(
htp
))
->
usesuper
)
{
#ifdef ACLDEBUG_TRACE
elog
(
DEBUG
,
"pg_aclcheck:
\"
%
-.*
s
\"
is superuser"
,
NAMEDATALEN
,
usename
);
elog
(
DEBUG
,
"pg_aclcheck:
\"
%s
\"
is superuser"
,
usename
);
#endif
return
ACLCHECK_OK
;
}
...
...
@@ -399,8 +399,8 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
htp
=
SearchSysCacheTuple
(
RELNAME
,
PointerGetDatum
(
relname
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
htp
))
{
elog
(
WARN
,
"pg_aclcheck: class
\"
%
-.*
s
\"
not found"
,
NAMEDATALEN
,
relname
);
elog
(
WARN
,
"pg_aclcheck: class
\"
%s
\"
not found"
,
relname
);
/* an elog(WARN) kills us, so no need to return anything. */
}
if
(
!
heap_attisnull
(
htp
,
Anum_pg_class_relacl
))
{
...
...
@@ -472,8 +472,8 @@ pg_ownercheck(char *usename,
htp
=
SearchSysCacheTuple
(
USENAME
,
PointerGetDatum
(
usename
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
htp
))
elog
(
WARN
,
"pg_ownercheck: user
\"
%
-.*
s
\"
not found"
,
NAMEDATALEN
,
usename
);
elog
(
WARN
,
"pg_ownercheck: user
\"
%s
\"
not found"
,
usename
);
user_id
=
(
AclId
)
((
Form_pg_user
)
GETSTRUCT
(
htp
))
->
usesysid
;
/*
...
...
@@ -481,8 +481,8 @@ pg_ownercheck(char *usename,
*/
if
(((
Form_pg_user
)
GETSTRUCT
(
htp
))
->
usesuper
)
{
#ifdef ACLDEBUG_TRACE
elog
(
DEBUG
,
"pg_ownercheck: user
\"
%
-.*
s
\"
is superuser"
,
NAMEDATALEN
,
usename
);
elog
(
DEBUG
,
"pg_ownercheck: user
\"
%s
\"
is superuser"
,
usename
);
#endif
return
(
1
);
}
...
...
@@ -498,20 +498,20 @@ pg_ownercheck(char *usename,
break
;
case
PRONAME
:
if
(
!
HeapTupleIsValid
(
htp
))
elog
(
WARN
,
"pg_ownercheck: function
\"
%
-.*
s
\"
not found"
,
NAMEDATALEN
,
value
);
elog
(
WARN
,
"pg_ownercheck: function
\"
%s
\"
not found"
,
value
);
owner_id
=
((
Form_pg_proc
)
GETSTRUCT
(
htp
))
->
proowner
;
break
;
case
RELNAME
:
if
(
!
HeapTupleIsValid
(
htp
))
elog
(
WARN
,
"pg_ownercheck: class
\"
%
-.*
s
\"
not found"
,
NAMEDATALEN
,
value
);
elog
(
WARN
,
"pg_ownercheck: class
\"
%s
\"
not found"
,
value
);
owner_id
=
((
Form_pg_class
)
GETSTRUCT
(
htp
))
->
relowner
;
break
;
case
TYPNAME
:
if
(
!
HeapTupleIsValid
(
htp
))
elog
(
WARN
,
"pg_ownercheck: type
\"
%
-.*
s
\"
not found"
,
NAMEDATALEN
,
value
);
elog
(
WARN
,
"pg_ownercheck: type
\"
%s
\"
not found"
,
value
);
owner_id
=
((
TypeTupleForm
)
GETSTRUCT
(
htp
))
->
typowner
;
break
;
default:
...
...
@@ -535,8 +535,8 @@ pg_func_ownercheck(char *usename,
htp
=
SearchSysCacheTuple
(
USENAME
,
PointerGetDatum
(
usename
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
htp
))
elog
(
WARN
,
"pg_func_ownercheck: user
\"
%
-.*
s
\"
not found"
,
NAMEDATALEN
,
usename
);
elog
(
WARN
,
"pg_func_ownercheck: user
\"
%s
\"
not found"
,
usename
);
user_id
=
(
AclId
)
((
Form_pg_user
)
GETSTRUCT
(
htp
))
->
usesysid
;
/*
...
...
@@ -544,8 +544,8 @@ pg_func_ownercheck(char *usename,
*/
if
(((
Form_pg_user
)
GETSTRUCT
(
htp
))
->
usesuper
)
{
#ifdef ACLDEBUG_TRACE
elog
(
DEBUG
,
"pg_ownercheck: user
\"
%
-.*
s
\"
is superuser"
,
NAMEDATALEN
,
usename
);
elog
(
DEBUG
,
"pg_ownercheck: user
\"
%s
\"
is superuser"
,
usename
);
#endif
return
(
1
);
}
...
...
@@ -574,8 +574,8 @@ pg_aggr_ownercheck(char *usename,
htp
=
SearchSysCacheTuple
(
USENAME
,
PointerGetDatum
(
usename
),
0
,
0
,
0
);
if
(
!
HeapTupleIsValid
(
htp
))
elog
(
WARN
,
"pg_aggr_ownercheck: user
\"
%
-.*
s
\"
not found"
,
NAMEDATALEN
,
usename
);
elog
(
WARN
,
"pg_aggr_ownercheck: user
\"
%s
\"
not found"
,
usename
);
user_id
=
(
AclId
)
((
Form_pg_user
)
GETSTRUCT
(
htp
))
->
usesysid
;
/*
...
...
@@ -583,8 +583,8 @@ pg_aggr_ownercheck(char *usename,
*/
if
(((
Form_pg_user
)
GETSTRUCT
(
htp
))
->
usesuper
)
{
#ifdef ACLDEBUG_TRACE
elog
(
DEBUG
,
"pg_aggr_ownercheck: user
\"
%
-.*
s
\"
is superuser"
,
NAMEDATALEN
,
usename
);
elog
(
DEBUG
,
"pg_aggr_ownercheck: user
\"
%s
\"
is superuser"
,
usename
);
#endif
return
(
1
);
}
...
...
src/backend/tcop/utility.c
View file @
b99c63cf
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.
19 1997/08/18 02:14:52
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.
20 1997/08/18 20:53:35
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -171,8 +171,8 @@ ProcessUtility(Node *parsetree,
foreach
(
arg
,
args
)
{
relname
=
strVal
(
lfirst
(
arg
));
if
(
IsSystemRelationName
(
relname
))
elog
(
WARN
,
"class
\"
%
-.*
s
\"
is a system catalog"
,
NAMEDATALEN
,
relname
);
elog
(
WARN
,
"class
\"
%s
\"
is a system catalog"
,
relname
);
rel
=
heap_openr
(
relname
);
if
(
RelationIsValid
(
rel
)
)
{
...
...
@@ -188,8 +188,8 @@ ProcessUtility(Node *parsetree,
}
#ifndef NO_SECURITY
if
(
!
pg_ownercheck
(
userName
,
relname
,
RELNAME
))
elog
(
WARN
,
"you do not own class
\"
%
-.*
s
\"
"
,
NAMEDATALEN
,
relname
);
elog
(
WARN
,
"you do not own class
\"
%s
\"
"
,
relname
);
#endif
}
foreach
(
arg
,
args
)
{
...
...
@@ -318,8 +318,8 @@ ProcessUtility(Node *parsetree,
foreach
(
i
,
stmt
->
relNames
)
{
relname
=
strVal
(
lfirst
(
i
));
if
(
!
pg_ownercheck
(
userName
,
relname
,
RELNAME
))
elog
(
WARN
,
"you do not own class
\"
%
-.*
s
\"
"
,
NAMEDATALEN
,
relname
);
elog
(
WARN
,
"you do not own class
\"
%s
\"
"
,
relname
);
}
#endif
foreach
(
i
,
stmt
->
relNames
)
{
...
...
src/backend/utils/adt/name.c
View file @
b99c63cf
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.
4 1997/08/12 20:16:0
1 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.
5 1997/08/18 20:53:4
1 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -29,7 +29,8 @@
* namein - converts "..." to internal representation
*
* Note:
* Currently if strlen(s) < NAMEDATALEN, the extra chars are nulls
* [Old] Currently if strlen(s) < NAMEDATALEN, the extra chars are nulls
* Now, always NULL terminated
*/
NameData
*
namein
(
char
*
s
)
{
...
...
src/backend/utils/cache/relcache.c
View file @
b99c63cf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.1
2 1997/08/12 22:54:41
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.1
3 1997/08/18 20:53:48
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -284,7 +284,7 @@ BuildDescInfoError(RelationBuildDescInfo buildinfo)
sprintf(errBuf, "(relation id %d)", buildinfo.i.info_id);
break;
case INFO_RELNAME:
sprintf(errBuf, "(relation name %
.*s)", NAMEDATALEN
, buildinfo.i.info_name);
sprintf(errBuf, "(relation name %
s)"
, buildinfo.i.info_name);
break;
}
...
...
@@ -1282,8 +1282,8 @@ RelationForgetRelation (Oid rid)
prev
=
curr
;
}
if
(
curr
==
NIL
)
elog
(
FATAL
,
"Local relation %
.*
s not found in list"
,
NAMEDATALEN
,
(
RelationGetRelationName
(
relation
))
->
data
);
elog
(
FATAL
,
"Local relation %s not found in list"
,
(
RelationGetRelationName
(
relation
))
->
data
);
if
(
prev
==
NIL
)
newlyCreatedRelns
=
lnext
(
newlyCreatedRelns
);
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment