Open chriscasano opened 4 years ago
@ericharmeling this may give you a jump start on the docs page. A fellow SE wrote this up.
PostGIS - PostGIS is a spatial database extender for PostgreSQL object-relational database. It adds support for geographic objects allowing location queries to be run in SQL.
In 20.2 we now support spatial indexes which should fill this requirement
Btree_gist - btree_gist provides GiST index operator classes that implement B-tree equivalent behavior for the data types int2, int4, int8, float4, float8, numeric, timestamp with time zone, timestamp without time zone, time with time zone, time without time zone, date, interval, oid, money, char, varchar, text, bytea, bit, varbit, macaddr, macaddr8, inet, cidr, uuid, and all enum types.
CockroachDB has built its own cost based optimizer. This means there are some constructs already built in to cockroach that could mean this extension is not required. Features such as Secondary indexes, partial indexes, inverted indexes, hash sharded indexes etc
fuzzymatch - The fuzzystrmatch module provides several functions to determine similarities and distance between strings.
Fuzzy-matching is not built into CockroachDB as of yet. There are a number of ways to accomplish this with traditional SQL or using the application to achieve this.
pgcrypto - The pgcrypto module provides cryptographic functions for PostgreSQL.
It appears some functions exists in CRDB but not all in the extension.
pg_stat_statements - The pg_stat_statements module provides a means for tracking planning and execution statistics of all SQL statements executed by a server.
Most of the items here can be found in the Statements page of DB Console, plus more
Pg_trgm - The pg_trgm module provides functions and operators for determining the similarity of alphanumeric text based on trigram matching, as well as index operator classes that support fast searching for similar strings.
Not supported but here's is a workaround without the extension - https://www.cockroachlabs.com/blog/full-text-indexing-search/
Plpgsql - PL SQL support - https://www.postgresql.org/docs/9.6/plpgsql.html
Not supported today
Uuid-ossp - The uuid-ossp module provides functions to generate universally unique identifiers (UUIDs) using one of several standard algorithms. There are also functions to produce certain special UUID constants. This module is only necessary for special requirements beyond what is available in core PostgreSQL. See Section 9.14 for built-in ways to generate UUIDs.
UUID’s are natively supported by CockroachDB
Thanks for compiling all of this info, @chriscasano. This will be massively helpful!
Another extension I came across on a project is postgres_fdw. This extension allows you to connect two postgres instances and query/join/access the tables across servers. I think it would be worth noting that: a) we don't support joining a CRDB instance to tables in a Postgres instance, and b) we do support cross database-joins within a CRDB instance.
just want to mention that we do support the levenshtein() function which is one way to do fuzzy matching similar to the fuzzymatch extension.
Dikshant Adhikari (dikshant) commented: Rafi Shamim is there a list of extensions we support somewhere either in code or in a doc?
Rafi Shamim (rafiss) commented: Yes, anything that does the {{return nil}} case here: https://github.com/cockroachdb/cockroach/blob/2e2fb1fae4f8bc91b4f4fc29a8f300b5c463117a/pkg/sql/create_extension.go#L46-L52
Dikshant Adhikari (dikshant) commented: https://cockroachdb.slack.com/archives/CP4D9LD5F/p1675701753972069
Chris Casano (chriscasano) commented:
On a regular frequency customers ask which Postgres extensions are supported in CockroachDB. Today create extensions is a no-op, but for customers migrating from Postgres their app may depend on functionality from these extensions. Postgis is an obvious one that we support now in 20.2. But there are others where similar functionality can be found with the uuid-ossp extension and the UUID data type for CockroachDB. ps_stat_statements comes up to and most of the metrics are already in our statements page. It would be good to have a docs page that outlines this so customers can figure out what they adopt or where they may have a loss of functionality.
Here are Postgres extension that comes with the Postgres source code: https://www.postgresql.org/docs/9.5/contrib.html and there's more out in the wild: https://www.postgresql.org/download/products/6-postgresql-extensions/
Jira Issue: DOC-825