Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite11f167

Browse files
committed
Document quote_ident and quote_literal in the main list of string functions,
as suggested by Josh Berkus.
1 parent12a28d1 commite11f167

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.103 2002/06/15 20:03:51 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.104 2002/06/24 22:17:01 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -1081,6 +1081,32 @@ PostgreSQL documentation
10811081
<entry><literal>SQL_ASCII</literal></entry>
10821082
</row>
10831083

1084+
<row>
1085+
<entry><function>quote_ident</function>(<parameter>string</parameter> text)</entry>
1086+
<entry><type>text</type></entry>
1087+
<entry>
1088+
Returns the given string suitably quoted to be used as an identifier
1089+
in an SQL query string.
1090+
Quotes are added only if necessary (i.e., if the string contains
1091+
non-identifier characters or would be case-folded).
1092+
Embedded quotes are properly doubled.
1093+
</entry>
1094+
<entry><literal>quote_ident('Foo')</literal></entry>
1095+
<entry><literal>"Foo"</literal></entry>
1096+
</row>
1097+
1098+
<row>
1099+
<entry><function>quote_literal</function>(<parameter>string</parameter> text)</entry>
1100+
<entry><type>text</type></entry>
1101+
<entry>
1102+
Returns the given string suitably quoted to be used as a literal
1103+
in an SQL query string.
1104+
Embedded quotes and backslashes are properly doubled.
1105+
</entry>
1106+
<entry><literal>quote_literal('O\'Reilly')</literal></entry>
1107+
<entry><literal>'O''Reilly'</literal></entry>
1108+
</row>
1109+
10841110
<row>
10851111
<entry><function>repeat</function>(<type>text</type>, <type>integer</type>)</entry>
10861112
<entry><type>text</type></entry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp