gooderp18绿色标准版
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

35 行
4.3KB

  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>CREATE USER</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 V1.79.1" /><link rel="prev" href="sql-createtype.html" title="CREATE TYPE" /><link rel="next" href="sql-createusermapping.html" title="CREATE USER MAPPING" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">CREATE USER</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="sql-createtype.html" title="CREATE TYPE">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 12.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="sql-createusermapping.html" title="CREATE USER MAPPING">Next</a></td></tr></table><hr></hr></div><div class="refentry" id="SQL-CREATEUSER"><div class="titlepage"></div><a id="id-1.9.3.95.1" class="indexterm"></a><div class="refnamediv"><h2><span class="refentrytitle">CREATE USER</span></h2><p>CREATE USER — define a new database role</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
  3. CREATE USER <em class="replaceable"><code>name</code></em> [ [ WITH ] <em class="replaceable"><code>option</code></em> [ ... ] ]
  4. <span class="phrase">where <em class="replaceable"><code>option</code></em> can be:</span>
  5. SUPERUSER | NOSUPERUSER
  6. | CREATEDB | NOCREATEDB
  7. | CREATEROLE | NOCREATEROLE
  8. | INHERIT | NOINHERIT
  9. | LOGIN | NOLOGIN
  10. | REPLICATION | NOREPLICATION
  11. | BYPASSRLS | NOBYPASSRLS
  12. | CONNECTION LIMIT <em class="replaceable"><code>connlimit</code></em>
  13. | [ ENCRYPTED ] PASSWORD '<em class="replaceable"><code>password</code></em>' | PASSWORD NULL
  14. | VALID UNTIL '<em class="replaceable"><code>timestamp</code></em>'
  15. | IN ROLE <em class="replaceable"><code>role_name</code></em> [, ...]
  16. | IN GROUP <em class="replaceable"><code>role_name</code></em> [, ...]
  17. | ROLE <em class="replaceable"><code>role_name</code></em> [, ...]
  18. | ADMIN <em class="replaceable"><code>role_name</code></em> [, ...]
  19. | USER <em class="replaceable"><code>role_name</code></em> [, ...]
  20. | SYSID <em class="replaceable"><code>uid</code></em>
  21. </pre></div><div class="refsect1" id="id-1.9.3.95.5"><h2>Description</h2><p>
  22. <code class="command">CREATE USER</code> is now an alias for
  23. <a class="xref" href="sql-createrole.html" title="CREATE ROLE"><span class="refentrytitle">CREATE ROLE</span></a>.
  24. The only difference is that when the command is spelled
  25. <code class="command">CREATE USER</code>, <code class="literal">LOGIN</code> is assumed
  26. by default, whereas <code class="literal">NOLOGIN</code> is assumed when
  27. the command is spelled
  28. <code class="command">CREATE ROLE</code>.
  29. </p></div><div class="refsect1" id="id-1.9.3.95.6"><h2>Compatibility</h2><p>
  30. The <code class="command">CREATE USER</code> statement is a
  31. <span class="productname">PostgreSQL</span> extension. The SQL standard
  32. leaves the definition of users to the implementation.
  33. </p></div><div class="refsect1" id="id-1.9.3.95.7"><h2>See Also</h2><span class="simplelist"><a class="xref" href="sql-createrole.html" title="CREATE ROLE"><span class="refentrytitle">CREATE ROLE</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-createtype.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="sql-commands.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sql-createusermapping.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">CREATE TYPE </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> CREATE USER MAPPING</td></tr></table></div></body></html>
上海开阖软件有限公司 沪ICP备12045867号-1