mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Introduce parse_ident()
SQL-layer function to split qualified identifier into array parts. Author: Pavel Stehule with minor editorization by me and Jim Nasby
This commit is contained in:
@ -1818,6 +1818,32 @@
|
||||
<entry><literal>900150983cd24fb0 d6963f7d28e17f72</literal></entry>
|
||||
</row>
|
||||
|
||||
<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>
|
||||
|
Reference in New Issue
Block a user