Data types and subtypes

<< Miscellaneous language elements | FB 2.0 Language Reference | DDL statements >>

Data types and subtypes

BIGINT data type

Added in: 1.5

Description

BIGINT is the SQL99-compliant 64-bit signed integer type. It is available in Dialect 3 only.

BIGINT numbers range from -263 .. 263-1, or -9,223,372,036,854,775,808 .. 9,223,372,036,854,775,807.

Example

 create table WholeLottaRecords (
   id bigint not null primary key,
   description varchar(32)
 )

See also:
BIGINT

BLOB data type

Changed in: 2.0

Description

Several enhancements have been implemented for text BLOBs:

  • DML COLLATE clauses are now supported.
  • Equality comparisons can be performed on the full BLOB contents.
  • Character set conversions are possible when assigning a BLOB to a BLOB or a string to a BLOB.

When defining binary BLOBs, the mnemonic binary can now be used instead of the integer 0.

Examples

 select NameBlob from MyTable
   where NameBlob collate pt_br = 'João'

 create table MyPictures (
   id int not null primary key,
   title varchar(40),
   description varchar(200),
   picture blob sub_type binary

See also:
BLOB

 )

back to top of page

New character sets

Added in: 1.0, 1.5, 2.0

The following table lists the character sets added in Firebird.

Table 4.1. Character sets new in Firebird
NameMax bytes/ch.LanguagesAdded in
DOS7371Greek1.5
DOS7751Baltic1.5
DOS8581= DOS850 plus € sign1.5
DOS8621Hebrew1.5
DOS8641Arabic1.5
DOS8661Russian1.5
DOS8691Modern Greek1.5
ISO8859_21Latin-2, Central European1.0
ISO8859_31Latin-3, Southern European1.5
ISO8859_41Latin-4, Northern European1.5
ISO8859_51Cyrillic1.5
ISO8859_61Arabic1.5
ISO8859_71Greek1.5
ISO8859_81Hebrew1.5
ISO8859_91Latin-5, Turkish1.5
ISO8859_131Latin-7, Baltic Rim1.5
KOI8R1Russian2.0
KOI8U1Ukrainian2.0
UTF8 (*)4All2.0
WIN12551Hebrew1.5
WIN12561Arabic1.5
WIN12571Baltic1.5
WIN12581Vietnamese2.0

(*) In Firebird 1.5, UTF8 is an alias for UNICODE_FSS. This character set has some inherent problems. In Firebird 2, UTF8 is a character set in its own right, without the drawbacks of UNICODE_FSS.

See also:
Character sets
SET NAMES
Default character set
Firebird 2.0 Language Reference Update: Character set NONE
Firebird 2.1 Release Notes: International language support (INTL)
Character sets and Unicode in Firebird
Convert your Firebird applications to Unicode

Character set NONE handling changed

Changed in: 1.5.1

Description

Firebird 1.5.1 has improved the way character set NONE data are moved to and from fields or variables with another character set, resulting in fewer transliteration errors. For more details, see the Note at the end of the book.

back to top of page

New collations

Added in: 1.0, 1.5, 1.5.1, 2.0

The following table lists the collations added in Firebird. The Details column is based on what has been reported in the Release Notes and other documents. The information in this column is probably incomplete; some collations with an empty Details field may still be case insensitive (ci), accent insensitive (ai) or dictionary-sorted (dic).

Table 4.2. Collations new in Firebird
Character setCollationLanguageDetailsAdded in
ISO8859_1ES_ES_CI_AISpanishci, ai2.0
 PT_BRBrazilian Portugueseci, ai2.0
ISO8859_2CS_CZCzech 1.0
 ISO_HUNHungarian 1.5
 ISO_PLKPolish 2.0
ISO8859_13LT_LTLithuanian 1.5.1
UTF8UCS_BASICAll 2.0
 UNICODEAlldic2.0
WIN1250BS_BABosnian 2.0
 PXW_HUNHungarianci1.0
 WIN_CZCzechci2.0
 WIN_CZ_CI_AICzechci, ai2.0
WIN1251WIN1251_UAUkrainian and Russian 1.5
WIN1252WIN_PTBRBrazilian Portugueseci, ai2.0
WIN1257WIN1257_EEEstoniandic2.0
 WIN1257_LTLithuaniandic2.0
 WIN1257_LVLatviandic2.0
KOI8RKOI8R_RURussiandic2.0
KOI8UKOI8U_UAUkrainiandic2.0

A note on the UTF8 collations:

The UCS_BASIC collation sorts in Unicode code-point order: A, B, a, b, á... This is exactly the same as UTF8 with no collation specified. UCS_BASIC was added to comply with the SQL standard.
The UNICODE collation sorts using UCA (Unicode Collation Algorithm): a, A, á, b, B...

See also:
Collate
Collation
CREATE COLLATION (Firebird 2.1)
Firebird 2.1 Release Notes: International language support (INTL)

back to top of page
<< Miscellaneous language elements | FB 2.0 Language Reference | DDL statements >>