Aller au contenu

Polyfills on other sources

A polyfill is how Provisa gives a PostgreSQL client PostgreSQL's behaviour on other sources (dialects: bigquery, databricks, dax, doris, dremio, drill, druid, dune, exasol, fabric, hive, materialize, mysql, oracle, prql, redshift, risingwave, snowflake, solr, spark, spark2, sqlite, starrocks, tableau, teradata, tsql). Each feature has a read polyfill, how its values and operations are computed on the engine, and a write polyfill, how its values reach the engine; each states its limitations.

This page lists every feature that has a polyfill or a limitation on other sources. A feature other sources does natively with no difference from PostgreSQL is left out: 1 of the grid's 12 features are left out as native. The conformance runs check the omission: a feature left out that answers otherwise than PostgreSQL fails the run.

Rules on this page: 12, of which 0 are only the name of a rewrite function. A rule is printed as the translator runs it: the PostgreSQL pattern, its holes written $name (typed with ::type), then the engine's replacement.

FeatureRead polyfillRead limitationsWrite polyfillWrite limitations
array_ndims
The number of an array's dimensions.
array_ndims($a::anyarray)
=>
refused (its error is under the limitations)
  • Refused: array_ndims($a::anyarray). 0A000 array_ndims() has no form on a direct source
array_dims
The text of an array's dimensions, such as [1:2][1:3].
array_dims($a::anyarray)
=>
refused (its error is under the limitations)
  • Refused: array_dims($a::anyarray). 0A000 array_dims() has no form on a direct source
array_lower
The lower bound of a dimension: 1, as a list's index starts there.
array_lower($a::anyarray, $d::integer)
=>
refused (its error is under the limitations)
  • Refused: array_lower($a::anyarray, $d::integer). 0A000 array_lower() has no form on a direct source
array_upper
The upper bound of a dimension: its length.
array_upper($a::anyarray, $d::integer)
=>
refused (its error is under the limitations)
  • Refused: array_upper($a::anyarray, $d::integer). 0A000 array_upper() has no form on a direct source
array_fill
An array of a value repeated to the dimensions given.
array_fill($v::anyelement, $dims::integer[])
=>
refused (its error is under the limitations)
array_fill($v::anyelement, $dims::integer[], $lower_bounds::integer[])
=>
refused (its error is under the limitations)
  • Refused: array_fill($v::anyelement, $dims::integer[]). 0A000 array_fill() has no form on a direct source
  • Refused: array_fill($v::anyelement, $dims::integer[], $lower_bounds::integer[]). 0A000 array_fill() has no form on a direct source
array_positions
The positions of every element equal to a value, a NULL equal to a NULL.
array_positions($a::anycompatiblearray, $v::anycompatible)
=>
refused (its error is under the limitations)
  • Refused: array_positions($a::anycompatiblearray, $v::anycompatible). 0A000 array_positions() has no form on a direct source
array_replace
Each element equal to a value replaced by another, a NULL equal to a NULL.
array_replace($a::anycompatiblearray, $v::anycompatible, $w::anycompatible)
=>
refused (its error is under the limitations)
  • Refused: array_replace($a::anycompatiblearray, $v::anycompatible, $w::anycompatible). 0A000 array_replace() has no form on a direct source
array_sample
A number of an array's elements, chosen at random.
array_sample($a::anyarray, $n::integer)
=>
refused (its error is under the limitations)
  • Refused: array_sample($a::anyarray, $n::integer). 0A000 array_sample() has no form on a direct source
array_shuffle
An array's elements in a random order.
array_shuffle($a::anyarray)
=>
refused (its error is under the limitations)
  • Refused: array_shuffle($a::anyarray). 0A000 array_shuffle() has no form on a direct source
trim_array
An array without its last elements.
trim_array($a::anyarray, $n::integer)
=>
refused (its error is under the limitations)
  • Refused: trim_array($a::anyarray, $n::integer). 0A000 trim_array() has no form on a direct source
generate_subscripts
The subscripts of a dimension, as rows, in either order.
generate_subscripts($a::anyarray, $d::integer, $reverse::boolean)
=>
refused (its error is under the limitations)
  • Refused: generate_subscripts($a::anyarray, $d::integer, $reverse::boolean). 0A000 generate_subscripts() has no form on a direct source