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 missing PostgreSQL built-in functions #26586

Merged
merged 1 commit into from Jun 11, 2018

Conversation

knz
Copy link
Contributor

@knz knz commented Jun 11, 2018

Fixes #26406.

Release note (sql change): CockroachDB now supports the built-in
functions bit_length(), quote_ident(), quote_literal(),
quote_nullable(), and the aliases char_length() and
character_length() for length(), for compatibility with
PostgreSQL.

@knz knz requested review from BramGruneir and a team June 11, 2018 08:39
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@justinj
Copy link
Contributor

justinj commented Jun 11, 2018

:lgtm:


Review status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale)


pkg/sql/logictest/testdata/logic_test/builtin_function, line 42 at r1 (raw file):


query TTTT
SELECT quote_ident('abc'), quote_ident('ab.c'), quote_ident('ab"c'), quote_ident('世界')

This is also sensitive to SQL keywords, right? Do we need a test of that?


Comments from Reviewable

@knz
Copy link
Contributor Author

knz commented Jun 11, 2018

Review status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale)


pkg/sql/logictest/testdata/logic_test/builtin_function, line 42 at r1 (raw file):

Previously, justinj (Justin Jaffray) wrote…

This is also sensitive to SQL keywords, right? Do we need a test of that?

Nice catch. Done.


Comments from Reviewable

@knz
Copy link
Contributor Author

knz commented Jun 11, 2018

TFYR!

bors r+

@craig
Copy link
Contributor

craig bot commented Jun 11, 2018

Build failed

Release note (sql change): CockroachDB now supports the built-in
functions `bit_length()`, `quote_ident()`, `quote_literal()`,
`quote_nullable()`, and the aliases `char_length()` and
`character_length()` for `length()`, for compatibility with
PostgreSQL.
@knz
Copy link
Contributor Author

knz commented Jun 11, 2018

github API flake (502 server error)

bors r+

craig bot pushed a commit that referenced this pull request Jun 11, 2018
26586: sql: add missing PostgreSQL built-in functions r=knz a=knz

Fixes #26406.

Release note (sql change): CockroachDB now supports the built-in
functions `bit_length()`, `quote_ident()`, `quote_literal()`,
`quote_nullable()`, and the aliases `char_length()` and
`character_length()` for `length()`, for compatibility with
PostgreSQL.

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

craig bot commented Jun 11, 2018

Build succeeded

@craig craig bot merged commit 74cfb8a into cockroachdb:master Jun 11, 2018
@knz knz deleted the 20180611-string-fns branch June 11, 2018 18:15
@knz knz moved this from Current milestone to Finished (milestone 0529) in (DEPRECATED) SQL Front-end, Lang & Semantics Jun 11, 2018
@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.

None yet

3 participants