|
335 | 335 | by <application>pg_dump</>. Such a change is usually only sensible if |
336 | 336 | you concurrently make the same change in the extension's script file. |
337 | 337 | (But there are special provisions for tables containing configuration |
338 | | - data; see below.) |
| 338 | + data; see <xref linkend="extend-extensions-config-tables">.) |
| 339 | + In production situations, it's generally better to create an extension |
| 340 | + update script to perform changes to extension member objects. |
339 | 341 | </para> |
340 | 342 |
|
341 | 343 | <para> |
342 | | - The extension script may set privileges on objects which are part of the |
| 344 | + The extension script may set privileges on objects that are part of the |
343 | 345 | extension via <command>GRANT</command> and <command>REVOKE</command> |
344 | 346 | statements. The final set of privileges for each object (if any are set) |
345 | 347 | will be stored in the |
|
453 | 455 | <term><varname>comment</varname> (<type>string</type>)</term> |
454 | 456 | <listitem> |
455 | 457 | <para> |
456 | | - A comment (any string) about the extension. Alternatively, |
457 | | - the comment can be set by means of the <xref linkend="sql-comment"> |
458 | | - command in the script file. |
| 458 | + A comment (any string) about the extension. The comment is applied |
| 459 | + when initially creating an extension, but not during extension updates |
| 460 | + (since that might override user-added comments). Alternatively, |
| 461 | + the extension's comment can be set by writing |
| 462 | + a <xref linkend="sql-comment"> command in the script file. |
459 | 463 | </para> |
460 | 464 | </listitem> |
461 | 465 | </varlistentry> |
|
518 | 522 | its contained objects into a different schema after initial creation |
519 | 523 | of the extension. The default is <literal>false</>, i.e. the |
520 | 524 | extension is not relocatable. |
521 | | - See below for more information. |
| 525 | + See <xref linkend="extend-extensions-relocation"> for more information. |
522 | 526 | </para> |
523 | 527 | </listitem> |
524 | 528 | </varlistentry> |
|
529 | 533 | <para> |
530 | 534 | This parameter can only be set for non-relocatable extensions. |
531 | 535 | It forces the extension to be loaded into exactly the named schema |
532 | | - and not any other. See below for more information. |
| 536 | + and not any other. |
| 537 | + The <varname>schema</varname> parameter is consulted only when |
| 538 | + initially creating an extension, not during extension updates. |
| 539 | + See <xref linkend="extend-extensions-relocation"> for more information. |
533 | 540 | </para> |
534 | 541 | </listitem> |
535 | 542 | </varlistentry> |
|
562 | 569 | comments) by the extension mechanism. This provision is commonly used |
563 | 570 | to throw an error if the script file is fed to <application>psql</> |
564 | 571 | rather than being loaded via <command>CREATE EXTENSION</> (see example |
565 | | - script below). Without that, users might accidentally load the |
| 572 | + script in <xref linkend="extend-extensions-example">). |
| 573 | + Without that, users might accidentally load the |
566 | 574 | extension's contents as <quote>loose</> objects rather than as an |
567 | 575 | extension, a state of affairs that's a bit tedious to recover from. |
568 | 576 | </para> |
|
580 | 588 |
|
581 | 589 | </sect2> |
582 | 590 |
|
583 | | - <sect2> |
| 591 | + <sect2 id="extend-extensions-relocation"> |
584 | 592 | <title>Extension Relocatability</title> |
585 | 593 |
|
586 | 594 | <para> |
@@ -678,7 +686,7 @@ SET LOCAL search_path TO @extschema@; |
678 | 686 | </para> |
679 | 687 | </sect2> |
680 | 688 |
|
681 | | - <sect2> |
| 689 | + <sect2 id="extend-extensions-config-tables"> |
682 | 690 | <title>Extension Configuration Tables</title> |
683 | 691 |
|
684 | 692 | <para> |
@@ -762,7 +770,7 @@ SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT standard_entr |
762 | 770 | out but the dump will not be able to be restored directly and user |
763 | 771 | intervention will be required. |
764 | 772 | </para> |
765 | | - |
| 773 | + |
766 | 774 | <para> |
767 | 775 | Sequences associated with <type>serial</> or <type>bigserial</> columns |
768 | 776 | need to be directly marked to dump their state. Marking their parent |
@@ -877,7 +885,7 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</>'); |
877 | 885 | </para> |
878 | 886 | </sect2> |
879 | 887 |
|
880 | | - <sect2> |
| 888 | + <sect2 id="extend-extensions-example"> |
881 | 889 | <title>Extension Example</title> |
882 | 890 |
|
883 | 891 | <para> |
|
0 commit comments