pg_window
pg_window#
The pg_window table stores information about window functions. Window functions are often used to compose complex OLAP (online analytical processing) queries. Window functions are applied to partitioned result sets within the scope of a single query expression. A window partition is a subset of rows returned by a query, as defined in a special OVER() clause. Typical window functions are rank, dense_rank, and row_number. Each entry in pg_window is an extension of an entry in pg_proc. The pg_proc entry carries the window function’s name, input and output data types, and other information that is similar to ordinary functions.
Table 1. pg_catalog.pg_window
column |
type |
references |
description |
|---|---|---|---|
|
regproc |
pg_proc.oid |
The OID in |
|
boolean |
The window function requires its window specification to have an |
|
|
boolean |
The window function permits its window specification to have a |
|
|
boolean |
The peer group row count is required to compute this window function, so the Window node implementation must ‘look ahead’ as necessary to make this available in its internal state. |
|
|
boolean |
The partition row count is required to compute this window function. |
|
|
regproc |
pg_proc.oid |
The OID in |
|
regproc |
pg_proc.oid |
The OID in |
|
oid |
pg_type.oid |
The OID in |
|
regproc |
pg_proc.oid |
The OID in |
|
char |
A character indicating membership of the window function in a class of related functions: |