Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e4f34f

Browse files
committed
Document that NAMEDATALEN must be a multiple of sizeof(int).
1 parente4f06dc commit1e4f34f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

‎src/include/c.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $Id: c.h,v 1.119 2002/04/25 02:56:56 tgl Exp $
15+
* $Id: c.h,v 1.120 2002/04/30 19:53:03 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -420,7 +420,9 @@ typedef Oid oidvector[INDEX_MAX_KEYS];
420420
/*
421421
* We want NameData to have length NAMEDATALEN and int alignment,
422422
* because that's how the data type 'name' is defined in pg_type.
423-
* Use a union to make sure the compiler agrees.
423+
* Use a union to make sure the compiler agrees. Note that NAMEDATALEN
424+
* must be a multiple of sizeof(int), else sizeof(NameData) will probably
425+
* not come out equal to NAMEDATALEN.
424426
*/
425427
typedefunionnameData
426428
{

‎src/include/postgres_ext.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*use header files that are otherwise internal to Postgres to interface
1616
*with the backend.
1717
*
18-
* $Id: postgres_ext.h,v 1.9 2001/10/28 06:25:59 momjian Exp $
18+
* $Id: postgres_ext.h,v 1.10 2002/04/30 19:53:03 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -36,7 +36,8 @@ typedef unsigned int Oid;
3636

3737
/*
3838
* NAMEDATALEN is the max length for system identifiers (e.g. table names,
39-
* attribute names, function names, etc.)
39+
* attribute names, function names, etc). It must be a multiple of
40+
* sizeof(int) (typically 4).
4041
*
4142
* NOTE that databases with different NAMEDATALEN's cannot interoperate!
4243
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp