data_types.hlp
上传用户:blenddy
上传日期:2007-01-07
资源大小:6495k
文件大小:2k
- .pgaw:Help.f.t configure -tabs {130 300 450}
- .pgaw:Help.f.t insert end
- "Data typesnn" {title}
- "Postgres has a rich set of native data types available to users. Users may add new types to Postgres using the DEFINE TYPE command described elsewhere.
- In the context of data types, the following sections will discuss SQL standards compliance, porting issues, and usage. Some Postgres types correspond directly to SQL92-compatible types. In other cases, data types defined by SQL92 syntax are mapped directly into native Postgres types. Many of the built-in types have obvious external formats. However, several types are either unique to Postgres, such as open and closed paths, or have several possibilities for formats, such as the date and time types.
- " {}
- "Postgres TypetSQL92 or SQL3 TypetDescriptionn" {bold}
- "booltbooleantlogical boolean (true/false)
- boxttrectangular box in 2D planetchar(n)
- character(n)ttfixed-length character string
- cidrttIP version 4 network or host address
- circlettcircle in 2D plane
- datetdatetcalendar date without time of day
- float4/8tfloat(p)tfloating-point number with precision p
- float8treal, double precisiontdouble-precision floating-point number
- inetttIP version 4 network or host address
- int2tsmallinttsigned two-byte integer
- int4tint, integertsigned 4-byte integer
- int4tdecimal(p,s)texact numeric for p <= 9, s = 0
- int4tnumeric(p,s)texact numeric for p == 9, s = 0
- int8ttsigned 8-byte integer
- linettinfinite line in 2D plane
- lsegttline segment in 2D plane
- moneytdecimal(9,2)tUS-style currency
- pathttopen and closed geometric path in 2D plane
- pointttgeometric point in 2D plane
- polygonttclosed geometric path in 2D plane
- serialttunique id for indexing and cross-reference
- timettimettime of day
- timespantintervaltgeneral-use time span
- timestampttimestamp with time zonetdate/time
- varchar(n)tcharacter varying(n)tvariable-length character string
- Note: The cidr and inet types are designed to handle any IP type but only ipv4 is handled in the current implementation. Everything here that talks about ipv4 will apply to ipv6 in a future release.
- " {}
- "Postgres Function Constants
- Postgres FunctiontSQL92 ConstanttDescription" {bold}
- "
- getpgusername()tcurrent_usertuser name in current session
- date('now')tcurrent_datetdate of current transaction
- time('now')tcurrent_timettime of current transaction
- timestamp('now')tcurrent_timestamptdate and time of current transaction
- " {}