diff --git a/docs/whpg/6x/admin_guide/analytics/postGIS.md b/docs/whpg/6x/admin_guide/analytics/postGIS.md index 6fdb610..bc4c843 100644 --- a/docs/whpg/6x/admin_guide/analytics/postGIS.md +++ b/docs/whpg/6x/admin_guide/analytics/postGIS.md @@ -40,62 +40,15 @@ There are significant changes in PostGIS 2.5.4 compared with 2.1.5. For a list o This table lists the PostGIS extensions support by WarehousePG PostGIS. -
| PostGIS Extension | -WarehousePG PostGIS Notes | -
|---|---|
postgisPostGIS and PostGIS Raster - support - |
-Supported. Both PostGIS and PostGIS Raster are enabled when the WarehousePG
- postgis extension is enabled. |
-
postgis_tiger_geocoderThe US TIGER geocoder - |
-Supported. Installed with WarehousePG PostGIS. Requires the
- The US TIGER geocoder converts addresses (like a street address) - to geographic coordinates. - |
-
address_standardizerRule-based address - standardizer - |
-Supported. Installed but not enabled with WarehousePG PostGIS. Can be used - with TIGER geocoder. -A single line address parser that takes an input
- address and normalizes it based on a set of rules stored in a table and helper
- |
-
address_standardizer_data_usSample rules tables for US - address data - |
-Supported. Installed but not enabled with WarehousePG PostGIS. Can be used with - the address standardizer. -The extension contains |
-
fuzzystrmatchFuzzy string matching - |
-Supported. This extension is bundled but not enabled with WarehousePG
- Database. Required for the PostGIS TIGER geocoder. - |
-
| Callback Signature | -Description | -
|---|---|
|
- Obtain relation size estimates for a foreign table. - Called at the beginning of planning for a query on a foreign table. | -
|
- Create possible access paths for a scan on a
- foreign table. Called during query planning. Note: A WarehousePG
- Database-compatible FDW must call
- create_foreignscan_path() in its
- GetForeignPaths() callback function. |
-
|
- Create a ForeignScan plan node from
- the selected foreign access path. Called at the end of query planning. |
-
|
- Begin running a foreign scan. Called during - executor startup. | -
|
- Fetch one row from the foreign source, returning it - in a tuple table slot; return NULL if no more rows are available. | -
|
- Restart the scan from the beginning. | -
|
- End the scan and release resources. | -
| Callback Signature | -Description | -
|---|---|
|
- Add additional information in the foreign - table that will be retrieved during an update or delete operation - to identify the exact row on which to operate. | -
|
- Perform additional planning actions required - for an insert, update, or delete operation on a foreign table, - and return the information generated. | -
|
- Begin executing a modify operation on a - foreign table. Called during executor startup. | -
|
- Insert a single tuple into the foreign table. - Return a slot containing the data that was actually inserted, or - NULL if no row was inserted. | -
|
- Update a single tuple in the foreign table. - Return a slot containing the row as it was actually updated, or - NULL if no row was updated. | -
|
- Delete a single tuple from the foreign table. - Return a slot containing the row that was deleted, or NULL if no - row was deleted. | -
|
- End the update and release resources. | -
|
- Report the update operations supported by the - specified foreign table. | -
| Helper Signature | -Description | -
|---|---|
|
- Returns the ForeignDataWrapper
- object for the foreign-data wrapper with the given OID. |
-
|
- Returns the ForeignDataWrapper
- object for the foreign-data wrapper with the given name. |
-
|
- Returns the ForeignServer
- object for the foreign server with the given OID. |
-
|
- Returns the ForeignServer
- object for the foreign server with the given name. |
-
|
- Returns the UserMapping
- object for the user mapping of the given role on the given
- server. |
-
|
- Returns the ForeignTable
- object for the foreign table with the given OID. |
-
|
- Returns the per-column FDW options for the - column with the given foreign table OID and attribute number. | -
| stakind Code | -Description | -
|---|---|
| 1 | -Most CommonValues (MCV) Slot
-
stavalues
- array; a unique column has no MCV slot. |
-
| 2 | -Histogram Slot – describes the distribution of scalar data.
If a Most Common Values slot is also provided, then the histogram - describes the data distribution after removing the values listed in the MCV - array. (It is a compressed histogram in the technical parlance). This - allows a more accurate representation of the distribution of a column with - some very common values. In a column with only a few distinct values, it is - possible that the MCV list describes the entire data population; in this case - the histogram reduces to empty and should be omitted. |
-
| 3 | -Correlation Slot – describes the correlation between the physical
- order of table tuples and the ordering of data values of this column.
|
-
| 4 | -Most Common Elements Slot - is similar to a Most Common Values (MCV)
- Slot, except that it stores the most common non-null elements of the
- column values. This is useful when the column datatype is an array or some other
- type with identifiable elements (for instance, tsvector).
Frequencies are measured as the fraction of non-null rows the element
- value appears in, not the frequency of all rows. Also, the values are sorted
- into the element type's default order (to support binary search for a
- particular value). Since this puts the minimum and maximum frequencies at
- unpredictable spots in Note: For tsvector columns, the stavalues
- elements are of type text, even though their representation
- within tsvector is not exactly
- text. |
-
| 5 | -Distinct Elements Count Histogram Slot - describes the distribution
- of the number of distinct element values present in each row of an array-type
- column. Only non-null rows are considered, and only non-null elements.
|
-
| 99 | -Hyperloglog Slot - for child leaf partitions of a partitioned table,
- stores the hyperloglog_counter created for the sampled data.
- The hyperloglog_counter data structure is converted into a
- bytea and stored in a stavalues5 slot of the
- pg_statistic catalog table. |
-
| Object Type | -Privileges | -
|---|---|
| Tables, External Tables, Views | -
-
-
-
-
-
-
-
-
- |
-
| Columns | -
-
-
-
-
-
- |
-
| Sequences | -
-
-
-
-
- |
-
| Databases | -
-
-
-
-
-
- |
-
| Domains | -
-
-
- |
-
| Foreign Data Wrappers | -
-
-
- |
-
| Foreign Servers | -
-
-
- |
-
| Functions | -
-
-
- |
-
| Procedural Languages | -
-
-
- |
-
| Schemas | -
-
-
-
- |
-
| Tablespaces | -
-
-
- |
-
| Types | -
-
-
- |
-
| Protocols | -
-
-
-
- |
-
| Activity | -Procedure | -Corrective Actions | -
|---|---|---|
| List segments that are currently down. If any rows are
- returned, this should generate a warning or alert. Recommended - frequency: run every 5 to 10 minutes Severity: - IMPORTANT |
-Run the following query in the postgres
- database: |
-If the query returns any rows, follow these steps to correct
- the problem:
|
-
| Check for segments that are up and not in sync. If rows are
- returned, this should generate a warning or alert. Recommended - frequency: run every 5 to 10 minutes |
-
- Execute the following query in the
-postgres
- database: |
-If the query returns rows then the segment might be in the process
- of moving from Not In Sync to
-Synchronized mode. Use gpstate
- -e to track progress. |
-
Check for segments that are not operating in their preferred role but are marked as up and Synchronized.
- If any segments are found, the cluster may not be
- balanced. If any rows are returned this should generate a
- warning or alert. Recommended frequency: run every 5 to 10 - minutes Severity: IMPORTANT |
-
- Execute the following query in the
-
-postgres
- database:
- |
-
- When the segments are not running in their preferred role, processing might be skewed.
- Run |
-
| Run a distributed query to test that it runs on all segments.
- One row should be returned for each primary segment.
- Recommended frequency: run every 5 to 10 - minutes Severity: CRITICAL |
-
- Execute the following query in the
-postgres
- database: |
-
- If this query fails, there is an issue dispatching to some - segments in the cluster. This is a rare event. Check the - hosts that are not able to be dispatched to ensure there is - no hardware or networking issue. - |
-
| Test the state of coordinator mirroring on WarehousePG. If
- the value is not "STREAMING", raise an alert or
- warning. Recommended frequency: run every 5 to 10 - minutes Severity: IMPORTANT |
-
- Run the following
-psql
- command: |
-
- Check the log file from the coordinator
- and standby coordinator for errors. If there are no unexpected
- errors and the machines are up, run the
- |
-
| Perform a basic check to see if the coordinator is up and
- functioning. Recommended frequency: run every 5 to 10 - minutes Severity: CRITICAL |
-
- Run the following query in the
-postgres
- database:
- |
-
- If this query fails, the active coordinator may be down. Try to - start the database on the original coordinator if the server is - up and running. If that fails, try to activate the standby - coordinator as coordinator. - |
-
| Activity | -Procedure | -Corrective Actions | -
|---|---|---|
| Check disk space usage on volumes used for WarehousePG data storage and the OS.
- Recommended frequency: every 5 to 30 - minutes Severity: CRITICAL |
-
- Set up a disk space check.
-
|
-Use VACUUM/VACUUM FULL on
- user tables to reclaim space occupied by dead rows. |
-
| Check for errors or dropped packets on the network
- interfaces. Recommended frequency: hourly Severity: - IMPORTANT |
-Set up a network interface checks. | -
- Work with network and OS teams to resolve errors. - |
-
| Check for RAID errors or degraded RAID performance.
- Recommended frequency: every 5 minutes Severity: - CRITICAL |
-Set up a RAID check. | -
-
|
-
| Check for adequate I/O bandwidth and I/O skew. Recommended - frequency: when create a cluster or when hardware issues are - suspected. |
-Run the WarehousePG
-gpcheckperf utility. |
-
- The cluster may be under-specified if data transfer rates are
- not similar to the following:
-
If the machines on the cluster display an uneven performance - profile, work with the system administration team to fix - faulty machines. - |
-
| Activity | -Procedure | -Corrective Actions | -
|---|---|---|
| Run catalog consistency checks in each database to ensure the
- catalog on each host in the cluster is consistent and in a good
- state. You may run this command while the database is up - and running. Recommended frequency: - weekly Severity: IMPORTANT |
-Run the WarehousePG gpcheckcat utility in each
- database:Note: With the
- -O option, gpcheckcat
- runs just 10 of its usual 15 tests. |
-Run the repair scripts for any issues identified. | -
Check for pg_class entries that have no
- corresponding pg_attribute entry.Recommended - frequency: monthly Severity: IMPORTANT |
-During a downtime, with no users on the system, run the
- WarehousePG
-gpcheckcat utility in each
- database: |
-Run the repair scripts for any issues identified. | -
| Check for leaked temporary schema and missing schema
- definition. Recommended frequency: monthly Severity: - IMPORTANT |
-During a downtime, with no users on the system, run the
- WarehousePG
-gpcheckcat utility in each
- database: |
-Run the repair scripts for any issues identified. | -
| Check constraints on randomly distributed
- tables. Recommended frequency: monthly Severity: - IMPORTANT |
-During a downtime, with no users on the system, run the
- WarehousePG
-gpcheckcat utility in each
- database: |
-Run the repair scripts for any issues identified. | -
| Check for dependencies on non-existent objects. Recommended - frequency: monthly Severity: IMPORTANT |
-During a downtime, with no users on the system, run the
- WarehousePG
-gpcheckcat utility in each
- database: |
-Run the repair scripts for any issues identified. | -
| Activity | -Procedure | -Corrective Actions | -
|---|---|---|
| Check for missing statistics on tables. | -Check the gp_stats_missing view in each
- database: |
-Run ANALYZE on tables that are missing
- statistics. |
-
Check for tables that have bloat (dead space) in data files
- that cannot be recovered by a regular VACUUM
- command. Recommended frequency: weekly or - monthly Severity: WARNING |
-Check the gp_bloat_diag view in each
- database:
- |
-VACUUM FULL acquires an ACCESS
- EXCLUSIVE lock on tables. Run VACUUM
- FULL during a time when users and applications do
- not require access to the tables, such as during a time of low
- activity, or during a maintenance window. |
-
| Activity | -Procedure | -Corrective Actions | -
|---|---|---|
| Reclaim space occupied by deleted rows in the heap
- tables so that the space they occupy can be
- reused. Recommended frequency: daily Severity: - CRITICAL |
-Vacuum user
- tables: |
-Vacuum updated tables regularly to prevent bloating. - | -
| Update table statistics. Recommended frequency: after - loading data and before executing - queries Severity: CRITICAL |
-Analyze user tables. You can use the
-analyzedb management
- utility: |
-Analyze updated tables regularly so that the optimizer - can produce efficient query execution plans. | -
| Backup the database data. Recommended frequency: daily, - or as required by your backup plan Severity: - CRITICAL |
-
-Run the gpbackup
- utility to create a backup of the coordinator and segment
- databases in parallel.
- |
-Best practice is to have a current backup ready in case - the database must be restored. | -
| Vacuum, reindex, and analyze system catalogs to maintain
- an efficient catalog. Recommended frequency: weekly, or - more often if database objects are created and dropped - frequently |
-
-
|
-The optimizer retrieves information from the system
- tables to create query plans. If system tables and indexes
- are allowed to become bloated over time, scanning the system
- tables increases query execution time. It is important to
- run ANALYZE after reindexing, because
-REINDEX leaves indexes with no
- statistics. |
-
| Activity | -Procedure | -Corrective Actions | -
|---|---|---|
| Ensure any bug fixes or enhancements are applied to the
- kernel. Recommended frequency: at least every 6 - months Severity: IMPORTANT |
-Follow the vendor's instructions to update the Linux - kernel. | -Keep the kernel current to include bug fixes and security - fixes, and to avoid difficult future upgrades. | -
| Install WarehousePG minor releases, for example
- 6.21.x. Recommended frequency: - quarterly Severity: IMPORTANT |
-Follow upgrade instructions in the WarehousePG -Release Notes. Always upgrade to the latest in the - series. | -Keep the WarehousePG software current to - incorporate bug fixes, performance enhancements, and feature - enhancements into your WarehousePG - cluster. | -
| Operator/Function Category | -VOLATILE Functions | -STABLE Functions | -Restrictions | -
|---|---|---|---|
| - Logical Operators - | -- | - | - |
| - Comparison Operators - | -- | - | - |
| - - Mathematical Functions and Operators - - | -random setseed |
- - | - |
| - - String Functions and Operators - - | -- All built-in conversion functions - | -convert pg_client_encoding |
- - |
| - - Binary String Functions and Operators - - | -- | - | - |
| - - Bit String Functions and Operators - - | -- | - | - |
| - - Pattern Matching - - | -- | - | - |
| - - Data Type Formatting Functions - - | -- | to_char to_timestamp |
- - |
| - Date/Time Functions and Operators - | -timeofday | -age current_date current_time current_timestamp localtime localtimestamp now |
- - |
| - Enum Support Functions - | -- | - | - |
| - - Geometric Functions and Operators - - | -- | - | - |
| - - Network Address Functions and Operators - - | -- | - | - |
| - - Sequence Manipulation Functions - - | -nextval() setval() |
- - | - |
| - - Conditional Expressions - - | -- | - | - |
| - - Array Functions and Operators - - | -- | - All array functions - | -- |
| - - Aggregate Functions - - | -- | - | - |
| - - Subquery Expressions - - | -- | - | - |
| - - Row and Array Comparisons - - | -- | - | - |
| - - Set Returning Functions - - | -generate_series | -- | - |
| - - System Information Functions - - | -- |
- All session information functions
- - All access privilege inquiry functions - - All schema visibility inquiry functions - - All system catalog information functions - - All comment information functions - - All transaction ids and snapshots - |
- - |
| - - System Administration Functions - - | -set_config pg_cancel_backend pg_terminate_backend pg_reload_conf pg_rotate_logfile pg_start_backup pg_stop_backup pg_size_pretty pg_ls_dir pg_read_file pg_stat_file |
- current_setting All database object size - functions |
- Note: The function
- pg_column_size displays bytes required to store
- the value, possibly with TOAST compression. |
-
| - XML Functions and function-like - expressions | -- |
- cursor_to_xml(cursor refcursor, count int, nulls boolean, - tableforest boolean, targetns text) -cursor_to_xmlschema(cursor refcursor, nulls boolean, tableforest - boolean, targetns text) -database_to_xml(nulls boolean, tableforest boolean, targetns - text) -database_to_xmlschema(nulls boolean, tableforest boolean, - targetns text) -database_to_xml_and_xmlschema( nulls boolean, tableforest - boolean, targetns text) -query_to_xml(query text, nulls boolean, tableforest boolean, - targetns text) -query_to_xmlschema(query text, nulls boolean, tableforest - boolean, targetns text) -query_to_xml_and_xmlschema( query text, nulls boolean, - tableforest boolean, targetns text) -schema_to_xml(schema name, nulls boolean, tableforest boolean, - targetns text) -schema_to_xmlschema( schema name, nulls boolean, tableforest - boolean, targetns text) -schema_to_xml_and_xmlschema( schema name, nulls boolean, - tableforest boolean, targetns text) -table_to_xml(tbl regclass, nulls boolean, tableforest boolean, - targetns text) -table_to_xmlschema( tbl regclass, nulls boolean, tableforest - boolean, targetns text) -table_to_xml_and_xmlschema( tbl regclass, nulls boolean, - tableforest boolean, targetns text) -xmlagg(xml) -xmlconcat(xml[, ...]) -xmlelement(name name [, xmlattributes(value [AS attname] [, ... - ])] [, content, ...]) -xmlexists(text, xml) -xmlforest(content [AS name] [, ...]) -xml_is_well_formed(text) -xml_is_well_formed_document(text) -xml_is_well_formed_content(text) -xmlparse ( { DOCUMENT | CONTENT } value) -xpath(text, xml) -xpath(text, xml, text[]) -xpath_exists(text, xml) -xpath_exists(text, xml, text[]) -xmlpi(name target [, content]) -xmlroot(xml, version text | no value [, standalone yes|no|no - value]) -xmlserialize ( { DOCUMENT | CONTENT } value AS type ) -xml(text) -text(xml) -xmlcomment(xml) -xmlconcat2(xml, xml) - |
- - |
| Function | -Return Type | -Full Syntax | -Description | -
|---|---|---|---|
- cume_dist()
- |
-
- double precision
- |
-
- CUME_DIST() OVER ( [PARTITION BY
- expr
- ] ORDER BY
- expr
- )
- |
- Calculates the cumulative distribution of a value - in a group of values. Rows with equal values always evaluate to the - same cumulative distribution value. | -
- dense_rank()
- |
-
- bigint
- |
-
- DENSE_RANK () OVER ( [PARTITION BY
- expr
- ] ORDER BY
- expr
- )
- |
- Computes the rank of a row in an ordered group of - rows without skipping rank values. Rows with equal values are given - the same rank value. | -
- first_value(expr)
- |
- same as input expr type | -
- FIRST_VALUE(
- expr
- ) OVER ( [PARTITION BY
- expr
- ] ORDER BY
- expr
- [ROWS|RANGE
- frame_expr
- ] )
- |
- Returns the first value in an ordered set of - values. | -
- lag(expr [,offset] [,default])
- |
- same as input expr type | -
- LAG(
- expr
- [,
- offset
- ] [,
- default
- ]) OVER ( [PARTITION BY
- expr
- ] ORDER BY
- expr
- )
- |
- Provides access to more than one row of the same
- table without doing a self join. Given a series of rows returned
- from a query and a position of the cursor, LAG
- provides access to a row at a given physical offset prior to that
- position. The default offset is 1. default
- sets the value that is returned if the offset goes beyond the scope
- of the window. If default is not specified, the default value
- is null. |
-
- last_value(expr) |
- same as input expr type | -
- LAST_VALUE(expr) OVER ( [PARTITION BY expr]
- ORDER BY expr [ROWS|RANGE frame_expr] )
- |
- Returns the last value in an ordered set of - values. | -
-
-
- |
- same as input expr type | -
- LEAD(expr [,offset]
- [,exprdefault]) OVER ( [PARTITION BY
- expr] ORDER BY expr )
- |
- Provides access to more than one row of the same
- table without doing a self join. Given a series of rows returned
- from a query and a position of the cursor, lead
- provides access to a row at a given physical offset after that
- position. If offset is not specified, the default offset is
- 1. default sets the value that is returned if the offset goes
- beyond the scope of the window. If default is not specified,
- the default value is null. |
-
- ntile(expr)
- |
- bigint |
-
- NTILE(expr) OVER ( [PARTITION BY expr] ORDER
- BY expr )
- |
- Divides an ordered data set into a number of - buckets (as defined by expr) and assigns a bucket number to - each row. | -
percent_rank() |
-
- double precision
- |
-
- PERCENT_RANK () OVER ( [PARTITION BY expr] ORDER BY
- expr )
- |
- Calculates the rank of a hypothetical row
- R minus 1, divided by 1 less than the number of
- rows being evaluated (within a window partition). |
-
- rank()
- |
- bigint |
-
- RANK () OVER ( [PARTITION BY expr] ORDER BY expr
- )
- |
- Calculates the rank of a row in an ordered group - of values. Rows with equal values for the ranking criteria receive - the same rank. The number of tied rows are added to the rank number - to calculate the next rank value. Ranks may not be consecutive - numbers in this case. | -
row_number() |
-
- bigint
- |
-
- ROW_NUMBER () OVER ( [PARTITION BY expr] ORDER BY
- expr )
- |
- Assigns a unique number to each row to which it is - applied (either each row in a window partition or each row of the - query). | -
| Function | -Return Type | -Full Syntax | -Description | -
|---|---|---|---|
- MEDIAN (expr)
- |
-
- timestamp, timestamptz, interval, float
- |
-
- MEDIAN (expression)
- - Example: -
- |
- Can take a two-dimensional array as input. Treats - such arrays as matrices. | -
- sum(array[])
- |
-
- smallint[], int[], bigint[], float[]
- |
-
- sum(array[[1,2],[3,4]])
- - Example: -
- |
- Performs matrix summation. Can take as input a - two-dimensional array that is treated as a matrix. | -
- pivot_sum (label[], label, expr)
- |
-
- int[], bigint[], float[]
- |
-
- pivot_sum( array['A1','A2'], attr, value)
- |
- A pivot aggregation using sum to resolve duplicate - entries. | -
- unnest (array[])
- |
- set of anyelement |
-
- unnest( array['one', 'row', 'per', 'item'])
- |
- Transforms a one dimensional array into rows.
- Returns a set of anyelement, a polymorphic pseudo-type in
- PostgreSQL. |
-
| Operator | -Right Operand Type | -Description | -Example | -
|---|---|---|---|
- @>
- |
-
- jsonb
- |
- Does the left JSON value contain within it the right value? | -
- '{"a":1, "b":2}'::jsonb @> '{"b":2}'::jsonb
- |
-
- <@
- |
-
- jsonb
- |
- Is the left JSON value contained within the right value? | -
- '{"b":2}'::jsonb <@ '{"a":1, "b":2}'::jsonb
- |
-
- ?
- |
-
- text
- |
- Does the key/element string exist within the JSON value? | -
- '{"a":1, "b":2}'::jsonb ? 'b'
- |
-
- ?|
- |
-
- text[]
- |
- Do any of these key/element strings exist? | -
- '{"a":1, "b":2, "c":3}'::jsonb ?| array['b', 'c']
- |
-
- ?&
- |
-
- text[]
- |
- Do all of these key/element strings exist? | -
- '["a", "b"]'::jsonb ?& array['a', 'b']
- |
-
| Function | -Description | -Example | -Example Result | -
|---|---|---|---|
- to_json(anyelement)
- |
- Returns the value as a JSON object. Arrays and composites are processed
- recursively and are converted to arrays and objects. If the input contains a cast
- from the type to json, the cast function is used to perform the
- conversion; otherwise, a JSON scalar value is produced. For any scalar type other
- than a number, a Boolean, or a null value, the text representation will be used,
- properly quoted and escaped so that it is a valid JSON string. |
-
- to_json('Fred said "Hi."'::text)
- |
-
- "Fred said \"Hi.\""
- |
-
- array_to_json(anyarray [, pretty_bool])
- |
- Returns the array as a JSON array. A multidimensional array becomes a JSON
- array of arrays. Line feeds will be added between dimension-1 elements if
- |
-
- array_to_json('{{1,5},{99,100}}'::int[])
- |
-
- [[1,5],[99,100]]
- |
-
- row_to_json(record [, pretty_bool])
- |
- Returns the row as a JSON object. Line feeds will be added between level-1
- elements if |
-
- row_to_json(row(1,'foo'))
- |
-
- {"f1":1,"f2":"foo"}
- |
-
json_build_array(VARIADIC "any") |
- Builds a possibly-heterogeneously-typed JSON array out of a
- VARIADIC argument list. |
-
- json_build_array(1,2,'3',4,5)
- |
-
- [1, 2, "3", 4, 5]
- |
-
- json_build_object(VARIADIC "any")
- |
- Builds a JSON object out of a VARIADIC argument list. The
- argument list is taken in order and converted to a set of key/value pairs. |
-
- json_build_object('foo',1,'bar',2)
- |
-
- {"foo": 1, "bar": 2}
- |
-
- json_object(text[])
- |
- Builds a JSON object out of a text array. The array must be either a one or a
- two dimensional array. The one dimensional array must have an even number of - elements. The elements are taken as key/value pairs. For a two - dimensional array, each inner array must have exactly two elements, which are - taken as a key/value pair. |
-
-
-
- |
-
- {"a": "1", "b": "def", "c": "3.5"}
- |
-
- json_object(keys text[], values text[])
- |
- Builds a JSON object out of a text array. This form of
- json_object takes keys and values pairwise from two separate
- arrays. In all other respects it is identical to the one-argument form. |
-
- json_object('{a, b}', '{1,2}')
- |
-
- {"a": "1", "b": "2"}
- |
-
| Function | -Return Type | -Description | -Example | -Example Result | -
|---|---|---|---|---|
- json_array_length(json)
-
- |
- int
- |
- Returns the number of elements in the outermost JSON array. | -json_array_length('[1,2,3,{"f1":1,"f2":[5,6]},4]')
- |
-
- 5
- |
-
json_each(json)
-
|
- setof key text, value json
-
|
- Expands the outermost JSON object into a set of key/value pairs. | -select * from json_each('{"a":"foo", "b":"bar"}')
- |
-
- key | value
+#### json_array_length() / jsonb_array_length()
+
+Syntax: `json_array_length(json)` / `jsonb_array_length(jsonb)`
+
+Return type: `int`
+
+Returns the number of elements in the outermost JSON array.
+
+Example:
+
+```
+json_array_length('[1,2,3,{"f1":1,"f2":[5,6]},4]')
+5
+```
+
+#### json_each() / jsonb_each()
+
+Syntax: `json_each(json)` / `jsonb_each(jsonb)`
+
+Return type: `setof key text, value json` / `setof key text, value jsonb`
+
+Expands the outermost JSON object into a set of key/value pairs.
+
+Example:
+
+```
+select * from json_each('{"a":"foo", "b":"bar"}')
+ key | value
-----+-------
a | "foo"
b | "bar"
-
- |
-
json_each_text(json)
-
|
- setof key text, value text
- |
- Expands the outermost JSON object into a set of key/value pairs. The returned
- values will be of type text. |
- select * from json_each_text('{"a":"foo", "b":"bar"}')
- |
-
- key | value
+```
+
+#### json_each_text() / jsonb_each_text()
+
+Syntax: `json_each_text(json)` / `jsonb_each_text(jsonb)`
+
+Return type: `setof key text, value text`
+
+Expands the outermost JSON object into a set of key/value pairs. The returned values will be of type `text`.
+
+Example:
+
+```
+select * from json_each_text('{"a":"foo", "b":"bar"}')
+ key | value
-----+-------
a | foo
b | bar
-
- |
-
json_extract_path(from_json json, VARIADIC path_elems
- text[])
-
|
-
-
|
- Returns the JSON value pointed to by path_elems (equivalent
- to #> operator). |
- json_extract_path('{"f2":{"f3":1},"f4":{"f5":99,"f6":"foo"}}','f4')
- |
-
- {"f5":99,"f6":"foo"}
- |
-
json_extract_path_text(from_json json, VARIADIC path_elems
- text[])
-
|
- text
- |
- Returns the JSON value pointed to by path_elems as text.
- Equivalent to #>> operator. |
- json_extract_path_text('{"f2":{"f3":1},"f4":{"f5":99,"f6":"foo"}}','f4',
- 'f6')
- |
-
- foo
- |
-
json_object_keys(json)
-
|
- setof text
- |
- Returns set of keys in the outermost JSON object. | -json_object_keys('{"f1":"abc","f2":{"f3":"a", "f4":"b"}}')
- |
-
- json_object_keys
+```
+
+#### json_extract_path() / jsonb_extract_path()
+
+Syntax: `json_extract_path(from_json json, VARIADIC path_elems text[])` / `jsonb_extract_path(from_json jsonb, VARIADIC path_elems text[])`
+
+Return type: `json` / `jsonb`
+
+Returns the JSON value pointed to by `path_elems` (equivalent to `#>` operator).
+
+Example:
+
+```
+json_extract_path('{"f2":{"f3":1},"f4":{"f5":99,"f6":"foo"}}','f4')
+{"f5":99,"f6":"foo"}
+```
+
+#### json_extract_path_text() / jsonb_extract_path_text()
+
+Syntax: `json_extract_path_text(from_json json, VARIADIC path_elems text[])` / `jsonb_extract_path_text(from_json jsonb, VARIADIC path_elems text[])`
+
+Return type: `text`
+
+Returns the JSON value pointed to by `path_elems` as text. Equivalent to `#>>` operator.
+
+Example:
+
+```
+json_extract_path_text('{"f2":{"f3":1},"f4":{"f5":99,"f6":"foo"}}','f4', 'f6')
+foo
+```
+
+#### json_object_keys() / jsonb_object_keys()
+
+Syntax: `json_object_keys(json)` / `jsonb_object_keys(jsonb)`
+
+Return type: `setof text`
+
+Returns set of keys in the outermost JSON object.
+
+Example:
+
+```
+json_object_keys('{"f1":"abc","f2":{"f3":"a", "f4":"b"}}')
+ json_object_keys
------------------
f1
f2
-
- |
-
json_populate_record(base anyelement, from_json
- json)
|
- anyelement
- |
- Expands the object in from_json to a row whose columns match
- the record type defined by base. See Note 1. |
- select * from json_populate_record(null::myrowtype,
- '{"a":1,"b":2}')
- |
-
- a | b
+```
+
+#### json_populate_record() / jsonb_populate_record()
+
+Syntax: `json_populate_record(base anyelement, from_json json)` / `jsonb_populate_record(base anyelement, from_json jsonb)`
+
+Return type: `anyelement`
+
+Expands the object in `from_json` to a row whose columns match the record type defined by base. See [Note 1](#notes-on-json-examples).
+
+Example:
+
+```
+select * from json_populate_record(null::myrowtype, '{"a":1,"b":2}')
+ a | b
---+---
1 | 2
-
- |
-
json_populate_recordset(base anyelement, from_json json)
-
|
- setof anyelement
- |
- Expands the outermost array of objects in from_json to a set
- of rows whose columns match the record type defined by base. See Note 1. |
- select * from json_populate_recordset(null::myrowtype,
- '[{"a":1,"b":2},{"a":3,"b":4}]')
- |
-
- a | b
+```
+
+#### json_populate_recordset() / jsonb_populate_recordset()
+
+Syntax: `json_populate_recordset(base anyelement, from_json json)` / `jsonb_populate_recordset(base anyelement, from_json jsonb)`
+
+Return type: `setof anyelement`
+
+Expands the outermost array of objects in `from_json` to a set of rows whose columns match the record type defined by base. See [Note 1](#notes-on-json-examples).
+
+Example:
+
+```
+select * from json_populate_recordset(null::myrowtype, '[{"a":1,"b":2},{"a":3,"b":4}]')
+ a | b
---+---
1 | 2
3 | 4
-
- |
-
json_array_elements(json)
-
|
-
-
|
- Expands a JSON array to a set of JSON values. | -select * from json_array_elements('[1,true, [2,false]]')
- |
-
- value
+```
+
+#### json_array_elements() / jsonb_array_elements()
+
+Syntax: `json_array_elements(json)` / `jsonb_array_elements(jsonb)`
+
+Return type: `setof json` / `setof jsonb`
+
+Expands a JSON array to a set of JSON values.
+
+Example:
+
+```
+select * from json_array_elements('[1,true, [2,false]]')
+ value
-----------
1
true
[2,false]
-
- |
-
json_array_elements_text(json)
-
|
- setof text
- |
- Expands a JSON array to a set of text values. |
- select * from json_array_elements_text('["foo", "bar"]')
- |
-
- value
+```
+
+#### json_array_elements_text() / jsonb_array_elements_text()
+
+Syntax: `json_array_elements_text(json)` / `jsonb_array_elements_text(jsonb)`
+
+Return type: `setof text`
+
+Expands a JSON array to a set of `text` values.
+
+Example:
+
+```
+select * from json_array_elements_text('["foo", "bar"]')
+ value
-----------
foo
bar
-
- |
-
json_typeof(json)
|
- text
- |
- Returns the type of the outermost JSON value as a text string. Possible types
- are object, array, string,
- number, boolean, and null.
- See Note
- 2. |
- json_typeof('-123.4')
- |
-
- number
- |
-
json_to_record(json)
|
- record
- |
- Builds an arbitrary record from a JSON object. See Note 1. As with all
- functions returning record, the caller must explicitly define the structure of
- the record with an |
- select * from json_to_record('{"a":1,"b":[1,2,3],"c":"bar"}') as x(a
- int, b text, d text)
- |
-
- a | b | d
+```
+
+#### json_typeof() / jsonb_typeof()
+
+Syntax: `json_typeof(json)` / `jsonb_typeof(jsonb)`
+
+Return type: `text`
+
+Returns the type of the outermost JSON value as a text string. Possible types are `object`, `array`, `string`, `number`, `boolean`, and `null`. See [Note 2](#notes-on-json-examples).
+
+Example:
+
+```
+json_typeof('-123.4')
+number
+```
+
+#### json_to_record() / jsonb_to_record()
+
+Syntax: `json_to_record(json)` / `jsonb_to_record(jsonb)`
+
+Return type: `record`
+
+Builds an arbitrary record from a JSON object. See [Note 1](#notes-on-json-examples).
+
+As with all functions returning record, the caller must explicitly define the structure of the record with an `AS` clause.
+
+Example:
+
+```
+select * from json_to_record('{"a":1,"b":[1,2,3],"c":"bar"}') as x(a int, b text, d text)
+ a | b | d
---+---------+---
1 | [1,2,3] |
-
- |
-
json_to_recordset(json)
-
|
- setof record
- |
- Builds an arbitrary set of records from a JSON array of objects See Note 1. As with all
- functions returning record, the caller must explicitly define the structure of
- the record with an |
- select * from
- json_to_recordset('[{"a":1,"b":"foo"},{"a":"2","c":"bar"}]') as x(a int, b
- text);
- |
-
- a | b
+```
+
+#### json_to_recordset() / jsonb_to_recordset()
+
+Syntax: `json_to_recordset(json)` / `jsonb_to_recordset(jsonb)`
+
+Return type: `setof record`
+
+Builds an arbitrary set of records from a JSON array of objects See [Note 1](#notes-on-json-examples).
+
+As with all functions returning record, the caller must explicitly define the structure of the record with an `AS` clause.
+
+Example:
+
+```
+select * from json_to_recordset('[{"a":1,"b":"foo"},{"a":"2","c":"bar"}]') as x(a int, b text);
+ a | b
---+-----
1 | foo
2 |
-
- |
-
| - - | -
-
|
-
-
|
-
-
|
-
| Component | -Package Version | -Additional Information | -
|---|---|---|
| PL/Java | -2.0.4 | -Supports Java 8 and 11. | -
| PL/R | -3.0.3 | -R 3.3.3 | -
| MADlib Machine Learning | -2.1, 2.0, 1.21, 1.20, 1.19, 1.18, 1.17, 1.16 | -Support matrix at MADlib FAQ. | -
| PostGIS Spatial and Geographic Objects | -2.5.4, 2.1.5 | -- |
| Function | -Return Type | -Description | -Example | -Example Result | -
|---|---|---|---|---|
-json_array_length(json)
-
- |
-int
- |
-Returns the number of elements in the outermost JSON array. | -json_array_length('[1,2,3,{"f1":1,"f2":[5,6]},4]')
- |
-
-5
- |
-
json_each(json)
-
|
-setof key text, value json
-
|
-Expands the outermost JSON object into a set of key/value pairs. | -select * from json_each('{"a":"foo", "b":"bar"}')
- |
-
- key | value
+#### `json_array_length() / jsonb_array_length()`
+
+Syntax: `json_array_length(json)` / `jsonb_array_length(jsonb)`
+
+Return type: `int`
+
+Returns the number of elements in the outermost JSON array.
+
+Example:
+
+```
+json_array_length('[1,2,3,{"f1":1,"f2":[5,6]},4]')
+5
+```
+
+#### `json_each() / jsonb_each()`
+
+Syntax: `json_each(json)` / `jsonb_each(jsonb)`
+
+Return type: `setof key text, value json` / `setof key text, value jsonb`
+
+Expands the outermost JSON object into a set of key/value pairs.
+
+Example:
+
+```
+select * from json_each('{"a":"foo", "b":"bar"}')
+key | value
-----+-------
- a | "foo"
- b | "bar"
-
- |
-
json_each_text(json)
-
|
-setof key text, value text
- |
-Expands the outermost JSON object into a set of key/value pairs. The returned
- values will be of type text. |
-select * from json_each_text('{"a":"foo", "b":"bar"}')
- |
-
- key | value
+a | "foo"
+b | "bar"
+```
+
+#### `json_each_text() / jsonb_each_text()`
+
+Syntax: `json_each_text(json)` / `jsonb_each_text(jsonb)`
+
+Return type: `setof key text, value text`
+
+Expands the outermost JSON object into a set of key/value pairs. The returned values will be of type `text`.
+
+Example:
+
+```
+select * from json_each_text('{"a":"foo", "b":"bar"}')
+key | value
-----+-------
- a | foo
- b | bar
-
- |
-
json_extract_path(from_json json, VARIADIC path_elems
- text[])
-
|
-
-
|
-Returns the JSON value pointed to by path_elems (equivalent
- to #> operator). |
-json_extract_path('{"f2":{"f3":1},"f4":{"f5":99,"f6":"foo"}}','f4')
- |
-
-{"f5":99,"f6":"foo"}
- |
-
json_extract_path_text(from_json json, VARIADIC path_elems
- text[])
-
|
-text
- |
-Returns the JSON value pointed to by path_elems as text.
- Equivalent to #>> operator. |
-json_extract_path_text('{"f2":{"f3":1},"f4":{"f5":99,"f6":"foo"}}','f4',
- 'f6')
- |
-
-foo
- |
-
json_object_keys(json)
-
|
-setof text
- |
-Returns set of keys in the outermost JSON object. | -json_object_keys('{"f1":"abc","f2":{"f3":"a", "f4":"b"}}')
- |
-
- json_object_keys
+a | foo
+b | bar
+```
+
+#### `json_extract_path() / jsonb_extract_path()`
+
+Syntax: `json_extract_path(from_json json, VARIADIC path_elems text[])` / `jsonb_extract_path(from_json jsonb, VARIADIC path_elems text[])`
+
+Return type: `json` / `jsonb`
+
+Returns the JSON value pointed to by `path_elems` (equivalent to `#>` operator).
+
+Example:
+
+```
+json_extract_path('{"f2":{"f3":1},"f4":{"f5":99,"f6":"foo"}}','f4')
+{"f5":99,"f6":"foo"}
+```
+
+#### `json_extract_path_text() / jsonb_extract_path_text()`
+
+Syntax: `json_extract_path_text(from_json json, VARIADIC path_elems text[])` / `jsonb_extract_path_text(from_json jsonb, VARIADIC path_elems text[])`
+
+Return type: `text`
+
+Returns the JSON value pointed to by `path_elems` as text. Equivalent to `#>>` operator.
+
+Example:
+
+```
+json_extract_path_text('{"f2":{"f3":1},"f4":{"f5":99,"f6":"foo"}}','f4', 'f6')
+foo
+```
+
+#### `json_object_keys() / jsonb_object_keys()`
+
+Syntax: `json_object_keys(json)` / `jsonb_object_keys(jsonb)`
+
+Return type: `setof text`
+
+Returns set of keys in the outermost JSON object.
+
+Example:
+
+```
+json_object_keys('{"f1":"abc","f2":{"f3":"a", "f4":"b"}}')
+json_object_keys
------------------
- f1
- f2
-
- |
-
json_populate_record(base anyelement, from_json
- json)
|
-anyelement
- |
-Expands the object in from_json to a row whose columns match
- the record type defined by base. See Note 1. |
-select * from json_populate_record(null::myrowtype,
- '{"a":1,"b":2}')
- |
-
- a | b
+f1
+f2
+```
+
+#### `json_populate_record() / jsonb_populate_record()`
+
+Syntax: `json_populate_record(base anyelement, from_json json)` / `jsonb_populate_record(base anyelement, from_json jsonb)`
+
+Return type: `anyelement`
+
+Expands the object in `from_json` to a row whose columns match the record type defined by base. See [Note 1](#note-on-json-processing-functions-examples).
+
+Example:
+
+```
+select * from json_populate_record(null::myrowtype, '{"a":1,"b":2}')
+a | b
---+---
- 1 | 2
-
- |
-
json_populate_recordset(base anyelement, from_json json)
-
|
-setof anyelement
- |
-Expands the outermost array of objects in from_json to a set
- of rows whose columns match the record type defined by base. See Note 1. |
-select * from json_populate_recordset(null::myrowtype,
- '[{"a":1,"b":2},{"a":3,"b":4}]')
- |
-
- a | b
+1 | 2
+```
+
+#### `json_populate_recordset() / jsonb_populate_recordset()`
+
+Syntax: `json_populate_recordset(base anyelement, from_json json)` / `jsonb_populate_recordset(base anyelement, from_json jsonb)`
+
+Return type: `setof anyelement`
+
+Expands the outermost array of objects in `from_json` to a set of rows whose columns match the record type defined by base. See [Note 1](#note-on-json-processing-functions-examples).
+
+Example:
+
+```
+select * from json_populate_recordset(null::myrowtype, '[{"a":1,"b":2},{"a":3,"b":4}]')
+a | b
---+---
- 1 | 2
- 3 | 4
-
- |
-
json_array_elements(json)
-
|
-
-
|
-Expands a JSON array to a set of JSON values. | -select * from json_array_elements('[1,true, [2,false]]')
- |
-
-value ------------ - 1 - true - [2,false] -- |
-
json_array_elements_text(json)
-
|
-setof text
- |
-Expands a JSON array to a set of text values. |
-select * from json_array_elements_text('["foo", "bar"]')
- |
-
-value ------------ - foo - bar -- |
-
json_typeof(json)
|
-text
- |
-Returns the type of the outermost JSON value as a text string. Possible types
- are object, array, string,
-number, boolean, and null.
- See Note |
-json_typeof('-123.4')
- |
-
-number
- |
-
json_to_record(json)
|
-record
- |
-Builds an arbitrary record from a JSON object. See Note 1. As with all
- functions returning record, the caller must explicitly define the structure of
- the record with an |
-select * from json_to_record('{"a":1,"b":[1,2,3],"c":"bar"}') as x(a
- int, b text, d text)
- |
-
-a | b | d ----+---------+--- - 1 | [1,2,3] | -- |
-
json_to_recordset(json)
-
|
-setof record
- |
-Builds an arbitrary set of records from a JSON array of objects See Note 1. As with all
- functions returning record, the caller must explicitly define the structure of
- the record with an |
-select * from
- json_to_recordset('[{"a":1,"b":"foo"},{"a":"2","c":"bar"}]') as x(a int, b
- text);
- |
-
-a | b ----+----- - 1 | foo - 2 | -- |
-
| Function | -Return Type | -Full Syntax | -Description | -
|---|---|---|---|
-MEDIAN (expr)
- |
-
-timestamp, timestamptz, interval, float
- |
-
-MEDIAN (expression)
--Example: - -
- |
-Can take a two-dimensional array as input. Treats such arrays as - matrices. | -
-PERCENTILE_CONT (expr) WITHIN GROUP (ORDER BY expr
- [DESC/ASC])
- |
-
-timestamp, timestamptz, interval, float
- |
-
-PERCENTILE_CONT(percentage) WITHIN GROUP (ORDER BY
-expression)
--Example: - -
- |
-Performs an inverse distribution function that assumes a - continuous distribution model. It takes a percentile value and a sort specification - and returns the same datatype as the numeric datatype of the argument. This returned - value is a computed result after performing linear interpolation. Null are ignored - in this calculation. | -
PERCENTILE_DISC (expr) WITHIN GROUP (ORDER BY
-expr [DESC/ASC]) |
-
-timestamp, timestamptz, interval, float
- |
-
-PERCENTILE_DISC(percentage) WITHIN GROUP (ORDER BY
-expression)
--Example: - -
- |
-Performs an inverse distribution function that assumes a - discrete distribution model. It takes a percentile value and a sort specification. - This returned value is an element from the set. Null are ignored in this - calculation. | -
-sum(array[])
- |
-
-smallint[]int[], bigint[], float[]
- |
-
-sum(array[[1,2],[3,4]])
--Example: - -
- |
-Performs matrix summation. Can take as input a two-dimensional - array that is treated as a matrix. | -
-pivot_sum (label[], label, expr)
- |
-
-int[], bigint[], float[]
- |
-
-pivot_sum( array['A1','A2'], attr, value)
- |
-A pivot aggregation using sum to resolve duplicate - entries. | -
-unnest (array[])
- |
-set of anyelement |
-
-unnest( array['one', 'row', 'per', 'item'])
- |
-Transforms a one dimensional array into rows. Returns a set of
-anyelement, a polymorphic pseudotype in PostgreSQL. |
-
| SQL Command - | Supported in WarehousePG - | Modifications, Limitations, Exceptions - |
|---|---|---|
ALTER AGGREGATE |
-YES | -- |
ALTER CONVERSION |
-YES | -- |
ALTER DATABASE |
-YES | -- |
ALTER DOMAIN |
-YES | -- |
ALTER EVENT TRIGGER |
-YES | -- |
ALTER EXTENSION |
-YES | -Changes the definition of a WarehousePG extension - based - on PostgreSQL 9.6. | -
ALTER FUNCTION |
-YES | -- |
ALTER GROUP |
-YES | -An alias for ALTER ROLE | -
ALTER INDEX |
-YES | -- |
ALTER LANGUAGE |
-YES | -- |
ALTER OPERATOR |
-YES | -- |
ALTER OPERATOR CLASS |
-YES | -- |
ALTER OPERATOR FAMILY |
-YES | -- |
ALTER PROTOCOL |
-YES | -- |
ALTER RESOURCE QUEUE |
-YES | -WarehousePG resource management feature - not in - PostgreSQL. | -
ALTER ROLE |
-YES | -WarehousePG Clauses:
|
-
ALTER SCHEMA |
-YES | -- |
ALTER SEQUENCE |
-YES | -- |
ALTER SYSTEM |
-NO | -- |
ALTER TABLE |
-YES | -Unsupported Clauses / Options:
WarehousePG - Database Clauses: -
|
-
ALTER TABLESPACE |
-YES | -- |
ALTER TRIGGER |
-NO | -- |
ALTER TYPE |
-YES | -WarehousePG Clauses:
|
-
ALTER USER |
-YES | -An alias for ALTER ROLE | -
ALTER VIEW |
-YES | -- |
ANALYZE |
-YES | -- |
BEGIN |
-YES | -- |
CHECKPOINT |
-YES | -- |
CLOSE |
-YES | -- |
CLUSTER |
-YES | -- |
COMMENT |
-YES | -- |
COMMIT |
-YES | -- |
COMMIT PREPARED |
-NO | -- |
COPY |
-YES | -Modified Clauses:
WarehousePG - Clauses: -
|
-
CREATE AGGREGATE |
-YES | -Unsupported Clauses / Options:
WarehousePG - Clauses: -
Limitations: -The functions used to implement the
- aggregate must be |
-
CREATE CAST |
-YES | -- |
CREATE CONSTRAINT TRIGGER |
-NO | -- |
CREATE CONVERSION |
-YES | -- |
CREATE DATABASE |
-YES | -- |
CREATE DOMAIN |
-YES | -- |
CREATE EVENT TRIGGER |
-YES | -- |
CREATE EXTENSION |
-YES | -Loads a new extension into WarehousePG - based on - PostgreSQL 9.6. | -
CREATE EXTERNAL TABLE |
-YES | -WarehousePG parallel ETL feature - not in PostgreSQL - 9.4. | -
CREATE FUNCTION |
-YES | -Limitations: Functions defined as
- |
-
CREATE GROUP |
-YES | -An alias for CREATE ROLE | -
CREATE INDEX |
-YES | -WarehousePG Clauses:
Limitations: -
|
-
CREATE LANGUAGE |
-YES | -- |
CREATE MATERIALIZED VIEW |
-YES | -Based on PostgreSQL 9.4. | -
CREATE OPERATOR |
-YES | -Limitations: The function used to implement the
- operator must be an |
-
CREATE OPERATOR CLASS |
-YES | -- |
CREATE OPERATOR FAMILY |
-YES | -- |
CREATE PROTOCOL |
-YES | -- |
CREATE RESOURCE QUEUE |
-YES | -WarehousePG resource management feature - not in - PostgreSQL 9.4. | -
CREATE ROLE |
-YES | -WarehousePG Clauses:
|
-
CREATE RULE |
-YES | -- |
CREATE SCHEMA |
-YES | -- |
CREATE SEQUENCE |
-YES | -Limitations: The The
- |
-
CREATE TABLE |
-YES | -Unsupported Clauses / Options:
Limited Clauses: -
WarehousePG Clauses: -
|
-
CREATE TABLE AS |
-YES | -See CREATE TABLE | -
CREATE TABLESPACE |
-YES | -WarehousePG Clauses: Specify host file system - locations for specific segment instances. -
|
-
CREATE TRIGGER |
-NO | -- |
CREATE TYPE |
-YES | -WarehousePG Clauses:
Limitations: -The functions
- used to implement a new base type must be |
-
CREATE USER |
-YES | -An alias for CREATE ROLE | -
CREATE VIEW |
-YES | -- |
DEALLOCATE |
-YES | -- |
DECLARE |
-YES | -Unsupported Clauses /
- Options:
Limitations: -Cursors cannot be - backward-scrolled. Forward scrolling is supported. -PL/pgSQL does not have - support for updatable cursors. - |
-
DELETE |
-YES | -- |
DISCARD |
-YES | -
- Limitation:
- |
-
DO |
-YES | -PostgreSQL 9.0 feature | -
DROP AGGREGATE |
-YES | -- |
DROP CAST |
-YES | -- |
DROP CONVERSION |
-YES | -- |
DROP DATABASE |
-YES | -- |
DROP DOMAIN |
-YES | -- |
DROP EVENT TRIGGER |
-YES | -- |
DROP EXTENSION |
-YES | -Removes an extension from WarehousePG – based on - PostgreSQL 9.6. | -
DROP EXTERNAL TABLE |
-YES | -WarehousePG parallel ETL feature - not in PostgreSQL - 9.4. | -
DROP FUNCTION |
-YES | -- |
DROP GROUP |
-YES | -An alias for DROP ROLE | -
DROP INDEX |
-YES | -- |
DROP LANGUAGE |
-YES | -- |
DROP OPERATOR |
-YES | -- |
DROP OPERATOR CLASS |
-YES | -- |
DROP OPERATOR FAMILY |
-YES | -- |
DROP OWNED |
-NO | -- |
DROP PROTOCOL |
-YES | -- |
DROP RESOURCE QUEUE |
-YES | -WarehousePG resource management feature - not in - PostgreSQL 9.4. | -
DROP ROLE |
-YES | -- |
DROP RULE |
-YES | -- |
DROP SCHEMA |
-YES | -- |
DROP SEQUENCE |
-YES | -- |
DROP TABLE |
-YES | -- |
DROP TABLESPACE |
-YES | -- |
DROP TRIGGER |
-NO | -- |
DROP TYPE |
-YES | -- |
DROP USER |
-YES | -An alias for DROP ROLE | -
DROP VIEW |
-YES | -- |
END |
-YES | -- |
EXECUTE |
-YES | -- |
EXPLAIN |
-YES | -- |
FETCH |
-YES | -Unsupported Clauses /
- Options:
Limitations: -Cannot fetch rows in a - nonsequential fashion; backward scan is not supported. - |
-
GRANT |
-YES | -- |
INSERT |
-YES | -- |
LATERAL Join Type |
-NO | -- |
LISTEN |
-YES | -- |
LOAD |
-YES | -- |
LOCK |
-YES | -- |
MOVE |
-YES | -See FETCH | -
NOTIFY |
-YES | -- |
PREPARE |
-YES | -- |
PREPARE TRANSACTION |
-NO | -- |
REASSIGN OWNED |
-YES | -- |
REFRESH MATERIALIZED VIEW |
-YES | -Based on PostgreSQL 9.4. | -
REINDEX |
-YES | -- |
RELEASE SAVEPOINT |
-YES | -- |
RESET |
-YES | -- |
RETRIEVE |
-YES | -WarehousePG parallel retrieve cursor - not in PostgreSQL 9.4. | -
REVOKE |
-YES | -- |
ROLLBACK |
-YES | -- |
ROLLBACK PREPARED |
-NO | -- |
ROLLBACK TO SAVEPOINT |
-YES | -- |
SAVEPOINT |
-YES | -- |
SELECT |
-YES | -Limitations: Limited use of Text search ( WarehousePG Clauses (OLAP): -
|
-
SELECT INTO |
-YES | -See SELECT | -
SET |
-YES | -- |
SET CONSTRAINTS |
-NO | -In PostgreSQL, this only applies to foreign key constraints, - which are currently not enforced in WarehousePG. | -
SET ROLE |
-YES | -- |
SET SESSION AUTHORIZATION |
-YES | -Deprecated as of PostgreSQL 8.1 - see SET ROLE | -
SET TRANSACTION |
-YES | -Limitations:
|
-
SHOW |
-YES | -- |
START TRANSACTION |
-YES | -- |
TRUNCATE |
-YES | -- |
UNLISTEN |
-YES | -- |
UPDATE |
-YES | -Limitations:
|
-
VACUUM |
-YES | -Limitations:
|
-
VALUES |
-YES | -- |
| PostGIS Extension | -WarehousePG PostGIS Notes | -
|---|---|
postgisPostGIS and PostGIS Raster - support - |
-Supported. Both PostGIS and PostGIS Raster are enabled when the WarehousePG
- postgis extension is enabled. |
-
postgis_tiger_geocoderThe US TIGER geocoder - |
-Supported. Installed with WarehousePG PostGIS. Requires the
- The US TIGER geocoder converts addresses (like a street address) - to geographic coordinates. - |
-
address_standardizerRule-based address - standardizer - |
-Supported. Installed but not enabled with WarehousePG PostGIS. Can be used - with TIGER geocoder. -A single line address parser that takes an input
- address and normalizes it based on a set of rules stored in a table and helper
- |
-
address_standardizer_data_usSample rules tables for US - address data - |
-Supported. Installed but not enabled with WarehousePG PostGIS. Can be used with - the address standardizer. -The extension contains |
-
fuzzystrmatchFuzzy string matching - |
-Supported. This extension is bundled but not enabled with WarehousePG
- Database. Required for the PostGIS TIGER geocoder. - |
-
| Callback Signature | -Description | -
|---|---|
|
- Obtain relation size estimates for a foreign table. - Called at the beginning of planning for a query on a foreign table. | -
|
- Create possible access paths for a scan on a
- foreign table. Called during query planning. Note: A WarehousePG
- Database-compatible FDW must call
- create_foreignscan_path() in its
- GetForeignPaths() callback function. |
-
|
- Create a ForeignScan plan node from
- the selected foreign access path. Called at the end of query planning. |
-
|
- Begin running a foreign scan. Called during - executor startup. | -
|
- Fetch one row from the foreign source, returning it - in a tuple table slot; return NULL if no more rows are available. | -
|
- Restart the scan from the beginning. | -
|
- End the scan and release resources. | -
| Callback Signature | -Description | -
|---|---|
|
- Add additional information in the foreign - table that will be retrieved during an update or delete operation - to identify the exact row on which to operate. | -
|
- Perform additional planning actions required - for an insert, update, or delete operation on a foreign table, - and return the information generated. | -
|
- Begin executing a modify operation on a - foreign table. Called during executor startup. | -
|
- Insert a single tuple into the foreign table. - Return a slot containing the data that was actually inserted, or - NULL if no row was inserted. | -
|
- Update a single tuple in the foreign table. - Return a slot containing the row as it was actually updated, or - NULL if no row was updated. | -
|
- Delete a single tuple from the foreign table. - Return a slot containing the row that was deleted, or NULL if no - row was deleted. | -
|
- End the update and release resources. | -
|
- Report the update operations supported by the - specified foreign table. | -
| Helper Signature | -Description | -
|---|---|
|
- Returns the ForeignDataWrapper
- object for the foreign-data wrapper with the given OID. |
-
|
- Returns the ForeignDataWrapper
- object for the foreign-data wrapper with the given name. |
-
|
- Returns the ForeignServer
- object for the foreign server with the given OID. |
-
|
- Returns the ForeignServer
- object for the foreign server with the given name. |
-
|
- Returns the UserMapping
- object for the user mapping of the given role on the given
- server. |
-
|
- Returns the ForeignTable
- object for the foreign table with the given OID. |
-
|
- Returns the per-column FDW options for the - column with the given foreign table OID and attribute number. | -
| stakind Code | -Description | -
|---|---|
| 1 | -Most CommonValues (MCV) Slot
-
stavalues
- array; a unique column has no MCV slot. |
-
| 2 | -Histogram Slot – describes the distribution of scalar data.
If a Most Common Values slot is also provided, then the histogram - describes the data distribution after removing the values listed in the MCV - array. (It is a compressed histogram in the technical parlance). This - allows a more accurate representation of the distribution of a column with - some very common values. In a column with only a few distinct values, it is - possible that the MCV list describes the entire data population; in this case - the histogram reduces to empty and should be omitted. |
-
| 3 | -Correlation Slot – describes the correlation between the physical
- order of table tuples and the ordering of data values of this column.
|
-
| 4 | -Most Common Elements Slot - is similar to a Most Common Values (MCV)
- Slot, except that it stores the most common non-null elements of the
- column values. This is useful when the column datatype is an array or some other
- type with identifiable elements (for instance, tsvector).
Frequencies are measured as the fraction of non-null rows the element
- value appears in, not the frequency of all rows. Also, the values are sorted
- into the element type's default order (to support binary search for a
- particular value). Since this puts the minimum and maximum frequencies at
- unpredictable spots in Note: For tsvector columns, the stavalues
- elements are of type text, even though their representation
- within tsvector is not exactly
- text. |
-
| 5 | -Distinct Elements Count Histogram Slot - describes the distribution
- of the number of distinct element values present in each row of an array-type
- column. Only non-null rows are considered, and only non-null elements.
|
-
| 99 | -Hyperloglog Slot - for leaf partitions of a partitioned table,
- stores the hyperloglog_counter created for the sampled data.
- The hyperloglog_counter data structure is converted into a
- bytea and stored in a stavalues5 slot of the
- pg_statistic catalog table. |
-
| Object Type | -Privileges | -
|---|---|
| Tables, External Tables, Views | -
-
-
-
-
-
-
-
-
- |
-
| Columns | -
-
-
-
-
-
- |
-
| Sequences | -
-
-
-
-
- |
-
| Databases | -
-
-
-
-
-
- |
-
| Domains | -
-
-
- |
-
| Foreign Data Wrappers | -
-
-
- |
-
| Foreign Servers | -
-
-
- |
-
| Functions | -
-
-
- |
-
| Procedural Languages | -
-
-
- |
-
| Schemas | -
-
-
-
- |
-
| Tablespaces | -
-
-
- |
-
| Types | -
-
-
- |
-
| Protocols | -
-
-
-
- |
-
| Activity | -Procedure | -Corrective Actions | -
|---|---|---|
| List segments that are currently down. If any rows are
- returned, this should generate a warning or alert. Recommended - frequency: run every 5 to 10 minutes Severity: - IMPORTANT |
-Run the following query in the postgres
- database: |
-If the query returns any rows, follow these steps to correct
- the problem:
|
-
| Check for segments that are up and not in sync. If rows are
- returned, this should generate a warning or alert. Recommended - frequency: run every 5 to 10 minutes |
-
- Execute the following query in the
-postgres
- database: |
-If the query returns rows then the segment might be in the process
- of moving from Not In Sync to
-Synchronized mode. Use gpstate
- -e to track progress. |
-
Check for segments that are not operating in their preferred role but are marked as up and Synchronized.
- If any segments are found, the cluster may not be
- balanced. If any rows are returned this should generate a
- warning or alert. Recommended frequency: run every 5 to 10 - minutes Severity: IMPORTANT |
-
- Execute the following query in the
-
-postgres
- database:
- |
-
- When the segments are not running in their preferred role, processing might be skewed.
- Run |
-
| Run a distributed query to test that it runs on all segments.
- One row should be returned for each primary segment.
- Recommended frequency: run every 5 to 10 - minutes Severity: CRITICAL |
-
- Execute the following query in the
-postgres
- database: |
-
- If this query fails, there is an issue dispatching to some - segments in the cluster. This is a rare event. Check the - hosts that are not able to be dispatched to ensure there is - no hardware or networking issue. - |
-
| Test the state of coordinator mirroring on WarehousePG. If
- the value is not "STREAMING", raise an alert or
- warning. Recommended frequency: run every 5 to 10 - minutes Severity: IMPORTANT |
-
- Run the following
-psql
- command: |
-
- Check the log file from the coordinator
- and standby coordinator for errors. If there are no unexpected
- errors and the machines are up, run the
- |
-
| Perform a basic check to see if the coordinator is up and
- functioning. Recommended frequency: run every 5 to 10 - minutes Severity: CRITICAL |
-
- Run the following query in the
-postgres
- database:
- |
-
- If this query fails, the active coordinator may be down. Try to - start the database on the original coordinator if the server is - up and running. If that fails, try to activate the standby - coordinator as coordinator. - |
-
| Activity | -Procedure | -Corrective Actions | -
|---|---|---|
| Check disk space usage on volumes used for WarehousePG data storage and the OS.
- Recommended frequency: every 5 to 30 - minutes Severity: CRITICAL |
-
- Set up a disk space check.
-
|
-Use VACUUM/VACUUM FULL on
- user tables to reclaim space occupied by dead rows. |
-
| Check for errors or dropped packets on the network
- interfaces. Recommended frequency: hourly Severity: - IMPORTANT |
-Set up a network interface checks. | -
- Work with network and OS teams to resolve errors. - |
-
| Check for RAID errors or degraded RAID performance.
- Recommended frequency: every 5 minutes Severity: - CRITICAL |
-Set up a RAID check. | -
-
|
-
| Check for adequate I/O bandwidth and I/O skew. Recommended - frequency: when create a cluster or when hardware issues are - suspected. |
-Run the WarehousePG
-gpcheckperf utility. |
-
- The cluster may be under-specified if data transfer rates are
- not similar to the following:
-
If the machines on the cluster display an uneven performance - profile, work with the system administration team to fix - faulty machines. - |
-
| Activity | -Procedure | -Corrective Actions | -
|---|---|---|
| Run catalog consistency checks in each database to ensure the
- catalog on each host in the cluster is consistent and in a good
- state. You may run this command while the database is up - and running. Recommended frequency: - weekly Severity: IMPORTANT |
-Run the WarehousePG gpcheckcat utility in each
- database:Note: With the
- -O option, gpcheckcat
- runs just 10 of its usual 15 tests. |
-Run the repair scripts for any issues identified. | -
Check for pg_class entries that have no
- corresponding pg_attribute entry.Recommended - frequency: monthly Severity: IMPORTANT |
-During a downtime, with no users on the system, run the
- WarehousePG
-gpcheckcat utility in each
- database: |
-Run the repair scripts for any issues identified. | -
| Check for leaked temporary schema and missing schema
- definition. Recommended frequency: monthly Severity: - IMPORTANT |
-During a downtime, with no users on the system, run the
- WarehousePG
-gpcheckcat utility in each
- database: |
-Run the repair scripts for any issues identified. | -
| Check constraints on randomly distributed
- tables. Recommended frequency: monthly Severity: - IMPORTANT |
-During a downtime, with no users on the system, run the
- WarehousePG
-gpcheckcat utility in each
- database: |
-Run the repair scripts for any issues identified. | -
| Check for dependencies on non-existent objects. Recommended - frequency: monthly Severity: IMPORTANT |
-During a downtime, with no users on the system, run the
- WarehousePG
-gpcheckcat utility in each
- database: |
-Run the repair scripts for any issues identified. | -
| Activity | -Procedure | -Corrective Actions | -
|---|---|---|
| Check for missing statistics on tables. | -Check the gp_stats_missing view in each
- database: |
-Run ANALYZE on tables that are missing
- statistics. |
-
Check for tables that have bloat (dead space) in data files
- that cannot be recovered by a regular VACUUM
- command. Recommended frequency: weekly or - monthly Severity: WARNING |
-Check the gp_bloat_diag view in each
- database:
- |
-VACUUM FULL acquires an ACCESS
- EXCLUSIVE lock on tables. Run VACUUM
- FULL during a time when users and applications do
- not require access to the tables, such as during a time of low
- activity, or during a maintenance window. |
-
| Activity | -Procedure | -Corrective Actions | -
|---|---|---|
| Reclaim space occupied by deleted rows in the heap
- tables so that the space they occupy can be
- reused. Recommended frequency: daily Severity: - CRITICAL |
-Vacuum user
- tables: |
-Vacuum updated tables regularly to prevent bloating. - | -
| Update table statistics. Recommended frequency: after - loading data and before executing - queries Severity: CRITICAL |
-Analyze user tables. You can use the
-analyzedb management
- utility: |
-Analyze updated tables regularly so that the optimizer - can produce efficient query execution plans. | -
| Backup the database data. Recommended frequency: daily, - or as required by your backup plan Severity: - CRITICAL |
-
-Run the gpbackup
- utility to create a backup of the coordinator and segment
- databases in parallel.
- |
-Best practice is to have a current backup ready in case - the database must be restored. | -
| Vacuum, reindex, and analyze system catalogs to maintain
- an efficient catalog. Recommended frequency: weekly, or - more often if database objects are created and dropped - frequently |
-
-
|
-The optimizer retrieves information from the system
- tables to create query plans. If system tables and indexes
- are allowed to become bloated over time, scanning the system
- tables increases query execution time. It is important to
- run ANALYZE after reindexing, because
-REINDEX leaves indexes with no
- statistics. |
-
| Activity | -Procedure | -Corrective Actions | -
|---|---|---|
| Ensure any bug fixes or enhancements are applied to the
- kernel. Recommended frequency: at least every 6 - months Severity: IMPORTANT |
-Follow the vendor's instructions to update the Linux - kernel. | -Keep the kernel current to include bug fixes and security - fixes, and to avoid difficult future upgrades. | -
| Install WarehousePG minor releases, for example
- 5.0.x. Recommended frequency: - quarterly Severity: IMPORTANT |
-Follow upgrade instructions in the WarehousePG -Release Notes. Always upgrade to the latest in the - series. | -Keep the WarehousePG software current to - incorporate bug fixes, performance enhancements, and feature - enhancements into your WarehousePG - cluster. | -
| Operator/Function Category | -VOLATILE Functions | -STABLE Functions | -Restrictions | -
|---|---|---|---|
| - Logical Operators - | -- | - | - |
| - Comparison Operators - | -- | - | - |
| - - Mathematical Functions and Operators - - | -random setseed |
- - | - |
| - - String Functions and Operators - - | -- All built-in conversion functions - | -convert pg_client_encoding |
- - |
| - - Binary String Functions and Operators - - | -- | - | - |
| - - Bit String Functions and Operators - - | -- | - | - |
| - - Pattern Matching - - | -- | - | - |
| - - Data Type Formatting Functions - - | -- | to_char to_timestamp |
- - |
| - Date/Time Functions and Operators - | -timeofday | -age current_date current_time current_timestamp localtime localtimestamp now |
- - |
| - Enum Support Functions - | -- | - | - |
| - - Geometric Functions and Operators - - | -- | - | - |
| - - Network Address Functions and Operators - - | -- | - | - |
| - - Sequence Manipulation Functions - - | -nextval() setval() |
- - | - |
| - - Conditional Expressions - - | -- | - | - |
| - - Array Functions and Operators - - | -- | - All array functions - | -- |
| - - Aggregate Functions - - | -- | - | - |
| - - Subquery Expressions - - | -- | - | - |
| - - Row and Array Comparisons - - | -- | - | - |
| - - Set Returning Functions - - | -generate_series | -- | - |
| - - System Information Functions - - | -- |
- All session information functions
- - All access privilege inquiry functions - - All schema visibility inquiry functions - - All system catalog information functions - - All comment information functions - - All transaction ids and snapshots - |
- - |
| - - System Administration Functions - - | -set_config pg_cancel_backend pg_terminate_backend pg_reload_conf pg_rotate_logfile pg_start_backup pg_stop_backup pg_size_pretty pg_ls_dir pg_read_file pg_stat_file |
- current_setting All database object size - functions |
- Note: The function
- pg_column_size displays bytes required to store
- the value, possibly with TOAST compression. |
-
| - XML Functions and function-like - expressions | -- |
- cursor_to_xml(cursor refcursor, count int, nulls boolean, - tableforest boolean, targetns text) -cursor_to_xmlschema(cursor refcursor, nulls boolean, tableforest - boolean, targetns text) -database_to_xml(nulls boolean, tableforest boolean, targetns - text) -database_to_xmlschema(nulls boolean, tableforest boolean, - targetns text) -database_to_xml_and_xmlschema( nulls boolean, tableforest - boolean, targetns text) -query_to_xml(query text, nulls boolean, tableforest boolean, - targetns text) -query_to_xmlschema(query text, nulls boolean, tableforest - boolean, targetns text) -query_to_xml_and_xmlschema( query text, nulls boolean, - tableforest boolean, targetns text) -schema_to_xml(schema name, nulls boolean, tableforest boolean, - targetns text) -schema_to_xmlschema( schema name, nulls boolean, tableforest - boolean, targetns text) -schema_to_xml_and_xmlschema( schema name, nulls boolean, - tableforest boolean, targetns text) -table_to_xml(tbl regclass, nulls boolean, tableforest boolean, - targetns text) -table_to_xmlschema( tbl regclass, nulls boolean, tableforest - boolean, targetns text) -table_to_xml_and_xmlschema( tbl regclass, nulls boolean, - tableforest boolean, targetns text) -xmlagg(xml) -xmlconcat(xml[, ...]) -xmlelement(name name [, xmlattributes(value [AS attname] [, ... - ])] [, content, ...]) -xmlexists(text, xml) -xmlforest(content [AS name] [, ...]) -xml_is_well_formed(text) -xml_is_well_formed_document(text) -xml_is_well_formed_content(text) -xmlparse ( { DOCUMENT | CONTENT } value) -xpath(text, xml) -xpath(text, xml, text[]) -xpath_exists(text, xml) -xpath_exists(text, xml, text[]) -xmlpi(name target [, content]) -xmlroot(xml, version text | no value [, standalone yes|no|no - value]) -xmlserialize ( { DOCUMENT | CONTENT } value AS type ) -xml(text) -text(xml) -xmlcomment(xml) -xmlconcat2(xml, xml) - |
- - |
| Function | -Return Type | -Full Syntax | -Description | -
|---|---|---|---|
- cume_dist()
- |
-
- double precision
- |
-
- CUME_DIST() OVER ( [PARTITION BY
- expr
- ] ORDER BY
- expr
- )
- |
- Calculates the cumulative distribution of a value - in a group of values. Rows with equal values always evaluate to the - same cumulative distribution value. | -
- dense_rank()
- |
-
- bigint
- |
-
- DENSE_RANK () OVER ( [PARTITION BY
- expr
- ] ORDER BY
- expr
- )
- |
- Computes the rank of a row in an ordered group of - rows without skipping rank values. Rows with equal values are given - the same rank value. | -
- first_value(expr)
- |
- same as input expr type | -
- FIRST_VALUE(
- expr
- ) OVER ( [PARTITION BY
- expr
- ] ORDER BY
- expr
- [ROWS|RANGE|GROUPS
- frame_expr
- ] )
- |
- Returns the first value in an ordered set of - values. | -
- lag(expr [,offset] [,default])
- |
- same as input expr type | -
- LAG(
- expr
- [,
- offset
- ] [,
- default
- ]) OVER ( [PARTITION BY
- expr
- ] ORDER BY
- expr
- )
- |
- Provides access to more than one row of the same
- table without doing a self join. Given a series of rows returned
- from a query and a position of the cursor, LAG
- provides access to a row at a given physical offset prior to that
- position. The default offset is 1. default
- sets the value that is returned if the offset goes beyond the scope
- of the window. If default is not specified, the default value
- is null. |
-
- last_value(expr) |
- same as input expr type | -
- LAST_VALUE(expr) OVER ( [PARTITION BY expr]
- ORDER BY expr [ROWS|RANGE|GROUPS frame_expr] )
- |
- Returns the last value in an ordered set of - values. | -
-
-
- |
- same as input expr type | -
- LEAD(expr [,offset]
- [,exprdefault]) OVER ( [PARTITION BY
- expr] ORDER BY expr )
- |
- Provides access to more than one row of the same
- table without doing a self join. Given a series of rows returned
- from a query and a position of the cursor, lead
- provides access to a row at a given physical offset after that
- position. If offset is not specified, the default offset is
- 1. default sets the value that is returned if the offset goes
- beyond the scope of the window. If default is not specified,
- the default value is null. |
-
- nth_value(expr)
- |
- same as input expr type | -
- NTH_VALUE(expr) OVER ( [PARTITION BY expr] ORDER
- BY expr [ROWS|RANGE|GROUPS frame_expr] )
- |
- Returns the value evaluated at the row that is the nth row of the window frame (counting from 1); null if no such row. | -
ntile(expr)
- |
- bigint |
-
- NTILE(expr) OVER ( [PARTITION BY expr] ORDER
- BY expr )
- |
- Divides an ordered data set into a number of - buckets (as defined by expr) and assigns a bucket number to - each row. | -
percent_rank() |
-
- double precision
- |
-
- PERCENT_RANK () OVER ( [PARTITION BY expr] ORDER BY
- expr )
- |
- Calculates the rank of a hypothetical row
- R minus 1, divided by 1 less than the number of
- rows being evaluated (within a window partition). |
-
- rank()
- |
- bigint |
-
- RANK () OVER ( [PARTITION BY expr] ORDER BY expr
- )
- |
- Calculates the rank of a row in an ordered group - of values. Rows with equal values for the ranking criteria receive - the same rank. The number of tied rows are added to the rank number - to calculate the next rank value. Ranks may not be consecutive - numbers in this case. | -
row_number() |
-
- bigint
- |
-
- ROW_NUMBER () OVER ( [PARTITION BY expr] ORDER BY
- expr )
- |
- Assigns a unique number to each row to which it is - applied (either each row in a window partition or each row of the - query). | -
| Function | -Return Type | -Full Syntax | -Description | -
|---|---|---|---|
- MEDIAN (expr)
- |
-
- timestamp, timestamptz, interval, float
- |
-
- MEDIAN (expression)
- - Example: -
- |
- Can take a two-dimensional array as input. Treats - such arrays as matrices. | -
- sum(array[])
- |
-
- smallint[], int[], bigint[], float[]
- |
-
- sum(array[[1,2],[3,4]])
- - Example: -
- |
- Performs matrix summation. Can take as input a - two-dimensional array that is treated as a matrix. | -
- pivot_sum (label[], label, expr)
- |
-
- int[], bigint[], float[]
- |
-
- pivot_sum( array['A1','A2'], attr, value)
- |
- A pivot aggregation using sum to resolve duplicate - entries. | -
- unnest (array[])
- |
- set of anyelement |
-
- unnest( array['one', 'row', 'per', 'item'])
- |
- Transforms a one dimensional array into rows.
- Returns a set of anyelement, a polymorphic pseudo-type in
- PostgreSQL. |
-
jsonpath Variables
| Variable | -Description | -
|---|---|
$ |
- A variable representing the JSON text to be queried (the context item). | -
$varname |
- A named variable. Its value can be set by the parameter vars of several JSON processing functions. See JSON Processing Functions and its notes for details. |
-
@ |
- A variable representing the result of path evaluation in filter expressions. | -
jsonpath Accessors
| Accessor Operator | -Description | -
|---|---|
|
-
|
-
- Member accessor that returns an object member with the specified key. If the key name is a named variable starting with |
-
|
-
|
-
- Wildcard member accessor that returns the values of all members located at the top level of the current object. - |
-
|
-
|
-
- Recursive wildcard member accessor that processes all levels of the JSON hierarchy of the current object and returns all the member values, regardless of their nesting level. This is a WarehousePG extension of the SQL/JSON standard. - |
-
|
-
|
-
- Same as |
-
|
-
|
-
- Array element accessor. The specified |
-
|
-
|
-
- Wildcard array element accessor that returns all array elements. - |
-
-
|
-
-
|
-
| Function | -Return Type | -Description | -Example | -Example Result | -
|---|---|---|---|---|
-json_array_length(json)
-
- |
-int
- |
-Returns the number of elements in the outermost JSON array. | -json_array_length('[1,2,3,{"f1":1,"f2":[5,6]},4]')
- |
-
-5
- |
-
json_each(json)
-
|
-setof key text, value json
-
|
-Expands the outermost JSON object into a set of key/value pairs. | -select * from json_each('{"a":"foo", "b":"bar"}')
- |
-
-key | value ------+------- - a | "foo" - b | "bar" -- |
-
json_each_text(json)
-
|
-setof key text, value text
- |
-Expands the outermost JSON object into a set of key/value pairs. The returned
- values will be of type text. |
-select * from json_each_text('{"a":"foo", "b":"bar"}')
- |
-
-key | value ------+------- - a | foo - b | bar -- |
-
json_extract_path(from_json json, VARIADIC path_elems
- text[])
-
|
-
-
|
-Returns the JSON value pointed to by path_elems (equivalent
- to #> operator). |
-json_extract_path('{"f2":{"f3":1},"f4":{"f5":99,"f6":"foo"}','f4')
- |
-
-{"f5":99,"f6":"foo"}
- |
-
json_extract_path_text(from_json json, VARIADIC path_elems
- text[])
-
|
-text
- |
-Returns the JSON value pointed to by path_elems as text
- (equivalent to #>> operator). |
-json_extract_path_text('{"f2":{"f3":1},"f4":{"f5":99,"f6":"foo"}','f4',
- 'f6')
- |
-
-foo
- |
-
json_object_keys(json)
-
|
-setof text
- |
-Returns set of keys in the outermost JSON object. | -json_object_keys('{"f1":"abc","f2":{"f3":"a", "f4":"b"}')
- |
-
-json_object_keys ------------------- - f1 - f2 -- |
-
json_populate_record(base anyelement, from_json
- json)
|
-anyelement
- |
-Expands the object in from_json to a row whose columns match
- the record type defined by base. See the Note 1. |
-select * from json_populate_record(null::myrowtype, '{"a": 1,
- "b": ["2", "a b"], "c": {"d": 4, "e": "a b c"}')
- |
-
- a | b | c
----+-----------+-------------
- 1 | {2,"a b"} | (4,"a b c")
-
- |
-
json_populate_recordset(base anyelement, from_json json)
-
|
-setof anyelement
- |
-Expands the outermost array of objects in from_json to a set
- of rows whose columns match the record type defined by base. See the Note 1. |
-select * from json_populate_recordset(null::myrowtype,
- '[{"a":1,"b":2},{"a":3,"b":4}]')
- |
-
-a | b ----+--- - 1 | 2 - 3 | 4 -- |
-
json_array_elements(json)
-
|
-
-
|
-Expands a JSON array to a set of JSON values. | -select * from json_array_elements('[1,true, [2,false]]')
- |
-
-value ------------ - 1 - true - [2,false] -- |
-
json_array_elements_text(json)
-
|
-setof text
- |
-Expands a JSON array to a set of text values. |
-select * from json_array_elements_text('["foo", "bar"]')
- |
-
-value ------------ - foo - bar -- |
-
json_typeof(json)
|
-text
- |
-Returns the type of the outermost JSON value as a text string. Possible types
- are object, array, string,
-number, boolean, and null.
- |
-json_typeof('-123.4')
- |
-
-number
- |
-
json_to_record(json)
|
-record
- |
-Builds an arbitrary record from a JSON object. See the Note 1. As with all
- functions returning record, the caller must explicitly define the structure of
- the record with an |
-select * from json_to_record('{"a":1,"b":[1,2,3],
- "c":[1,2,3],"e":"bar","r": {"a": 123, "b": "a b c"}')
- as x(a int, b text, c int[], d text, r myrowtype)
- |
-
- a | b | c | d | r
----+---------+---------+---+---------------
- 1 | [1,2,3] | {1,2,3} | | (123,"a b c")
-
- |
-
json_to_recordset(json)
-
|
-setof record
- |
-Builds an arbitrary set of records from a JSON array of objects See the Note 1. As with all
- functions returning record, the caller must explicitly define the structure of
- the record with an |
-select * from
- json_to_recordset('[{"a":1,"b":"foo"},{"a":"2","c":"bar"}]') as x(a int, b
- text);
- |
-
-a | b ----+----- - 1 | foo - 2 | -- |
-
|
-
|
-
-
|
- Returns from_json with all object fields that have null values omitted. Other null values are untouched. |
- json_strip_nulls('[{"f1":1,"f2":null},2,null,3]') |
- [{"f1":1},2,null,3] |
-
|
-
|
-
-
|
- Returns target with the section designated by path replaced by new_value, or with new_value added if create_missing is true (default is true) and the item designated by path does not exist. As with the path oriented operators, negative integers that appear in path count from the end of JSON arrays. |
-
-
|
-
-
|
-
|
-
|
-
-
|
- Returns target with new_value inserted. If target section designated by path is in a JSONB array, new_value will be inserted before target or after if insert_after is true (default is false). If target section designated by path is in JSONB object, new_value will be inserted only if target does not exist. As with the path oriented operators, negative integers that appear in path count from the end of JSON arrays. |
-
-
|
-
-
|
-
|
-
|
-
-
|
- Returns from_json as indented JSON text. |
- jsonb_pretty('[{"f1":1,"f2":null},2,null,3]') |
-
- [
- {
- "f1": 1,
- "f2": null
- },
- 2,
- null,
- 3
-]
-
- |
-
|
-
|
- boolean |
- Checks whether JSON path returns any item for the specified JSON value. | -
-
|
-
-
|
-
|
-
|
- boolean |
- Returns the result of JSON path predicate check for the specified JSON value. Only the first item of the result is taken into account. If the result is not Boolean, then null is returned. |
-
-
|
-
-
|
-
|
-
|
- setof jsonb |
- Gets all JSON items returned by JSON path for the specified JSON value. | -
-
|
-
- jsonb_path_query ------------------- - 2 - 3 - 4 -- |
-
|
-
|
- jsonb |
- Gets all JSON items returned by JSON path for the specified JSON value and wraps result into an array. | -
-
|
-
-
|
-
|
-
|
- jsonb |
- Gets the first JSON item returned by JSON path for the specified JSON value. Returns NULL on no results. |
-
-
|
-
-
|
-
| Operator/Method | -Description | -Example JSON | -Example Query | -Result | -
|---|---|---|---|---|
+ (unary) |
- Plus operator that iterates over the SQL/JSON sequence | -{"x": [2.85, -14.7, -9.4]} |
- + $.x.floor() |
- 2, -15, -10 |
-
- (unary) |
- Minus operator that iterates over the SQL/JSON sequence | -{"x": [2.85, -14.7, -9.4]} |
- - $.x.floor() |
- -2, 15, 10 |
-
+ (binary) |
- Addition | -[2] |
- 2 + $[0] |
- 4 |
-
- (binary) |
- Subtraction | -[2] |
- 4 - $[0] |
- 2 |
-
* |
- Multiplication | -[4] |
- 2 * $[0] |
- 8 |
-
/ |
- Division | -[8] |
- $[0] / 2 |
- 4 |
-
% |
- Modulus | -[32] |
- $[0] % 10 |
- 2 |
-
type() |
- Type of the SQL/JSON item | -[1, "2", {}] |
- $[*].type() |
- "number", "string", "object" |
-
size() |
- Size of the SQL/JSON item | -{"m": [11, 15]} |
- $.m.size() |
- 2 |
-
double() |
- Approximate floating-point number converted from an SQL/JSON number or a string | -{"len": "1.9"} |
- $.len.double() * 2 |
- 3.8 |
-
ceiling() |
- Nearest integer greater than or equal to the SQL/JSON number | -{"h": 1.3} |
- $.h.ceiling() |
- 2 |
-
floor() |
- Nearest integer less than or equal to the SQL/JSON number | -{"h": 1.3} |
- $.h.floor() |
- 1 |
-
abs() |
- Absolute value of the SQL/JSON number | -{"z": -0.3} |
- $.z.abs() |
- 0.3 |
-
keyvalue() |
- Sequence of object's key-value pairs represented as array of items containing three fields ("key", "value", and "id"). "id" is a unique identifier of the object key-value pair belongs to. |
- {"x": "20", "y": 32} |
- $.keyvalue() |
- {"key": "x", "value": "20", "id": 0}, {"key": "y", "value": 32, "id": 0} |
-
| Value/Predicate | -Description | -Example JSON | -Example Query | -Result | -
|---|---|---|---|---|
== |
- Equality operator | -[1, 2, 1, 3] |
- $[*] ? (@ == 1) |
- 1, 1 |
-
!= |
- Non-equality operator | -[1, 2, 1, 3] |
- $[*] ? (@ != 1) |
- 2, 3 |
-
<> |
- Non-equality operator (same as !=) |
- [1, 2, 1, 3] |
- $[*] ? (@ <> 1) |
- 2, 3 |
-
< |
- Less-than operator | -[1, 2, 3] |
- $[*] ? (@ < 2) |
- 1 |
-
<= |
- Less-than-or-equal-to operator | -[1, 2, 3] |
- $[*] ? (@ <= 2) |
- 1, 2 |
-
> |
- Greater-than operator | -[1, 2, 3] |
- $[*] ? (@ > 2) |
- 3 |
-
>= |
- Greater-than-or-equal-to operator | -[1, 2, 3] |
- $[*] ? (@ >= 2) |
- 2, 3 |
-
true |
- Value used to perform comparison with JSON true literal |
- [{"name": "John", "parent": false}, {"name": "Chris", "parent": true}] |
- $[*] ? (@.parent == true) |
- {"name": "Chris", "parent": true} |
-
false |
- Value used to perform comparison with JSON false literal |
- [{"name": "John", "parent": false}, {"name": "Chris", "parent": true}] |
- $[*] ? (@.parent == false) |
- {"name": "John", "parent": false} |
-
null |
- Value used to perform comparison with JSON null value |
- [{"name": "Mary", "job": null}, {"name": "Michael", "job": "driver"}] |
- $[*] ? (@.job == null) .name |
- "Mary" |
-
&& |
- Boolean AND | -[1, 3, 7] |
- $[*] ? (@ > 1 && @ < 5) |
- 3 |
-
|| |
- Boolean OR | -[1, 3, 7] |
- $[*] ? (@ < 1 || @ > 5) |
- 7 |
-
! |
- Boolean NOT | -[1, 3, 7] |
- $[*] ? (!(@ < 5)) |
- 7 |
-
like_regex |
- Tests whether the first operand matches the regular expression given by the second operand, optionally with modifications described by a string of flag characters. |
- ["abc", "abd", "aBdC", "abdacb", "babc"] |
- $[*] ? (@ like_regex "^ab.*c" flag "i") |
- "abc", "aBdC", "abdacb" |
-
starts with |
- Tests whether the second operand is an initial substring of the first operand | -["John Smith", "Mary Stone", "Bob Johnson"] |
- $[*] ? (@ starts with "John") |
- "John Smith" |
-
exists |
- Tests whether a path expression matches at least one SQL/JSON item | -{"x": [1, 2], "y": [2, 4]} |
- strict $.* ? (exists (@ ? (@[*] > 2))) |
- 2, 4 |
-
is unknown |
- Tests whether a Boolean condition is unknown |
- [-1, 2, 7, "infinity"] |
- $[*] ? ((@ > 0) is unknown) |
- "infinity" |
-
| Function | -Return Type | -Full Syntax | -Description | -
|---|---|---|---|
-gp_array_agg (anyarray)
- |
--same as the argument data type - | -
-gp_array_agg (anyarray)
--Example: - -
- |
-A parallel version of array_agg(anyarray). Concatenates input arrays to create an array of one higher dimension. The inputs must all have the same dimensions, and they cannot be empty or null. |
-
-gp_array_agg (anynonarray)
- |
--array of the argument type - | -
-gp_array_agg (anynonarray)
--Example: - -
- |
-An parallel version of array_agg(anynonarray). Creates an array by concatenating input values, including nulls. |
-
-MEDIAN (expr)
- |
-
-timestamp, timestamptz, interval, float
- |
-
-MEDIAN (expression)
--Example: - -
- |
-Can take a two-dimensional array as input. Treats such arrays as - matrices. | -
-PERCENTILE_CONT (expr) WITHIN GROUP (ORDER BY expr
- [DESC/ASC])
- |
-
-timestamp, timestamptz, interval, float
- |
-
-PERCENTILE_CONT(percentage) WITHIN GROUP (ORDER BY
-expression)
--Example: - -
- |
-Performs an inverse distribution function that assumes a - continuous distribution model. It takes a percentile value and a sort specification - and returns the same datatype as the numeric datatype of the argument. This returned - value is a computed result after performing linear interpolation. Null are ignored - in this calculation. | -
PERCENTILE_DISC (expr) WITHIN GROUP (ORDER BY
-expr [DESC/ASC]) |
-
-timestamp, timestamptz, interval, float
- |
-
-PERCENTILE_DISC(percentage) WITHIN GROUP (ORDER BY
-expression)
--Example: - -
- |
-Performs an inverse distribution function that assumes a - discrete distribution model. It takes a percentile value and a sort specification. - This returned value is an element from the set. Null are ignored in this - calculation. | -
-sum(array[])
- |
-
-smallint[]int[], bigint[], float[]
- |
-
-sum(array[[1,2],[3,4]])
--Example: - -
- |
-Performs matrix summation. Can take as input a two-dimensional - array that is treated as a matrix. | -
-pivot_sum (label[], label, expr)
- |
-
-int[], bigint[], float[]
- |
-
-pivot_sum( array['A1','A2'], attr, value)
- |
-A pivot aggregation using sum to resolve duplicate - entries. | -
-unnest (array[])
- |
-set of anyelement |
-
-unnest( array['one', 'row', 'per', 'item'])
- |
-Transforms a one dimensional array into rows. Returns a set of
-anyelement, a polymorphic pseudotype in PostgreSQL. |
-
| SQL Command | -Supported in WarehousePG | -Modifications, Limitations, Exceptions | -
|---|---|---|
ALTER AGGREGATE |
-YES | -- |
ALTER CONVERSION |
-YES | -- |
ALTER DATABASE |
-YES | -- |
ALTER DOMAIN |
-YES | -- |
ALTER EVENT TRIGGER |
-YES | -- |
ALTER EXTENSION |
-YES | -Changes the definition of a WarehousePG extension - based on PostgreSQL 9.6. | -
ALTER FUNCTION |
-YES | -- |
ALTER GROUP |
-YES | -An alias for ALTER ROLE | -
ALTER INDEX |
-YES | -- |
ALTER LANGUAGE |
-YES | -- |
ALTER OPERATOR |
-YES | -- |
ALTER OPERATOR CLASS |
-YES | -- |
ALTER OPERATOR FAMILY |
-YES | -- |
ALTER PROTOCOL |
-YES | -- |
ALTER PUBLICATION |
-NO | -- |
ALTER RESOURCE QUEUE |
-YES | -WarehousePG resource management feature - not in PostgreSQL. | -
ALTER ROLE |
-YES | -WarehousePG Clauses:
|
-
ALTER SCHEMA |
-YES | -- |
ALTER SEQUENCE |
-YES | -- |
ALTER SUBSCRIPTION |
-NO | -- |
ALTER SYSTEM |
-NO | -- |
ALTER TABLE |
-YES | -Unsupported Clauses / Options:
-
WarehousePG - Database Clauses: -
|
-
ALTER TABLESPACE |
-YES | -- |
ALTER TRIGGER |
-NO | -- |
ALTER TYPE |
-YES | -WarehousePG Clauses:
|
-
ALTER USER |
-YES | -An alias for ALTER ROLE | -
ALTER VIEW |
-YES | -- |
ANALYZE |
-YES | -- |
BEGIN |
-YES | -- |
CHECKPOINT |
-YES | -- |
CLOSE |
-YES | -- |
CLUSTER |
-YES | -- |
COMMENT |
-YES | -- |
COMMIT |
-YES | -- |
COMMIT PREPARED |
-NO | -- |
COPY |
-YES | -Modified Clauses:
WarehousePG - Clauses: -
|
-
CREATE AGGREGATE |
-YES | -Unsupported Clauses / Options:
WarehousePG - Clauses: -
Limitations: -The functions used to implement the
- aggregate must be |
-
CREATE CAST |
-YES | -- |
CREATE CONSTRAINT TRIGGER |
-NO | -- |
CREATE CONVERSION |
-YES | -- |
CREATE DATABASE |
-YES | -- |
CREATE DOMAIN |
-YES | -- |
CREATE EVENT TRIGGER |
-YES | -- |
CREATE EXTENSION |
-YES | -Loads a new extension into WarehousePG - based on - PostgreSQL 9.6. | -
CREATE EXTERNAL TABLE |
-YES | -WarehousePG parallel ETL feature - not in PostgreSQL - 9.4. | -
CREATE FUNCTION |
-YES | -Limitations: Functions defined as
- |
-
CREATE GROUP |
-YES | -An alias for CREATE ROLE | -
CREATE INDEX |
-YES | -WarehousePG Clauses:
Limitations: -
|
-
CREATE LANGUAGE |
-YES | -- |
CREATE MATERIALIZED VIEW |
-YES | -Based on PostgreSQL 9.4. | -
CREATE OPERATOR |
-YES | -Limitations: The function used to implement the operator must be an |
-
CREATE OPERATOR CLASS |
-YES | -- |
CREATE OPERATOR FAMILY |
-YES | -- |
CREATE PROTOCOL |
-YES | -- |
CREATE PUBLICATION |
-NO | -- |
CREATE RESOURCE QUEUE |
-YES | -WarehousePG resource management feature - not in PostgreSQL 9.4. | -
CREATE ROLE |
-YES | -WarehousePG Clauses:
|
-
CREATE RULE |
-YES | -- |
CREATE SCHEMA |
-YES | -- |
CREATE SEQUENCE |
-YES | -Limitations: The The
- |
-
CREATE SUBSCRIPTION |
-NO | -- |
CREATE TABLE |
-YES | -Unsupported Clauses / Options:
Limited Clauses: -
WarehousePG Clauses: -
|
-
CREATE TABLE AS |
-YES | -See CREATE TABLE | -
CREATE TABLESPACE |
-YES | -WarehousePG Clauses: Specify host file system - locations for specific segment instances. -
|
-
CREATE TRIGGER |
-NO | -- |
CREATE TYPE |
-YES | -WarehousePG Clauses:
Limitations: -The functions
- used to implement a new base type must be |
-
CREATE USER |
-YES | -An alias for CREATE ROLE | -
CREATE VIEW |
-YES | -- |
DEALLOCATE |
-YES | -- |
DECLARE |
-YES | -Unsupported Clauses /
- Options:
Limitations: -Cursors cannot be - backward-scrolled. Forward scrolling is supported. -PL/pgSQL does not have - support for updatable cursors. - |
-
DELETE |
-YES | -- |
DISCARD |
-YES | -
- Limitation:
- |
-
DO |
-YES | -PostgreSQL 9.0 feature | -
DROP AGGREGATE |
-YES | -- |
DROP CAST |
-YES | -- |
DROP CONVERSION |
-YES | -- |
DROP DATABASE |
-YES | -- |
DROP DOMAIN |
-YES | -- |
DROP EVENT TRIGGER |
-YES | -- |
DROP EXTENSION |
-YES | -Removes an extension from WarehousePG – based on - PostgreSQL 9.6. | -
DROP EXTERNAL TABLE |
-YES | -WarehousePG parallel ETL feature - not in PostgreSQL - 9.4. | -
DROP FUNCTION |
-YES | -- |
DROP GROUP |
-YES | -An alias for DROP ROLE | -
DROP INDEX |
-YES | -- |
DROP LANGUAGE |
-YES | -- |
DROP OPERATOR |
-YES | -- |
DROP OPERATOR CLASS |
-YES | -- |
DROP OPERATOR FAMILY |
-YES | -- |
DROP OWNED |
-NO | -- |
DROP PROTOCOL |
-YES | -- |
DROP PUBLICATION |
-NO | -- |
DROP RESOURCE QUEUE |
-YES | -WarehousePG resource management feature - not in - PostgreSQL 9.4. | -
DROP ROLE |
-YES | -- |
DROP RULE |
-YES | -- |
DROP SCHEMA |
-YES | -- |
DROP SEQUENCE |
-YES | -- |
DROP SUBSCRIPTION |
-NO | -- |
DROP TABLE |
-YES | -- |
DROP TABLESPACE |
-YES | -- |
DROP TRIGGER |
-NO | -- |
DROP TYPE |
-YES | -- |
DROP USER |
-YES | -An alias for DROP ROLE | -
DROP VIEW |
-YES | -- |
END |
-YES | -- |
EXECUTE |
-YES | -- |
EXPLAIN |
-YES | -- |
FETCH |
-YES | -Unsupported Clauses /
- Options:
Limitations: -Cannot fetch rows in a - nonsequential fashion; backward scan is not supported. - |
-
GRANT |
-YES | -- |
INSERT |
-YES | -- |
LATERAL Join Type |
-NO | -- |
LISTEN |
-YES | -- |
LOAD |
-YES | -- |
LOCK |
-YES | -- |
MOVE |
-YES | -See FETCH | -
NOTIFY |
-YES | -- |
PREPARE |
-YES | -- |
PREPARE TRANSACTION |
-NO | -- |
REASSIGN OWNED |
-YES | -- |
REFRESH MATERIALIZED VIEW |
-YES | -Based on PostgreSQL 9.4. | -
REINDEX |
-YES | -- |
RELEASE SAVEPOINT |
-YES | -- |
RESET |
-YES | -- |
RETRIEVE |
-YES | -WarehousePG parallel retrieve cursor - not in PostgreSQL 9.4. | -
REVOKE |
-YES | -- |
ROLLBACK |
-YES | -- |
ROLLBACK PREPARED |
-NO | -- |
ROLLBACK TO SAVEPOINT |
-YES | -- |
SAVEPOINT |
-YES | -- |
SELECT |
-YES | -Limitations: Limited use of Text search ( WarehousePG Clauses (OLAP): -
|
-
SELECT INTO |
-YES | -See SELECT | -
SET |
-YES | -- |
SET CONSTRAINTS |
-NO | -In PostgreSQL, this only applies to foreign key constraints, - which are currently not enforced in WarehousePG. | -
SET ROLE |
-YES | -- |
SET SESSION AUTHORIZATION |
-YES | -Deprecated as of PostgreSQL 8.1 - see SET ROLE | -
SET TRANSACTION |
-YES | -Limitations:
|
-
SHOW |
-YES | -- |
START TRANSACTION |
-YES | -- |
TRUNCATE |
-YES | -- |
UNLISTEN |
-YES | -- |
UPDATE |
-YES | -Limitations:
|
-
VACUUM |
-YES | -Limitations:
|
-
VALUES |
-YES | -- |