HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

Type Conversion Functions(2)

  • bpchar_int8

    Description: Converts a string to int8.

    Parameter: character

    Return type: bigint

  • bpchar_numeric

    Description: Converts a string to numeric.

    Parameter: character

    Return type: numeric

  • bpchar_timestamp

    Description: Converts a string to a timestamp.

    Parameter: character

    Return type: timestamp without time zone

  • bpchar_to_smalldatetime

    Description: Converts a string to smalldatetime.

    Parameter: character

    Return type: smalldatetime

  • cupointer_bigint

    Description: Converts the column-store CU pointer type to the bigint type.

    Parameter: text

    Return type: bigint

  • date_bpchar

    Description: Converts the date type to bpchar.

    Parameter: date

    Return type: character

  • date_text

    Description: Converts date to text.

    Parameter: date

    Return type: text

  • date_varchar

    Description: Converts date to varchar.

    Parameter: date

    Return type: character varying

  • f4toi1

    Description: Forcibly converts float4 to uint8.

    Parameter: real

    Return type: tinyint

  • f8toi1

    Description: Forcibly converts float8 to uint8.

    Parameter: double precision

    Return type: tinyint

  • float4_bpchar

    Description: Converts float4 to bpchar.

    Parameter: real

    Return type: character

  • float4_text

    Description: Converts float4 to text.

    Parameter: real

    Return type: text

  • float4_varchar

    Description: Converts float4 to varchar.

    Parameter: real

    Return type: character varying

  • float8_bpchar

    Description: Converts float8 to bpchar.

    Parameter: double precision

    Return type: character

  • float8_interval

    Description: Converts float8 to interval.

    Parameter: double precision

    Return type: interval

  • float8_text

    Description: Converts float8 to text.

    Parameter: double precision

    Return type: text

  • float8_varchar

    Description: Converts float8 to varchar.

    Parameter: double precision

    Return type: character varying

  • i1tof4

    Description: Converts uint8 to float4.

    Parameter: tinyint

    Return type: real

  • i1tof8

    Description: Converts uint8 to float8.

    Parameter: tinyint

    Return type: double precision

  • i1toi2

    Description: Converts uint8 to int16.

    Parameter: tinyint

    Return type: smallint

  • i1toi4

    Description: Converts uint8 to int32.

    Parameter: tinyint

    Return type: integer

  • i1toi8

    Description: Converts uint8 to int64.

    Parameter: tinyint

    Return type: bigint

  • i2toi1

    Description: Converts int16 to uint8.

    Parameter: smallint

    Return type: tinyint

  • i4toi1

    Description: Converts int32 to uint8.

    Parameter: integer

    Return type: tinyint

  • i8toi1

    Description: Converts int64 to uint8.

    Parameter: bigint

    Return type: tinyint

  • int1_avg_accum

    Description: Adds the second parameter of the uint8 type to the first parameter. The first parameter is an array of the bigint type.

    Parameter: bigint[], tinyint

    Return type: bigint[]

  • int1_bool

    Description: Converts uint8 to bool.

    Parameter: tinyint

    Return type: Boolean

  • int1_bpchar

    Description: Converts uint8 to bpchar.

    Parameter: tinyint

    Return type: character

  • int1_mul_cash

    Description: Returns the product of a parameter of the int8 type and a parameter of the cash type. The return type is cash.

    Parameter: tinyint, money

    Return type: money

  • int1_numeric

    Description: Converts uint8 to numeric.

    Parameter: tinyint

    Return type: numeric

  • int1_nvarchar2

    Description: Converts uint8 to nvarchar2.

    Parameter: tinyint

    Return type: nvarchar2

  • int1_text

    Description: Converts uint8 to text.

    Parameter: tinyint

    Return type: text

  • int1_varchar

    Description: Converts uint8 to varchar.

    Parameter: tinyint

    Return type: character varying

  • int1in

    Description: Converts a string into an unsigned 1-byte integer.

    Parameter: cstring

    Return type: tinyint

  • int1out

    Description: Converts an unsigned 1-byte integer into a string.

    Parameter: tinyint

    Return type: cstring

  • int1up

    Description: Converts an input integer to an unsigned 1-byte integer.

    Parameter: tinyint

    Return type: tinyint

  • int2_bool

    Description: Converts a signed two-byte integer to the bool type.

    Parameter: smallint

    Return type: Boolean

  • int2_bpchar

    Description: Converts a signed two-byte integer to the bpchar type.

    Parameter: smallint

    Return type: character

  • int2_text

    Description: Converts a signed two-byte integer to the text type.

    Parameter: smallint

    Return type: text

  • int2_varchar

    Description: Converts a signed two-byte integer to the varchar type.

    Parameter: smallint

    Return type: character varying

  • int8_text

    Description: Converts an eight-byte signed integer to the text type.

    Parameter: bigint

    Return type: text

  • int8_varchar

    Description: Converts an eight-byte signed integer to varchar.

    Parameter: bigint

    Return type: character varying

  • intervaltonum

    Description: Converts the internal dats type date to numeric.

    Parameter: interval

    Return type: numeric

  • numeric_bpchar

    Description: Converts numeric to bpchar.

    Parameter: numeric

    Return type: character

  • numeric_int1

    Description: Converts numeric to a signed one-byte integer.

    Parameter: numeric

    Return type: tinyint

  • numeric_text

    Description: Converts numeric to text.

    Parameter: numeric

    Return type: text

  • numeric_varchar

    Description: Converts numeric to varchar.

    Parameter: numeric

    Return type: character varying

  • nvarchar2in

    Description: Converts c string to varchar.

    Parameter: cstring, oid, integer

    Return type: nvarchar2

  • nvarchar2out

    Description: Converts text into a c string.

    Parameter: nvarchar2

    Return type: cstring

  • nvarchar2send

    Description: Converts varchar to binary.

    Parameter: nvarchar2

    Return type: bytea

  • oidvectorin_extend

    Description: Converts a string to oidvector.

    Parameter: cstring

    Return type: oidvector_extend

  • oidvectorout_extend

    Description: Converts oidvector to a string.

    Parameter: oidvector_extend

    Return type: cstring

  • oidvectorsend_extend

    Description: Converts oidvector to a string.

    Parameter: oidvector_extend

    Return type: bytea

  • reltime_text

    Description: Converts reltime to text.

    Parameter: reltime

    Return type: text

  • text_date

    Description: Converts the text type to the date type.

    Parameter: text

    Return type: date

  • text_float4

    Description: Converts text to float4.

    Parameter: text

    Return type: real

  • text_float8

    Description: Converts the text type to float8.

    Parameter: text

    Return type: double precision

  • text_int1

    Description: Converts the text type to int1.

    Parameter: text

    Return type: tinyint

  • text_int2

    Description: Converts the text type to the int2 type.

    Parameter: text

    Return type: smallint

  • text_int4

    Description: Converts the text type to int4.

    Parameter: text

    Return type: integer

  • text_int8

    Description: Converts the text type to the int8 type.

    Parameter: text

    Return type: bigint

  • text_numeric

    Description: Converts the text type to the numeric type.

    Parameter: text

    Return type: numeric

  • text_timestamp

    Description: Converts the text type to the timestamp type.

    Parameter: text

    Return type: timestamp without time zone

  • time_text

    Description: Converts the time type to the text type.

    Parameter: time without time zone

    Return type: text

  • timestamp_text

    Description: Converts the timestamp type to the text type.

    Parameter: timestamp without time zone

    Return type: text

  • timestamp_to_smalldatetime

    Description: Converts the timestamp type to the smalldatetime type.

    Parameter: timestamp without time zone

    Return type: smalldatetime

  • timestamp_varchar

    Description: Converts the timestamp type to varchar.

    Parameter: timestamp without time zone

    Return type: character varying

  • timestamptz_to_smalldatetime

    Description: Converts timestamptz to smalldatetime.

    Parameter: timestamp with time zone

    Return type: smalldatetime

  • timestampzone_text

    Description: Converts the timestampzone type to the text type.

    Parameter: timestamp with time zone

    Return type: text

  • timetz_text

    Description: Converts the timetz type to the text type.

    Parameter: time with time zone

    Return type: text

  • to_integer

    Description: Converts data to the integer type.

    Parameter: character varying

    Return type: integer

  • to_interval

    Description: Converts to the interval type.

    Parameter: character varying

    Return type: interval

  • to_numeric

    Description: Converts to the numeric type.

    Parameter: character varying

    Return type: numeric

  • to_nvarchar2

    Description: Converts to the nvarchar2 type.

    Parameter: numeric

    Return type: nvarchar2

  • to_text

    Description: Converts to the text type.

    Parameter: smallint

    Return type: text

  • to_ts

    Description: Converts to the ts type.

    Parameter: character varying

    Return type: timestamp without time zone

  • to_varchar2

    Description: Converts to the varchar2 type.

    Parameter: timestamp without time zone

    Return type: character varying

  • varchar_date

    Description: Converts varchar to date.

    Parameter: character varying

    Return type: date

  • varchar_float4

    Description: Converts varchar to float4.

    Parameter: character varying

    Return type: real

  • varchar_float8

    Description: Converts the varchar type to the float8 type.

    Parameter: character varying

    Return type: double precision

  • varchar_int4

    Description: Converts the type from varchar to int4.

    Parameter: character varying

    Return type: integer

  • varchar_int8

    Description: Converts the varchar type to the int8 type.

    Parameter: character varying

    Return type: bigint

  • varchar_numeric

    Description: Converts varchar to numeric.

    Parameter: character varying

    Return type: numeric

  • varchar_timestamp

    Description: Converts varchar to timestamp.

    Parameter: character varying

    Return type: timestamp without time zone

  • varchar2_to_smlldatetime

    Description: Converts varchar2 to smlldatetime.

    Parameter: character varying

    Return type: smalldatetime

  • xidout4

    Description: The xid output is a four-byte number.

    Parameter: xid32

    Return type: cstring

  • xidsend4

    Description: Converts xid to the binary format.

    Parameter: xid32

    Return type: bytea

Encoding Type Conversion

  • convert_to_nocase(text, text)

    Description: Converts a string into a specified encoding type.

    Return type: bytea

    Example:

    MogDB=# SELECT convert_to_nocase('12345', 'GBK');
     convert_to_nocase
    -------------------
     \x3132333435
    (1 row)
Copyright © 2011-2024 www.enmotech.com All rights reserved.