Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
PostgreSQL
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Data types === A wide variety of native [[data type]]s are supported, including: * Boolean * [[Arbitrary-precision arithmetic|Arbitrary-precision]] numerics * Character (text, varchar, char) * Binary * Date/time (timestamp/time with/without time zone, date, interval) * Money * Enum * Bit strings * Text search type * Composite * HStore, an extension enabled key–value store within PostgreSQL<ref>{{Cite web |url=https://www.linuxjournal.com/content/postgresql-nosql-database |title=PostgreSQL, the NoSQL Database | Linux Journal |website=www.linuxjournal.com}}</ref> * Arrays ([[dynamic array|variable-length]] and can be of any data type, including text and composite types) up to 1 GB in total storage size * Geometric primitives * [[IPv4]] and [[IPv6]] addresses * [[Classless Inter-Domain Routing]] (CIDR) blocks and [[MAC address]]es * [[XML]] supporting [[XPath]] queries * [[Universally unique identifier]] (UUID) * JavaScript Object Notation ([[JSON]]), and a faster [[binary code|binary]] JSONB (not the same as [[BSON]]<ref name="jsonb" />) In addition, users can create their own data types which can usually be made fully indexable via PostgreSQL's indexing infrastructures{{snd}} GiST, GIN, SP-GiST. Examples of these include the [[geographic information system]] (GIS) data types from the [[PostGIS]] project for PostgreSQL. There is also a data type called a ''domain'', which is the same as any other data type but with optional constraints defined by the creator of that domain. This means any data entered into a column using the domain will have to conform to whichever constraints were defined as part of the domain. A data type that represents a range of data can be used which are called range types. These can be discrete ranges (e.g. all integer values 1 to 10) or continuous ranges (e.g., any time between {{nowrap|10:00 am}} and {{nowrap|11:00 am}}). The built-in range types available include ranges of integers, big integers, decimal numbers, time stamps (with and without time zone) and dates. Custom range types can be created to make new types of ranges available, such as IP address ranges using the inet type as a base, or float ranges using the float data type as a base. Range types support inclusive and exclusive range boundaries using the {{kbd|[]}} and {{kbd|()}} characters respectively. (e.g., {{code|[4,9)}} represents all integers starting from and including 4 up to but not including 9.) Range types are also compatible with existing operators used to check for overlap, containment, right of etc.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)