Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/src/main/sphinx/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ sql/revoke
sql/revoke-roles
sql/rollback
sql/select
sql/set-path
sql/set-role
sql/set-session
sql/set-time-zone
Expand Down
52 changes: 52 additions & 0 deletions docs/src/main/sphinx/sql/set-path.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
========
SET PATH
========

Synopsis
--------

.. code-block:: text

SET PATH path-element[, ...]

Description
-----------

Define a collection of paths to functions or table functions in specific
catalogs and schemas for the current session.

Each path-element uses a period-separated syntax to specify the catalog name and
schema location ``<catalog>.<schema>`` of the function, or only the schema
location ``<schema>`` in the current catalog. The current catalog is set with
:doc:`use`, or as part of a client tool connection. Catalog and schema must
exist.

Examples
--------

The following example sets a path to access functions in the ``system`` schema
Comment thread
mosabua marked this conversation as resolved.
Outdated
of the ``example`` catalog::

SET PATH example.system;

The catalog uses the PostgreSQL connector, and you can therefore use the
:ref:`query table function <postgresql-query-function>` directly, without the
full catalog and schema qualifiers::

SELECT
Comment thread
mosabua marked this conversation as resolved.
Outdated
*
FROM
TABLE(
query(
query => 'SELECT
*
FROM
tpch.nation'
)
);

Comment thread
mosabua marked this conversation as resolved.
Outdated
See also
--------

:doc:`use`