{"Entry":{"collection":"psql","key":"cmd-67","name":"\\g","aliases":["\\g"],"metadata":{"aliases":["\\g"],"category":"Query execution","content_hash":"a6e3c0be7f55b0e47c48c02136c344a053b4cb88dfc049f1405077c3b44eaae1","derived_content_hash":"a5938e6bc7061b1fb4f0569c30dfa15dec18aaa7bd33a6e2a5a11c42f11529fa","documentation_refresh":{"batch":"20261113","original_source_rev":"","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"imported_at":"2026-09-30T00:40:45.022897+08:00","name":"\\g","name_zh":"","slug":"cmd-67","summary":"Sends the current query buffer to the server for execution."}},"Definition":{"Collection":"psql","Key":"cmd-67","SourceDatabase":"center","Version":"18","SourceTable":"psql_command","SourceKey":"cmd-67","SourceRevision":"1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915","Facts":{"command":"\\g","comparison_data":{"definition":"Sends the current query buffer to the server for execution. If parentheses appear after \\g , they surround a space-separated list of option = value formatting-option clauses, which are interpreted in the same way as \\pset option value commands, but take effect only for the duration of this query. In this list, spaces are not allowed around = signs, but are required between option clauses. If = value is omitted, the named option is changed in the same way as for \\pset option with no explicit value . If a filename or | command argument is given, the query's output is written to the named file or piped to the given shell command, instead of displaying it as usual. The file or command is written to only if the query successfully returns zero or more tuples, not if the query fails or is a non-data-returning SQL command. If the current query buffer is empty, the most recently sent query is re-executed instead. Except for that behavior, \\g without any arguments is essentially equivalent to a semicolon. With arguments, \\g provides a “ one-shot ” alternative to the \\o command, and additionally allows one-shot adjustments of the output formatting options normally set by \\pset . When the last argument begins with | , the entire remainder of the line is taken to be the command to execute, and neither variable interpolation nor backquote expansion are performed in it. The rest of the line is simply passed literally to the shell.","modifiers":[],"signature":"\\g [ ( option = value [...]) ] [ filename ] \\g [ ( option = value [...]) ] [ | command ]","spellings":["\\g"]},"comparison_hash":"fcf271c4683692aaeae3e4499d82dbc766c4cabaffbbeabffcc2db03bb450831","description":["Sends the current query buffer to the server for execution."],"description_zh":"将当前查询缓冲区发送给服务器执行。","description_zh_html":"\u003cdd\u003e\u003cp\u003e将当前查询缓冲区发送给服务器执行。\u003c/p\u003e\u003cp\u003e如果在\u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e 后面出现括号，则括号中是用空格分隔的 \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\u003ccode class=\"literal\"\u003e=\u003c/code\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e 格式选项子句列表。这些子句的解释方式与\u003ccode class=\"literal\"\u003e\\pset\u003c/code\u003e\n\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\n\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e 命令相同，但仅在此查询执行期间生效。在此列表中，\u003ccode class=\"literal\"\u003e=\u003c/code\u003e符号周围不允许有空格，但选项子句之间必须有空格。如果\u003ccode class=\"literal\"\u003e=\u003c/code\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e 被省略，则指定的 \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e 会按以下命令的方式更改：\u003ccode class=\"literal\"\u003e\\pset\u003c/code\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e，其中不显式指定 \u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e。\n        \u003c/p\u003e\u003cp\u003e如果给出了 \u003cem class=\"replaceable\"\u003e\u003ccode\u003efilename\u003c/code\u003e\u003c/em\u003e 或\u003ccode class=\"literal\"\u003e|\u003c/code\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ecommand\u003c/code\u003e\u003c/em\u003e 参数，查询输出就会写入指定文件，或通过管道传给指定的 shell 命令，而不是照常显示。只有当查询成功返回零个或多个元组时，才会向文件或命令写入；如果查询失败，或执行的是不返回数据的 SQL 命令，则不会写入。\u003c/p\u003e\u003cp\u003e\n        如果当前查询缓冲区为空，则最近发送的查询将被重新执行。除此之外，没有任何参数的\u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e 基本上等同于一个分号。带有参数的\u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e 提供了一个\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e一次性\u003c/span\u003e”\u003c/span\u003e替代\u003ccode class=\"command\"\u003e\\o\u003c/code\u003e 命令的选择，并且还允许一次性调整通常由\u003ccode class=\"literal\"\u003e\\pset\u003c/code\u003e 设置的输出格式选项。\n        \u003c/p\u003e\u003cp\u003e当最后一个参数以\u003ccode class=\"literal\"\u003e|\u003c/code\u003e开头时，该行剩余的全部内容都会被视为要执行的 \u003cem class=\"replaceable\"\u003e\u003ccode\u003ecommand\u003c/code\u003e\u003c/em\u003e，其中既不进行变量插值，也不进行反引号扩展。该行剩余部分会直接按字面传给 shell。\u003c/p\u003e\u003c/dd\u003e","documentation_revision":{"inputs":[{"file":"app-psql.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"af50448485df02bdef2b72b8347192ba029c7082b8d0392ecb17db44ad533aaf","version":"18.7"},{"file":"app-psql.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"cb475c53a16d9e06358f5e6c9c5649645db92568cfd319f230c62c9f57ae090b","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"facts":[{"label":"Client","value":"psql 18.7"},{"label":"Case-sensitive spelling","value":"\\g"}],"facts_zh":[{"label":"客户端","value":"psql 18.7"},{"label":"区分大小写的写法","value":"\\g"}],"localization":{"documentation_release":"18.7","language":"en","source_language":"en","source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552","status":"same-version-reviewed-manual"},"manual_html":"\u003cdiv\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt id=\"APP-PSQL-META-COMMAND-G\"\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\g [ (\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e=\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e [...]) ] [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003efilename\u003c/code\u003e\u003c/em\u003e ]\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\g [ (\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e=\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e [...]) ] [ |\u003cem class=\"replaceable\"\u003e\u003ccode\u003ecommand\u003c/code\u003e\u003c/em\u003e ]\u003c/code\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n        Sends the current query buffer to the server for execution.\n        \u003c/p\u003e\u003cp\u003e\n        If parentheses appear after \u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e, they surround a\n        space-separated list\n        of \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\u003ccode class=\"literal\"\u003e=\u003c/code\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\n        formatting-option clauses, which are interpreted in the same way\n        as \u003ccode class=\"literal\"\u003e\\pset\u003c/code\u003e\n\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\n\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e commands, but take\n        effect only for the duration of this query.  In this list, spaces are\n        not allowed around \u003ccode class=\"literal\"\u003e=\u003c/code\u003e signs, but are required\n        between option clauses.\n        If \u003ccode class=\"literal\"\u003e=\u003c/code\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\n        is omitted, the\n        named \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e is changed\n        in the same way as for\n        \u003ccode class=\"literal\"\u003e\\pset\u003c/code\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\n        with no explicit \u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e.\n        \u003c/p\u003e\u003cp\u003e\n        If a \u003cem class=\"replaceable\"\u003e\u003ccode\u003efilename\u003c/code\u003e\u003c/em\u003e\n        or \u003ccode class=\"literal\"\u003e|\u003c/code\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ecommand\u003c/code\u003e\u003c/em\u003e\n        argument is given, the query's output is written to the named\n        file or piped to the given shell command, instead of displaying it as\n        usual.  The file or command is written to only if the query\n        successfully returns zero or more tuples, not if the query fails or\n        is a non-data-returning SQL command.\n        \u003c/p\u003e\u003cp\u003e\n        If the current query buffer is empty, the most recently sent query is\n        re-executed instead.  Except for that behavior, \u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e\n        without any arguments is essentially equivalent to a semicolon.\n        With arguments, \u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e provides\n        a \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eone-shot\u003c/span\u003e”\u003c/span\u003e alternative to the \u003ccode class=\"command\"\u003e\\o\u003c/code\u003e\n        command, and additionally allows one-shot adjustments of the\n        output formatting options normally set by \u003ccode class=\"literal\"\u003e\\pset\u003c/code\u003e.\n        \u003c/p\u003e\u003cp\u003e\n        When the last argument begins with \u003ccode class=\"literal\"\u003e|\u003c/code\u003e, the entire\n        remainder of the line is taken to be\n        the \u003cem class=\"replaceable\"\u003e\u003ccode\u003ecommand\u003c/code\u003e\u003c/em\u003e to execute,\n        and neither variable interpolation nor backquote expansion are\n        performed in it.  The rest of the line is simply passed literally to\n        the shell.\n        \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","manual_path":"app-psql.html#APP-PSQL-META-COMMAND-G","modifiers":[],"related":[{"label":"psql command-line options and complete manual","url":"/wiki/tool/psql/?v=18"}],"related_zh":[{"label":"psql 命令行选项及完整手册","url":"/wiki/tool/psql/?v=18"}],"release":{"channel":"stable","evidence_kind":"English manual and source declarations","label":"18.7","major":"18","manifest":{"major":"18","release":"18.7","source_sha256":"441dfae4280cae3e0425e5f876f80559fb0731c140f1aae22b3e5a54d0411bfd","source_url":"https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2"},"ref":"https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2","revision":"1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915","source_sha256":"441dfae4280cae3e0425e5f876f80559fb0731c140f1aae22b3e5a54d0411bfd"},"sections":[],"sections_zh":[],"signature":"\\g [ ( option = value [...]) ] [ filename ] \\g [ ( option = value [...]) ] [ | command ]","sources":[{"anchor":"APP-PSQL-META-COMMAND-G","file":"app-psql.html","label":"18.7 English manual · app-psql.html","sha256":"af50448485df02bdef2b72b8347192ba029c7082b8d0392ecb17db44ad533aaf","url":"/docs/18/app-psql.html#APP-PSQL-META-COMMAND-G"}],"spellings":["\\g"],"tables":[{"columns":[{"key":"command","label":"Command"},{"key":"modifiers","label":"Documented suffix modifiers"}],"key":"spellings","rows":[{"command":{"text":"\\g","url":"/wiki/psql/cmd-67/?v=18"},"modifiers":"None listed in this signature"}],"title":"Spellings in this manual definition"}],"tables_zh":[{"columns":[{"key":"command","label":"命令"},{"key":"modifiers","label":"手册中的后缀修饰符"}],"key":"spellings","rows":[{"command":{"text":"\\g","url":"/wiki/psql/cmd-67/?v=18"},"modifiers":"此语法签名未列出"}],"title":"本版手册中的写法"}],"zh_from":"same-version-manual"},"ManualEvidence":{"manual_path":"app-psql.html#APP-PSQL-META-COMMAND-G","release":{"channel":"stable","evidence_kind":"English manual and source declarations","label":"18.7","major":"18","manifest":{"major":"18","release":"18.7","source_sha256":"441dfae4280cae3e0425e5f876f80559fb0731c140f1aae22b3e5a54d0411bfd","source_url":"https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2"},"ref":"https://ftp.postgresql.org/pub/source/v18.7/postgresql-18.7.tar.bz2","revision":"1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915","source_sha256":"441dfae4280cae3e0425e5f876f80559fb0731c140f1aae22b3e5a54d0411bfd"},"sources":[{"anchor":"APP-PSQL-META-COMMAND-G","file":"app-psql.html","label":"18.7 English manual · app-psql.html","sha256":"af50448485df02bdef2b72b8347192ba029c7082b8d0392ecb17db44ad533aaf","url":"/docs/18/app-psql.html#APP-PSQL-META-COMMAND-G"}]},"MeasuredEvidence":{}},"Text":{"Collection":"psql","Key":"cmd-67","SourceDatabase":"center","Version":"18","Locale":"en","Title":"\\g","Summary":"Sends the current query buffer to the server for execution.","BodyHTML":"\u003cdiv\u003e\u003cdl\u003e\u003cdt id=\"APP-PSQL-META-COMMAND-G\"\u003e\u003cspan\u003e\u003ccode\u003e\\g [ (\u003cem\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e=\u003cem\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e [...]) ] [ \u003cem\u003e\u003ccode\u003efilename\u003c/code\u003e\u003c/em\u003e ]\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan\u003e\u003ccode\u003e\\g [ (\u003cem\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e=\u003cem\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e [...]) ] [ |\u003cem\u003e\u003ccode\u003ecommand\u003c/code\u003e\u003c/em\u003e ]\u003c/code\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n        Sends the current query buffer to the server for execution.\n        \u003c/p\u003e\u003cp\u003e\n        If parentheses appear after \u003ccode\u003e\\g\u003c/code\u003e, they surround a\n        space-separated list\n        of \u003cem\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\u003ccode\u003e=\u003c/code\u003e\u003cem\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\n        formatting-option clauses, which are interpreted in the same way\n        as \u003ccode\u003e\\pset\u003c/code\u003e\n\u003cem\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\n\u003cem\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e commands, but take\n        effect only for the duration of this query.  In this list, spaces are\n        not allowed around \u003ccode\u003e=\u003c/code\u003e signs, but are required\n        between option clauses.\n        If \u003ccode\u003e=\u003c/code\u003e\u003cem\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\n        is omitted, the\n        named \u003cem\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e is changed\n        in the same way as for\n        \u003ccode\u003e\\pset\u003c/code\u003e \u003cem\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\n        with no explicit \u003cem\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e.\n        \u003c/p\u003e\u003cp\u003e\n        If a \u003cem\u003e\u003ccode\u003efilename\u003c/code\u003e\u003c/em\u003e\n        or \u003ccode\u003e|\u003c/code\u003e\u003cem\u003e\u003ccode\u003ecommand\u003c/code\u003e\u003c/em\u003e\n        argument is given, the query\u0026#39;s output is written to the named\n        file or piped to the given shell command, instead of displaying it as\n        usual.  The file or command is written to only if the query\n        successfully returns zero or more tuples, not if the query fails or\n        is a non-data-returning SQL command.\n        \u003c/p\u003e\u003cp\u003e\n        If the current query buffer is empty, the most recently sent query is\n        re-executed instead.  Except for that behavior, \u003ccode\u003e\\g\u003c/code\u003e\n        without any arguments is essentially equivalent to a semicolon.\n        With arguments, \u003ccode\u003e\\g\u003c/code\u003e provides\n        a \u003cspan\u003e“\u003cspan\u003eone-shot\u003c/span\u003e”\u003c/span\u003e alternative to the \u003ccode\u003e\\o\u003c/code\u003e\n        command, and additionally allows one-shot adjustments of the\n        output formatting options normally set by \u003ccode\u003e\\pset\u003c/code\u003e.\n        \u003c/p\u003e\u003cp\u003e\n        When the last argument begins with \u003ccode\u003e|\u003c/code\u003e, the entire\n        remainder of the line is taken to be\n        the \u003cem\u003e\u003ccode\u003ecommand\u003c/code\u003e\u003c/em\u003e to execute,\n        and neither variable interpolation nor backquote expansion are\n        performed in it.  The rest of the line is simply passed literally to\n        the shell.\n        \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","SourceRevision":"1b2d62b4845aa46374f2cb680f95d3392322cc8128646992ae4e18d0e7084915","ContentHash":"a19e0ade1ba5b34d61acb3858d0b232fb8356747a6b39e39000f14eabe4b3d76","Payload":{"description":["Sends the current query buffer to the server for execution."],"manual_html":"\u003cdiv\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt id=\"APP-PSQL-META-COMMAND-G\"\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\g [ (\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e=\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e [...]) ] [ \u003cem class=\"replaceable\"\u003e\u003ccode\u003efilename\u003c/code\u003e\u003c/em\u003e ]\u003c/code\u003e\u003cbr\u003e\u003c/span\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e\\g [ (\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e=\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e [...]) ] [ |\u003cem class=\"replaceable\"\u003e\u003ccode\u003ecommand\u003c/code\u003e\u003c/em\u003e ]\u003c/code\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n        Sends the current query buffer to the server for execution.\n        \u003c/p\u003e\u003cp\u003e\n        If parentheses appear after \u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e, they surround a\n        space-separated list\n        of \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\u003ccode class=\"literal\"\u003e=\u003c/code\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\n        formatting-option clauses, which are interpreted in the same way\n        as \u003ccode class=\"literal\"\u003e\\pset\u003c/code\u003e\n\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\n\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e commands, but take\n        effect only for the duration of this query.  In this list, spaces are\n        not allowed around \u003ccode class=\"literal\"\u003e=\u003c/code\u003e signs, but are required\n        between option clauses.\n        If \u003ccode class=\"literal\"\u003e=\u003c/code\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\n        is omitted, the\n        named \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e is changed\n        in the same way as for\n        \u003ccode class=\"literal\"\u003e\\pset\u003c/code\u003e \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\n        with no explicit \u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e.\n        \u003c/p\u003e\u003cp\u003e\n        If a \u003cem class=\"replaceable\"\u003e\u003ccode\u003efilename\u003c/code\u003e\u003c/em\u003e\n        or \u003ccode class=\"literal\"\u003e|\u003c/code\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ecommand\u003c/code\u003e\u003c/em\u003e\n        argument is given, the query's output is written to the named\n        file or piped to the given shell command, instead of displaying it as\n        usual.  The file or command is written to only if the query\n        successfully returns zero or more tuples, not if the query fails or\n        is a non-data-returning SQL command.\n        \u003c/p\u003e\u003cp\u003e\n        If the current query buffer is empty, the most recently sent query is\n        re-executed instead.  Except for that behavior, \u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e\n        without any arguments is essentially equivalent to a semicolon.\n        With arguments, \u003ccode class=\"literal\"\u003e\\g\u003c/code\u003e provides\n        a \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eone-shot\u003c/span\u003e”\u003c/span\u003e alternative to the \u003ccode class=\"command\"\u003e\\o\u003c/code\u003e\n        command, and additionally allows one-shot adjustments of the\n        output formatting options normally set by \u003ccode class=\"literal\"\u003e\\pset\u003c/code\u003e.\n        \u003c/p\u003e\u003cp\u003e\n        When the last argument begins with \u003ccode class=\"literal\"\u003e|\u003c/code\u003e, the entire\n        remainder of the line is taken to be\n        the \u003cem class=\"replaceable\"\u003e\u003ccode\u003ecommand\u003c/code\u003e\u003c/em\u003e to execute,\n        and neither variable interpolation nor backquote expansion are\n        performed in it.  The rest of the line is simply passed literally to\n        the shell.\n        \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e","related":[{"label":"psql command-line options and complete manual","url":"/wiki/tool/psql/?v=18"}],"sections":[],"tables":[{"columns":[{"key":"command","label":"Command"},{"key":"modifiers","label":"Documented suffix modifiers"}],"key":"spellings","rows":[{"command":{"text":"\\g","url":"/wiki/psql/cmd-67/?v=18"},"modifiers":"None listed in this signature"}],"title":"Spellings in this manual definition"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":[{"Version":"18","Ordinal":0,"Command":"\\g","Signature":"\\g [ ( option = value [...]) ] [ filename ] \\g [ ( option = value [...]) ] [ | command ]","Modifiers":[]}],"SQLState":null,"Evidence":null}
