From 792db2fcf49497d04907aa6d2c39725c795803f4 Mon Sep 17 00:00:00 2001 From: Victor Kryukov Date: Tue, 24 Feb 2015 17:39:51 -0800 Subject: [PATCH] Better regexp for PG SQL identifiers --- src/pgsql/schema.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pgsql/schema.lisp b/src/pgsql/schema.lisp index 25a5bdc..d24ecc8 100644 --- a/src/pgsql/schema.lisp +++ b/src/pgsql/schema.lisp @@ -26,7 +26,7 @@ (cond ((quoted-p identifier) :none) - ((cl-ppcre:scan "[^A-Za-z_]" identifier) + ((not (cl-ppcre:scan "^[A-Za-z_][A-Za-z0-9_$]*$" identifier)) :quote) ((member lowercase-identifier *pgsql-reserved-keywords*