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

Commit788af6f

Browse files
committed
Move atooid() definition to a central place
1 parentb5a3883 commit788af6f

File tree

12 files changed

+4
-23
lines changed

12 files changed

+4
-23
lines changed

‎contrib/lo/lo.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
PG_MODULE_MAGIC;
1616

17-
#defineatooid(x) ((Oid) strtoul((x), NULL, 10))
18-
1917

2018
/*
2119
* This is the trigger that protects us from orphaned large objects

‎contrib/vacuumlo/vacuumlo.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
#include"libpq-fe.h"
2525
#include"pg_getopt.h"
2626

27-
#defineatooid(x) ((Oid) strtoul((x), NULL, 10))
28-
2927
#defineBUFSIZE1024
3028

3129
enumtrivalue

‎src/backend/bootstrap/bootparse.y

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@
5151
#include"tcop/dest.h"
5252
#include"utils/rel.h"
5353

54-
#defineatooid(x)((Oid) strtoul((x),NULL,10))
55-
5654

5755
/*
5856
* Bison doesn't allocate anything that needs to live across parser calls,

‎src/backend/libpq/hba.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@
5252
#endif
5353

5454

55-
#defineatooid(x) ((Oid) strtoul((x), NULL, 10))
56-
#defineatoxid(x) ((TransactionId) strtoul((x), NULL, 10))
57-
5855
#defineMAX_TOKEN256
5956
#defineMAX_LINE8192
6057

‎src/backend/nodes/readfuncs.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@
164164
*/
165165
#defineatoui(x) ((unsigned int) strtoul((x), NULL, 10))
166166

167-
#defineatooid(x) ((Oid) strtoul((x), NULL, 10))
168-
169167
#definestrtobool(x) ((*(x) == 't') ? true : false)
170168

171169
#definenullable_string(token,length) \

‎src/backend/utils/adt/misc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@
4444
#include"utils/builtins.h"
4545
#include"utils/timestamp.h"
4646

47-
#defineatooid(x) ((Oid) strtoul((x), NULL, 10))
48-
4947

5048
/*
5149
* Common subroutine for num_nulls() and num_nonnulls().

‎src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
#include"streamutil.h"
4040

4141

42-
#defineatooid(x) ((Oid) strtoul((x), NULL, 10))
43-
4442
typedefstructTablespaceListCell
4543
{
4644
structTablespaceListCell*next;

‎src/bin/pg_upgrade/pg_upgrade.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ extern char *output_files[];
9797
#defineCLUSTER_NAME(cluster)((cluster) == &old_cluster ? "old" : \
9898
(cluster) == &new_cluster ? "new" : "none")
9999

100-
#defineatooid(x) ((Oid) strtoul((x), NULL, 10))
101-
102100
/* OID system catalog preservation added during PG 9.0 development */
103101
#defineTABLE_SPACE_SUBDIRS_CAT_VER 201001111
104102
/* postmaster/postgres -b (binary_upgrade) flag added during PG 9.1 development */

‎src/bin/psql/common.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
#include"libpq-fe.h"
1414
#include"fe_utils/print.h"
1515

16-
#defineatooid(x) ((Oid) strtoul((x), NULL, 10))
17-
1816
externboolopenQueryOutputFile(constchar*fname,FILE**fout,bool*is_pipe);
1917
externboolsetQFout(constchar*fname);
2018

‎src/bin/scripts/droplang.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#include"common.h"
1515
#include"fe_utils/print.h"
1616

17-
#defineatooid(x) ((Oid) strtoul((x), NULL, 10))
18-
1917

2018
staticvoidhelp(constchar*progname);
2119

‎src/include/fe_utils/string_utils.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
#include"libpq-fe.h"
2020
#include"pqexpbuffer.h"
2121

22-
#defineatooid(x) ((Oid) strtoul((x), NULL, 10))
23-
2422
/* Global variables controlling behavior of fmtId() and fmtQualifiedId() */
2523
externintquote_all_identifiers;
2624
externPQExpBuffer (*getLocalPQExpBuffer) (void);

‎src/include/postgres_ext.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ typedef unsigned int Oid;
3939
#defineOID_MAX UINT_MAX
4040
/* you will need to include <limits.h> to use the above #define */
4141

42+
#defineatooid(x) ((Oid) strtoul((x), NULL, 10))
43+
/* the above needs <stdlib.h> */
44+
45+
4246
/* Define a signed 64-bit integer type for use in client API declarations. */
4347
typedefPG_INT64_TYPEpg_int64;
4448

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp