Heroku目前是否支持postgresql时态表扩展?

时间:2015-07-19 17:42:48

标签: postgresql heroku heroku-postgres

在heroku docs中找不到任何提及它的内容。我正在考虑创建历史表并想知道。如下所述:https://github.com/arkhipov/temporal_tables和此处http://clarkdave.net/2015/02/historical-records-with-postgresql-and-temporal-tables-and-sql-2011/

2 个答案:

答案 0 :(得分:0)

据我所知,Heroku的Postgres服务并未包含该特定扩展名:

SELECT * FROM pg_available_extensions WHERE name LIKE '%temporal%';
...
(0 rows)

对于后代,这里是可用扩展的完整列表(截至2015/07/20):

SELECT * FROM pg_available_extensions;

         name          | default_version | installed_version |                               comment
------------------------+-----------------+-------------------+----------------------------------------------------------------------
 dblink                 | 1.1             | [null]            | connect to other PostgreSQL databases from within a database
 tablefunc              | 1.0             | [null]            | functions that manipulate whole tables, including crosstab
 hstore                 | 1.3             | [null]            | data type for storing sets of (key, value) pairs
 intarray               | 1.0             | [null]            | functions, operators, and index support for 1-D arrays of integers
 pg_trgm                | 1.1             | [null]            | text similarity measurement and index searching based on trigrams
 postgis                | 2.1.7           | [null]            | PostGIS geometry, geography, and raster spatial types and functions
 pg_stat_statements     | 1.2             | [null]            | track execution statistics of all SQL statements executed
 test_parser            | 1.0             | [null]            | example of a custom parser for full-text search
 dict_xsyn              | 1.0             | [null]            | text search dictionary template for extended synonym processing
 insert_username        | 1.0             | [null]            | functions for tracking who changed a table
 pg_freespacemap        | 1.0             | [null]            | examine the free space map (FSM)
 ltree                  | 1.0             | [null]            | data type for hierarchical tree-like structures
 test_shm_mq            | 1.0             | [null]            | Test code for shared memory message queues
 adminpack              | 1.0             | [null]            | administrative functions for PostgreSQL
 plpgsql                | 1.0             | 1.0               | PL/pgSQL procedural language
 plv8                   | 1.4.2           | [null]            | PL/JavaScript (v8) trusted procedural language
 dict_int               | 1.0             | [null]            | text search dictionary template for integers
 fuzzystrmatch          | 1.0             | [null]            | determine similarities and distance between strings
 tcn                    | 1.0             | [null]            | Triggered change notifications
 sslinfo                | 1.0             | [null]            | information about SSL certificates
 lo                     | 1.0             | [null]            | Large Object maintenance
 cube                   | 1.0             | [null]            | data type for multidimensional cubes
 tsearch2               | 1.0             | [null]            | compatibility package for pre-8.3 text search functions
 timetravel             | 1.0             | [null]            | functions for implementing time travel
 redis_fdw              | 1.0             | [null]            | Foreign data wrapper for querying a Redis server
 pgstattuple            | 1.2             | [null]            | show tuple-level statistics
 earthdistance          | 1.0             | [null]            | calculate great-circle distances on the surface of the Earth
 chkpass                | 1.0             | [null]            | data type for auto-encrypted passwords
 refint                 | 1.0             | [null]            | functions for implementing referential integrity (obsolete)
 moddatetime            | 1.0             | [null]            | functions for tracking last modification time
 seg                    | 1.0             | [null]            | data type for representing line segments or floating-point intervals
 pageinspect            | 1.2             | [null]            | inspect the contents of database pages at a low level
 citext                 | 1.0             | [null]            | data type for case-insensitive character strings
 autoinc                | 1.0             | [null]            | functions for autoincrementing fields
 pg_prewarm             | 1.0             | [null]            | prewarm relation data
 isn                    | 1.0             | [null]            | data types for international product numbering standards
 postgis_topology       | 2.1.7           | [null]            | PostGIS topology spatial types and functions
 xml2                   | 1.0             | [null]            | XPath querying and XSLT
 postgres_fdw           | 1.0             | [null]            | foreign-data wrapper for remote PostgreSQL servers
 postgis_tiger_geocoder | 2.1.7           | [null]            | PostGIS tiger geocoder and reverse geocoder
 unaccent               | 1.0             | [null]            | text search dictionary that removes accents
 pg_buffercache         | 1.0             | [null]            | examine the shared buffer cache
 uuid-ossp              | 1.0             | 1.0               | generate universally unique identifiers (UUIDs)
 file_fdw               | 1.0             | [null]            | foreign-data wrapper for flat file access
 pg_logfebe             | 1.0             | [null]            | log via febe framing protocol to a unix socket
 btree_gist             | 1.0             | [null]            | support for indexing common datatypes in GiST
 pgcrypto               | 1.1             | [null]            | cryptographic functions
 intagg                 | 1.0             | [null]            | integer aggregator and enumerator (obsolete)
 pgrowlocks             | 1.1             | [null]            | show row-level locking information
 btree_gin              | 1.0             | [null]            | support for indexing common datatypes in GIN
 worker_spi             | 1.0             | [null]            | Sample background worker

亚马逊的RDS也doesn't appear包含它。

虽然并不完全令人惊讶:它是一个有趣的扩展,但不太可能经常被请求(因为功能可以间接复制)。

答案 1 :(得分:0)

PL/pgSQL 中有一个 temporal_tables 的实现,它不需要编译扩展。这应该适用于任何托管的 PostgresSQL 数据库,例如 Heroku Postgres。

Github 项目:https://github.com/nearform/temporal_tables