diff options
| author | Pavan Deolasee | 2010-05-13 01:55:34 +0000 |
|---|---|---|
| committer | Pavan Deolasee | 2011-05-19 16:38:46 +0000 |
| commit | 3741e829e5b045120d9c6077c32a27375cfafa02 (patch) | |
| tree | d0170fcc6f2f554743b9f05e3eeead1d6c1d6fd4 /src/include | |
| parent | 458f2058e628fe721b3d5fd42f7038a1403d97cc (diff) | |
Fix some stylistic issues with the code. Trying to make it more
consistent in general and with Postgres code in particular
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/pgxc/locator.h | 16 | ||||
| -rw-r--r-- | src/include/pgxc/planner.h | 15 | ||||
| -rw-r--r-- | src/include/pgxc/poolcomm.h | 20 | ||||
| -rw-r--r-- | src/include/pgxc/poolmgr.h | 18 |
4 files changed, 34 insertions, 35 deletions
diff --git a/src/include/pgxc/locator.h b/src/include/pgxc/locator.h index 46a8f9ec58..5fea37a019 100644 --- a/src/include/pgxc/locator.h +++ b/src/include/pgxc/locator.h @@ -39,7 +39,7 @@ typedef struct int nodeCount; List *nodeList; ListCell *roundRobinNode; /* points to next one to use */ -} RelationLocInfo; +} RelationLocInfo; /* track if tables use pg_catalog */ @@ -63,21 +63,21 @@ typedef struct List *nodelist; char baselocatortype; TableUsageType tableusagetype; /* track pg_catalog usage */ -} Exec_Nodes; +} Exec_Nodes; extern char *PreferredDataNodes; -extern void InitRelationLocInfo(); +extern void InitRelationLocInfo(void); extern char GetLocatorType(Oid relid); extern char ConvertToLocatorType(int disttype); -extern char *GetRelationHashColumn(RelationLocInfo * rel_loc_info); +extern char *GetRelationHashColumn(RelationLocInfo *rel_loc_info); extern RelationLocInfo *GetRelationLocInfo(Oid relid); -extern RelationLocInfo *CopyRelationLocInfo(RelationLocInfo * src_info); -extern Exec_Nodes *GetRelationNodes(RelationLocInfo * rel_loc_info, long *partValue, +extern RelationLocInfo *CopyRelationLocInfo(RelationLocInfo *src_info); +extern Exec_Nodes *GetRelationNodes(RelationLocInfo *rel_loc_info, long *partValue, int isRead); -extern bool IsHashColumn(RelationLocInfo * rel_loc_info, char *part_col_name); +extern bool IsHashColumn(RelationLocInfo *rel_loc_info, char *part_col_name); extern bool IsHashColumnForRelId(Oid relid, char *part_col_name); extern int GetRoundRobinNode(Oid relid); @@ -85,6 +85,6 @@ extern bool IsHashDistributable(Oid col_type); extern List *GetAllNodes(void); extern List *GetAnyDataNode(void); extern void RelationBuildLocator(Relation rel); -extern void FreeRelationLocInfo(RelationLocInfo * relationLocInfo); +extern void FreeRelationLocInfo(RelationLocInfo *relationLocInfo); #endif /* LOCATOR_H */ diff --git a/src/include/pgxc/planner.h b/src/include/pgxc/planner.h index 04ec6fcc0e..0da4472c91 100644 --- a/src/include/pgxc/planner.h +++ b/src/include/pgxc/planner.h @@ -34,7 +34,7 @@ typedef struct CombineType combine_type; List *simple_aggregates; /* simple aggregate to combine on this * step */ -} Query_Step; +} Query_Step; /* @@ -47,7 +47,7 @@ typedef struct int exec_loc_type; bool force_autocommit; /* For CREATE DATABASE */ List *query_step_list; /* List of QuerySteps */ -} Query_Plan; +} Query_Plan; /* For handling simple aggregates (no group by present) @@ -60,7 +60,7 @@ typedef enum AGG_TYPE_COUNT, AGG_TYPE_SUM, AGG_TYPE_AVG -} SimpleAggType; +} SimpleAggType; /* For handling simple aggregates */ @@ -74,7 +74,7 @@ typedef struct int data_len; int agg_data_type; int response_count; -} SimpleAgg; +} SimpleAgg; /* forbid SQL if unsafe, useful to turn off for development */ extern bool StrictStatementChecking; @@ -82,10 +82,9 @@ extern bool StrictStatementChecking; /* forbid SELECT even multi-node ORDER BY */ extern bool StrictSelectChecking; -extern Query_Plan * - GetQueryPlan(Node *parsetree, const char *sql_statement, List *querytree_list); -extern void - FreeQueryPlan(Query_Plan * query_plan); +extern Query_Plan *GetQueryPlan(Node *parsetree, const char *sql_statement, + List *querytree_list); +extern void FreeQueryPlan(Query_Plan *query_plan); extern bool IsHashDistributable(Oid col_type); #endif /* PGXCPLANNER_H */ diff --git a/src/include/pgxc/poolcomm.h b/src/include/pgxc/poolcomm.h index 3c62f0662e..9e286ab292 100644 --- a/src/include/pgxc/poolcomm.h +++ b/src/include/pgxc/poolcomm.h @@ -32,18 +32,18 @@ typedef struct /* send buffer */ int SendPointer; char SendBuffer[POOL_BUFFER_SIZE]; -} PoolPort; +} PoolPort; extern int pool_listen(unsigned short port, const char *unixSocketName); extern int pool_connect(unsigned short port, const char *unixSocketName); -extern int pool_getbyte(PoolPort * port); -extern int pool_pollbyte(PoolPort * port); -extern int pool_getmessage(PoolPort * port, StringInfo s, int maxlen); -extern int pool_getbytes(PoolPort * port, char *s, size_t len); -extern int pool_putmessage(PoolPort * port, char msgtype, const char *s, size_t len); -extern int pool_putbytes(PoolPort * port, const char *s, size_t len); -extern int pool_flush(PoolPort * port); -extern int pool_sendfds(PoolPort * port, int *fds, int count); -extern int pool_recvfds(PoolPort * port, int *fds, int count); +extern int pool_getbyte(PoolPort *port); +extern int pool_pollbyte(PoolPort *port); +extern int pool_getmessage(PoolPort *port, StringInfo s, int maxlen); +extern int pool_getbytes(PoolPort *port, char *s, size_t len); +extern int pool_putmessage(PoolPort *port, char msgtype, const char *s, size_t len); +extern int pool_putbytes(PoolPort *port, const char *s, size_t len); +extern int pool_flush(PoolPort *port); +extern int pool_sendfds(PoolPort *port, int *fds, int count); +extern int pool_recvfds(PoolPort *port, int *fds, int count); #endif /* POOLCOMM_H */ diff --git a/src/include/pgxc/poolmgr.h b/src/include/pgxc/poolmgr.h index 6e88fca3bc..2c9128e7c7 100644 --- a/src/include/pgxc/poolmgr.h +++ b/src/include/pgxc/poolmgr.h @@ -30,14 +30,14 @@ typedef struct char *port; char *uname; char *password; -} DataNodeConnectionInfo; +} DataNodeConnectionInfo; /* Connection pool entry */ typedef struct { struct timeval released; NODE_CONNECTION *conn; -} DataNodePoolSlot; +} DataNodePoolSlot; /* Pool of connections to specified data nodes */ typedef struct @@ -46,7 +46,7 @@ typedef struct int freeSize; /* available connections */ int size; /* total pool size */ DataNodePoolSlot **slot; -} DataNodePool; +} DataNodePool; /* All pools for specified database */ typedef struct databasepool @@ -55,7 +55,7 @@ typedef struct databasepool char *database; DataNodePool **nodePools; /* one for each data node */ struct databasepool *next; -} DatabasePool; +} DatabasePool; /* Agent of client session (Pool Manager side) * Acts as a session manager, grouping connections together @@ -66,14 +66,14 @@ typedef struct PoolPort port; DatabasePool *pool; DataNodePoolSlot **connections; /* one for each data node */ -} PoolAgent; +} PoolAgent; /* Handle to the pool manager (Session's side) */ typedef struct { /* communication channel */ PoolPort port; -} PoolHandle; +} PoolHandle; extern int NumDataNodes; extern int MinPoolSize; @@ -107,19 +107,19 @@ extern PoolHandle *GetPoolManagerHandle(void); * Called from Postmaster(Coordinator) after fork. Close one end of the pipe and * free memory occupied by PoolHandler */ -extern void PoolManagerCloseHandle(PoolHandle * handle); +extern void PoolManagerCloseHandle(PoolHandle *handle); /* * Gracefully close connection to the PoolManager */ -extern void PoolManagerDisconnect(PoolHandle * handle); +extern void PoolManagerDisconnect(PoolHandle *handle); /* * Called from Session process after fork(). Associate handle with session * for subsequent calls. Associate session with specified database and * initialize respective connection pool */ -extern void PoolManagerConnect(PoolHandle * handle, const char *database, List *nodes); +extern void PoolManagerConnect(PoolHandle *handle, const char *database); /* Get pooled connections */ extern int *PoolManagerGetConnections(List *nodelist); |
