9.0 compile fix - ScanKeywordLookup has 3 args now
authorMarko Kreen <markokr@gmail.com>
Fri, 18 Jun 2010 15:09:05 +0000 (15:09 +0000)
committerMarko Kreen <markokr@gmail.com>
Fri, 18 Jun 2010 15:09:05 +0000 (15:09 +0000)
Original patch by Devrim GÜNDÜZ, but replaced autoconf
checking with version checking.

sql/logtriga/textbuf.c
sql/pgq/triggers/stringutil.c

index bb3e0127e44cde0d7b738c0e24306b4b982bd432..852dd32ac4edcc061ada2b6cce606cb1159aa373 100644 (file)
@@ -277,7 +277,12 @@ quote_ident(char *dst, const uint8 *src, int srclen)
                  * Note: ScanKeywordLookup() does case-insensitive comparison, but
                  * that's fine, since we already know we have all-lower-case.
                  */
-                if (ScanKeywordLookup(ident) != NULL)
+#if defined(PG_VERSION_NUM) && PG_VERSION_NUM >= 90000
+               if (ScanKeywordLookup(ident, ScanKeywords, NumScanKeywords) != NULL)
+#else
+               if (ScanKeywordLookup(ident) != NULL)
+#endif
+
                         safe = false;
         }
 
index c314b19e2634cfc65c86ea71ff09ef21b8ac0015..98651640059fdb6f42705ba5086ff584884d14b2 100644 (file)
@@ -199,7 +199,11 @@ pgq_quote_ident(char *dst, const uint8 *src, int srclen)
                 * Note: ScanKeywordLookup() does case-insensitive comparison, but
                 * that's fine, since we already know we have all-lower-case.
                 */
+#if defined(PG_VERSION_NUM) && PG_VERSION_NUM >= 90000
+               if (ScanKeywordLookup(ident, ScanKeywords, NumScanKeywords) != NULL)
+#else
                if (ScanKeywordLookup(ident) != NULL)
+#endif
                        safe = false;
        }