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

pragma index_info #3880

Open
pgulutzan opened this issue Dec 12, 2018 · 3 comments
Open

pragma index_info #3880

pgulutzan opened this issue Dec 12, 2018 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers sql

Comments

@pgulutzan
Copy link
Contributor

I have Ubuntu 18.04. I have Tarantool 2.1, pulled from source today.

I execute these requests:
CREATE TABLE f (s1 CHAR(1) PRIMARY KEY);
CREATE INDEX i ON f (s1);
PRAGMA index_info(f.i);
CREATE TABLE g (s1 CHAR(1) COLLATE "BINARY");

The PRAGMA statement says that the collation is BINARY (upper case).
The CREATE TABLE g statement says that there is no such collation as BINARY (upper case).

The correct name is binary (lower case), as seen in PRAGMA collation_list.

Also, the PRAGMA statement says the data type is "string" -- why not CHAR?

Also, the PRAGMA statement would say that the collation of an integer column
is BINARY -- why not NULL or 'none'? I don't know what 'none' means, so I'm
not sure whether it is correct, but I know what 'binary' means, and it won't
work on integers (assuming MessagePack high-endian storage and assuming
unsigned but not assuming everything has the same length).

@Korablev77
Copy link
Contributor

Well, 'none' collation is @kostja 's idea. It was needed for this issue: #3185 to tell binary collation from total absence of collation and meanwhile operate on collation objects in the same way.

Other concerns are related mostly to output format, so I guess it is easy to fix.

@Korablev77 Korablev77 added sql good first issue Good for newcomers labels Dec 13, 2018
@kyukhin kyukhin added the bug Something isn't working label Dec 18, 2018
@kyukhin kyukhin added this to the 2.2.0 milestone Dec 18, 2018
@kyukhin kyukhin modified the milestones: 2.2.0, 2.3.0 Apr 1, 2019
@kostja kostja modified the milestones: 2.3.1, wishlist Aug 6, 2019
@kostja
Copy link
Contributor

kostja commented Aug 6, 2019

This is still not documented, so can hardly be a bug. I think we should support an information schema view for indexes, not a pragma.

@pgulutzan
Copy link
Contributor Author

Well, kostja is right that we should have a view similar to what information_schema has, but now PRAGMA is documented, so I think this could be regarded as a bug.

@kyukhin kyukhin removed this from the wishlist milestone Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers sql
Projects
None yet
Development

No branches or pull requests

4 participants