21.10.2013 Views

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Declaration:<br />

External functions (UDFs)<br />

DECLARE EXTERNAL FUNCTION dPower<br />

DOUBLE PRECISION BY DESCRIPTOR, DOUBLE PRECISION BY DESCRIPTOR,<br />

DOUBLE PRECISION BY DESCRIPTOR<br />

RETURNS PARAMETER 3<br />

ENTRY_POINT 'power' MODULE_NAME 'fbudf'<br />

Library: ib_udf<br />

Added in: IB<br />

Better alternative: Internal function FLOOR()<br />

floor<br />

Description: Returns the largest whole number that is smaller than or equal to the argument.<br />

Result type: DOUBLE PRECISION<br />

Syntax:<br />

floor (number)<br />

Declaration:<br />

DECLARE EXTERNAL FUNCTION floor<br />

DOUBLE PRECISION<br />

RETURNS DOUBLE PRECISION BY VALUE<br />

ENTRY_POINT 'IB_UDF_floor' MODULE_NAME 'ib_udf'<br />

Library: fbudf<br />

Added in: 1.0 (Win), 1.5 (Linux)<br />

Better alternative: CURRENT_TIMESTAMP or 'NOW'<br />

getExactTimestamp<br />

Description: Returns the system time with milliseconds precision. This function was added because in pre-2.0<br />

versions, CURRENT_TIMESTAMP always had .0000 in the fractional part of the second. In <strong>Firebird</strong> 2.0 and up<br />

it is better to use CURRENT_TIMESTAMP, which now also defaults to milliseconds precision. To measure time<br />

intervals in PSQL modules, use 'NOW'.<br />

Result type: TIMESTAMP<br />

Syntax:<br />

getexacttimestamp()<br />

176

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!