From: Tom Lane Date: Mon, 24 Jun 2002 22:17:01 +0000 (+0000) Subject: Document quote_ident and quote_literal in the main list of string functions, X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=744e241a7f449bfe6cbdb649fb8428896d815da1;p=users%2Fbernd%2Fpostgres.git Document quote_ident and quote_literal in the main list of string functions, as suggested by Josh Berkus. --- diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 9bfee877e4..d97c739325 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -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(text, integer) text