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: implement col_description() #12978

Merged
merged 1 commit into from
Jan 18, 2017

Conversation

jordanlewis
Copy link
Member

@jordanlewis jordanlewis commented Jan 18, 2017

This postgres builtin retrieves the comment, if present, on a column in
a table. We don't support commenting on columns, so for us this function
currently always returns NULL.

Resolves #12783.
The test query in that issue hasn't yet been added to the ORM test file because it also depends on pg_catalog.pg_collation, which is tracked in #12976.


This change is Reviewable

@jordanlewis jordanlewis requested a review from cuongdo January 18, 2017 19:36
@cuongdo
Copy link
Contributor

cuongdo commented Jan 18, 2017

:lgtm:


Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.


pkg/sql/parser/builtins.go, line 1586 at r1 (raw file):

			Types:      NamedArgTypes{{"table_oid", TypeInt}, {"column_number", TypeInt}},
			ReturnType: TypeString,
			fn: func(ctx *EvalContext, args DTuple) (Datum, error) {

nit: replace ctx and args with _


Comments from Reviewable

This postgres builtin retrieves the comment, if present, on a column in
a table. We don't support commenting on columns, so this function
currently always returns NULL.
@jordanlewis
Copy link
Member Author

Review status: 1 of 2 files reviewed at latest revision, 1 unresolved discussion.


pkg/sql/parser/builtins.go, line 1586 at r1 (raw file):

Previously, cuongdo (Cuong Do) wrote…

nit: replace ctx and args with _

Done.


Comments from Reviewable

@jordanlewis jordanlewis merged commit 4f9c864 into cockroachdb:master Jan 18, 2017
@jordanlewis jordanlewis deleted the col_description branch January 18, 2017 22:47
@knz
Copy link
Contributor

knz commented Jan 22, 2017

Reviewed 1 of 2 files at r1, 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.


Comments from Reviewable

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.

4 participants