awsdocs / amazon-redshift-developer-guide

This is the documentation for the Amazon Redshift Developer Guide
Other
122 stars 143 forks source link

Switch data type name and alias for numeric and decimal #5

Closed bradleybuda closed 1 year ago

bradleybuda commented 6 years ago

This page: https://docs.aws.amazon.com/redshift/latest/dg/c_Supported_data_types.html (GitHub: https://github.com/awsdocs/amazon-redshift-developer-guide/blob/master/doc_source/c_Supported_data_types.md ) shows the DECIMAL data type having alias NUMERIC. However, when you create decimal / numeric columns in the DB, the canonical name returned by the DB is "NUMERIC". Maybe switch the name and alias for this type in the docs?

dev=# create table brad_loves_numbers (dec DECIMAL(8,3), num DECIMAL(10,5));
CREATE TABLE

dev=# \d brad_loves_numbers
 Table "public.brad_loves_numbers"
 Column |     Type      | Modifiers
--------+---------------+-----------
 dec    | numeric(8,3)  |
 num    | numeric(10,5) |

dev=# select column_name, data_type from information_schema.columns where table_name LIKE 'brad_loves_numbers';
 column_name | data_type
-------------+-----------
 num         | numeric
 dec         | numeric
(2 rows)
joshbean commented 1 year ago

Closing this issue or pull request in advance of archiving this repo. For more information about the decision to archive this repo (and others in the 'awsdocs' org), see the announcement on the AWS News Blog.