Tutorialsteacher

Follow Us

Articles
  • C#
  • C# OOP
  • ASP.NET Core
  • ASP.NET MVC
  • LINQ
  • Inversion of Control (IoC)
  • Web API
  • JavaScript
  • TypeScript
  • jQuery
  • Angular 11
  • Node.js
  • D3.js
  • Sass
  • Python
  • Go lang
  • HTTPS (SSL)
  • Regex
  • SQL
  • SQL Server
  • PostgreSQL
  • MongoDB
  • PostgreSQL - Get Started
  • Install PostgreSQL
  • Connect to PostgreSQL DB
  • Create Database
  • Create Table
  • Copy Table
  • Drop Table
  • Drop Database
  • Truncate Table
  • ALTER Table
  • Rename Table
  • Rename Columns
  • Add Columns
  • Modify Column Type
  • Set Default Value of Column
  • Remove Columns
  • Add Constraints to Table
  • Insert Data
  • Upsert Data
  • Update Data
  • Delete Data
  • SELECT Statement
  • WHERE Clause
  • GROUP BY Clause
  • HAVING Clause
  • ORDER BY Clause
  • DISTINCT Clause
  • Inner Join
  • Left Outer Join
  • Right Outer Join
  • Full Outer Join
  • Self Join
  • Natural Join
  • Cross Join
  • LIMIT OFFSET Clause
  • GROUPING SETS
  • GROUPING() Function
  • GROUP BY CUBE
  • GROUP BY ROLLUP
  • Sub Query
  • ALL Operator
  • ANY Operator
  • UNION Operator
  • INTERSECT Operator
  • EXCEPT Operator
  • IS NULL Operator
  • BETWEEN Operator
  • LIKE Operator
  • CAST Operator
  • CASE Expressions
  • NULLIF()
  • COALESCE()
  • GREATEST(), LEAST()
  • WITH Queries (CTE)
  • Constraints
  • NOT NULL Constraint
  • Unique Constraint
  • Check Constraint
  • Primary Key
  • Foreign Key
  • Sequence
  • Serial Type
  • Identity Columns
  • Generated Columns
  • Data Types
  • Boolean Type
  • Character Type
  • Integer Type
  • Numeric Type
  • Date Type
  • Time Type
  • TimeStamp Type
  • Interval Type
  • Array Type
  • Json Type
Entity Framework Extensions - Boost EF Core 9
  Bulk Insert
  Bulk Delete
  Bulk Update
  Bulk Merge

PostgreSQL Data Types

In PostgreSQL, a data type is a classification of data based on the type of value it represents. The data type of a column in a PostgreSQL table determines the type of data that can be stored in that column, as well as the operations that can be performed on the data.

PostgreSQL provides a wide variety of data types that can be used to store different kinds of data, such as numbers, text, dates, and more complex data structures like arrays, geometric shapes, and network addresses.

Data TypeDescriptionRange of Values
bigint8-byte integer-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
bigserialAutoincrementing 8-byte integer1 to 9,223,372,036,854,775,807
bitFixed-length bit stringn/a
bit varyingVariable-length bit string0 to 2^(n)-1 bits, where n is the length of the string
booleanLogical Boolean (true/false) valuetrue or false
boxRectangular box (defined by two points: bottom-left and top-right)N/A
byteaBinary data ("byte array")0 to 1 GB
characterFixed-length character string (deprecated; use "char" or "character(n)" instead)N/A
character(n)Fixed-length character string of length nN/A
charFixed-length character stringN/A
cidrIPv4 or IPv6 network addressIPv4: x.x.x.x/y where x is a number between 0 and 255 and y is a number between 0 and 32, IPv6: x:x:x:x:x:x:x:x/y where x is a hexadecimal number between 0 and FFFF and y is a number between 0 and 128
circleCircle (defined by a center point and a radius)N/A
dateCalendar date (year, month, and day)4713 BC to 5874897 AD
double precisionDouble-precision floating-point number (8 bytes)Approximately 15 decimal digits
inetIPv4 or IPv6 host addressIPv4: x.x.x.x where x is a number between 0 and 255, IPv6: x:x:x:x:x:x:x:x where x is a hexadecimal number between 0 and FFFF
integer4-byte integer-2,147,483,648 to 2,147,483,647
intervalTime interval-178000000 years to 178000000 years
jsonJSON data1 byte to 1 GB
jsonbBinary JSON dataN/A
lineInfinite line (defined by two points)N/A
lsegLine segment (defined by two points)N/A
macaddrMAC (Media Access Control) address00:00:00:00:00:00 to FF:FF:FF:FF:FF:FF
moneyCurrency amount-92233720368547758.08 to +92233720368547758.07
numericArbitrary-precision decimal number-10^131071 to 10^131071
pathGeometric path (defined by points connected by straight lines or circular arcs)N/A
pointPoint in a two-dimensional planeN/A
polygonClosed geometric shape (defined by a set of connected points)N/A
realSingle-precision floating-point number (4 bytes)-3.402823e38 to 3.402823e38
smallint2-byte integer-32768 to 32767
smallserialAutoincrementing 2-byte integer1 to 32767
serialAutoincrementing 4-byte integer1 to 2147483647
textVariable-length character stringNo specified limit
timeTime of day (no date)00:00:00 to 24:00:00.
time with time zoneTime of day with time zoneN/A
timestampDate and time (no time zone)4713 BC to 294276 AD
timestamp with time zoneDate and time with time zoneN/A
tsqueryText search queryN/A
tsvectorText search documentN/A
txid_snapshotTransaction ID snapshotN/A
uuidUniversally unique identifierN/A
xmlXML dataN/A
TUTORIALSTEACHER.COM

TutorialsTeacher.com is your authoritative source for comprehensive technologies tutorials, tailored to guide you through mastering various web and other technologies through a step-by-step approach.

Our content helps you to learn technologies easily and quickly for learners of all levels. By accessing this platform, you acknowledge that you have reviewed and consented to abide by our Terms of Use and Privacy Policy, designed to safeguard your experience and privacy rights.

[email protected]

ABOUT USTERMS OF USEPRIVACY POLICY
copywrite-symbol

2024 TutorialsTeacher.com. (v 1.2) All Rights Reserved.