On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

Databases - Practical PostgreSQL
Previous Page Home Next Page

## Geometric types

Geometric types in PostgreSQL represent two dimensional spatial objects. These types are not standard SQL data types, and will not be discussed in depth in this book. Table 3-24 gives a brief overview of each of the available geometric types.

Table 3-24. Geometric types

Type Name

Storage

Description

Syntax

point

16 bytes

A dimensionless object with no properties except for its location, where x and y are floating-point numbers.

( x  , y  )

lseg

32 bytes

Finite line segment. The points specified are the end points of the line segment.

(( x1  , y1  ), ( x2  , y2  ))

box

32 bytes

Rectangular box. The points specified are the opposite corners of the box.

(( x1  , y1  ), ( x2  , y2  ))

path

4 + 32 * n bytes

Closed path (similar to polygon). A connected set of n points.

(( x1  , y1  ), ...)

path

4 + 32 * n bytes

Open path. A connected set of n points.

[( x1  , y1  ), ...]

polygon

4 + 32 * n bytes

Polygon (similar to closed path), with n end points defining line segments that makes up the boundary of the polygon.

(( x1  , y1  ), ...)

circle

24 bytes

The point ( x  , y  ) is the center, while r is the radius of the circle.

<( x  , y  ), r  >

Databases - Practical PostgreSQL
Previous Page Home Next Page

 Published under the terms of the Open Publication License Design by Interspire