Download PostgreSQL User`s Guide - BITS
Transcript
Chapter 3. Data Types The Serial Type The serial type is a special-case type constructed by Postgres from other existing components. It is typically used to create unique identifiers for table entries. In the current implementation, specifying CREATE TABLE tablename (colname SERIAL); is equivalent to specifying: CREATE SEQUENCE tablename_colname_seq; CREATE TABLE tablename (colname INT4 DEFAULT nextval(’tablename_colname_seq’); CREATE UNIQUE INDEX tablename_colname_key on tablename (colname); Caution The implicit sequence created for the serial type will not be automatically removed when the table is dropped. Implicit sequences supporting the serial are not automatically dropped when a table containing a serial type is dropped. So, the following commands executed in order will likely fail: CREATE TABLE tablename (colname SERIAL); DROP TABLE tablename; CREATE TABLE tablename (colname SERIAL); The sequence will remain in the database until explicitly dropped using DROP SEQUENCE. Monetary Type Obsolete Type: The money is now deprecated. Use numeric or decimal instead. The money type may become a locale-aware layer over the numeric type in a future release. The money type supports US-style currency with fixed decimal point representation. If Postgres is compiled with USE_LOCALE then the money type should use the monetary conventions defined for locale(7). 26
Related documents
PostgreSQL 7.1 User`s Guide
PostgreSQL 7.2 Developer`s Guide
Postgres Book
PostgreSQL 7.1 User`s Guide
PostgreSQL Tutorial - BITS-Dubai, III Year CSE Notes
Manual del usuario de PostgreSQL [ Postgres
Manual do Postgresql
postgres tutorial-7.3.2-A4
lsedm trading services description
C Programmer`s Toolkit for PACSystems User`s Manual, GFK
Manual de Referência do PostgreSQL 7.2
trading services description - London Stock Exchange Group