diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2016-03-18 18:16:14 +0300 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2016-03-18 18:16:14 +0300 |
commit | 3187d6de0e5a9e805b27c48437897e8c39071d45 (patch) | |
tree | 73c8b2d0ffb1f9410ca5d59bc3b62c43febbf0ea /doc/src | |
parent | 992b5ba30dcafdc222341505b072a6b009b248a7 (diff) |
Introduce parse_ident()
SQL-layer function to split qualified identifier into array parts.
Author: Pavel Stehule with minor editorization by me and Jim Nasby
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 000489d961b..918356c075d 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1821,6 +1821,32 @@ <row> <entry> <indexterm> + <primary>parse_ident</primary> + </indexterm> + <literal><function>parse_ident(<parameter>str</parameter> <type>text</type>, + [ <parameter>strictmode</parameter> <type>boolean</type> DEFAULT true ] )</function></literal> + </entry> + <entry><type>text[]</type></entry> + <entry>Split <parameter>qualified identifier</parameter> into array + <parameter>parts</parameter>. When <parameter>strictmode</parameter> is + false, extra characters after the identifier are ignored. This is useful + for parsing identifiers for objects like functions and arrays that may + have trailing characters. By default, extra characters after the last + identifier are considered an error, but if second parameter is false, + then chararacters after last identifier are ignored. Note that this + function does not truncate quoted identifiers. If you care about that + you should cast the result of this function to name[]. A non-printable + chararacters (like 0 to 31) are displayed as hexadecimal codes always, + what can be different from PostgreSQL internal SQL identifiers + processing, when the original escaped value is displayed. + </entry> + <entry><literal>parse_ident('"SomeSchema".someTable')</literal></entry> + <entry><literal>"SomeSchema,sometable"</literal></entry> + </row> + + <row> + <entry> + <indexterm> <primary>pg_client_encoding</primary> </indexterm> <literal><function>pg_client_encoding()</function></literal> |