Skip to content

Commit

Permalink
sql/builtins: update Info for pg_get_viewdef
Browse files Browse the repository at this point in the history
The pg_builtin func `pg_get_viewdef` was updated from a no-op to an actual
function long time ago, but the info field is still `notUsableInfo`, which
made the doc to miss it by mistake. This PR is to update the info, and let it
be recorded in `functions.md`.

Release justification: bug fix, update a builtin's visibility in docs.
Release note: none
  • Loading branch information
ZhouXing19 committed Aug 22, 2022
1 parent e252fb2 commit eca9bc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/generated/sql/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3457,6 +3457,10 @@ A write probe will effectively probe reads as well.</p>
</span></td><td>Immutable</td></tr>
<tr><td><a name="pg_get_serial_sequence"></a><code>pg_get_serial_sequence(table_name: <a href="string.html">string</a>, column_name: <a href="string.html">string</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the name of the sequence used by the given column_name in the table table_name.</p>
</span></td><td>Stable</td></tr>
<tr><td><a name="pg_get_viewdef"></a><code>pg_get_viewdef(view_oid: oid) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the CREATE statement for an existing view.</p>
</span></td><td>Stable</td></tr>
<tr><td><a name="pg_get_viewdef"></a><code>pg_get_viewdef(view_oid: oid, pretty_bool: <a href="bool.html">bool</a>) &rarr; <a href="string.html">string</a></code></td><td><span class="funcdesc"><p>Returns the CREATE statement for an existing view.</p>
</span></td><td>Stable</td></tr>
<tr><td><a name="pg_has_role"></a><code>pg_has_role(role: <a href="string.html">string</a>, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for role.</p>
</span></td><td>Stable</td></tr>
<tr><td><a name="pg_has_role"></a><code>pg_has_role(role: oid, privilege: <a href="string.html">string</a>) &rarr; <a href="bool.html">bool</a></code></td><td><span class="funcdesc"><p>Returns whether or not the current user has privileges for role.</p>
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/sem/builtins/pg_builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func makePGGetViewDef(argTypes tree.ArgTypes) tree.Overload {
}
return r[0], nil
},
Info: notUsableInfo,
Info: "Returns the CREATE statement for an existing view.",
Volatility: volatility.Stable,
}
}
Expand Down

0 comments on commit eca9bc9

Please sign in to comment.