mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-24 18:55:04 +08:00
Document quote_ident and quote_literal in the main list of string functions,
as suggested by Josh Berkus.
This commit is contained in:
parent
12a28d12bb
commit
e11f167718
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.103 2002/06/15 20:03:51 momjian Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.104 2002/06/24 22:17:01 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -1081,6 +1081,32 @@ PostgreSQL documentation
|
||||
<entry><literal>SQL_ASCII</literal></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><function>quote_ident</function>(<parameter>string</parameter> text)</entry>
|
||||
<entry><type>text</type></entry>
|
||||
<entry>
|
||||
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.
|
||||
</entry>
|
||||
<entry><literal>quote_ident('Foo')</literal></entry>
|
||||
<entry><literal>"Foo"</literal></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><function>quote_literal</function>(<parameter>string</parameter> text)</entry>
|
||||
<entry><type>text</type></entry>
|
||||
<entry>
|
||||
Returns the given string suitably quoted to be used as a literal
|
||||
in an SQL query string.
|
||||
Embedded quotes and backslashes are properly doubled.
|
||||
</entry>
|
||||
<entry><literal>quote_literal('O\'Reilly')</literal></entry>
|
||||
<entry><literal>'O''Reilly'</literal></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><function>repeat</function>(<type>text</type>, <type>integer</type>)</entry>
|
||||
<entry><type>text</type></entry>
|
||||
|
Loading…
Reference in New Issue
Block a user