I l @ ve RuBoard |
PostgreSQL includes three basic data types for storing string- related data. In compliance with the SQL standard, there are types for fixed-length and variable-length character strings. Additionally, PostgreSQL defines a more generic data type named TEXT that requires no specified upper limit regarding maximum size . However, this data type is PostgreSQL-specific and is not compliant with the SQL-92 standards. CHAR (or CHARACTER )DescriptionHolds a fixed-length string specified with a maximum length. InputsCHAR(n) n ”Integer length of string (if omitted, a 1 is assumed). Storage Size(4+n) bytes NotesCHAR is a SQL-92-compatible data type. Data that does not fill to the limit specified is blank padded . TEXTDescriptionHolds a variable-length string. Storage SizeVariable ”depends on the length of string, but no smaller than 4 bytes. VARCHAR (or CHARACTER VARYING )DescriptionHolds a variable-length string with a specified limit. InputsVARCHAR(n) n ”Integer length of string (if omitted, a 1 is assumed). Storage SizeVariable ”depends on the length of string, but no smaller than 4 bytes. NotesVARCHAR and CHARACTER VARYING are both SQL-compatible data types. |
I l @ ve RuBoard |