codekingpro/portable-devtools
115k
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>GRANT</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="sql-fetch.html" title="FETCH" /><link rel="next" href="sql-importforeignschema.html" title="IMPORT FOREIGN SCHEMA" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">GRANT</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="sql-fetch.html" title="FETCH">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="sql-commands.html" title="SQL Commands">Up</a></td><th width="60%" align="center">SQL Commands</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="sql-importforeignschema.html" title="IMPORT FOREIGN SCHEMA">Next</a></td></tr></table><hr /></div><div class="refentry" id="SQL-GRANT"><div class="titlepage"></div><a id="id-1.9.3.150.1" class="indexterm"></a><div class="refnamediv"><h2><span class="refentrytitle">GRANT</span></h2><p>GRANT — define access privileges</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">3GRANT { { SELECT | INSERT | UPDATE | DELETE | TRUNCATE | REFERENCES | TRIGGER }4 [, ...] | ALL [ PRIVILEGES ] }5 ON { [ TABLE ] <em class="replaceable"><code>table_name</code></em> [, ...]6 | ALL TABLES IN SCHEMA <em class="replaceable"><code>schema_name</code></em> [, ...] }7 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]8 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]9 10GRANT { { SELECT | INSERT | UPDATE | REFERENCES } ( <em class="replaceable"><code>column_name</code></em> [, ...] )11 [, ...] | ALL [ PRIVILEGES ] ( <em class="replaceable"><code>column_name</code></em> [, ...] ) }12 ON [ TABLE ] <em class="replaceable"><code>table_name</code></em> [, ...]13 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]14 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]15 16GRANT { { USAGE | SELECT | UPDATE }17 [, ...] | ALL [ PRIVILEGES ] }18 ON { SEQUENCE <em class="replaceable"><code>sequence_name</code></em> [, ...]19 | ALL SEQUENCES IN SCHEMA <em class="replaceable"><code>schema_name</code></em> [, ...] }20 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]21 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]22 23GRANT { { CREATE | CONNECT | TEMPORARY | TEMP } [, ...] | ALL [ PRIVILEGES ] }24 ON DATABASE <em class="replaceable"><code>database_name</code></em> [, ...]25 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]26 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]27 28GRANT { USAGE | ALL [ PRIVILEGES ] }29 ON DOMAIN <em class="replaceable"><code>domain_name</code></em> [, ...]30 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]31 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]32 33GRANT { USAGE | ALL [ PRIVILEGES ] }34 ON FOREIGN DATA WRAPPER <em class="replaceable"><code>fdw_name</code></em> [, ...]35 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]36 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]37 38GRANT { USAGE | ALL [ PRIVILEGES ] }39 ON FOREIGN SERVER <em class="replaceable"><code>server_name</code></em> [, ...]40 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]41 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]42 43GRANT { EXECUTE | ALL [ PRIVILEGES ] }44 ON { { FUNCTION | PROCEDURE | ROUTINE } <em class="replaceable"><code>routine_name</code></em> [ ( [ [ <em class="replaceable"><code>argmode</code></em> ] [ <em class="replaceable"><code>arg_name</code></em> ] <em class="replaceable"><code>arg_type</code></em> [, ...] ] ) ] [, ...]45 | ALL { FUNCTIONS | PROCEDURES | ROUTINES } IN SCHEMA <em class="replaceable"><code>schema_name</code></em> [, ...] }46 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]47 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]48 49GRANT { USAGE | ALL [ PRIVILEGES ] }50 ON LANGUAGE <em class="replaceable"><code>lang_name</code></em> [, ...]51 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]52 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]53 54GRANT { { SELECT | UPDATE } [, ...] | ALL [ PRIVILEGES ] }55 ON LARGE OBJECT <em class="replaceable"><code>loid</code></em> [, ...]56 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]57 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]58 59GRANT { { SET | ALTER SYSTEM } [, ... ] | ALL [ PRIVILEGES ] }60 ON PARAMETER <em class="replaceable"><code>configuration_parameter</code></em> [, ...]61 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]62 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]63 64GRANT { { CREATE | USAGE } [, ...] | ALL [ PRIVILEGES ] }65 ON SCHEMA <em class="replaceable"><code>schema_name</code></em> [, ...]66 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]67 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]68 69GRANT { CREATE | ALL [ PRIVILEGES ] }70 ON TABLESPACE <em class="replaceable"><code>tablespace_name</code></em> [, ...]71 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]72 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]73 74GRANT { USAGE | ALL [ PRIVILEGES ] }75 ON TYPE <em class="replaceable"><code>type_name</code></em> [, ...]76 TO <em class="replaceable"><code>role_specification</code></em> [, ...] [ WITH GRANT OPTION ]77 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]78 79GRANT <em class="replaceable"><code>role_name</code></em> [, ...] TO <em class="replaceable"><code>role_specification</code></em> [, ...]80 [ WITH { ADMIN | INHERIT | SET } { OPTION | TRUE | FALSE } ]81 [ GRANTED BY <em class="replaceable"><code>role_specification</code></em> ]82 83<span class="phrase">where <em class="replaceable"><code>role_specification</code></em> can be:</span>84 85 [ GROUP ] <em class="replaceable"><code>role_name</code></em>86 | PUBLIC87 | CURRENT_ROLE88 | CURRENT_USER89 | SESSION_USER90</pre></div><div class="refsect1" id="SQL-GRANT-DESCRIPTION"><h2>Description</h2><p>91 The <code class="command">GRANT</code> command has two basic variants: one92 that grants privileges on a database object (table, column, view,93 foreign table, sequence, database, foreign-data wrapper, foreign server,94 function, procedure, procedural language, large object, configuration95 parameter, schema, tablespace, or type), and one that grants96 membership in a role. These variants are similar in many ways, but97 they are different enough to be described separately.98 </p><div class="refsect2" id="SQL-GRANT-DESCRIPTION-OBJECTS"><h3>GRANT on Database Objects</h3><p>99 This variant of the <code class="command">GRANT</code> command gives specific100 privileges on a database object to101 one or more roles. These privileges are added102 to those already granted, if any.103 </p><p>104 The key word <code class="literal">PUBLIC</code> indicates that the105 privileges are to be granted to all roles, including those that might106 be created later. <code class="literal">PUBLIC</code> can be thought of as an107 implicitly defined group that always includes all roles.108 Any particular role will have the sum109 of privileges granted directly to it, privileges granted to any role it110 is presently a member of, and privileges granted to111 <code class="literal">PUBLIC</code>.112 </p><p>113 If <code class="literal">WITH GRANT OPTION</code> is specified, the recipient114 of the privilege can in turn grant it to others. Without a grant115 option, the recipient cannot do that. Grant options cannot be granted116 to <code class="literal">PUBLIC</code>.117 </p><p>118 If <code class="literal">GRANTED BY</code> is specified, the specified grantor must119 be the current user. This clause is currently present in this form only120 for SQL compatibility.121 </p><p>122 There is no need to grant privileges to the owner of an object123 (usually the user that created it),124 as the owner has all privileges by default. (The owner could,125 however, choose to revoke some of their own privileges for safety.)126 </p><p>127 The right to drop an object, or to alter its definition in any way, is128 not treated as a grantable privilege; it is inherent in the owner,129 and cannot be granted or revoked. (However, a similar effect can be130 obtained by granting or revoking membership in the role that owns131 the object; see below.) The owner implicitly has all grant132 options for the object, too.133 </p><p>134 The possible privileges are:135 136 </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">SELECT</code><br /></span><span class="term"><code class="literal">INSERT</code><br /></span><span class="term"><code class="literal">UPDATE</code><br /></span><span class="term"><code class="literal">DELETE</code><br /></span><span class="term"><code class="literal">TRUNCATE</code><br /></span><span class="term"><code class="literal">REFERENCES</code><br /></span><span class="term"><code class="literal">TRIGGER</code><br /></span><span class="term"><code class="literal">CREATE</code><br /></span><span class="term"><code class="literal">CONNECT</code><br /></span><span class="term"><code class="literal">TEMPORARY</code><br /></span><span class="term"><code class="literal">EXECUTE</code><br /></span><span class="term"><code class="literal">USAGE</code><br /></span><span class="term"><code class="literal">SET</code><br /></span><span class="term"><code class="literal">ALTER SYSTEM</code></span></dt><dd><p>137 Specific types of privileges, as defined in <a class="xref" href="ddl-priv.html" title="5.7. Privileges">Section 5.7</a>.138 </p></dd><dt><span class="term"><code class="literal">TEMP</code></span></dt><dd><p>139 Alternative spelling for <code class="literal">TEMPORARY</code>.140 </p></dd><dt><span class="term"><code class="literal">ALL PRIVILEGES</code></span></dt><dd><p>141 Grant all of the privileges available for the object's type.142 The <code class="literal">PRIVILEGES</code> key word is optional in143 <span class="productname">PostgreSQL</span>, though it is required by144 strict SQL.145 </p></dd></dl></div><p>146 </p><p>147 The <code class="literal">FUNCTION</code> syntax works for plain functions,148 aggregate functions, and window functions, but not for procedures;149 use <code class="literal">PROCEDURE</code> for those.150 Alternatively, use <code class="literal">ROUTINE</code> to refer to a function,151 aggregate function, window function, or procedure regardless of its152 precise type.153 </p><p>154 There is also an option to grant privileges on all objects of the same155 type within one or more schemas. This functionality is currently supported156 only for tables, sequences, functions, and procedures. <code class="literal">ALL157 TABLES</code> also affects views and foreign tables, just like the158 specific-object <code class="command">GRANT</code> command. <code class="literal">ALL159 FUNCTIONS</code> also affects aggregate and window functions, but not160 procedures, again just like the specific-object <code class="command">GRANT</code>161 command. Use <code class="literal">ALL ROUTINES</code> to include procedures.162 </p></div><div class="refsect2" id="SQL-GRANT-DESCRIPTION-ROLES"><h3>GRANT on Roles</h3><p>163 This variant of the <code class="command">GRANT</code> command grants membership164 in a role to one or more other roles, and the modification of165 membership options <code class="literal">SET</code>, <code class="literal">INHERIT</code>,166 and <code class="literal">ADMIN</code>; see <a class="xref" href="role-membership.html" title="22.3. Role Membership">Section 22.3</a>167 for details. Membership in a role is significant168 because it potentially allows access to the privileges granted to a role169 to each of its members, and potentially also the ability to make changes170 to the role itself. However, the actual permissions conferred depend on171 the options associated with the grant. To modify that options of172 an existing membership, simply specify the membership with updated173 option values.174 </p><p>175 Each of the options described below can be set to either176 <code class="literal">TRUE</code> or <code class="literal">FALSE</code>. The keyword177 <code class="literal">OPTION</code> is accepted as a synonym for178 <code class="literal">TRUE</code>, so that <code class="literal">WITH ADMIN OPTION</code>179 is a synonym for <code class="literal">WITH ADMIN TRUE</code>. When altering180 an existing membership the omission of an option results in the current181 value being retained.182 </p><p>183 The <code class="literal">ADMIN</code> option allows the member to184 in turn grant membership in the role to others, and revoke membership185 in the role as well. Without the admin option, ordinary users cannot186 do that. A role is not considered to hold <code class="literal">WITH ADMIN187 OPTION</code> on itself. Database superusers can grant or revoke188 membership in any role to anyone. This option defaults to189 <code class="literal">FALSE</code>.190 </p><p>191 The <code class="literal">INHERIT</code> option controls the inheritance status192 of the new membership; see <a class="xref" href="role-membership.html" title="22.3. Role Membership">Section 22.3</a> for193 details on inheritance. If it is set to <code class="literal">TRUE</code>,194 it causes the new member to inherit from the granted role. If195 set to <code class="literal">FALSE</code>, the new member does not inherit.196 If unspecified when creating a new role membership, this defaults to the197 inheritance attribute of the new member.198 </p><p>199 The <code class="literal">SET</code> option, if it is set to200 <code class="literal">TRUE</code>, allows the member to change to the granted201 role using the202 <a class="link" href="sql-set-role.html" title="SET ROLE"><code class="command">SET ROLE</code></a>203 command. If a role is an indirect member of another role, it can use204 <code class="literal">SET ROLE</code> to change to that role only if there is a205 chain of grants each of which has <code class="literal">SET TRUE</code>.206 This option defaults to <code class="literal">TRUE</code>.207 </p><p>208 To create an object owned by another role or give ownership of an existing209 object to another role, you must have the ability to <code class="literal">SET210 ROLE</code> to that role; otherwise, commands such as <code class="literal">ALTER211 ... OWNER TO</code> or <code class="literal">CREATE DATABASE ... OWNER</code>212 will fail. However, a user who inherits the privileges of a role but does213 not have the ability to <code class="literal">SET ROLE</code> to that role may be214 able to obtain full access to the role by manipulating existing objects215 owned by that role (e.g. they could redefine an existing function to act216 as a Trojan horse). Therefore, if a role's privileges are to be inherited217 but should not be accessible via <code class="literal">SET ROLE</code>, it should not218 own any SQL objects.219 </p><p>220 If <code class="literal">GRANTED BY</code> is specified, the grant is recorded as221 having been done by the specified role. A user can only attribute a grant222 to another role if they possess the privileges of that role. The role223 recorded as the grantor must have <code class="literal">ADMIN OPTION</code> on the224 target role, unless it is the bootstrap superuser. When a grant is recorded225 as having a grantor other than the bootstrap superuser, it depends on the226 grantor continuing to possess <code class="literal">ADMIN OPTION</code> on the role;227 so, if <code class="literal">ADMIN OPTION</code> is revoked, dependent grants must228 be revoked as well.229 </p><p>230 Unlike the case with privileges, membership in a role cannot be granted231 to <code class="literal">PUBLIC</code>. Note also that this form of the command232 does not allow the noise word <code class="literal">GROUP</code>233 in <em class="replaceable"><code>role_specification</code></em>.234 </p></div></div><div class="refsect1" id="SQL-GRANT-NOTES"><h2>Notes</h2><p>235 The <a class="link" href="sql-revoke.html" title="REVOKE"><code class="command">REVOKE</code></a> command is used236 to revoke access privileges.237 </p><p>238 Since <span class="productname">PostgreSQL</span> 8.1, the concepts of users and239 groups have been unified into a single kind of entity called a role.240 It is therefore no longer necessary to use the keyword <code class="literal">GROUP</code>241 to identify whether a grantee is a user or a group. <code class="literal">GROUP</code>242 is still allowed in the command, but it is a noise word.243 </p><p>244 A user may perform <code class="command">SELECT</code>, <code class="command">INSERT</code>, etc. on a245 column if they hold that privilege for either the specific column or246 its whole table. Granting the privilege at the table level and then247 revoking it for one column will not do what one might wish: the248 table-level grant is unaffected by a column-level operation.249 </p><p>250 When a non-owner of an object attempts to <code class="command">GRANT</code> privileges251 on the object, the command will fail outright if the user has no252 privileges whatsoever on the object. As long as some privilege is253 available, the command will proceed, but it will grant only those254 privileges for which the user has grant options. The <code class="command">GRANT ALL255 PRIVILEGES</code> forms will issue a warning message if no grant options are256 held, while the other forms will issue a warning if grant options for257 any of the privileges specifically named in the command are not held.258 (In principle these statements apply to the object owner as well, but259 since the owner is always treated as holding all grant options, the260 cases can never occur.)261 </p><p>262 It should be noted that database superusers can access263 all objects regardless of object privilege settings. This264 is comparable to the rights of <code class="literal">root</code> in a Unix system.265 As with <code class="literal">root</code>, it's unwise to operate as a superuser266 except when absolutely necessary.267 </p><p>268 If a superuser chooses to issue a <code class="command">GRANT</code> or <code class="command">REVOKE</code>269 command, the command is performed as though it were issued by the270 owner of the affected object. In particular, privileges granted via271 such a command will appear to have been granted by the object owner.272 (For role membership, the membership appears to have been granted273 by the bootstrap superuser.)274 </p><p>275 <code class="command">GRANT</code> and <code class="command">REVOKE</code> can also be done by a role276 that is not the owner of the affected object, but is a member of the role277 that owns the object, or is a member of a role that holds privileges278 <code class="literal">WITH GRANT OPTION</code> on the object. In this case the279 privileges will be recorded as having been granted by the role that280 actually owns the object or holds the privileges281 <code class="literal">WITH GRANT OPTION</code>. For example, if table282 <code class="literal">t1</code> is owned by role <code class="literal">g1</code>, of which role283 <code class="literal">u1</code> is a member, then <code class="literal">u1</code> can grant privileges284 on <code class="literal">t1</code> to <code class="literal">u2</code>, but those privileges will appear285 to have been granted directly by <code class="literal">g1</code>. Any other member286 of role <code class="literal">g1</code> could revoke them later.287 </p><p>288 If the role executing <code class="command">GRANT</code> holds the required privileges289 indirectly via more than one role membership path, it is unspecified290 which containing role will be recorded as having done the grant. In such291 cases it is best practice to use <code class="command">SET ROLE</code> to become the292 specific role you want to do the <code class="command">GRANT</code> as.293 </p><p>294 Granting permission on a table does not automatically extend295 permissions to any sequences used by the table, including296 sequences tied to <code class="type">SERIAL</code> columns. Permissions on297 sequences must be set separately.298 </p><p>299 See <a class="xref" href="ddl-priv.html" title="5.7. Privileges">Section 5.7</a> for more information about specific300 privilege types, as well as how to inspect objects' privileges.301 </p></div><div class="refsect1" id="SQL-GRANT-EXAMPLES"><h2>Examples</h2><p>302 Grant insert privilege to all users on table <code class="literal">films</code>:303 304</p><pre class="programlisting">305GRANT INSERT ON films TO PUBLIC;306</pre><p>307 </p><p>308 Grant all available privileges to user <code class="literal">manuel</code> on view309 <code class="literal">kinds</code>:310 311</p><pre class="programlisting">312GRANT ALL PRIVILEGES ON kinds TO manuel;313</pre><p>314 315 Note that while the above will indeed grant all privileges if executed by a316 superuser or the owner of <code class="literal">kinds</code>, when executed by someone317 else it will only grant those permissions for which the someone else has318 grant options.319 </p><p>320 Grant membership in role <code class="literal">admins</code> to user <code class="literal">joe</code>:321 322</p><pre class="programlisting">323GRANT admins TO joe;324</pre></div><div class="refsect1" id="SQL-GRANT-COMPATIBILITY"><h2>Compatibility</h2><p>325 According to the SQL standard, the <code class="literal">PRIVILEGES</code>326 key word in <code class="literal">ALL PRIVILEGES</code> is required. The327 SQL standard does not support setting the privileges on more than328 one object per command.329 </p><p>330 <span class="productname">PostgreSQL</span> allows an object owner to revoke their331 own ordinary privileges: for example, a table owner can make the table332 read-only to themselves by revoking their own <code class="literal">INSERT</code>,333 <code class="literal">UPDATE</code>, <code class="literal">DELETE</code>, and <code class="literal">TRUNCATE</code>334 privileges. This is not possible according to the SQL standard. The335 reason is that <span class="productname">PostgreSQL</span> treats the owner's336 privileges as having been granted by the owner to themselves; therefore they337 can revoke them too. In the SQL standard, the owner's privileges are338 granted by an assumed entity <span class="quote">“<span class="quote">_SYSTEM</span>”</span>. Not being339 <span class="quote">“<span class="quote">_SYSTEM</span>”</span>, the owner cannot revoke these rights.340 </p><p>341 According to the SQL standard, grant options can be granted to342 <code class="literal">PUBLIC</code>; PostgreSQL only supports granting grant options343 to roles.344 </p><p>345 The SQL standard allows the <code class="literal">GRANTED BY</code> option to346 specify only <code class="literal">CURRENT_USER</code> or347 <code class="literal">CURRENT_ROLE</code>. The other variants are PostgreSQL348 extensions.349 </p><p>350 The SQL standard provides for a <code class="literal">USAGE</code> privilege351 on other kinds of objects: character sets, collations,352 translations.353 </p><p>354 In the SQL standard, sequences only have a <code class="literal">USAGE</code>355 privilege, which controls the use of the <code class="literal">NEXT VALUE FOR</code>356 expression, which is equivalent to the357 function <code class="function">nextval</code> in PostgreSQL. The sequence358 privileges <code class="literal">SELECT</code> and <code class="literal">UPDATE</code> are359 PostgreSQL extensions. The application of the360 sequence <code class="literal">USAGE</code> privilege to361 the <code class="literal">currval</code> function is also a PostgreSQL extension (as362 is the function itself).363 </p><p>364 Privileges on databases, tablespaces, schemas, languages, and365 configuration parameters are366 <span class="productname">PostgreSQL</span> extensions.367 </p></div><div class="refsect1" id="id-1.9.3.150.9"><h2>See Also</h2><span class="simplelist"><a class="xref" href="sql-revoke.html" title="REVOKE"><span class="refentrytitle">REVOKE</span></a>, <a class="xref" href="sql-alterdefaultprivileges.html" title="ALTER DEFAULT PRIVILEGES"><span class="refentrytitle">ALTER DEFAULT PRIVILEGES</span></a></span></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sql-fetch.html" title="FETCH">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="sql-commands.html" title="SQL Commands">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sql-importforeignschema.html" title="IMPORT FOREIGN SCHEMA">Next</a></td></tr><tr><td width="40%" align="left" valign="top">FETCH </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="40%" align="right" valign="top"> IMPORT FOREIGN SCHEMA</td></tr></table></div></body></html>