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

String aliases are preserved #3820

Merged
merged 1 commit into from
Oct 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 27 additions & 11 deletions v2.1/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,11 @@ The size of a `STRING` value is variable, but it's recommended to keep values un
~~~

~~~
+-------------+-----------+-------------+----------------+-----------------------+-------------+
| column_name | data_type | is_nullable | column_default | generation_expression | indices |
+-------------+-----------+-------------+----------------+-----------------------+-------------+
| a | STRING | false | NULL | | {"primary"} |
| b | STRING(4) | true | NULL | | {} |
| c | STRING | true | NULL | | {} |
+-------------+-----------+-------------+----------------+-----------------------+-------------+
column_name | data_type | is_nullable | column_default | generation_expression | indices | is_hidden
+-------------+-----------+-------------+----------------+-----------------------+-------------+-----------+
a | STRING | false | NULL | | {"primary"} | false
b | STRING(4) | true | NULL | | {} | false
c | STRING | true | NULL | | {} | false
(3 rows)
~~~

Expand All @@ -89,11 +87,29 @@ The size of a `STRING` value is variable, but it's recommended to keep values un
~~~

~~~
a | b | c
+----------+------+--------+
| a | b | c |
+----------+------+--------+
| a1b2c3d4 | e5f6 | g7h8i9 |
+----------+------+--------+
a1b2c3d4 | e5f6 | g7h8i9
(1 row)
~~~

{% include copy-clipboard.html %}
~~~ sql
> CREATE TABLE aliases (a STRING PRIMARY KEY, b VARCHAR, c CHAR);
~~~

{% include copy-clipboard.html %}
~~~ sql
> SHOW COLUMNS FROM aliases;
~~~

~~~
column_name | data_type | is_nullable | column_default | generation_expression | indices | is_hidden
+-------------+-----------+-------------+----------------+-----------------------+-------------+-----------+
a | STRING | false | NULL | | {"primary"} | false
b | VARCHAR | true | NULL | | {} | false
c | CHAR | true | NULL | | {} | false
(3 rows)
~~~

## Supported casting and conversion
Expand Down