0

Numeric datatype doesn't accept decimal points in numbers and PgAdmin 4.2 don't have decimal data type. I want to add percentage numbers like 4.8 and latitude, longitudes something like -89.03177649999999 this. Which is the best data type in postgresql for this king of numbers. PgAdmin only allows numeric datatype to use for numbers. If I add this numbers with numeric data type it throws errors.

1
  • The numeric data type certainly accepts decimal points. Please edit the question and provide an SQL statement and error message to demonstrate your problem. Commented Mar 14, 2019 at 13:23

1 Answer 1

2

You can absolutely insert values with a decimal point into a numeric column:

create table data (nr decimal);
insert into data 
values 
(-89.03177649999999);

Online example: https://rextester.com/VQB54123

Sign up to request clarification or add additional context in comments.

3 Comments

greate. I tried creating table with decimal, its accepting the values. When I used gui for create table, there is no decimal data type option available in data types list for columns.
@Gauri: numeric is an alias for decimal - does that "GUI" offer numeric?
Yes. GUI offers numeric.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.