Skip to content

sql: add miscellaneous Postgres compatibility#18530

Merged
jordanlewis merged 5 commits intocockroachdb:masterfrom
jordanlewis:more-pg-compat
Sep 17, 2017
Merged

sql: add miscellaneous Postgres compatibility#18530
jordanlewis merged 5 commits intocockroachdb:masterfrom
jordanlewis:more-pg-compat

Conversation

@jordanlewis
Copy link
Copy Markdown
Member

  • support "char" type as alias to char
  • add and link pg_tablespace table
  • add pg_encoding_to_char builtin
  • add missing relpersistence column to pg_class
  • fix pg_namespace column name: aclitem should be nspacl

Column was named aclitem, this is incorrect. It's supposed to be named
nspacl.
This column describes whether a table is temporary, permanent, or
unlogged. We only support permanent.
This builtin converts database encoding ids to human-readable names. We
only support UTF8 as an encoding.
@jordanlewis jordanlewis requested review from a team September 17, 2017 20:00
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@jordanlewis jordanlewis assigned knz and justinj and unassigned knz Sep 17, 2017
@knz
Copy link
Copy Markdown
Contributor

knz commented Sep 17, 2017

:lgtm:


Reviewed 2 of 2 files at r1, 2 of 2 files at r2, 3 of 3 files at r3, 4 of 4 files at r4, 3 of 3 files at r5.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks pending.


Comments from Reviewable

This pg_catalog table records the tablespace of databases and tables, a
Postgres concept that we don't support. As such, we hardcode all
databases to a single default tablespace with the same name as the one
in Postgres.
Postgres has a type called "char" (with the quotes) that is a
single-character string. It's used for system tables as a lightweight
enum type. Some ORMs cast input data to "char" to compare against these
tables, so we need to support it in the parser.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants