|
99 | 99 | </row>
|
100 | 100 |
|
101 | 101 | <row>
|
102 |
| - <entry><link linkend="catalog-pg-constraint"><structname>pg_constraint</structname></link></entry> |
103 |
| - <entry>check constraints, unique constraints, primary key constraints, foreign key constraints</entry> |
| 102 | + <entry><link linkend="catalog-pg-collation"><structname>pg_collation</structname></link></entry> |
| 103 | + <entry>collations (locale information)</entry> |
104 | 104 | </row>
|
105 | 105 |
|
106 | 106 | <row>
|
107 |
| - <entry><link linkend="catalog-pg-collation"><structname>pg_collation</structname></link></entry> |
108 |
| - <entry>collations (locale information)</entry> |
| 107 | + <entry><link linkend="catalog-pg-constraint"><structname>pg_constraint</structname></link></entry> |
| 108 | + <entry>check constraints, unique constraints, primary key constraints, foreign key constraints</entry> |
109 | 109 | </row>
|
110 | 110 |
|
111 | 111 | <row>
|
|
1933 | 1933 | </para>
|
1934 | 1934 | </sect1>
|
1935 | 1935 |
|
1936 |
| - <sect1 id="catalog-pg-event-trigger"> |
1937 |
| - <title><structname>pg_event_trigger</structname></title> |
| 1936 | + <sect1 id="catalog-pg-collation"> |
| 1937 | + <title><structname>pg_collation</structname></title> |
1938 | 1938 |
|
1939 |
| - <indexterm zone="catalog-pg-event-trigger"> |
1940 |
| - <primary>pg_event_trigger</primary> |
| 1939 | + <indexterm zone="catalog-pg-collation"> |
| 1940 | + <primary>pg_collation</primary> |
1941 | 1941 | </indexterm>
|
1942 | 1942 |
|
1943 | 1943 | <para>
|
1944 |
| - The catalog <structname>pg_event_trigger</structname> stores event triggers. |
1945 |
| - See <xref linkend="event-triggers"> for more information. |
| 1944 | + The catalog <structname>pg_collation</structname> describes the |
| 1945 | + available collations, which are essentially mappings from an SQL |
| 1946 | + name to operating system locale categories. |
| 1947 | + See <xref linkend="collation"> for more information. |
1946 | 1948 | </para>
|
1947 | 1949 |
|
1948 | 1950 | <table>
|
1949 |
| - <title><structname>pg_event_trigger</> Columns</title> |
| 1951 | + <title><structname>pg_collation</> Columns</title> |
1950 | 1952 |
|
1951 | 1953 | <tgroup cols="4">
|
1952 | 1954 | <thead>
|
|
1960 | 1962 |
|
1961 | 1963 | <tbody>
|
1962 | 1964 | <row>
|
1963 |
| - <entry><structfield>evtname</structfield></entry> |
1964 |
| - <entry><type>name</type></entry> |
| 1965 | + <entry><structfield>oid</structfield></entry> |
| 1966 | + <entry><type>oid</type></entry> |
1965 | 1967 | <entry></entry>
|
1966 |
| - <entry>Trigger name (must be unique)</entry> |
| 1968 | + <entry>Row identifier (hidden attribute; must be explicitly selected)</entry> |
1967 | 1969 | </row>
|
1968 | 1970 |
|
1969 | 1971 | <row>
|
1970 |
| - <entry><structfield>evtevent</structfield></entry> |
| 1972 | + <entry><structfield>collname</structfield></entry> |
1971 | 1973 | <entry><type>name</type></entry>
|
1972 | 1974 | <entry></entry>
|
1973 |
| - <entry>Identifies the event for which this trigger fires</entry> |
| 1975 | + <entry>Collation name (unique per namespace and encoding)</entry> |
1974 | 1976 | </row>
|
1975 | 1977 |
|
1976 | 1978 | <row>
|
1977 |
| - <entry><structfield>evtowner</structfield></entry> |
| 1979 | + <entry><structfield>collnamespace</structfield></entry> |
1978 | 1980 | <entry><type>oid</type></entry>
|
1979 |
| - <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry> |
1980 |
| - <entry>Owner of the event trigger</entry> |
| 1981 | + <entry><literal><link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.oid</literal></entry> |
| 1982 | + <entry> |
| 1983 | + The OID of the namespace that contains this collation |
| 1984 | + </entry> |
1981 | 1985 | </row>
|
1982 | 1986 |
|
1983 | 1987 | <row>
|
1984 |
| - <entry><structfield>evtfoid</structfield></entry> |
| 1988 | + <entry><structfield>collowner</structfield></entry> |
1985 | 1989 | <entry><type>oid</type></entry>
|
1986 |
| - <entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
1987 |
| - <entry>The function to be called</entry> |
| 1990 | + <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry> |
| 1991 | + <entry>Owner of the collation</entry> |
1988 | 1992 | </row>
|
1989 | 1993 |
|
1990 | 1994 | <row>
|
1991 |
| - <entry><structfield>evtenabled</structfield></entry> |
1992 |
| - <entry><type>char</type></entry> |
| 1995 | + <entry><structfield>collencoding</structfield></entry> |
| 1996 | + <entry><type>int4</type></entry> |
1993 | 1997 | <entry></entry>
|
1994 |
| - <entry> |
1995 |
| - Controls in which <xref linkend="guc-session-replication-role"> modes |
1996 |
| - the event trigger fires. |
1997 |
| - <literal>O</> = trigger fires in <quote>origin</> and <quote>local</> modes, |
1998 |
| - <literal>D</> = trigger is disabled, |
1999 |
| - <literal>R</> = trigger fires in <quote>replica</> mode, |
2000 |
| - <literal>A</> = trigger fires always. |
2001 |
| - </entry> |
| 1998 | + <entry>Encoding in which the collation is applicable, or -1 if it |
| 1999 | + works for any encoding</entry> |
2002 | 2000 | </row>
|
2003 | 2001 |
|
2004 | 2002 | <row>
|
2005 |
| - <entry><structfield>evttags</structfield></entry> |
2006 |
| - <entry><type>text[]</type></entry> |
| 2003 | + <entry><structfield>collcollate</structfield></entry> |
| 2004 | + <entry><type>name</type></entry> |
2007 | 2005 | <entry></entry>
|
2008 |
| - <entry> |
2009 |
| - Command tags for which this trigger will fire. If NULL, the firing |
2010 |
| - of this trigger is not restricted on the basis of the command tag. |
2011 |
| - </entry> |
| 2006 | + <entry><symbol>LC_COLLATE</> for this collation object</entry> |
| 2007 | + </row> |
| 2008 | + |
| 2009 | + <row> |
| 2010 | + <entry><structfield>collctype</structfield></entry> |
| 2011 | + <entry><type>name</type></entry> |
| 2012 | + <entry></entry> |
| 2013 | + <entry><symbol>LC_CTYPE</> for this collation object</entry> |
2012 | 2014 | </row>
|
2013 | 2015 | </tbody>
|
2014 | 2016 | </tgroup>
|
2015 | 2017 | </table>
|
| 2018 | + |
| 2019 | + <para> |
| 2020 | + Note that the unique key on this catalog is (<structfield>collname</>, |
| 2021 | + <structfield>collencoding</>, <structfield>collnamespace</>) not just |
| 2022 | + (<structfield>collname</>, <structfield>collnamespace</>). |
| 2023 | + <productname>PostgreSQL</productname> generally ignores all |
| 2024 | + collations that do not have <structfield>collencoding</> equal to |
| 2025 | + either the current database's encoding or -1, and creation of new entries |
| 2026 | + with the same name as an entry with <structfield>collencoding</> = -1 |
| 2027 | + is forbidden. Therefore it is sufficient to use a qualified SQL name |
| 2028 | + (<replaceable>schema</>.<replaceable>name</>) to identify a collation, |
| 2029 | + even though this is not unique according to the catalog definition. |
| 2030 | + The reason for defining the catalog this way is that |
| 2031 | + <application>initdb</> fills it in at cluster initialization time with |
| 2032 | + entries for all locales available on the system, so it must be able to |
| 2033 | + hold entries for all encodings that might ever be used in the cluster. |
| 2034 | + </para> |
| 2035 | + |
| 2036 | + <para> |
| 2037 | + In the <literal>template0</> database, it could be useful to create |
| 2038 | + collations whose encoding does not match the database encoding, |
| 2039 | + since they could match the encodings of databases later cloned from |
| 2040 | + <literal>template0</>. This would currently have to be done manually. |
| 2041 | + </para> |
2016 | 2042 | </sect1>
|
2017 | 2043 |
|
2018 | 2044 | <sect1 id="catalog-pg-constraint">
|
|
2296 | 2322 | relation.
|
2297 | 2323 | </para>
|
2298 | 2324 | </note>
|
2299 |
| - |
2300 | 2325 | </sect1>
|
2301 | 2326 |
|
2302 |
| - <sect1 id="catalog-pg-collation"> |
2303 |
| - <title><structname>pg_collation</structname></title> |
2304 |
| - |
2305 |
| - <indexterm zone="catalog-pg-collation"> |
2306 |
| - <primary>pg_collation</primary> |
2307 |
| - </indexterm> |
2308 |
| - |
2309 |
| - <para> |
2310 |
| - The catalog <structname>pg_collation</structname> describes the |
2311 |
| - available collations, which are essentially mappings from an SQL |
2312 |
| - name to operating system locale categories. |
2313 |
| - See <xref linkend="collation"> for more information. |
2314 |
| - </para> |
2315 |
| - |
2316 |
| - <table> |
2317 |
| - <title><structname>pg_collation</> Columns</title> |
2318 |
| - |
2319 |
| - <tgroup cols="4"> |
2320 |
| - <thead> |
2321 |
| - <row> |
2322 |
| - <entry>Name</entry> |
2323 |
| - <entry>Type</entry> |
2324 |
| - <entry>References</entry> |
2325 |
| - <entry>Description</entry> |
2326 |
| - </row> |
2327 |
| - </thead> |
2328 |
| - |
2329 |
| - <tbody> |
2330 |
| - <row> |
2331 |
| - <entry><structfield>oid</structfield></entry> |
2332 |
| - <entry><type>oid</type></entry> |
2333 |
| - <entry></entry> |
2334 |
| - <entry>Row identifier (hidden attribute; must be explicitly selected)</entry> |
2335 |
| - </row> |
2336 |
| - |
2337 |
| - <row> |
2338 |
| - <entry><structfield>collname</structfield></entry> |
2339 |
| - <entry><type>name</type></entry> |
2340 |
| - <entry></entry> |
2341 |
| - <entry>Collation name (unique per namespace and encoding)</entry> |
2342 |
| - </row> |
2343 |
| - |
2344 |
| - <row> |
2345 |
| - <entry><structfield>collnamespace</structfield></entry> |
2346 |
| - <entry><type>oid</type></entry> |
2347 |
| - <entry><literal><link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.oid</literal></entry> |
2348 |
| - <entry> |
2349 |
| - The OID of the namespace that contains this collation |
2350 |
| - </entry> |
2351 |
| - </row> |
2352 |
| - |
2353 |
| - <row> |
2354 |
| - <entry><structfield>collowner</structfield></entry> |
2355 |
| - <entry><type>oid</type></entry> |
2356 |
| - <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry> |
2357 |
| - <entry>Owner of the collation</entry> |
2358 |
| - </row> |
2359 |
| - |
2360 |
| - <row> |
2361 |
| - <entry><structfield>collencoding</structfield></entry> |
2362 |
| - <entry><type>int4</type></entry> |
2363 |
| - <entry></entry> |
2364 |
| - <entry>Encoding in which the collation is applicable, or -1 if it |
2365 |
| - works for any encoding</entry> |
2366 |
| - </row> |
2367 |
| - |
2368 |
| - <row> |
2369 |
| - <entry><structfield>collcollate</structfield></entry> |
2370 |
| - <entry><type>name</type></entry> |
2371 |
| - <entry></entry> |
2372 |
| - <entry><symbol>LC_COLLATE</> for this collation object</entry> |
2373 |
| - </row> |
2374 |
| - |
2375 |
| - <row> |
2376 |
| - <entry><structfield>collctype</structfield></entry> |
2377 |
| - <entry><type>name</type></entry> |
2378 |
| - <entry></entry> |
2379 |
| - <entry><symbol>LC_CTYPE</> for this collation object</entry> |
2380 |
| - </row> |
2381 |
| - </tbody> |
2382 |
| - </tgroup> |
2383 |
| - </table> |
2384 |
| - |
2385 |
| - <para> |
2386 |
| - Note that the unique key on this catalog is (<structfield>collname</>, |
2387 |
| - <structfield>collencoding</>, <structfield>collnamespace</>) not just |
2388 |
| - (<structfield>collname</>, <structfield>collnamespace</>). |
2389 |
| - <productname>PostgreSQL</productname> generally ignores all |
2390 |
| - collations that do not have <structfield>collencoding</> equal to |
2391 |
| - either the current database's encoding or -1, and creation of new entries |
2392 |
| - with the same name as an entry with <structfield>collencoding</> = -1 |
2393 |
| - is forbidden. Therefore it is sufficient to use a qualified SQL name |
2394 |
| - (<replaceable>schema</>.<replaceable>name</>) to identify a collation, |
2395 |
| - even though this is not unique according to the catalog definition. |
2396 |
| - The reason for defining the catalog this way is that |
2397 |
| - <application>initdb</> fills it in at cluster initialization time with |
2398 |
| - entries for all locales available on the system, so it must be able to |
2399 |
| - hold entries for all encodings that might ever be used in the cluster. |
2400 |
| - </para> |
2401 |
| - |
2402 |
| - <para> |
2403 |
| - In the <literal>template0</> database, it could be useful to create |
2404 |
| - collations whose encoding does not match the database encoding, |
2405 |
| - since they could match the encodings of databases later cloned from |
2406 |
| - <literal>template0</>. This would currently have to be done manually. |
2407 |
| - </para> |
2408 |
| - </sect1> |
2409 | 2327 |
|
2410 | 2328 | <sect1 id="catalog-pg-conversion">
|
2411 | 2329 | <title><structname>pg_conversion</structname></title>
|
|
3178 | 3096 | </sect1>
|
3179 | 3097 |
|
3180 | 3098 |
|
| 3099 | + <sect1 id="catalog-pg-event-trigger"> |
| 3100 | + <title><structname>pg_event_trigger</structname></title> |
| 3101 | + |
| 3102 | + <indexterm zone="catalog-pg-event-trigger"> |
| 3103 | + <primary>pg_event_trigger</primary> |
| 3104 | + </indexterm> |
| 3105 | + |
| 3106 | + <para> |
| 3107 | + The catalog <structname>pg_event_trigger</structname> stores event triggers. |
| 3108 | + See <xref linkend="event-triggers"> for more information. |
| 3109 | + </para> |
| 3110 | + |
| 3111 | + <table> |
| 3112 | + <title><structname>pg_event_trigger</> Columns</title> |
| 3113 | + |
| 3114 | + <tgroup cols="4"> |
| 3115 | + <thead> |
| 3116 | + <row> |
| 3117 | + <entry>Name</entry> |
| 3118 | + <entry>Type</entry> |
| 3119 | + <entry>References</entry> |
| 3120 | + <entry>Description</entry> |
| 3121 | + </row> |
| 3122 | + </thead> |
| 3123 | + |
| 3124 | + <tbody> |
| 3125 | + <row> |
| 3126 | + <entry><structfield>evtname</structfield></entry> |
| 3127 | + <entry><type>name</type></entry> |
| 3128 | + <entry></entry> |
| 3129 | + <entry>Trigger name (must be unique)</entry> |
| 3130 | + </row> |
| 3131 | + |
| 3132 | + <row> |
| 3133 | + <entry><structfield>evtevent</structfield></entry> |
| 3134 | + <entry><type>name</type></entry> |
| 3135 | + <entry></entry> |
| 3136 | + <entry>Identifies the event for which this trigger fires</entry> |
| 3137 | + </row> |
| 3138 | + |
| 3139 | + <row> |
| 3140 | + <entry><structfield>evtowner</structfield></entry> |
| 3141 | + <entry><type>oid</type></entry> |
| 3142 | + <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry> |
| 3143 | + <entry>Owner of the event trigger</entry> |
| 3144 | + </row> |
| 3145 | + |
| 3146 | + <row> |
| 3147 | + <entry><structfield>evtfoid</structfield></entry> |
| 3148 | + <entry><type>oid</type></entry> |
| 3149 | + <entry><literal><link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.oid</literal></entry> |
| 3150 | + <entry>The function to be called</entry> |
| 3151 | + </row> |
| 3152 | + |
| 3153 | + <row> |
| 3154 | + <entry><structfield>evtenabled</structfield></entry> |
| 3155 | + <entry><type>char</type></entry> |
| 3156 | + <entry></entry> |
| 3157 | + <entry> |
| 3158 | + Controls in which <xref linkend="guc-session-replication-role"> modes |
| 3159 | + the event trigger fires. |
| 3160 | + <literal>O</> = trigger fires in <quote>origin</> and <quote>local</> modes, |
| 3161 | + <literal>D</> = trigger is disabled, |
| 3162 | + <literal>R</> = trigger fires in <quote>replica</> mode, |
| 3163 | + <literal>A</> = trigger fires always. |
| 3164 | + </entry> |
| 3165 | + </row> |
| 3166 | + |
| 3167 | + <row> |
| 3168 | + <entry><structfield>evttags</structfield></entry> |
| 3169 | + <entry><type>text[]</type></entry> |
| 3170 | + <entry></entry> |
| 3171 | + <entry> |
| 3172 | + Command tags for which this trigger will fire. If NULL, the firing |
| 3173 | + of this trigger is not restricted on the basis of the command tag. |
| 3174 | + </entry> |
| 3175 | + </row> |
| 3176 | + </tbody> |
| 3177 | + </tgroup> |
| 3178 | + </table> |
| 3179 | + </sect1> |
| 3180 | + |
| 3181 | + |
3181 | 3182 | <sect1 id="catalog-pg-extension">
|
3182 | 3183 | <title><structname>pg_extension</structname></title>
|
3183 | 3184 |
|
|
0 commit comments