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
6ed1715b
Commit
6ed1715b
authored
Aug 03, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup for NAMEDATALEN use.
parent
ea210dc6
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
49 additions
and
49 deletions
+49
-49
src/backend/access/common/tupdesc.c
src/backend/access/common/tupdesc.c
+2
-2
src/backend/commands/async.c
src/backend/commands/async.c
+2
-2
src/backend/commands/cluster.c
src/backend/commands/cluster.c
+6
-6
src/backend/commands/creatinh.c
src/backend/commands/creatinh.c
+7
-6
src/backend/commands/define.c
src/backend/commands/define.c
+2
-2
src/backend/nodes/print.c
src/backend/nodes/print.c
+3
-3
src/backend/parser/analyze.c
src/backend/parser/analyze.c
+3
-3
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+3
-3
src/backend/storage/smgr/md.c
src/backend/storage/smgr/md.c
+2
-2
src/backend/utils/adt/acl.c
src/backend/utils/adt/acl.c
+2
-2
src/backend/utils/adt/name.c
src/backend/utils/adt/name.c
+4
-4
src/backend/utils/adt/oidname.c
src/backend/utils/adt/oidname.c
+2
-2
src/backend/utils/cache/relcache.c
src/backend/utils/cache/relcache.c
+1
-2
src/bin/psql/psql.c
src/bin/psql/psql.c
+2
-2
src/include/storage/buf_internals.h
src/include/storage/buf_internals.h
+5
-5
src/man/sql.l
src/man/sql.l
+3
-3
No files found.
src/backend/access/common/tupdesc.c
View file @
6ed1715b
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.1
1 1996/11/05 07:42:46 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.1
2 1997/08/03 02:34:19 momjian
Exp $
*
*
* NOTES
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
* some of the executor utility code such as "ExecTypeFromTL" should be
...
@@ -328,7 +328,7 @@ BuildDescForRelation(List *schema, char *relname)
...
@@ -328,7 +328,7 @@ BuildDescForRelation(List *schema, char *relname)
attnum
=
0
;
attnum
=
0
;
typename
=
palloc
(
NAMEDATALEN
+
1
);
typename
=
palloc
(
NAMEDATALEN
);
foreach
(
p
,
schema
)
{
foreach
(
p
,
schema
)
{
ColumnDef
*
entry
;
ColumnDef
*
entry
;
...
...
src/backend/commands/async.c
View file @
6ed1715b
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.1
3 1997/03/10 00:18:09 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.1
4 1997/08/03 02:34:34 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -456,8 +456,8 @@ Async_Listen(char *relname, int pid)
...
@@ -456,8 +456,8 @@ Async_Listen(char *relname, int pid)
* to unlisten prior to dying.
* to unlisten prior to dying.
*/
*/
relnamei
=
malloc
(
NAMEDATALEN
);
/* persists to process exit */
relnamei
=
malloc
(
NAMEDATALEN
);
/* persists to process exit */
memset
(
relnamei
,
0
,
NAMEDATALEN
);
strncpy
(
relnamei
,
relname
,
NAMEDATALEN
);
strncpy
(
relnamei
,
relname
,
NAMEDATALEN
);
relnamei
[
NAMEDATALEN
-
1
]
=
'\0'
;
on_exitpg
(
Async_UnlistenOnExit
,
(
caddr_t
)
relnamei
);
on_exitpg
(
Async_UnlistenOnExit
,
(
caddr_t
)
relnamei
);
}
}
...
...
src/backend/commands/cluster.c
View file @
6ed1715b
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.1
0 1997/01/10 20:17:0
5 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.1
1 1997/08/03 02:34:4
5 momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -83,10 +83,10 @@ cluster(char oldrelname[], char oldindexname[])
...
@@ -83,10 +83,10 @@ cluster(char oldrelname[], char oldindexname[])
Relation
OldHeap
,
OldIndex
;
Relation
OldHeap
,
OldIndex
;
Relation
NewHeap
;
Relation
NewHeap
;
char
NewIndexName
[
NAMEDATALEN
+
1
];
char
NewIndexName
[
NAMEDATALEN
];
char
NewHeapName
[
NAMEDATALEN
+
1
];
char
NewHeapName
[
NAMEDATALEN
];
char
saveoldrelname
[
NAMEDATALEN
+
1
];
char
saveoldrelname
[
NAMEDATALEN
];
char
saveoldindexname
[
NAMEDATALEN
+
1
];
char
saveoldindexname
[
NAMEDATALEN
];
/* Save the old names because they will get lost when the old relations
/* Save the old names because they will get lost when the old relations
...
@@ -258,7 +258,7 @@ copy_index(Oid OIDOldIndex, Oid OIDNewHeap)
...
@@ -258,7 +258,7 @@ copy_index(Oid OIDOldIndex, Oid OIDNewHeap)
Old_pg_index_relation_Form
=
Old_pg_index_relation_Form
=
(
Form_pg_class
)
GETSTRUCT
(
Old_pg_index_relation_Tuple
);
(
Form_pg_class
)
GETSTRUCT
(
Old_pg_index_relation_Tuple
);
NewIndexName
=
palloc
(
NAMEDATALEN
+
1
);
/* XXX */
NewIndexName
=
palloc
(
NAMEDATALEN
);
/* XXX */
sprintf
(
NewIndexName
,
"temp_%x"
,
OIDOldIndex
);
/* Set the name. */
sprintf
(
NewIndexName
,
"temp_%x"
,
OIDOldIndex
);
/* Set the name. */
/*
/*
...
...
src/backend/commands/creatinh.c
View file @
6ed1715b
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.
7 1997/08/02 19:09:3
3 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.
8 1997/08/03 02:34:5
3 momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -46,7 +46,7 @@ static void StoreCatalogInheritance(Oid relationId, List *supers);
...
@@ -46,7 +46,7 @@ static void StoreCatalogInheritance(Oid relationId, List *supers);
void
void
DefineRelation
(
CreateStmt
*
stmt
)
DefineRelation
(
CreateStmt
*
stmt
)
{
{
char
*
relname
=
palloc
(
NAMEDATALEN
+
1
);
char
*
relname
=
palloc
(
NAMEDATALEN
);
List
*
schema
=
stmt
->
tableElts
;
List
*
schema
=
stmt
->
tableElts
;
int
numberOfAttributes
;
int
numberOfAttributes
;
Oid
relationId
;
Oid
relationId
;
...
@@ -58,11 +58,12 @@ DefineRelation(CreateStmt *stmt)
...
@@ -58,11 +58,12 @@ DefineRelation(CreateStmt *stmt)
char
*
typename
=
NULL
;
/* the typename of this relation. not useod for now */
char
*
typename
=
NULL
;
/* the typename of this relation. not useod for now */
if
(
strlen
(
stmt
->
relname
)
>
NAMEDATALEN
)
if
(
strlen
(
stmt
->
relname
)
>
=
NAMEDATALEN
)
elog
(
WARN
,
"the relation name %s is > %d characters long"
,
stmt
->
relname
,
elog
(
WARN
,
"the relation name %s is >
=
%d characters long"
,
stmt
->
relname
,
NAMEDATALEN
);
NAMEDATALEN
);
strncpy
(
relname
,
stmt
->
relname
,
NAMEDATALEN
+
1
);
/* make full length for copy */
strncpy
(
relname
,
stmt
->
relname
,
NAMEDATALEN
);
/* make full length for copy */
relname
[
NAMEDATALEN
-
1
]
=
'\0'
;
/* ----------------
/* ----------------
* Handle parameters
* Handle parameters
* XXX parameter handling missing below.
* XXX parameter handling missing below.
...
...
src/backend/commands/define.c
View file @
6ed1715b
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.1
1 1996/11/30 17:47:07
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.1
2 1997/08/03 02:35:01
momjian Exp $
*
*
* DESCRIPTION
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
* The "DefineFoo" routines take the parse tree and pick out the
...
@@ -187,7 +187,7 @@ CreateFunction(ProcedureStmt *stmt, CommandDest dest)
...
@@ -187,7 +187,7 @@ CreateFunction(ProcedureStmt *stmt, CommandDest dest)
/* SQL that executes this function, if any */
/* SQL that executes this function, if any */
char
*
prorettype
;
char
*
prorettype
;
/* Type of return value (or member of set of values) from function */
/* Type of return value (or member of set of values) from function */
char
languageName
[
NAMEDATALEN
+
1
];
char
languageName
[
NAMEDATALEN
];
/* name of language of function, with case adjusted:
/* name of language of function, with case adjusted:
"C", "internal", or "SQL"
"C", "internal", or "SQL"
*/
*/
...
...
src/backend/nodes/print.c
View file @
6ed1715b
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.
3 1996/11/10 03:00:49
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.
4 1997/08/03 02:35:13
momjian Exp $
*
*
* HISTORY
* HISTORY
* AUTHOR DATE MAJOR EVENT
* AUTHOR DATE MAJOR EVENT
...
@@ -350,14 +350,14 @@ print_plan_recursive (Plan* p, Query *parsetree, int indentLevel, char* label)
...
@@ -350,14 +350,14 @@ print_plan_recursive (Plan* p, Query *parsetree, int indentLevel, char* label)
RangeTblEntry
*
rte
;
RangeTblEntry
*
rte
;
rte
=
rt_fetch
(((
Scan
*
)
p
)
->
scanrelid
,
parsetree
->
rtable
);
rte
=
rt_fetch
(((
Scan
*
)
p
)
->
scanrelid
,
parsetree
->
rtable
);
strncpy
(
extraInfo
,
rte
->
relname
,
NAMEDATALEN
);
strncpy
(
extraInfo
,
rte
->
relname
,
NAMEDATALEN
);
extraInfo
[
NAMEDATALEN
]
=
'\0'
;
extraInfo
[
NAMEDATALEN
-
1
]
=
'\0'
;
}
else
}
else
if
(
IsA
(
p
,
IndexScan
))
{
if
(
IsA
(
p
,
IndexScan
))
{
strncpy
(
extraInfo
,
strncpy
(
extraInfo
,
((
RangeTblEntry
*
)(
nth
(((
IndexScan
*
)
p
)
->
scan
.
scanrelid
-
1
,
((
RangeTblEntry
*
)(
nth
(((
IndexScan
*
)
p
)
->
scan
.
scanrelid
-
1
,
parsetree
->
rtable
)))
->
relname
,
parsetree
->
rtable
)))
->
relname
,
NAMEDATALEN
);
NAMEDATALEN
);
extraInfo
[
NAMEDATALEN
]
=
'\0'
;
extraInfo
[
NAMEDATALEN
-
1
]
=
'\0'
;
}
else
}
else
extraInfo
[
0
]
=
'\0'
;
extraInfo
[
0
]
=
'\0'
;
if
(
extraInfo
[
0
]
!=
'\0'
)
if
(
extraInfo
[
0
]
!=
'\0'
)
...
...
src/backend/parser/analyze.c
View file @
6ed1715b
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.
29 1997/07/30 04:42:26 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.
30 1997/08/03 02:35:28 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1003,9 +1003,9 @@ makeTargetNames(ParseState *pstate, List *cols)
...
@@ -1003,9 +1003,9 @@ makeTargetNames(ParseState *pstate, List *cols)
for
(
i
=
0
;
i
<
numcol
;
i
++
)
{
for
(
i
=
0
;
i
<
numcol
;
i
++
)
{
Ident
*
id
=
makeNode
(
Ident
);
Ident
*
id
=
makeNode
(
Ident
);
id
->
name
=
palloc
(
NAMEDATALEN
+
1
);
id
->
name
=
palloc
(
NAMEDATALEN
);
strncpy
(
id
->
name
,
attr
[
i
]
->
attname
.
data
,
NAMEDATALEN
);
strncpy
(
id
->
name
,
attr
[
i
]
->
attname
.
data
,
NAMEDATALEN
);
id
->
name
[
NAMEDATALEN
]
=
'\0'
;
id
->
name
[
NAMEDATALEN
-
1
]
=
'\0'
;
id
->
indirection
=
NIL
;
id
->
indirection
=
NIL
;
id
->
isRel
=
false
;
id
->
isRel
=
false
;
if
(
tl
==
NIL
)
if
(
tl
==
NIL
)
...
...
src/backend/postmaster/postmaster.c
View file @
6ed1715b
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.4
8 1997/07/30 14:08:11 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.4
9 1997/08/03 02:36:01 momjian
Exp $
*
*
* NOTES
* NOTES
*
*
...
@@ -625,7 +625,7 @@ ConnStartup(Port *port, int *status,
...
@@ -625,7 +625,7 @@ ConnStartup(Port *port, int *status,
char
*
errormsg
,
const
int
errormsg_len
)
char
*
errormsg
,
const
int
errormsg_len
)
{
{
MsgType
msgType
;
MsgType
msgType
;
char
namebuf
[
NAMEDATALEN
+
1
];
char
namebuf
[
NAMEDATALEN
];
int
pid
;
int
pid
;
PacketBuf
*
p
;
PacketBuf
*
p
;
StartupInfo
sp
;
StartupInfo
sp
;
...
@@ -653,7 +653,7 @@ ConnStartup(Port *port, int *status,
...
@@ -653,7 +653,7 @@ ConnStartup(Port *port, int *status,
msgType
=
(
MsgType
)
ntohl
(
port
->
buf
.
msgtype
);
msgType
=
(
MsgType
)
ntohl
(
port
->
buf
.
msgtype
);
(
void
)
strncpy
(
namebuf
,
sp
.
user
,
NAMEDATALEN
);
(
void
)
strncpy
(
namebuf
,
sp
.
user
,
NAMEDATALEN
);
namebuf
[
NAMEDATALEN
]
=
'\0'
;
namebuf
[
NAMEDATALEN
-
1
]
=
'\0'
;
if
(
!
namebuf
[
0
])
{
if
(
!
namebuf
[
0
])
{
strncpy
(
errormsg
,
strncpy
(
errormsg
,
"No Postgres username specified in startup packet."
,
"No Postgres username specified in startup packet."
,
...
...
src/backend/storage/smgr/md.c
View file @
6ed1715b
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.1
4 1997/07/24 20:14:41
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.1
5 1997/08/03 02:36:22
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -167,8 +167,8 @@ mdunlink(Relation reln)
...
@@ -167,8 +167,8 @@ mdunlink(Relation reln)
** to do this.
** to do this.
*/
*/
memset
(
fname
,
0
,
NAMEDATALEN
);
strncpy
(
fname
,
RelationGetRelationName
(
reln
)
->
data
,
NAMEDATALEN
);
strncpy
(
fname
,
RelationGetRelationName
(
reln
)
->
data
,
NAMEDATALEN
);
fname
[
NAMEDATALEN
-
1
]
=
'\0'
;
if
(
FileNameUnlink
(
fname
)
<
0
)
if
(
FileNameUnlink
(
fname
)
<
0
)
return
(
SM_FAIL
);
return
(
SM_FAIL
);
...
...
src/backend/utils/adt/acl.c
View file @
6ed1715b
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.1
0 1997/07/24 20:15:36
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.1
1 1997/08/03 02:36:41
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -85,7 +85,7 @@ char *
...
@@ -85,7 +85,7 @@ char *
aclparse
(
char
*
s
,
AclItem
*
aip
,
unsigned
*
modechg
)
aclparse
(
char
*
s
,
AclItem
*
aip
,
unsigned
*
modechg
)
{
{
HeapTuple
htp
;
HeapTuple
htp
;
char
name
[
NAMEDATALEN
+
1
];
char
name
[
NAMEDATALEN
];
Assert
(
s
&&
aip
&&
modechg
);
Assert
(
s
&&
aip
&&
modechg
);
...
...
src/backend/utils/adt/name.c
View file @
6ed1715b
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.
2 1997/03/14 23:20:43 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.
3 1997/08/03 02:36:57 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -39,8 +39,8 @@ NameData *namein(char *s)
...
@@ -39,8 +39,8 @@ NameData *namein(char *s)
return
(
NULL
);
return
(
NULL
);
result
=
(
NameData
*
)
palloc
(
NAMEDATALEN
);
result
=
(
NameData
*
)
palloc
(
NAMEDATALEN
);
/* always keep it null-padded */
/* always keep it null-padded */
memset
(
result
->
data
,
0
,
NAMEDATALEN
);
(
void
)
strncpy
(
result
->
data
,
s
,
NAMEDATALEN
);
(
void
)
strncpy
(
result
->
data
,
s
,
NAMEDATALEN
-
1
)
;
result
->
data
[
NAMEDATALEN
-
1
]
=
'\0'
;
return
(
result
);
return
(
result
);
}
}
...
@@ -145,8 +145,8 @@ namestrcpy(Name name, char *str)
...
@@ -145,8 +145,8 @@ namestrcpy(Name name, char *str)
{
{
if
(
!
name
||
!
str
)
if
(
!
name
||
!
str
)
return
(
-
1
);
return
(
-
1
);
memset
(
name
->
data
,
0
,
sizeof
(
NameData
));
(
void
)
strncpy
(
name
->
data
,
str
,
NAMEDATALEN
);
(
void
)
strncpy
(
name
->
data
,
str
,
NAMEDATALEN
);
name
->
data
[
NAMEDATALEN
-
1
]
=
'\0'
;
return
(
0
);
return
(
0
);
}
}
...
...
src/backend/utils/adt/oidname.c
View file @
6ed1715b
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidname.c,v 1.
2 1996/11/06 06:49:56 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidname.c,v 1.
3 1997/08/03 02:37:08 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -35,7 +35,7 @@ oidnamein(char *inStr)
...
@@ -35,7 +35,7 @@ oidnamein(char *inStr)
if
(
*
inptr
)
{
if
(
*
inptr
)
{
oc
->
id
=
(
Oid
)
pg_atoi
(
inStr
,
sizeof
(
Oid
),
','
);
oc
->
id
=
(
Oid
)
pg_atoi
(
inStr
,
sizeof
(
Oid
),
','
);
/* copy one less to ensure null-padding */
/* copy one less to ensure null-padding */
strncpy
(
oc
->
name
.
data
,
++
inptr
,
NAMEDATALEN
-
1
);
strncpy
(
oc
->
name
.
data
,
++
inptr
,
NAMEDATALEN
);
/* namestrcpy(&oc->name, ++inptr); */
/* namestrcpy(&oc->name, ++inptr); */
}
else
}
else
elog
(
WARN
,
"Bad input data for type oidname"
);
elog
(
WARN
,
"Bad input data for type oidname"
);
...
...
src/backend/utils/cache/relcache.c
View file @
6ed1715b
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.1
0 1997/07/28 00:56:04
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.1
1 1997/08/03 02:37:32
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1066,7 +1066,6 @@ RelationNameCacheGetRelation(char *relationName)
...
@@ -1066,7 +1066,6 @@ RelationNameCacheGetRelation(char *relationName)
/* make sure that the name key used for hash lookup is properly
/* make sure that the name key used for hash lookup is properly
null-padded */
null-padded */
memset
(
&
name
,
0
,
NAMEDATALEN
);
namestrcpy
(
&
name
,
relationName
);
namestrcpy
(
&
name
,
relationName
);
RelationNameCacheLookup
(
name
.
data
,
rd
);
RelationNameCacheLookup
(
name
.
data
,
rd
);
...
...
src/bin/psql/psql.c
View file @
6ed1715b
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.8
0 1997/08/01 04:07:55
momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.8
1 1997/08/03 02:37:58
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -835,7 +835,7 @@ do_copy(const char *args, PsqlSettings * settings)
...
@@ -835,7 +835,7 @@ do_copy(const char *args, PsqlSettings * settings)
/* The direction of the copy is from a file to a table. */
/* The direction of the copy is from a file to a table. */
char
file
[
MAXPATHLEN
+
1
];
char
file
[
MAXPATHLEN
+
1
];
/* The pathname of the file from/to which we copy */
/* The pathname of the file from/to which we copy */
char
table
[
NAMEDATALEN
+
1
];
char
table
[
NAMEDATALEN
];
/* The name of the table from/to which we copy */
/* The name of the table from/to which we copy */
bool
syntax_error
;
bool
syntax_error
;
/* The \c command has invalid syntax */
/* The \c command has invalid syntax */
...
...
src/include/storage/buf_internals.h
View file @
6ed1715b
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: buf_internals.h,v 1.1
2 1997/03/28 07:06:48 scrappy
Exp $
* $Id: buf_internals.h,v 1.1
3 1997/08/03 02:38:25 momjian
Exp $
*
*
* NOTE
* NOTE
* If BUFFERPAGE0 is defined, then 0 will be used as a
* If BUFFERPAGE0 is defined, then 0 will be used as a
...
@@ -118,10 +118,10 @@ struct sbufdesc_unpadded {
...
@@ -118,10 +118,10 @@ struct sbufdesc_unpadded {
#ifdef HAS_TEST_AND_SET
#ifdef HAS_TEST_AND_SET
slock_t
io_in_progress_lock
;
slock_t
io_in_progress_lock
;
#endif
/* HAS_TEST_AND_SET */
#endif
/* HAS_TEST_AND_SET */
char
sb_dbname
[
NAMEDATALEN
+
1
];
char
sb_dbname
[
NAMEDATALEN
];
/* NOTE NO PADDING OF THE MEMBER HERE */
/* NOTE NO PADDING OF THE MEMBER HERE */
char
sb_relname
[
NAMEDATALEN
+
1
];
char
sb_relname
[
NAMEDATALEN
];
};
};
/* THE REAL STRUCTURE - the structure above must match it, minus sb_pad */
/* THE REAL STRUCTURE - the structure above must match it, minus sb_pad */
...
@@ -143,7 +143,7 @@ struct sbufdesc {
...
@@ -143,7 +143,7 @@ struct sbufdesc {
slock_t
io_in_progress_lock
;
slock_t
io_in_progress_lock
;
#endif
/* HAS_TEST_AND_SET */
#endif
/* HAS_TEST_AND_SET */
char
sb_dbname
[
NAMEDATALEN
+
1
];
/* name of db in which buf belongs */
char
sb_dbname
[
NAMEDATALEN
];
/* name of db in which buf belongs */
/*
/*
* I padded this structure to a power of 2 (PADDED_SBUFDESC_SIZE) because
* I padded this structure to a power of 2 (PADDED_SBUFDESC_SIZE) because
...
@@ -159,7 +159,7 @@ struct sbufdesc {
...
@@ -159,7 +159,7 @@ struct sbufdesc {
/* please, don't take the sizeof() this member and use it for
/* please, don't take the sizeof() this member and use it for
something important */
something important */
char
sb_relname
[
NAMEDATALEN
+
1
+
/* name of reln */
char
sb_relname
[
NAMEDATALEN
+
/* name of reln */
PADDED_SBUFDESC_SIZE
-
sizeof
(
struct
sbufdesc_unpadded
)];
PADDED_SBUFDESC_SIZE
-
sizeof
(
struct
sbufdesc_unpadded
)];
};
};
...
...
src/man/sql.l
View file @
6ed1715b
.\" This is -*-nroff-*-
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/sql.l,v 1.
3 1996/12/11 00:28:11
momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/sql.l,v 1.
4 1997/08/03 02:38:47
momjian Exp $
.TH INTRODUCTION SQL 11/5/95 PostgreSQL PostgreSQL
.TH INTRODUCTION SQL 11/5/95 PostgreSQL PostgreSQL
.SH "Section 4 \(em SQL Commands (COMMANDS)"
.SH "Section 4 \(em SQL Commands (COMMANDS)"
.SH "General Information"
.SH "General Information"
...
@@ -19,9 +19,9 @@ of the line e.g:
...
@@ -19,9 +19,9 @@ of the line e.g:
.fi
.fi
.SH "Names"
.SH "Names"
.IR Names
.IR Names
in SQL are sequences of
not more
than NAMEDATALEN alphanumeric characters,
in SQL are sequences of
less
than NAMEDATALEN alphanumeric characters,
starting with an alphabetic character. By default, NAMEDATALEN is set
starting with an alphabetic character. By default, NAMEDATALEN is set
to
16
, but at the time the system is built, NAMEDATALEN can be changed
to
32
, but at the time the system is built, NAMEDATALEN can be changed
by changing the #ifdef in src/backend/include/postgres.h. Underscore
by changing the #ifdef in src/backend/include/postgres.h. Underscore
(\*(lq_\*(rq) is considered an alphabetic character.
(\*(lq_\*(rq) is considered an alphabetic character.
.SH "Keywords"
.SH "Keywords"
...
...
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