Document quote_ident and quote_literal in the main list of string functions,
authorTom Lane
Mon, 24 Jun 2002 22:17:01 +0000 (22:17 +0000)
committerTom Lane
Mon, 24 Jun 2002 22:17:01 +0000 (22:17 +0000)
as suggested by Josh Berkus.

doc/src/sgml/func.sgml

index 4c30789eff4166c26e185c4b34076a572d733d48..b32bcbaa82ef58de27fa081fcd7f5cc2cd26dd52 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -1081,6 +1081,32 @@ PostgreSQL documentation
        SQL_ASCII
       
 
+      
+       quote_ident(string text)
+       text
+       
+        Returns the given string suitably quoted to be used as an identifier
+   in an SQL query string.
+   Quotes are added only if necessary (i.e., if the string contains
+   non-identifier characters or would be case-folded).
+   Embedded quotes are properly doubled.
+       
+       quote_ident('Foo')
+       "Foo"
+      
+
+      
+       quote_literal(string text)
+       text
+       
+        Returns the given string suitably quoted to be used as a literal
+   in an SQL query string.
+   Embedded quotes and backslashes are properly doubled.
+       
+       quote_literal('O\'Reilly')
+       'O''Reilly'
+      
+
       
        repeat(textinteger)
        text