Skip to content

sys.worker_uuid

Given a logical compute node ID, return the UUID of that compute node if it was involved in the query where the function is used. If the compute node was not involved, the function returns NULL.

sys.worker_uuid(worker_id)

To return a meaningful result, always use this function in a query with a table reference, such as a reference to sys.const.

For example, the first two queries return UUIDs, and the third returns NULL:

premdb=# select sys.worker_uuid(9) from sys.const;
            worker_uuid
--------------------------------------
 00000000-0000-0000-0000-38b8ebd00393
(1 row)

premdb=# select sys.worker_uuid(3) from sys.const;
            worker_uuid
--------------------------------------
 00000000-0000-0000-0000-38b8ebd002a3
(1 row)

premdb=# select sys.worker_uuid(16) from sys.const;
 worker_uuid
-------------

(1 row)