Add a comment to need_insert_lock() if the query being used to check
authorTatsuo Ishii <ishii at sraoss.co.jp>
Sat, 7 Mar 2009 09:19:58 +0000 (09:19 +0000)
committerTatsuo Ishii <ishii at sraoss.co.jp>
Sat, 7 Mar 2009 09:19:58 +0000 (09:19 +0000)
if the table has SERIAL column is valid for PostgreSQL 7.3 to 8.3.

pool_process_query.c

index 321d2b5155e3b10f1403121977c14708793032eb..281216296c511165d7884424c5428390ab9a59d3 100644 (file)
@@ -3031,6 +3031,10 @@ POOL_STATUS do_query(POOL_CONNECTION *backend, char *query, POOL_SELECT_RESULT *
  */
 int need_insert_lock(POOL_CONNECTION_POOL *backend, char *query, Node *node)
 {
+/*
+ * Query to know if the target table has SERIAL column or not.
+ * This query is valid through PostgreSQL 7.3 to 8.3.
+ */
 #define NEXTVALQUERY "SELECT count(*) FROM pg_catalog.pg_attrdef AS d, pg_catalog.pg_class AS c WHERE d.adrelid = c.oid AND d.adsrc ~ 'nextval' AND c.relname = '%s'"
 
 #define INSERT_STATEMENT_MAX_CACHE             16