The Pyrrho Database Management System

Malcolm Crowe, University of the West of Scotland

 

Pyrrho SQL syntax

Type

Type = (StandardType | DefinedType | Domain_id | Type_id) [UriType] [SENSITIVE] .

StandardType =BOOLEAN | CharacterType | FloatType | IntegerType | LobType | NumericType | DateTimeType | IntervalType | PASSWORD | XML .

CharacterType = (([NATIONAL] CHARACTER) | CHAR | NCHAR | VARCHAR) [VARYING] ['('int ')'] [CHARACTER SET id ] Collate .

National is ignored, and NCHAR is silently changed to CHAR.

Collate = [ COLLATE id ] .

There is no need to specify COLLATE UNICODE, since this is the default collation. COLLATE UCS_BASIC is supported but deprecated. Other CultureInfo strings (in double quotes) are supported depending on the current version of the .NET libraries: for Windows 6-8.1 see the Go Global Developer Center; since Windows 10 any valid BCP-47 language tag can be used. This determines comparison of strings and conversion from dates etc.

FloatType = (FLOAT|REAL) ['('int','int')'] .

IntegerType = INT | INTEGER .

LobType = BLOB | CLOB | NCLOB .

CLOB and NCLOB are silently converted to CHAR in Pyrrho (all represent unbounded string).

NumericType = (NUMERIC|DECIMAL|DEC) ['('int','int')'] .

DateTimeType = (DATE | TIME | TIMESTAMP) ([IntervalField [TO IntervalField]] | ['('int')']) .

IntervalType = INTERVAL IntervalField [ TO IntervalField ] .

IntervalField = YEAR | MONTH | DAY | HOUR | MINUTE | SECOND ['('int')'] .

DefinedType = (ROW|TABLE) Representation
| DataTypeList | TABLE Representation
| Type ARRAY
| Type MULTISET .