# Type conversion helpers

> Internal routines used by casts, coercion and expression rewriting.

---

LLMS index: [llms.txt](/llms.txt)

---

Internal routines used by casts, coercion and expression rewriting.

## B {#b}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-binary-n-pg-catalog-bytea-integer-boolean-c046e3f6" href="#mysql-binary-n-pg-catalog-bytea-integer-boolean-c046e3f6">`mysql.binary_n(bytea, integer, boolean) → mysql.binary_n`</a> | Convert bytea to mysql.binary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-binary-n-character-varying-integer-boolean-7e3f9e4a" href="#mysql-binary-n-character-varying-integer-boolean-7e3f9e4a">`mysql.binary_n(character varying, integer, boolean) → mysql.binary_n`</a> | Convert character varying to mysql.binary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-binary-n-character-integer-boolean-30f49789" href="#mysql-binary-n-character-integer-boolean-30f49789">`mysql.binary_n(character, integer, boolean) → mysql.binary_n`</a> | Convert character to mysql.binary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-binary-n-mysql-binary-n-integer-boolean-d4649b51" href="#mysql-binary-n-mysql-binary-n-integer-boolean-d4649b51">`mysql.binary_n(mysql.binary_n, integer, boolean) → mysql.binary_n`</a> | Convert mysql.binary_n to mysql.binary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-binary-n-mysql-hexlit-integer-boolean-b7697bd8" href="#mysql-binary-n-mysql-hexlit-integer-boolean-b7697bd8">`mysql.binary_n(mysql.hexlit, integer, boolean) → mysql.binary_n`</a> | Convert mysql.hexlit to mysql.binary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-binary-n-mysql-varbinary-n-integer-boolean-2cd6710b" href="#mysql-binary-n-mysql-varbinary-n-integer-boolean-2cd6710b">`mysql.binary_n(mysql.varbinary_n, integer, boolean) → mysql.binary_n`</a> | Convert mysql.varbinary_n to mysql.binary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-binary-n-pg-catalog-text-integer-boolean-d945fe13" href="#mysql-binary-n-pg-catalog-text-integer-boolean-d945fe13">`mysql.binary_n(text, integer, boolean) → mysql.binary_n`</a> | Convert text to mysql.binary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-binary-n-bpchar-mysql-binary-n-74ba76d2" href="#mysql-binary-n-bpchar-mysql-binary-n-74ba76d2">`mysql.binary_n_bpchar(mysql.binary_n) → character`</a> | Convert mysql.binary_n to character. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L410-L412) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L441-L448) |
| <a id="mysql-binary-n-text-mysql-binary-n-2d2e9363" href="#mysql-binary-n-text-mysql-binary-n-2d2e9363">`mysql.binary_n_text(mysql.binary_n) → text`</a> | Convert mysql.binary_n to text. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L410-L412) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L441-L448) |
| <a id="mysql-binary-n-varchar-mysql-binary-n-04270b12" href="#mysql-binary-n-varchar-mysql-binary-n-04270b12">`mysql.binary_n_varchar(mysql.binary_n) → character varying`</a> | Convert mysql.binary_n to character varying. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L410-L412) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L441-L448) |
| <a id="mysql-bit-to-text-bit-75e547ee" href="#mysql-bit-to-text-bit-75e547ee">`mysql.bit_to_text(bit) → text`</a> | Convert bit to text. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L48-L51) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L772-L822) |
| <a id="mysql-bytea2bit-pg-catalog-bytea-b4207433" href="#mysql-bytea2bit-pg-catalog-bytea-b4207433">`mysql.bytea2bit(bytea) → bit`</a> | Convert bytea to bit. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L356-L359) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L601-L605) |
| <a id="mysql-bytea2bool-pg-catalog-bytea-2085703e" href="#mysql-bytea2bool-pg-catalog-bytea-2085703e">`mysql.bytea2bool(bytea) → boolean`</a> | Convert bytea to boolean. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L350-L353) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L518-L538) |
| <a id="mysql-bytea2bpchar-pg-catalog-bytea-f73142d3" href="#mysql-bytea2bpchar-pg-catalog-bytea-f73142d3">`mysql.bytea2bpchar(bytea) → character`</a> | Convert bytea to character. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L314-L317) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L431-L448) |
| <a id="mysql-bytea2date-pg-catalog-bytea-79297072" href="#mysql-bytea2date-pg-catalog-bytea-79297072">`mysql.bytea2date(bytea) → date`</a> | Convert bytea to date. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L320-L323) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L451-L459) |
| <a id="mysql-bytea2float4-pg-catalog-bytea-8a442883" href="#mysql-bytea2float4-pg-catalog-bytea-8a442883">`mysql.bytea2float4(bytea) → real`</a> | Convert bytea to real. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L296-L299) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L394-L404) |
| <a id="mysql-bytea2float8-pg-catalog-bytea-7c5e548f" href="#mysql-bytea2float8-pg-catalog-bytea-7c5e548f">`mysql.bytea2float8(bytea) → double precision`</a> | Convert bytea to double precision. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L290-L293) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L381-L391) |
| <a id="mysql-bytea2int2-pg-catalog-bytea-97d184e7" href="#mysql-bytea2int2-pg-catalog-bytea-97d184e7">`mysql.bytea2int2(bytea) → smallint`</a> | Convert bytea to smallint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L277-L280) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L352-L362) |
| <a id="mysql-bytea2int4-pg-catalog-bytea-ff39d787" href="#mysql-bytea2int4-pg-catalog-bytea-ff39d787">`mysql.bytea2int4(bytea) → integer`</a> | Convert bytea to integer. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L270-L273) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L339-L349) |
| <a id="mysql-bytea2int8-pg-catalog-bytea-e6efe60f" href="#mysql-bytea2int8-pg-catalog-bytea-e6efe60f">`mysql.bytea2int8(bytea) → bigint`</a> | Convert bytea to bigint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L263-L266) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L326-L336) |
| <a id="mysql-bytea2numeric-pg-catalog-bytea-085f39e3" href="#mysql-bytea2numeric-pg-catalog-bytea-085f39e3">`mysql.bytea2numeric(bytea) → numeric`</a> | Convert bytea to numeric. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L284-L287) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L365-L378) |
| <a id="mysql-bytea2text-pg-catalog-bytea-ddac0dba" href="#mysql-bytea2text-pg-catalog-bytea-ddac0dba">`mysql.bytea2text(bytea) → text`</a> | Convert bytea to text. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L302-L305) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L407-L416) |
| <a id="mysql-bytea2time-pg-catalog-bytea-8857cfe1" href="#mysql-bytea2time-pg-catalog-bytea-8857cfe1">`mysql.bytea2time(bytea) → time without time zone`</a> | Convert bytea to time without time zone. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L326-L329) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L462-L473) |
| <a id="mysql-bytea2timestamp-pg-catalog-bytea-9fc2e16d" href="#mysql-bytea2timestamp-pg-catalog-bytea-9fc2e16d">`mysql.bytea2timestamp(bytea) → timestamp without time zone`</a> | Convert bytea to timestamp without time zone. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L338-L341) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L490-L501) |
| <a id="mysql-bytea2timestamptz-pg-catalog-bytea-65a41bac" href="#mysql-bytea2timestamptz-pg-catalog-bytea-65a41bac">`mysql.bytea2timestamptz(bytea) → timestamp with time zone`</a> | Convert bytea to timestamp with time zone. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L344-L347) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L504-L515) |
| <a id="mysql-bytea2timetz-pg-catalog-bytea-a823d9b2" href="#mysql-bytea2timetz-pg-catalog-bytea-a823d9b2">`mysql.bytea2timetz(bytea) → time with time zone`</a> | Convert bytea to time with time zone. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L332-L335) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L476-L487) |
| <a id="mysql-bytea2varbit-pg-catalog-bytea-3c531fb6" href="#mysql-bytea2varbit-pg-catalog-bytea-3c531fb6">`mysql.bytea2varbit(bytea) → bit varying`</a> | Convert bytea to bit varying. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L362-L365) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L608-L612) |
| <a id="mysql-bytea2varchar-pg-catalog-bytea-ccaf19cc" href="#mysql-bytea2varchar-pg-catalog-bytea-ccaf19cc">`mysql.bytea2varchar(bytea) → character varying`</a> | Convert bytea to character varying. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L308-L311) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L419-L428) |

## C {#c}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-cast-bigint-to-boolean-bigint-0ab00b98" href="#mysql-cast-bigint-to-boolean-bigint-0ab00b98">`mysql.cast_bigint_to_boolean(bigint) → boolean`</a> | Convert bigint to boolean. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L383-L395) |
| <a id="mysql-cast-bigint-to-varbit-bigint-f1680ba2" href="#mysql-cast-bigint-to-varbit-bigint-f1680ba2">`mysql.cast_bigint_to_varbit(bigint) → bit varying`</a> | Convert bigint to bit varying. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L534-L542) |
| <a id="mysql-cast-bit-to-boolean-bit-7eb887f3" href="#mysql-cast-bit-to-boolean-bit-7eb887f3">`mysql.cast_bit_to_boolean(bit) → boolean`</a> | Convert bit to boolean. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L398-L410) |
| <a id="mysql-cast-bit-to-bytea-bit-61819cce" href="#mysql-cast-bit-to-bytea-bit-61819cce">`mysql.cast_bit_to_bytea(bit) → bytea`</a> | Convert bit to bytea. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L54-L57) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L825-L851) |
| <a id="mysql-cast-bool-to-varbit-boolean-2d6d273e" href="#mysql-cast-bool-to-varbit-boolean-2d6d273e">`mysql.cast_bool_to_varbit(boolean) → bit varying`</a> | Convert boolean to bit varying. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L545-L557) |
| <a id="mysql-cast-boolean-to-bigint-boolean-867f5dca" href="#mysql-cast-boolean-to-bigint-boolean-867f5dca">`mysql.cast_boolean_to_bigint(boolean) → bigint`</a> | Convert boolean to bigint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L26-L38) |
| <a id="mysql-cast-boolean-to-binary-n-boolean-578e8979" href="#mysql-cast-boolean-to-binary-n-boolean-578e8979">`mysql.cast_boolean_to_binary_n(boolean) → mysql.binary_n`</a> | Convert boolean to mysql.binary_n. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L654-L655) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L413-L421) |
| <a id="mysql-cast-boolean-to-bytea-boolean-44ed7519" href="#mysql-cast-boolean-to-bytea-boolean-44ed7519">`mysql.cast_boolean_to_bytea(boolean) → bytea`</a> | Convert boolean to bytea. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L652-L653) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L413-L421) |
| <a id="mysql-cast-boolean-to-float4-boolean-bc077df8" href="#mysql-cast-boolean-to-float4-boolean-bc077df8">`mysql.cast_boolean_to_float4(boolean) → real`</a> | Convert boolean to real. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L648-L649) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L399-L403) |
| <a id="mysql-cast-boolean-to-float8-boolean-ffb48a43" href="#mysql-cast-boolean-to-float8-boolean-ffb48a43">`mysql.cast_boolean_to_float8(boolean) → double precision`</a> | Convert boolean to double precision. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L650-L651) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L406-L410) |
| <a id="mysql-cast-boolean-to-numeric-boolean-e7379c9b" href="#mysql-cast-boolean-to-numeric-boolean-e7379c9b">`mysql.cast_boolean_to_numeric(boolean) → numeric`</a> | Convert boolean to numeric. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L646-L647) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L392-L396) |
| <a id="mysql-cast-boolean-to-tinyint-boolean-274c3249" href="#mysql-cast-boolean-to-tinyint-boolean-274c3249">`mysql.cast_boolean_to_tinyint(boolean) → smallint`</a> | Convert boolean to smallint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L11-L23) |
| <a id="mysql-cast-boolean-to-varbinary-n-boolean-a1dbd84f" href="#mysql-cast-boolean-to-varbinary-n-boolean-a1dbd84f">`mysql.cast_boolean_to_varbinary_n(boolean) → mysql.varbinary_n`</a> | Convert boolean to mysql.varbinary_n. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L656-L657) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L413-L421) |
| <a id="mysql-cast-char-to-bigint-character-54469af4" href="#mysql-cast-char-to-bigint-character-54469af4">`mysql.cast_char_to_bigint(character) → bigint`</a> | Convert character to bigint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L109-L128) |
| <a id="mysql-cast-char-to-int-character-2a6dfd98" href="#mysql-cast-char-to-int-character-2a6dfd98">`mysql.cast_char_to_int(character) → integer`</a> | Convert character to integer. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L87-L106) |
| <a id="mysql-cast-char-to-tinyint-character-059dee0a" href="#mysql-cast-char-to-tinyint-character-059dee0a">`mysql.cast_char_to_tinyint(character) → smallint`</a> | Convert character to smallint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L65-L84) |
| <a id="mysql-cast-int-to-varbit-integer-9b954bf2" href="#mysql-cast-int-to-varbit-integer-9b954bf2">`mysql.cast_int_to_varbit(integer) → bit varying`</a> | Convert integer to bit varying. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L518-L526) |
| <a id="mysql-cast-numeric-source-pg-catalog-anyelement-integer-2cfe125f" href="#mysql-cast-numeric-source-pg-catalog-anyelement-integer-2cfe125f">`mysql.cast_numeric_source(anyelement, integer) → anyelement`</a> | Convert anyelement to anyelement. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L421-L422) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L1039-L1043) |
| <a id="mysql-cast-numeric-source-pg-catalog-bytea-integer-b8c7066d" href="#mysql-cast-numeric-source-pg-catalog-bytea-integer-b8c7066d">`mysql.cast_numeric_source(bytea, integer) → numeric`</a> | Convert bytea to numeric. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L431-L432) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L1046-L1118) |
| <a id="mysql-cast-numeric-source-mysql-binary-n-integer-2d5858f5" href="#mysql-cast-numeric-source-mysql-binary-n-integer-2d5858f5">`mysql.cast_numeric_source(mysql.binary_n, integer) → numeric`</a> | Convert mysql.binary_n to numeric. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L431-L432) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L1046-L1118) |
| <a id="mysql-cast-numeric-source-mysql-hexlit-integer-f6ecfaf6" href="#mysql-cast-numeric-source-mysql-hexlit-integer-f6ecfaf6">`mysql.cast_numeric_source(mysql.hexlit, integer) → mysql.hexlit`</a> | Convert mysql.hexlit to mysql.hexlit. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L425-L426) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L1039-L1043) |
| <a id="mysql-cast-numeric-source-mysql-varbinary-n-integer-9c73b526" href="#mysql-cast-numeric-source-mysql-varbinary-n-integer-9c73b526">`mysql.cast_numeric_source(mysql.varbinary_n, integer) → numeric`</a> | Convert mysql.varbinary_n to numeric. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L431-L432) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L1046-L1118) |
| <a id="mysql-cast-numeric-source-pg-catalog-text-integer-baeb2ed7" href="#mysql-cast-numeric-source-pg-catalog-text-integer-baeb2ed7">`mysql.cast_numeric_source(text, integer) → text`</a> | Convert text to text. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L423-L424) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L1039-L1043) |
| <a id="mysql-cast-smallint-to-boolean-smallint-ec91ccce" href="#mysql-cast-smallint-to-boolean-smallint-ec91ccce">`mysql.cast_smallint_to_boolean(smallint) → boolean`</a> | Convert smallint to boolean. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L368-L380) |
| <a id="mysql-cast-smallint-to-varbit-smallint-bcc32458" href="#mysql-cast-smallint-to-varbit-smallint-bcc32458">`mysql.cast_smallint_to_varbit(smallint) → bit varying`</a> | Convert smallint to bit varying. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L502-L510) |
| <a id="mysql-cast-text-to-bigint-pg-catalog-text-67a3e27e" href="#mysql-cast-text-to-bigint-pg-catalog-text-67a3e27e">`mysql.cast_text_to_bigint(text) → bigint`</a> | Convert text to bigint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L241-L260) |
| <a id="mysql-cast-text-to-date-pg-catalog-text-e802d361" href="#mysql-cast-text-to-date-pg-catalog-text-e802d361">`mysql.cast_text_to_date(text) → date`</a> | Convert text to date. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L571-L579) |
| <a id="mysql-cast-text-to-int-pg-catalog-text-6c675d44" href="#mysql-cast-text-to-int-pg-catalog-text-6c675d44">`mysql.cast_text_to_int(text) → integer`</a> | Convert text to integer. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L219-L238) |
| <a id="mysql-cast-text-to-time-pg-catalog-text-a65f53b6" href="#mysql-cast-text-to-time-pg-catalog-text-a65f53b6">`mysql.cast_text_to_time(text) → time without time zone`</a> | Convert text to time without time zone. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L560-L568) |
| <a id="mysql-cast-text-to-timestamp-pg-catalog-text-71c4db76" href="#mysql-cast-text-to-timestamp-pg-catalog-text-71c4db76">`mysql.cast_text_to_timestamp(text) → timestamp without time zone`</a> | Convert text to timestamp without time zone. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L582-L590) |
| <a id="mysql-cast-text-to-timestamptz-pg-catalog-text-7ad97411" href="#mysql-cast-text-to-timestamptz-pg-catalog-text-7ad97411">`mysql.cast_text_to_timestamptz(text) → timestamp with time zone`</a> | Convert text to timestamp with time zone. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L593-L601) |
| <a id="mysql-cast-text-to-tinyint-pg-catalog-text-9841926d" href="#mysql-cast-text-to-tinyint-pg-catalog-text-9841926d">`mysql.cast_text_to_tinyint(text) → smallint`</a> | Convert text to smallint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L197-L216) |
| <a id="mysql-cast-varbit-to-bigint-bit-varying-d46e3651" href="#mysql-cast-varbit-to-bigint-bit-varying-d46e3651">`mysql.cast_varbit_to_bigint(bit varying) → bigint`</a> | Convert bit varying to bigint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L479-L494) |
| <a id="mysql-cast-varbit-to-boolean-bit-varying-eec689be" href="#mysql-cast-varbit-to-boolean-bit-varying-eec689be">`mysql.cast_varbit_to_boolean(bit varying) → boolean`</a> | Convert bit varying to boolean. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L413-L425) |
| <a id="mysql-cast-varbit-to-int-bit-varying-d5bfe7ab" href="#mysql-cast-varbit-to-int-bit-varying-d5bfe7ab">`mysql.cast_varbit_to_int(bit varying) → integer`</a> | Convert bit varying to integer. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L456-L471) |
| <a id="mysql-cast-varbit-to-smallint-bit-varying-a4087975" href="#mysql-cast-varbit-to-smallint-bit-varying-a4087975">`mysql.cast_varbit_to_smallint(bit varying) → smallint`</a> | Convert bit varying to smallint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L433-L448) |
| <a id="mysql-cast-varchar-to-bigint-character-varying-8837544a" href="#mysql-cast-varchar-to-bigint-character-varying-8837544a">`mysql.cast_varchar_to_bigint(character varying) → bigint`</a> | Convert character varying to bigint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L175-L194) |
| <a id="mysql-cast-varchar-to-int-character-varying-7d889559" href="#mysql-cast-varchar-to-int-character-varying-7d889559">`mysql.cast_varchar_to_int(character varying) → integer`</a> | Convert character varying to integer. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L153-L172) |
| <a id="mysql-cast-varchar-to-tinyint-character-varying-4dfe426f" href="#mysql-cast-varchar-to-tinyint-character-varying-4dfe426f">`mysql.cast_varchar_to_tinyint(character varying) → smallint`</a> | Convert character varying to smallint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L131-L150) |
| <a id="mysql-convert-bigint-to-varbit-bigint-6edfe06d" href="#mysql-convert-bigint-to-varbit-bigint-6edfe06d">`mysql.convert_bigint_to_varbit(bigint) → bit varying`</a> | Convert bigint to bit varying. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L529-L532) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L631-L635) |
| <a id="mysql-convert-char-to-float8-pg-catalog-char-ce1e0979" href="#mysql-convert-char-to-float8-pg-catalog-char-ce1e0979">`mysql.convert_char_to_float8("char") → double precision`</a> | Convert "char" to double precision. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L621-L629) |
| <a id="mysql-convert-date-to-float8-pg-catalog-date-2199e53c" href="#mysql-convert-date-to-float8-pg-catalog-date-2199e53c">`mysql.convert_date_to_float8(date) → double precision`</a> | Convert date to double precision. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/30-op-cmp.sql#L3317-L3320) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L153-L164) |
| <a id="mysql-convert-digit-text-to-text-for-mysql-pg-catalog-text-59c3fb69" href="#mysql-convert-digit-text-to-text-for-mysql-pg-catalog-text-59c3fb69">`mysql.convert_digit_text_to_text_for_mysql(text) → text`</a> | Convert text to text. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/30-op-cmp.sql#L494-L497) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L684-L703) |
| <a id="mysql-convert-int-to-varbit-integer-7aae1492" href="#mysql-convert-int-to-varbit-integer-7aae1492">`mysql.convert_int_to_varbit(integer) → bit varying`</a> | Convert integer to bit varying. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L513-L516) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L624-L628) |
| <a id="mysql-convert-smallint-to-varbit-smallint-f52a7375" href="#mysql-convert-smallint-to-varbit-smallint-f52a7375">`mysql.convert_smallint_to_varbit(smallint) → bit varying`</a> | Convert smallint to bit varying. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L497-L500) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L617-L621) |
| <a id="mysql-convert-text-hex-to-text-varbit-pg-catalog-text-5318c90b" href="#mysql-convert-text-hex-to-text-varbit-pg-catalog-text-5318c90b">`mysql.convert_text_hex_to_text_varbit(text) → text`</a> | Convert text to text. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/43-func-num.sql#L605-L608) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L1487-L1543) |
| <a id="mysql-convert-text-to-bigint-for-mysql-pg-catalog-text-d1e5a71d" href="#mysql-convert-text-to-bigint-for-mysql-pg-catalog-text-d1e5a71d">`mysql.convert_text_to_bigint_for_mysql(text) → bigint`</a> | Convert text to bigint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L60-L63) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L398-L483) |
| <a id="mysql-convert-text-to-digit-text-for-mysql-pg-catalog-text-bf8c673b" href="#mysql-convert-text-to-digit-text-for-mysql-pg-catalog-text-bf8c673b">`mysql.convert_text_to_digit_text_for_mysql(text) → text`</a> | Convert text to text. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/30-op-cmp.sql#L499-L502) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L638-L681) |
| <a id="mysql-convert-text-to-float8-pg-catalog-text-42ad8b6f" href="#mysql-convert-text-to-float8-pg-catalog-text-42ad8b6f">`mysql.convert_text_to_float8(text) → double precision`</a> | Convert text to double precision. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L604-L607) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L328-L359) |
| <a id="mysql-convert-text-to-int8-pg-catalog-text-96af4d41" href="#mysql-convert-text-to-int8-pg-catalog-text-96af4d41">`mysql.convert_text_to_int8(text) → bigint`</a> | Convert text to bigint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/43-func-num.sql#L600-L603) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L370-L395) |
| <a id="mysql-convert-text-varbit-to-bigint-pg-catalog-text-f1b5af90" href="#mysql-convert-text-varbit-to-bigint-pg-catalog-text-f1b5af90">`mysql.convert_text_varbit_to_bigint(text) → bigint`</a> | Convert text to bigint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/43-func-num.sql#L580-L583) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L522-L537) |
| <a id="mysql-convert-time-text-to-numeric-for-mysql-pg-catalog-text-cf551e5e" href="#mysql-convert-time-text-to-numeric-for-mysql-pg-catalog-text-cf551e5e">`mysql.convert_time_text_to_numeric_for_mysql(text) → double precision`</a> | Convert text to double precision. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/31-op-math.sql#L855-L858) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L281-L311) |
| <a id="mysql-convert-time-to-float8-time-without-time-zone-5baa2e91" href="#mysql-convert-time-to-float8-time-without-time-zone-5baa2e91">`mysql.convert_time_to_float8(time without time zone) → double precision`</a> | Convert time without time zone to double precision. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/30-op-cmp.sql#L3312-L3315) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L139-L150) |
| <a id="mysql-convert-timestamp-to-float8-timestamp-without-time-zone-f2216e62" href="#mysql-convert-timestamp-to-float8-timestamp-without-time-zone-f2216e62">`mysql.convert_timestamp_to_float8(timestamp without time zone) → double precision`</a> | Convert timestamp without time zone to double precision. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/30-op-cmp.sql#L3322-L3325) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/user_var.c#L167-L178) |
| <a id="mysql-convert-varbit-to-bigint-bit-varying-6e1be203" href="#mysql-convert-varbit-to-bigint-bit-varying-6e1be203">`mysql.convert_varbit_to_bigint(bit varying) → bigint`</a> | Convert bit varying to bigint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L474-L477) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L540-L551) |
| <a id="mysql-convert-varbit-to-int-bit-varying-f6d6d58d" href="#mysql-convert-varbit-to-int-bit-varying-f6d6d58d">`mysql.convert_varbit_to_int(bit varying) → integer`</a> | Convert bit varying to integer. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L451-L454) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L554-L565) |
| <a id="mysql-convert-varbit-to-smallint-bit-varying-24a0562c" href="#mysql-convert-varbit-to-smallint-bit-varying-24a0562c">`mysql.convert_varbit_to_smallint(bit varying) → smallint`</a> | Convert bit varying to smallint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L428-L431) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/strfuncs.c#L568-L579) |
| <a id="mysql-convert-varchar-to-float8-character-varying-cf0cb50c" href="#mysql-convert-varchar-to-float8-character-varying-cf0cb50c">`mysql.convert_varchar_to_float8(character varying) → double precision`</a> | Convert character varying to double precision. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L610-L618) |

## H {#h}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-hexlit-bit-mysql-hexlit-integer-boolean-d4e82b5c" href="#mysql-hexlit-bit-mysql-hexlit-integer-boolean-d4e82b5c">`mysql.hexlit_bit(mysql.hexlit, integer, boolean) → bit`</a> | Convert mysql.hexlit to bit. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L67-L68) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L456-L510) |
| <a id="mysql-hexlit-bool-mysql-hexlit-9d420128" href="#mysql-hexlit-bool-mysql-hexlit-9d420128">`mysql.hexlit_bool(mysql.hexlit) → boolean`</a> | Convert mysql.hexlit to boolean. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L53-L54) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L424-L437) |
| <a id="mysql-hexlit-bpchar-mysql-hexlit-679bda0b" href="#mysql-hexlit-bpchar-mysql-hexlit-679bda0b">`mysql.hexlit_bpchar(mysql.hexlit) → character`</a> | Convert mysql.hexlit to character. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L61-L62) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L441-L448) |
| <a id="mysql-hexlit-float4-mysql-hexlit-c9a206e3" href="#mysql-hexlit-float4-mysql-hexlit-c9a206e3">`mysql.hexlit_float4(mysql.hexlit) → real`</a> | Convert mysql.hexlit to real. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L51-L52) |
| <a id="mysql-hexlit-float8-mysql-hexlit-f7307b5e" href="#mysql-hexlit-float8-mysql-hexlit-f7307b5e">`mysql.hexlit_float8(mysql.hexlit) → double precision`</a> | Convert mysql.hexlit to double precision. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L49-L50) |
| <a id="mysql-hexlit-int2-mysql-hexlit-93a645e1" href="#mysql-hexlit-int2-mysql-hexlit-93a645e1">`mysql.hexlit_int2(mysql.hexlit) → smallint`</a> | Convert mysql.hexlit to smallint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L47-L48) |
| <a id="mysql-hexlit-int4-mysql-hexlit-3c4daa2c" href="#mysql-hexlit-int4-mysql-hexlit-3c4daa2c">`mysql.hexlit_int4(mysql.hexlit) → integer`</a> | Convert mysql.hexlit to integer. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L45-L46) |
| <a id="mysql-hexlit-int8-mysql-hexlit-1fdd1bee" href="#mysql-hexlit-int8-mysql-hexlit-1fdd1bee">`mysql.hexlit_int8(mysql.hexlit) → bigint`</a> | Convert mysql.hexlit to bigint. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L43-L44) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L376-L384) |
| <a id="mysql-hexlit-numeric-mysql-hexlit-71e8a596" href="#mysql-hexlit-numeric-mysql-hexlit-71e8a596">`mysql.hexlit_numeric(mysql.hexlit) → numeric`</a> | Convert mysql.hexlit to numeric. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L41-L42) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L369-L373) |
| <a id="mysql-hexlit-text-mysql-hexlit-64b8a472" href="#mysql-hexlit-text-mysql-hexlit-64b8a472">`mysql.hexlit_text(mysql.hexlit) → text`</a> | Convert mysql.hexlit to text. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L57-L58) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L441-L448) |
| <a id="mysql-hexlit-varbit-mysql-hexlit-integer-boolean-b2d26a86" href="#mysql-hexlit-varbit-mysql-hexlit-integer-boolean-b2d26a86">`mysql.hexlit_varbit(mysql.hexlit, integer, boolean) → bit varying`</a> | Convert mysql.hexlit to bit varying. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L65-L66) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L456-L510) |
| <a id="mysql-hexlit-varchar-mysql-hexlit-12a09fa5" href="#mysql-hexlit-varchar-mysql-hexlit-12a09fa5">`mysql.hexlit_varchar(mysql.hexlit) → character varying`</a> | Convert mysql.hexlit to character varying. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L59-L60) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L441-L448) |

## I {#i}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-interval-pg-catalog-text-integer-7d67733d" href="#mysql-interval-pg-catalog-text-integer-7d67733d">`mysql."interval"(text, integer) → interval`</a> | Convert text to interval. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L41-L45) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mysm/date_func.c#L38-L51) |

## S {#s}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-str-to-double-pg-catalog-text-322e00ee" href="#mysql-str-to-double-pg-catalog-text-322e00ee">`mysql.str_to_double(text) → double precision`</a> | Parse a string as a floating-point value. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/31-op-math.sql#L1420-L1422) |

## T {#t}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-time-to-timestamp-time-without-time-zone-ba28f92b" href="#mysql-time-to-timestamp-time-without-time-zone-ba28f92b">`mysql.time_to_timestamp(time without time zone) → timestamp without time zone`</a> | Convert time without time zone to timestamp without time zone. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/20-cast.sql#L7-L8) |

## V {#v}

| Signature | Purpose | Source definition |
|---|---|---|
| <a id="mysql-varbinary-n-pg-catalog-bytea-integer-boolean-62490b7c" href="#mysql-varbinary-n-pg-catalog-bytea-integer-boolean-62490b7c">`mysql.varbinary_n(bytea, integer, boolean) → mysql.varbinary_n`</a> | Convert bytea to mysql.varbinary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-varbinary-n-character-varying-integer-boolean-892d38d4" href="#mysql-varbinary-n-character-varying-integer-boolean-892d38d4">`mysql.varbinary_n(character varying, integer, boolean) → mysql.varbinary_n`</a> | Convert character varying to mysql.varbinary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-varbinary-n-character-integer-boolean-bf3acde9" href="#mysql-varbinary-n-character-integer-boolean-bf3acde9">`mysql.varbinary_n(character, integer, boolean) → mysql.varbinary_n`</a> | Convert character to mysql.varbinary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-varbinary-n-mysql-binary-n-integer-boolean-9bee1d30" href="#mysql-varbinary-n-mysql-binary-n-integer-boolean-9bee1d30">`mysql.varbinary_n(mysql.binary_n, integer, boolean) → mysql.varbinary_n`</a> | Convert mysql.binary_n to mysql.varbinary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-varbinary-n-mysql-hexlit-integer-boolean-a7246d37" href="#mysql-varbinary-n-mysql-hexlit-integer-boolean-a7246d37">`mysql.varbinary_n(mysql.hexlit, integer, boolean) → mysql.varbinary_n`</a> | Convert mysql.hexlit to mysql.varbinary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-varbinary-n-mysql-varbinary-n-integer-boolean-3c0ec3a0" href="#mysql-varbinary-n-mysql-varbinary-n-integer-boolean-3c0ec3a0">`mysql.varbinary_n(mysql.varbinary_n, integer, boolean) → mysql.varbinary_n`</a> | Convert mysql.varbinary_n to mysql.varbinary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-varbinary-n-pg-catalog-text-integer-boolean-a7c2f278" href="#mysql-varbinary-n-pg-catalog-text-integer-boolean-a7c2f278">`mysql.varbinary_n(text, integer, boolean) → mysql.varbinary_n`</a> | Convert text to mysql.varbinary_n. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L402-L404) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L875-L885) |
| <a id="mysql-varbinary-n-bpchar-mysql-varbinary-n-de30ebb1" href="#mysql-varbinary-n-bpchar-mysql-varbinary-n-de30ebb1">`mysql.varbinary_n_bpchar(mysql.varbinary_n) → character`</a> | Convert mysql.varbinary_n to character. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L410-L412) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L441-L448) |
| <a id="mysql-varbinary-n-text-mysql-varbinary-n-924f770e" href="#mysql-varbinary-n-text-mysql-varbinary-n-924f770e">`mysql.varbinary_n_text(mysql.varbinary_n) → text`</a> | Convert mysql.varbinary_n to text. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L410-L412) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L441-L448) |
| <a id="mysql-varbinary-n-varchar-mysql-varbinary-n-fe634508" href="#mysql-varbinary-n-varchar-mysql-varbinary-n-fe634508">`mysql.varbinary_n_varchar(mysql.varbinary_n) → character varying`</a> | Convert mysql.varbinary_n to character varying. | [Generated definition](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L410-L412) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L441-L448) |
| <a id="mysql-varbit-numeric-bit-varying-3c7881c7" href="#mysql-varbit-numeric-bit-varying-3c7881c7">`mysql.varbit_numeric(bit varying) → numeric`</a> | Convert the input to numeric using binary-string rules. | [SQL](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/sql/baseline/50-bin.sql#L71-L72) · [C](https://github.com/pgsty/pg_mysql/blob/0d51adcf5151ca5c98bc61de84f287ec3b4fe4a3/src/mys_binary.c#L514-L529) |

---

Backlinks:

- [Functions](/docs/mysql/reference/objects/functions/)
