mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
Fix whitespace and indentation.
This commit is contained in:
parent
c38ef4c235
commit
47288d2818
@ -8,9 +8,8 @@
|
||||
|
||||
(defun quoted-p (s)
|
||||
"Return true if s is a double-quoted string"
|
||||
(and
|
||||
(eq (char s 0) #\")
|
||||
(eq (char s (- (length s) 1)) #\")))
|
||||
(and (eq (char s 0) #\")
|
||||
(eq (char s (- (length s) 1)) #\")))
|
||||
|
||||
(defun apply-identifier-case (identifier)
|
||||
"Return given IDENTIFIER with CASE handled to be PostgreSQL compatible."
|
||||
@ -24,9 +23,8 @@
|
||||
;; SQL identifiers and key words must begin with a letter (a-z, but
|
||||
;; also letters with diacritical marks and non-Latin letters) or an
|
||||
;; underscore (_).
|
||||
(cond
|
||||
((quoted-p identifier)
|
||||
:none)
|
||||
(cond ((quoted-p identifier)
|
||||
:none)
|
||||
|
||||
((cl-ppcre:scan "^[^A-Za-z_]" identifier)
|
||||
:quote)
|
||||
@ -44,8 +42,8 @@
|
||||
|
||||
(ecase *identifier-case*
|
||||
(:downcase lowercase-identifier)
|
||||
(:quote (format nil "\"~a\""
|
||||
(cl-ppcre:regex-replace-all "\"" identifier "\"\"")))
|
||||
(:quote (format nil "\"~a\""
|
||||
(cl-ppcre:regex-replace-all "\"" identifier "\"\"")))
|
||||
(:none identifier))))
|
||||
|
||||
;;;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user