Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: add pg_catalog.pg_shdescription #26474

Merged
merged 1 commit into from
Jun 6, 2018
Merged

Conversation

BramGruneir
Copy link
Member

This virtual table is required for compatibility with PGAdmin.

Closes #26376.

Release note: Added the pg_catalog.pg_shdescription table for compatibility with
Postgres tools. Note that we do not support adding descriptions to shared
database objects.

This virtual table is required for compatibility with PGAdmin.

Closes cockroachdb#26376.

Release note: Added the pg_catalog.pg_shdescription table for compatibility with
Postgres tools. Note that we do not support adding descriptions to shared
database objects.
@BramGruneir BramGruneir requested review from knz, emsal0 and a team June 6, 2018 18:59
@BramGruneir BramGruneir requested a review from a team as a code owner June 6, 2018 18:59
@BramGruneir BramGruneir requested review from a team June 6, 2018 18:59
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@BramGruneir
Copy link
Member Author

bors r+

craig bot pushed a commit that referenced this pull request Jun 6, 2018
26223: sql: cleanups + new "project set" relop + ROWS FROM + local exec logic r=knz a=knz

This PR provides support for pg's "Project Set" logical plan operator, which underlies both the handling of set-generating functions (SRFs) and the `ROWS FROM` input SQL syntax.

Formally, this operator takes a relational operator R and a list of SRF applications L. Its semantics is a relation which performs a lateral cross join between R and (conceptually) `ROWS FROM (L)`, the functional zip of the value generators in L.

Reminder: the functional zip over iterators a,b,c returns tuples of values from a,b,c picked "simultaneously". NULLs are used when an iterator is "shorter" than another. For example `zip([1,2,3], ['a','b'])` is `[(1,'a'), (2,'b'), (3, null)]`.

The PR also greatly simplifies / clean up the typing logic around SRFs by getting rid of `TTable` and `DTable` entirely.

It also cleans up the docs of SRF built-in functions so that their return type is displayed in simple form (e.g. the documented return type of generate_series is now `int` and not `setof tuple{int as ...}`)

This PR serves several purposes simultaneously.

1. to solve #20511.
2. to provide more compatibility with pg's wrt the `ROWS FROM` syntax.
3. to serve as baseline for testing the new "ApplySRF" (really, "project set") functionality in distsql (SQL Execution team)
4. to serve as common intermediate language for the optimizer code, and as baseline for future
    optimizer code that will look into SRF transformations (SQL Optimizer team). /cc @andy-kimball 

Fixes #20511.

26474: sql: add pg_catalog.pg_shdescription r=BramGruneir a=BramGruneir

This virtual table is required for compatibility with PGAdmin.

Closes #26376.

Release note: Added the pg_catalog.pg_shdescription table for compatibility with
Postgres tools. Note that we do not support adding descriptions to shared
database objects.

Co-authored-by: Raphael 'kena' Poss <knz@cockroachlabs.com>
Co-authored-by: Bram Gruneir <bram@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Jun 6, 2018

Build succeeded

@craig craig bot merged commit 81161b3 into cockroachdb:master Jun 6, 2018
@BramGruneir BramGruneir deleted the 26376 branch June 6, 2018 20:17
@knz knz added the docs-todo label Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants