A free SQL (Standard Query Language) database. The current version is 9.6.1 Last revised/verified: 2016-10-27 It is also known as Postgres, but never Postgre.
Name | Aliases | Description |
---|---|---|
bigint | int8 | signed eight-byte integer |
bigserial | serial8 | autoincrementing eight-byte integer |
bit | fixed-length bit string | |
bit varying(n) | varbit(n) | variable-length bit string |
Boolean | bool | logical Boolean (true/false) |
box | rectangular box in the plane | |
bytea | binary data | |
character varying(n) | varchar(n) | variable-length character string |
character(n) | char(n) | fixed-length character string |
cidr | IPv4 (Internet Protocol Version 4) or IPv6 (Internet Protocol Version 6) network address | |
circle | circle in the plane | |
date | calendar date (year, month, day). Stored internally as 4-byte binary. | |
double precision | float8 | double precision floating-point number |
ENUM | define the enum like this CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy'); then use it as if it were a built-in type. It sorts in ordinal order. You set the values with ordinary Strings. The total length of all the possible values must be ≤ 63, a severe restriction. Postgre enums behave both like java enums and EnumSets. There are set SET('fragile', 'oversize', 'express') | |
inet | IPv4 or IPv6 host address | |
integer | int, int4 | signed four-byte integer |
interval(p) | time span | |
line | infinite line in the plane (not fully implemented) | |
lseg | line segment in the plane | |
macaddr | MAC (Media Access Control) address | |
money | currency amount | |
numeric [ (p, s) ] | decimal [ (p, s) ] | exact numeric with selectable precision |
path | open and closed geometric path in the plane | |
point | geometric point in the plane | |
polygon | closed geometric path in the plane | |
real | float4 | single precision floating-point number |
smallint | int2 | signed two-byte integer |
serial | serial4 | autoincrementing four-byte integer |
text | variable-length character string | |
time [ (p) ] [ without time zone ] | time of day | |
time [ (p) ] with time zone | timetz | time of day, including time zone |
timestamp [ (p) ] without time zone | timestamp | date and time |
timestamp [ (p) ] [ with time zone ] | timestamptz | date and time, including time zone |
tsquery | text search query | |
tsvector | text search document | |
txid_snapshot | user-level transaction ID snapshot | |
uuid | universally unique identifier | |
xml | XML (extensible Markup Language) data |
Unfortunately, the names are not the same names as Java uses. Postgres predates Java.
To create a database.
Createdb then sends the following command to the database server:
To import SQL command files:
You can import data from a CSV (Comma-Separated Value) file with the following SQL command:
There are many other COPY options. By default the delimiters are , and " . . Like Java, SQL distiguishes between a null field and an empty field.
Postgre is royal pain when it comes to passwords.
So you have have to pick a short, insecure password.
This page is posted |
http://mindprod.com/jgloss/postgresql.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\postgresql.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[13.59.36.36] |
| |
Feedback |
You are visitor number | |