This is the multi-page printable view of this section.
MySQL
- 1: Install and connect
- 2: Server configuration and authentication
- 2.1: Password authentication and TLS
- 2.2: pg_mysql object index
- 2.2.1: Schemas
- 2.2.2: Types and domains
- 2.2.3: Collations
- 2.2.4: Casts
- 2.2.5: Functions
- 2.2.5.1: String and binary functions
- 2.2.5.2: Numeric functions
- 2.2.5.3: Date and time functions
- 2.2.5.4: Conditional functions
- 2.2.5.5: Session functions
- 2.2.5.6: Type conversion helpers
- 2.2.5.7: Comparison operator functions
- 2.2.5.8: Arithmetic operator functions
- 2.2.5.9: Bitwise and logical operator functions
- 2.2.5.10: Pattern and JSON operator functions
- 2.2.5.11: String and number helpers
- 2.2.5.12: Temporal conversion helpers
- 2.2.5.13: Binary and string storage helpers
- 2.2.5.14: Aggregate support functions
- 2.2.5.15: Index support functions
- 2.2.5.16: Session state and variable helpers
- 2.2.5.17: DDL and write helpers
- 2.2.5.18: SHOW and metadata helpers
- 2.2.6: Aggregates
- 2.2.7: Operators
- 2.2.8: Metadata views
- 2.2.9: Metadata tables
- 2.2.10: Index access method, classes and families
- 2.2.11: Operator family members
- 2.2.12: Table indexes
- 2.2.13: Primary keys and domain checks
- 2.2.14: NOT NULL in metadata schemas
- 2.2.15: NOT NULL in performance_schema.events_*
- 2.2.16: NOT NULL in other performance_schema tables
- 3: SQL and type compatibility
- 4: Clients and drivers
- 5: Migration and recovery
- 6: Limits and troubleshooting
- 7: Protocol, dialect and origins
A MySQL client can create a table on TCP port 3306 and a PostgreSQL client can read it on port 5432. Mimus 19.0.1 runs PostgreSQL 19.0 with the OpenHalo protocol hooks and the standalone pg_mysql 1.0 extension. The two connections share tables, roles and transactions committed by other sessions. Each uses its own wire protocol and SQL dialect.
Which database am I using?
All MySQL connections enter the PostgreSQL database selected by mysql.database (default postgres). Inside it, a MySQL “database” is a PostgreSQL schema. With the example settings, mysql … app selects schema app and psql -d postgres sees its table as app.notes. A MySQL USE changes the selected schema on that connection.
First connection
Install and connect takes you from matching source trees to an ordinary login, an insert and a native PostgreSQL read. For additional hosts and existing services, see server configuration and authentication.
Before moving an application
Start with the columns that identify rows and the transactions that read them. An unsigned 64-bit key can exceed the supported range, and two plain reads in a writable REPEATABLE READ transaction can see different commits. Check your source values and replay one complete transaction with your own driver. SQL and types · Tested drivers · Migration and recovery · Limits and troubleshooting
How it works
OpenHalo contributed the protocol and grammar. Mimus pairs the 300/301 kernel changes with a separately built extension. MySQL kernel patches · Source versions and credits
Use a separate instance for applications that need the SQL Server protocol. For additional dialect reference see the PG.CENTER OpenHalo manual. Instance configuration · OpenHalo reference
1 - Install and connect
This walkthrough uses a fresh Linux instance, a local PostgreSQL administrator and a MariaDB mysql client. Install the OpenSSL command-line tool for the certificate step. Both ports must be free. At the end, the application owns one schema and can create and read its own tables. The TLS certificate below is for this loopback example.
Install the matching server and extension
This example builds the 19.0.1-r4 server and MySQL extension from two local repositories, pgsty/mimus in mimus/ and pgsty/pg_mysql in pg_mysql/. The candidate branches are pending upload. Run the commands in Bash from their common parent directory. Have the administrator prepare a fresh /usr/mimus-19 prefix writable by the build user. On Debian 13 the build uses build-essential, git, tar, bison, flex, perl (including FindBin), pkg-config, libicu-dev, libssl-dev, libreadline-dev and zlib1g-dev.
Expect PostgreSQL 19.0 and the installed control file. If the exact kernel is already installed, set PREFIX to that installation and skip the kernel archive, configure and make steps. The extension uses its installed server headers and PGXS through bin/pg_config. The server account needs read and execute access to the installation. Kernel and source identities
Initialize, preload and restart
In a shell running as OS user postgres, choose an unused data directory. The native socket uses peer authentication and the TCP loopback entries use SCRAM. Start PostgreSQL once, then enable the second listener. On an existing service, preserve its other preload entries and use its usual restart command.
Expect pg_mysql. SQL installation is per PostgreSQL database. Preloading is cluster-wide and takes effect at restart.
Prepare the database and role in psql
From the same shell, run psql -X -v ON_ERROR_STOP=1 -d postgres. As the database superuser, enter the following. At the password prompt, choose a password for the new role. The fresh database grants CONNECT to PUBLIC; if you revoked it, grant CONNECT ON DATABASE postgres to app_user.
Expect extension version 1.0. Earlier development builds, including unified RC2, also report 1.0. To move an application from one of those builds, install into a fresh cluster and restore its application schema and data. Check direct calls to private helper functions before restoring views. Schema ownership gives app_user the rights required by this example.
Write with mysql and read with psql
In the same OS shell, connect over TCP as the ordinary database role. Supply the password just set. If the client runs under another OS account, give it a readable copy of the public certificate and adjust the CA path.
At the mysql prompt, run these statements in schema app.
With the default configuration the first query returns app, 5.7.32-log and mimus. The TLS check returns 1, and the last query returns one row, 1 | hello. Type exit, then cross-check on the native port as the database administrator.
Connect from another host
Configure the intended interface, HBA rule, trusted CA and server identity before opening the listener to the application. Oracle MySQL and MariaDB use different TLS option names. Authentication and TLS
2 - Server configuration and authentication
SQL object index
Look up a function overload, operator, type or MySQL metadata relation by its installed signature. pg_mysql 1.0 object index
Inspect the running server
Use native psql as the administrator. These are the 14 PostgreSQL settings registered by pg_mysql 1.0. boot_val is the compiled default, setting the effective value in this backend. A MySQL @@ variable belongs to a different namespace. For example, SELECT @@max_allowed_packet reports the packet limit, while the PostgreSQL configuration entry has the mysql. prefix.
Cluster settings requiring restart
| Parameter | Default and accepted values | Effect |
|---|---|---|
mysql.listener_on | on, boolean | Enables the MySQL TCP listener when the module is preloaded. Set off to stop accepting connections on this protocol at the next start. |
mysql.port | 3306, integer 0–65535 | 0 disables the listener. The native PostgreSQL port defaults to 5432. |
mysql.listen_addresses | Unset. Comma-separated host names or IP addresses, or * | Unset or empty inherits PostgreSQL listen_addresses. An empty inherited list disables TCP. Bind a specific interface for application access. |
mysql.auth_cache_size | 1024, integer 0–1000000 entries | Shared fast-auth cache capacity in users. At 0 each password login uses full authentication. |
mysql.rsa_private_key_file | mysql_rsa_private_key.pem, file path | RSA private key for full authentication without TLS. Relative paths start at the data directory. An OpenSSL build generates a missing key. An empty path disables RSA key loading. |
mysql.auto_create_extension | on, boolean | On the first authenticated MySQL superuser connection, install the SQL extension if missing, before reporting login success. An ordinary user needs it installed already. Standbys and binary upgrade suppress automatic installation. |
Cluster settings applied by reload
Edit the active configuration and run SELECT pg_reload_conf(); in an administrative PostgreSQL session. Reconnect to verify handshake settings and the target database.
| Parameter | Default and accepted values | When a client sees it |
|---|---|---|
mysql.database | postgres, PostgreSQL database name | New connections bind to this database. Create it and install the extension there first. Existing connections stay in their original database. |
mysql.compat_version | 5.7.32-log, string | Reloadable major.minor.patch with an optional -suffix. The handshake, VERSION() and @@version return the full string. The numeric part determines the handshake collation and which versioned comments execute. An invalid value leaves the active version in effect on reload. |
mysql.default_authentication_plugin | caching_sha2_password or mysql_clear_password, default the former | Advertised at the next login. The server checks the role’s PostgreSQL credentials. |
mysql.max_allowed_packet | 67108864, integer 1024–1073741823 bytes | Limit for an incoming MySQL message or accumulated prepared-statement long data. Read the effective limit with SELECT @@max_allowed_packet. |
mysql.deadlock_timeout | 50ms, 0–2147483647 ms | Dynamic default for MySQL sessions. A positive value also defaults log_lock_waits to off. Zero inherits PostgreSQL defaults. Explicit PostgreSQL server, role, database and session settings take precedence. |
If reloading mysql.compat_version changes which ? placeholders occur in an executable comment, the next execution of that prepared statement returns error 1615 (HY000). Prepare it again and bind the parameters for the new version. Statements with the same parameter positions can continue on the existing connection.
Session settings
| Parameter | Default and accepted values | Scope |
|---|---|---|
mysql.parser | mysql (default), postgres; postgresql is an alias | Selects the grammar for subsequent queries arriving over the MySQL protocol. The connection still returns MySQL packets. Native connections use the PostgreSQL parser. |
mysql.statement_rollback | on, boolean | Inside a MySQL transaction, an ordinary statement error rolls back to a hidden savepoint. With off an error can abort the transaction. Deadlocks and serialization failures require a full transaction retry. |
mysql.default_collation | case_insensitive (default), string. Also accepts case_sensitive, ignore_accents, MySQL collation names and default or empty for database default | Default used by subsequent MySQL DDL for character columns without an explicit column or table collation. MySQL names follow the dialect mapping. Existing columns keep their definitions. |
An application can set session options for its connection. For example, in mysql, switch parsers, issue PostgreSQL SQL over the same socket, then switch back.
Admit a client
Once the listener is up, authentication depends on the target PostgreSQL database, role, TLS and HBA match. Configure passwords, HBA and TLS
Where to find the schemas
Connect with native psql to the database named in mysql.database. Application schemas sit alongside the extension schemas. A connection to a different native database has its own catalogs and installed extensions.
2.1 - Password authentication and TLS
Password authentication
Authenticate as a PostgreSQL role with LOGIN and CONNECT on the target database. PostgreSQL evaluates pg_hba.conf using that database, role, transport and client address. The first matching rule wins. MySQL schema selection and its privileges come later. The listener handles reject, trust, password, md5, scram-sha-256 and cert; other HBA authentication methods return an unsupported-method error. PostgreSQL HBA matching
Full and cached login
With MariaDB CLI 11.8.9 over TLS, a trust rule accepts a passwordless login. Supplying a password on that path produces error 1047. For a password-based login, use a matching scram-sha-256 HBA entry.
With the default plugin, a cache miss requires full authentication over TLS or an RSA-OAEP password exchange on a non-TLS connection. The server verifies the password using the role’s PostgreSQL verifier. A scram-sha-256 HBA entry requires a SCRAM verifier. Later connections can use the fast challenge/response path. Changing the role password invalidates the old cached credential. RSA protects the password exchange only. To protect queries and rows in transit, use TLS. For a legacy client requiring mysql_clear_password, require TLS by HBA and enable that plugin on the client.
Require and verify TLS
Configure an OpenSSL-enabled server with ssl=on, a server certificate and private key (ssl_cert_file, ssl_key_file). The certificate must cover the name or IP used by the client. For example, put these rules above broader host rules for the application subnet, substituting your actual CIDR. They apply to this role and PostgreSQL database on both TCP protocols. Reload HBA after editing.
With Oracle MySQL use --ssl-mode=VERIFY_IDENTITY --ssl-ca=ca.pem. With MariaDB use --ssl-verify-server-cert --ssl-ca=ca.pem. Connect to the certificate’s host and check the TLS status of this backend in the MySQL client.
2.2 - pg_mysql object index
All counts in this index come from one fresh installation of pg_mysql 1.0 on Mimus 19.0.1. Its source matches pg_mysql commit 0d51adc. For changes between this snapshot and r4, see the source comparison through 1e631f9.
Look up a function by name, match an operator and its operands, or find the PostgreSQL object behind an information_schema view. Each signature has a permanent page anchor.
SQL objects
| Category | Entries | Look up |
|---|---|---|
| Schemas | 4 | Namespace names as seen from PostgreSQL and MySQL. |
| Types and domains | 97 | 3 binary base types, 23 domains and 71 enumerations. |
| Collations | 5 | Choose a collation for character comparisons or check a column’s ordering dependency. |
| Casts | 88 | 80 assignment and 8 implicit casts. |
| Functions | 1859 | Find a function by name, then choose the overload that matches the argument types. |
| Aggregates | 7 | SQL aggregates, their input types and the result produced for a group. |
| Operators | 665 | Match the symbol and both operand types. NONE in the left slot denotes a unary prefix operator. |
| Metadata views | 20 | Query the MySQL name through the dialect or the PostgreSQL name from psql. SHOW helpers and the pending foreign key view are identified by their purpose. |
| Metadata tables | 180 | These physical tables provide compatibility metadata. Seed counts describe a fresh install. Performance Schema tables start empty. |
| Index access method, classes and families | 51 | 1 access method, 27 operator classes and 23 operator families. |
Index and constraint dependencies
| Category | Entries | Look up |
|---|---|---|
| Operator family members | 168 | 127 strategy operators and 41 support function registrations. |
| Table indexes | 119 | 61 explicit indexes and 58 indexes backing primary keys. |
| Primary keys and domain checks | 71 | 58 primary keys and 13 domain checks. |
| NOT NULL in metadata schemas | 341 | Column constraints in the compatibility catalogs outside Performance Schema, ordered by the owning table’s initial. |
| NOT NULL in performance_schema.events_* | 481 | Catalog constraint names and column definitions for Performance Schema event tables. |
| NOT NULL in other performance_schema tables | 589 | Catalog constraint names and column definitions for the remaining Performance Schema tables. |
Version and counting rules
Source links point to the files and lines used for this installation. Generated definition links to the SQL statement that created the object. C links to the C implementation of the SQL entry point.
The 4,745 entries in this installation include 2,976 direct extension members and 1,769 dependent objects (family entries, table indexes and constraints). PostgreSQL also records 497 derived types as extension members. These comprise one row type for each of the 180 tables and 20 views, and one array type for each of those 200 row types and the 97 declared types. Look up a row type under its relation’s name, or an array under its element type. Counts exclude those derived types. Each overload counts once. A type’s forward declaration and completed definition share one entry.
Seed rows are documented with their tables. PUBLIC receives schema USAGE and SELECT on the extension tables and views, plus REFERENCES on mysql.dual. Restricted function privileges are noted with the relevant function. Relation grants
2.2.1 - Schemas
Namespace names as seen from PostgreSQL and MySQL.
| Signature | Purpose | Source definition |
|---|---|---|
mys_informa_schema | MySQL information_schema metadata. | SQL |
mys_sys | Backing schema for MySQL sys. | SQL |
mysql | Dialect functions, operators, types and compatibility relations. | SQL |
performance_schema | Table shapes used by Performance Schema queries. | SQL |
2.2.2 - Types and domains
SQL types used by column declarations, binary literals and metadata tables.
Binary base types
| Signature | Purpose | Source definition |
|---|---|---|
mysql.binary_n | Length-qualified fixed-width BINARY storage. | Generated definition |
mysql.hexlit | MySQL hex/bit literal with byte-string and numeric interpretations. | SQL |
mysql.varbinary_n | Length-qualified variable-width VARBINARY storage. | Generated definition |
Domains
| Signature | Purpose | Source definition |
|---|---|---|
mysql."bigint signed" | Domain over bigint | SQL |
mysql."bigint unsigned" | Domain over bigint · CHECK ((0 <= VALUE)) | SQL |
mysql."binary" | Domain over bytea | SQL |
mysql."int signed" | Domain over integer | SQL |
mysql."int unsigned" | Domain over bigint · CHECK (((0 <= VALUE) AND (VALUE <= ‘4294967295’::bigint))) | SQL |
mysql."mediumint signed" | Domain over integer · CHECK (((’-8388608’::integer <= VALUE) AND (VALUE <= 8388607))) | SQL |
mysql."mediumint unsigned" | Domain over integer · CHECK (((0 <= VALUE) AND (VALUE <= 16777215))) | SQL |
mysql."real" | Domain over double precision | SQL |
mysql."smallint signed" | Domain over smallint | SQL |
mysql."smallint unsigned" | Domain over integer · CHECK (((0 <= VALUE) AND (VALUE <= 65535))) | SQL |
mysql."smallint" | Domain over smallint | SQL |
mysql."tinyint signed" | Domain over smallint · CHECK (((’-128’::integer <= VALUE) AND (VALUE <= 127))) | SQL |
mysql."tinyint unsigned" | Domain over smallint · CHECK (((0 <= VALUE) AND (VALUE <= 255))) | SQL |
mysql."tinyint1 signed" | Domain over smallint · CHECK (((’-128’::integer <= VALUE) AND (VALUE <= 127))) | SQL |
mysql."tinyint1 unsigned" | Domain over smallint · CHECK (((0 <= VALUE) AND (VALUE <= 255))) | SQL |
mysql.blob | Domain over bytea | SQL |
mysql.datetime | Domain over timestamp without time zone | SQL |
mysql.double | Domain over double precision | SQL |
mysql.mediumint | Domain over integer · CHECK (((’-8388608’::integer <= VALUE) AND (VALUE <= 8388607))) | SQL |
mysql.tinyint | Domain over smallint · CHECK (((’-128’::integer <= VALUE) AND (VALUE <= 127))) | SQL |
mysql.tinyint1 | Domain over smallint · CHECK (((’-128’::integer <= VALUE) AND (VALUE <= 127))) | SQL |
mysql.varbinary | Domain over bytea | SQL |
mysql.year_ | Domain over integer · CHECK (((1901 <= VALUE) AND (VALUE <= 2155))) | SQL |
Metadata enumerations
| Signature | Purpose | Source definition |
|---|---|---|
mys_informa_schema.enum_collations_pad_attribute | Used by mys_informa_schema.collations.pad_attribute. Allowed values are ‘PAD SPACE’, ‘NO PAD’. | SQL |
mys_informa_schema.enum_referential_constraints_delete_rule | Allowed values are ‘NO ACTION’, ‘RESTRICT’, ‘CASCADE’, ‘SET NULL’, ‘SET DEFAULT’. | SQL |
mys_informa_schema.enum_referential_constraints_match_option | Allowed values are ‘NONE’, ‘PARTIAL’, ‘FULL’. | SQL |
mys_informa_schema.enum_referential_constraints_update_rule | Allowed values are ‘NO ACTION’, ‘RESTRICT’, ‘CASCADE’, ‘SET NULL’, ‘SET DEFAULT’. | SQL |
mys_informa_schema.enum_resource_groups_resource_group_type | Used by mys_informa_schema.resource_groups.resource_group_type. Allowed values are ‘SYSTEM’, ‘USER’. | SQL |
mysql.enum_mysql_user | Used by mysql.“user”.account_locked. Allowed values are ‘N’, ‘Y’. | SQL |
mysql.enum_mysql_user_ssl_type | Used by mysql.“user”.ssl_type. Allowed values are ‘’, ‘ANY’, ‘X509’, ‘SPECIFIED’. | SQL |
mysql.enum_proc | Allowed values are ‘FUNCTION’, ‘PROCEDURE’. | SQL |
mysql.enum_security | Allowed values are ‘INVOKER’, ‘DEFINER’. | SQL |
performance_schema.enum_bin_log_trans_comp_stats_log_type | Used by performance_schema.binary_log_transaction_compression_stats.log_type. Allowed values are ‘BINARY’, ‘RELAY’. | SQL |
performance_schema.enum_error_log_prio | Used by performance_schema.error_log.prio. Allowed values are ‘System’, ‘Error’, ‘Warning’, ‘Note’. | SQL |
performance_schema.enum_evs_st_cur_nes_event_type | Used by performance_schema.events_stages_current.nesting_event_type. Allowed values are ‘TRANSACTION’, ‘STATEMENT’, ‘STAGE’, ‘WAIT’. | SQL |
performance_schema.enum_evs_st_his_long_nes_event_type | Used by performance_schema.events_stages_history_long.nesting_event_type. Allowed values are ‘TRANSACTION’, ‘STATEMENT’, ‘STAGE’, ‘WAIT’. | SQL |
performance_schema.enum_evs_st_his_nes_event_type | Used by performance_schema.events_stages_history.nesting_event_type. Allowed values are ‘TRANSACTION’, ‘STATEMENT’, ‘STAGE’, ‘WAIT’. | SQL |
performance_schema.enum_evs_stms_sumy_by_prg_obj_type | Used by performance_schema.events_statements_summary_by_program.object_type. Allowed values are ‘EVENT’, ‘FUNCTION’, ‘PROCEDURE’, ‘TABLE’, ‘TRIGGER’. | SQL |
performance_schema.enum_evs_stmts_cur_exe_engine | Used by performance_schema.events_statements_current.execution_engine. Allowed values are ‘PRIMARY’, ‘SECONDARY’. | SQL |
performance_schema.enum_evs_stmts_cur_nes_event_type | Used by performance_schema.events_statements_current.nesting_event_type. Allowed values are ‘TRANSACTION’, ‘STATEMENT’, ‘STAGE’, ‘WAIT’. | SQL |
performance_schema.enum_evs_stmts_his_exe_engine | Used by performance_schema.events_statements_history.execution_engine. Allowed values are ‘PRIMARY’, ‘SECONDARY’. | SQL |
performance_schema.enum_evs_stmts_his_long_exe_engine | Used by performance_schema.events_statements_history_long.execution_engine. Allowed values are ‘PRIMARY’, ‘SECONDARY’. | SQL |
performance_schema.enum_evs_stmts_his_long_nes_event_type | Used by performance_schema.events_statements_history_long.nesting_event_type. Allowed values are ‘TRANSACTION’, ‘STATEMENT’, ‘STAGE’, ‘WAIT’. | SQL |
performance_schema.enum_evs_stmts_his_nes_event_type | Used by performance_schema.events_statements_history.nesting_event_type. Allowed values are ‘TRANSACTION’, ‘STATEMENT’, ‘STAGE’, ‘WAIT’. | SQL |
performance_schema.enum_evs_trans_cur_access_mode | Used by performance_schema.events_transactions_current.access_mode. Allowed values are ‘READ ONLY’, ‘READ WRITE’. | SQL |
performance_schema.enum_evs_trans_cur_autocommit | Used by performance_schema.events_transactions_current.autocommit. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_evs_trans_cur_nes_event_type | Used by performance_schema.events_transactions_current.nesting_event_type. Allowed values are ‘TRANSACTION’, ‘STATEMENT’, ‘STAGE’, ‘WAIT’. | SQL |
performance_schema.enum_evs_trans_cur_state | Used by performance_schema.events_transactions_current.state. Allowed values are ‘ACTIVE’, ‘COMMITTED’, ‘ROLLED BACK’. | SQL |
performance_schema.enum_evs_trans_his_access_mode | Used by performance_schema.events_transactions_history.access_mode. Allowed values are ‘READ ONLY’, ‘READ WRITE’. | SQL |
performance_schema.enum_evs_trans_his_autocommit | Used by performance_schema.events_transactions_history.autocommit. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_evs_trans_his_long_access_mode | Used by performance_schema.events_transactions_history_long.access_mode. Allowed values are ‘READ ONLY’, ‘READ WRITE’. | SQL |
performance_schema.enum_evs_trans_his_long_autocommit | Used by performance_schema.events_transactions_history_long.autocommit. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_evs_trans_his_long_nes_event_type | Used by performance_schema.events_transactions_history_long.nesting_event_type. Allowed values are ‘TRANSACTION’, ‘STATEMENT’, ‘STAGE’, ‘WAIT’. | SQL |
performance_schema.enum_evs_trans_his_long_state | Used by performance_schema.events_transactions_history_long.state. Allowed values are ‘ACTIVE’, ‘COMMITTED’, ‘ROLLED BACK’. | SQL |
performance_schema.enum_evs_trans_his_nesting_event_type | Used by performance_schema.events_transactions_history.nesting_event_type. Allowed values are ‘TRANSACTION’, ‘STATEMENT’, ‘STAGE’, ‘WAIT’. | SQL |
performance_schema.enum_evs_trans_his_state | Used by performance_schema.events_transactions_history.state. Allowed values are ‘ACTIVE’, ‘COMMITTED’, ‘ROLLED BACK’. | SQL |
performance_schema.enum_evs_waits_cur_nesting_event_type | Used by performance_schema.events_waits_current.nesting_event_type. Allowed values are ‘TRANSACTION’, ‘STATEMENT’, ‘STAGE’, ‘WAIT’. | SQL |
performance_schema.enum_evs_waits_his_long_nesting_event_type | Used by performance_schema.events_waits_history_long.nesting_event_type. Allowed values are ‘TRANSACTION’, ‘STATEMENT’, ‘STAGE’, ‘WAIT’. | SQL |
performance_schema.enum_evs_waits_his_nesting_event_type | Used by performance_schema.events_waits_history.nesting_event_type. Allowed values are ‘TRANSACTION’, ‘STATEMENT’, ‘STAGE’, ‘WAIT’. | SQL |
performance_schema.enum_host_cache_host_validated | Used by performance_schema.host_cache.host_validated. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_perf_timers_timer_name | Used by performance_schema.performance_timers.timer_name. Allowed values are ‘CYCLE’, ‘NANOSECOND’, ‘MICROSECOND’, ‘MILLISECOND’, ‘THREAD_CPU’. | SQL |
performance_schema.enum_pl_exe_engine | Used by performance_schema.processlist.execution_engine. Allowed values are ‘PRIMARY’, ‘SECONDARY’. | SQL |
performance_schema.enum_pre_stmts_ins_exec_eng | Used by performance_schema.prepared_statements_instances.execution_engine. Allowed values are ‘PRIMARY’, ‘SECONDARY’. | SQL |
performance_schema.enum_pre_stmts_ins_owner_obj_type | Used by performance_schema.prepared_statements_instances.owner_object_type. Allowed values are ‘EVENT’, ‘FUNCTION’, ‘PROCEDURE’, ‘TABLE’, ‘TRIGGER’. | SQL |
performance_schema.enum_r_a_cn_as_gt_tott | Used by performance_schema.replication_applier_configuration.assign_gtids_to_anonymous_transactions_type. Allowed values are ‘OFF’, ‘LOCAL’, ‘UUID’. | SQL |
performance_schema.enum_r_a_cn_re_ro_ft | Used by performance_schema.replication_applier_configuration.require_row_format. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_r_a_cn_re_ta_pkc | Used by performance_schema.replication_applier_configuration.require_table_primary_key_check. Allowed values are ‘STREAM’, ‘ON’, ‘OFF’. | SQL |
performance_schema.enum_r_a_f_cnf_by | Used by performance_schema.replication_applier_filters.configured_by. Allowed values are ‘STARTUP_OPTIONS’, ‘CHANGE_REPLICATION_FILTER’, ‘STARTUP_OPTIONS_FOR_CHANNEL’, ‘CHANGE_REPLICATION_FILTER_FOR_CHANNEL’. | SQL |
performance_schema.enum_repl_al_st_by_wk_ser_state | Used by performance_schema.replication_applier_status_by_worker.service_state. Allowed values are ‘ON’, ‘OFF’. | SQL |
performance_schema.enum_repl_app_gl_fil_cnf_by | Used by performance_schema.replication_applier_global_filters.configured_by. Allowed values are ‘STARTUP_OPTIONS’, ‘CHANGE_REPLICATION_FILTER’. | SQL |
performance_schema.enum_repl_app_st_by_co_ser_st | Used by performance_schema.replication_applier_status_by_coordinator.service_state. Allowed values are ‘ON’, ‘OFF’. | SQL |
performance_schema.enum_repl_app_st_ser_state | Used by performance_schema.replication_applier_status.service_state. Allowed values are ‘ON’, ‘OFF’. | SQL |
performance_schema.enum_repl_con_conf_auto_position | Used by performance_schema.replication_connection_configuration.auto_position. Allowed values are ‘1’, ‘0’. | SQL |
performance_schema.enum_repl_con_conf_get_public_key | Used by performance_schema.replication_connection_configuration.get_public_key. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_repl_con_conf_gtid_only | Used by performance_schema.replication_connection_configuration.gtid_only. Allowed values are ‘1’, ‘0’. | SQL |
performance_schema.enum_repl_con_conf_sou_con_auto_fo | Used by performance_schema.replication_connection_configuration.source_connection_auto_failover. Allowed values are ‘1’, ‘0’. | SQL |
performance_schema.enum_repl_con_conf_ssl_allowed | Used by performance_schema.replication_connection_configuration.ssl_allowed. Allowed values are ‘YES’, ‘NO’, ‘IGNORED’. | SQL |
performance_schema.enum_repl_con_conf_ssl_verify_svr_cert | Used by performance_schema.replication_connection_configuration.ssl_verify_server_certificate. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_repl_con_status_service_state | Used by performance_schema.replication_connection_status.service_state. Allowed values are ‘ON’, ‘OFF’, ‘CONNECTING’. | SQL |
performance_schema.enum_setup_actors_enabled | Used by performance_schema.setup_actors.enabled. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_setup_actors_history | Used by performance_schema.setup_actors.history. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_setup_consumers_enabled | Used by performance_schema.setup_consumers.enabled. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_setup_instruments_enabled | Used by performance_schema.setup_instruments.enabled. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_setup_instruments_timed | Used by performance_schema.setup_instruments.timed. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_setup_objects_enabled | Used by performance_schema.setup_objects.enabled. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_setup_objects_object_type | Used by performance_schema.setup_objects.object_type. Allowed values are ‘EVENT’, ‘FUNCTION’, ‘PROCEDURE’, ‘TABLE’, ‘TRIGGER’. | SQL |
performance_schema.enum_setup_objects_timed | Used by performance_schema.setup_objects.timed. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_setup_threads_enabled | Used by performance_schema.setup_threads.enabled. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_setup_threads_history | Used by performance_schema.setup_threads.history. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_socket_instances_state | Used by performance_schema.socket_instances.state. Allowed values are ‘IDLE’, ‘ACTIVE’. | SQL |
performance_schema.enum_threads_execution_engine | Used by performance_schema.threads.execution_engine. Allowed values are ‘PRIMARY’, ‘SECONDARY’. | SQL |
performance_schema.enum_threads_history | Used by performance_schema.threads.history. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_threads_instrumented | Used by performance_schema.threads.instrumented. Allowed values are ‘YES’, ‘NO’. | SQL |
performance_schema.enum_variables_info_variable_source | Used by performance_schema.variables_info.variable_source. Allowed values are ‘COMPILED’, ‘GLOBAL’, ‘SERVER’, ‘EXPLICIT’, ‘EXTRA’, ‘USER’, ‘LOGIN’, ‘COMMAND_LINE’, ‘PERSISTED’, ‘DYNAMIC’. | SQL |
2.2.3 - Collations
Choose a collation for character comparisons or check a column’s ordering dependency.
| Signature | Purpose | Source definition |
|---|---|---|
mysql.case_insensitive | ICU secondary strength, ignoring case. | SQL |
mysql.case_sensitive | C collation for case-sensitive ordering. | SQL |
mysql.ignore_accents | ICU primary strength with case level enabled. | SQL |
mysql.utf8mb4_bin | Unicode code-point order with PAD SPACE. | SQL |
mysql.utf8mb4_general_ci | MySQL general_ci comparison weights and PAD SPACE. | SQL |
2.2.4 - Casts
Look up a source and target type. The section gives the least restrictive context in which PostgreSQL can use that cast.
An assignment cast also works in an explicit CAST. An implicit cast can participate in function and operator resolution.
Assignment
| Signature | Purpose | Source definition |
|---|---|---|
"char" → double precision | Call mysql.convert_char_to_float8(“char”). | SQL |
bigint → bit varying | Call mysql.cast_bigint_to_varbit(bigint). | SQL |
bit varying → bigint | Call mysql.cast_varbit_to_bigint(bit varying). | SQL |
bit varying → integer | Call mysql.cast_varbit_to_int(bit varying). | SQL |
bit varying → smallint | Call mysql.cast_varbit_to_smallint(bit varying). | SQL |
bit → bytea | Call mysql.cast_bit_to_bytea(bit). | SQL |
bit → text | Call mysql.bit_to_text(bit). | SQL |
boolean → bigint | Call mysql.cast_boolean_to_bigint(boolean). | SQL |
boolean → bit varying | Call mysql.cast_bool_to_varbit(boolean). | SQL |
boolean → bytea | Call mysql.cast_boolean_to_bytea(boolean). | Generated definition |
boolean → double precision | Call mysql.cast_boolean_to_float8(boolean). | Generated definition |
boolean → mysql.binary_n | Call mysql.cast_boolean_to_binary_n(boolean). | Generated definition |
boolean → mysql.varbinary_n | Call mysql.cast_boolean_to_varbinary_n(boolean). | Generated definition |
boolean → numeric | Call mysql.cast_boolean_to_numeric(boolean). | Generated definition |
boolean → real | Call mysql.cast_boolean_to_float4(boolean). | Generated definition |
boolean → smallint | Call mysql.cast_boolean_to_tinyint(boolean). | SQL |
bytea → bit | Call mysql.bytea2bit(bytea). | SQL |
bytea → bit varying | Call mysql.bytea2varbit(bytea). | SQL |
bytea → boolean | Call mysql.bytea2bool(bytea). | SQL |
bytea → character | Call mysql.bytea2bpchar(bytea). | SQL |
bytea → character varying | Call mysql.bytea2varchar(bytea). | SQL |
bytea → date | Call mysql.bytea2date(bytea). | SQL |
bytea → double precision | Call mysql.bytea2float8(bytea). | SQL |
bytea → mysql.binary_n | Call mysql.binary_n(bytea,integer,boolean). | Generated definition |
bytea → mysql.varbinary_n | Call mysql.varbinary_n(bytea,integer,boolean). | Generated definition |
bytea → numeric | Call mysql.bytea2numeric(bytea). | SQL |
bytea → real | Call mysql.bytea2float4(bytea). | SQL |
bytea → text | Call mysql.bytea2text(bytea). | SQL |
bytea → time with time zone | Call mysql.bytea2timetz(bytea). | SQL |
bytea → time without time zone | Call mysql.bytea2time(bytea). | SQL |
bytea → timestamp with time zone | Call mysql.bytea2timestamptz(bytea). | SQL |
bytea → timestamp without time zone | Call mysql.bytea2timestamp(bytea). | SQL |
character varying → bigint | Call mysql.cast_varchar_to_bigint(character varying). | SQL |
character varying → double precision | Call mysql.convert_varchar_to_float8(character varying). | SQL |
character varying → integer | Call mysql.cast_varchar_to_int(character varying). | SQL |
character varying → mysql.binary_n | Call mysql.binary_n(character varying,integer,boolean). | Generated definition |
character varying → mysql.varbinary_n | Call mysql.varbinary_n(character varying,integer,boolean). | Generated definition |
character varying → smallint | Call mysql.cast_varchar_to_tinyint(character varying). | SQL |
character → bigint | Call mysql.cast_char_to_bigint(character). | SQL |
character → integer | Call mysql.cast_char_to_int(character). | SQL |
character → mysql.binary_n | Call mysql.binary_n(character,integer,boolean). | Generated definition |
character → mysql.varbinary_n | Call mysql.varbinary_n(character,integer,boolean). | Generated definition |
character → smallint | Call mysql.cast_char_to_tinyint(character). | SQL |
integer → bit varying | Call mysql.cast_int_to_varbit(integer). | SQL |
mysql.binary_n → character | Call mysql.binary_n_bpchar(mysql.binary_n). | Generated definition |
mysql.binary_n → character varying | Call mysql.binary_n_varchar(mysql.binary_n). | Generated definition |
mysql.binary_n → mysql.binary_n | Call mysql.binary_n(mysql.binary_n,integer,boolean). | Generated definition |
mysql.binary_n → mysql.varbinary_n | Call mysql.varbinary_n(mysql.binary_n,integer,boolean). | Generated definition |
mysql.binary_n → text | Call mysql.binary_n_text(mysql.binary_n). | Generated definition |
mysql.hexlit → bigint | Call mysql.hexlit_int8(mysql.hexlit). | SQL |
mysql.hexlit → bit | Call mysql.hexlit_bit(mysql.hexlit,integer,boolean). | SQL |
mysql.hexlit → bit varying | Call mysql.hexlit_varbit(mysql.hexlit,integer,boolean). | SQL |
mysql.hexlit → boolean | Call mysql.hexlit_bool(mysql.hexlit). | SQL |
mysql.hexlit → character | Call mysql.hexlit_bpchar(mysql.hexlit). | SQL |
mysql.hexlit → character varying | Call mysql.hexlit_varchar(mysql.hexlit). | SQL |
mysql.hexlit → double precision | Call mysql.hexlit_float8(mysql.hexlit). | SQL |
mysql.hexlit → integer | Call mysql.hexlit_int4(mysql.hexlit). | SQL |
mysql.hexlit → mysql.binary_n | Call mysql.binary_n(mysql.hexlit,integer,boolean). | Generated definition |
mysql.hexlit → mysql.varbinary_n | Call mysql.varbinary_n(mysql.hexlit,integer,boolean). | Generated definition |
mysql.hexlit → numeric | Call mysql.hexlit_numeric(mysql.hexlit). | SQL |
mysql.hexlit → real | Call mysql.hexlit_float4(mysql.hexlit). | SQL |
mysql.hexlit → smallint | Call mysql.hexlit_int2(mysql.hexlit). | SQL |
mysql.hexlit → text | Call mysql.hexlit_text(mysql.hexlit). | SQL |
mysql.varbinary_n → character | Call mysql.varbinary_n_bpchar(mysql.varbinary_n). | Generated definition |
mysql.varbinary_n → character varying | Call mysql.varbinary_n_varchar(mysql.varbinary_n). | Generated definition |
mysql.varbinary_n → mysql.binary_n | Call mysql.binary_n(mysql.varbinary_n,integer,boolean). | Generated definition |
mysql.varbinary_n → mysql.varbinary_n | Call mysql.varbinary_n(mysql.varbinary_n,integer,boolean). | Generated definition |
mysql.varbinary_n → text | Call mysql.varbinary_n_text(mysql.varbinary_n). | Generated definition |
smallint → bit varying | Call mysql.cast_smallint_to_varbit(smallint). | SQL |
text → bigint | Call mysql.cast_text_to_bigint(text). | SQL |
text → date | Call mysql.cast_text_to_date(text). | SQL |
text → double precision | Call mysql.convert_text_to_float8(text). | SQL |
text → integer | Call mysql.cast_text_to_int(text). | SQL |
text → mysql.binary_n | Call mysql.binary_n(text,integer,boolean). | Generated definition |
text → mysql.varbinary_n | Call mysql.varbinary_n(text,integer,boolean). | Generated definition |
text → smallint | Call mysql.cast_text_to_tinyint(text). | SQL |
text → time without time zone | Call mysql.cast_text_to_time(text). | SQL |
text → timestamp with time zone | Call mysql.cast_text_to_timestamptz(text). | SQL |
text → timestamp without time zone | Call mysql.cast_text_to_timestamp(text). | SQL |
time without time zone → timestamp without time zone | Call mysql.time_to_timestamp(time without time zone). | SQL |
Implicit
| Signature | Purpose | Source definition |
|---|---|---|
bigint → boolean | Call mysql.cast_bigint_to_boolean(bigint). | SQL |
bit varying → boolean | Call mysql.cast_varbit_to_boolean(bit varying). | SQL |
bit → boolean | Call mysql.cast_bit_to_boolean(bit). | SQL |
mysql.binary_n → bytea | Reuse the binary representation. | Generated definition |
mysql.hexlit → bytea | Reuse the binary representation. | SQL |
mysql.varbinary_n → bytea | Reuse the binary representation. | Generated definition |
smallint → boolean | Call mysql.cast_smallint_to_boolean(smallint). | SQL |
text → interval | Call mysql.“interval”(text,integer). | SQL |
2.2.5 - Functions
Find a function by name, then choose the overload that matches the argument types.
The first five categories contain functions for application SQL. The remaining categories list the entry points used by the dialect, operators, indexes and metadata queries.
By purpose
| Category | Entries | Look up |
|---|---|---|
| String and binary functions | 324 | Use the return type to distinguish text and byte-string overloads. |
| Numeric functions | 45 | Rounding, division, base conversion and numeric calculations. |
| Date and time functions | 162 | Date arithmetic, formatting, parsing, extraction and clock values. |
| Conditional functions | 335 | IF, IFNULL and ISNULL. Match each branch’s type as well as the condition type. |
| Session functions | 18 | Connection identity, selected database, named locks and statement state. |
| Type conversion helpers | 112 | Internal routines used by casts, coercion and expression rewriting. |
| Comparison operator functions | 278 | Internal entry points behind equality and ordering comparisons. |
| Arithmetic operator functions | 193 | Internal routines for arithmetic on mixed MySQL operand types. |
| Bitwise and logical operator functions | 181 | Internal routines for bit operations and truth-value tests. |
| Pattern and JSON operator functions | 41 | Internal routines for LIKE, regular expressions and JSON field access. |
| String and number helpers | 9 | Internal routines used by string searches, validation and rounding. |
| Temporal conversion helpers | 15 | Internal routines for date normalization, week modes and numeric date arithmetic. |
| Binary and string storage helpers | 48 | Internal routines for type I/O, binary expression evaluation and string results. |
| Aggregate support functions | 12 | Internal transition and final functions invoked while computing an aggregate. |
| Index support functions | 24 | Internal functions for index access, key comparison, hashing and operator-class registration. |
| Session state and variable helpers | 16 | Internal interfaces behind SET, SHOW, user variables and authentication cache management. |
| DDL and write helpers | 15 | Internal routines invoked by column expressions, sequences and row triggers. |
| SHOW and metadata helpers | 31 | Internal routines that format catalog values and construct result sets for MySQL clients. |
By function name
_
_add_bool · _add_null · _calc_days_in_year · _calc_week · _calc_weekday · _convert_format_to_halo_for_number_datetime · _convert_format_to_halo_for_string_datetime · _convert_format_to_halo_for_string_number_datetime · _convert_format_to_halo_for_string_string_datetime · _date_padding · _process_for_number_datetime · _process_for_string_number_datetime · _sub_bool · _sub_null · _week_mode
A
adddate · addtime · amend_def_val · amend_def_val_for_internal · anycompatibleandbytea · anycompatiblecondandbytea · anycompatiblecondorbytea · anycompatibledivbytea · anycompatibleeqbytea · anycompatiblegebytea · anycompatiblegtbytea · anycompatiblelebytea · anycompatiblelikebytea · anycompatibleltbytea · anycompatiblemibytea · anycompatiblemodbytea · anycompatiblemulbytea · anycompatiblenebytea · anycompatiblenlikebytea · anycompatiblenonarray_or_text · anycompatiblenregexpbinbytea · anycompatiblenregexpbytea · anycompatibleorbytea · anycompatibleplbytea · anycompatibleregexpbinbytea · anycompatibleregexpbytea · anynonarray_or_text · array_to_string_for_mysql · ascii · auto_increment_advance
B
bigint_add_char · bigint_add_text · bigint_add_varchar · bigint_and_bigint · bigint_bitxor_bigint · bigint_divide_char · bigint_divide_text · bigint_divide_varchar · bigint_like_text · bigint_minus_char · bigint_minus_text · bigint_minus_varchar · bigint_mod_char · bigint_mod_text · bigint_mod_varchar · bigint_multi_char · bigint_multi_text · bigint_multi_varchar · bigint_not_like_text · bigint_or_bigint · bigint_xor_bigint · bigintbgeqtext · bigintbgtext · bigintleeqtext · bigintletext · bin · binary_n · binary_n_bpchar · binary_n_cmp · binary_n_cmp_bytea · binary_n_cmp_varbinary_n · binary_n_eq · binary_n_ge · binary_n_gt · binary_n_hash · binary_n_hash_extended · binary_n_in · binary_n_le · binary_n_lt · binary_n_ne · binary_n_out · binary_n_recv · binary_n_send · binary_n_text · binary_n_typmodin · binary_n_typmodout · binary_n_varchar · binary_regular_expr · binary_regular_expr_not · binary_truth · bit_and_varbit · bit_and_varbit_final · bit_count · bit_eq_boolean · bit_or_varbit · bit_or_varbit_final · bit_to_text · bit_xor_varbit · bit_xor_varbit_final · bool_and_int2 · bool_and_int4 · bool_and_int8 · bool_or_bool · bool_or_int2 · bool_or_int4 · bool_or_int8 · boolcondandbool · boolean_eq_bit · boolean_eq_varbit · booleqint2 · booleqint4 · booleqint8 · boolneint2 · boolneint4 · boolneint8 · bpcharlike · bpcharnlike · btrim · bytea2bit · bytea2bool · bytea2bpchar · bytea2date · bytea2float4 · bytea2float8 · bytea2int2 · bytea2int4 · bytea2int8 · bytea2numeric · bytea2text · bytea2time · bytea2timestamp · bytea2timestamptz · bytea2timetz · bytea2varbit · bytea2varchar · bytea_and_hexlit · bytea_cmp_binary_n · bytea_cmp_varbinary_n · bytea_div_hexlit · bytea_eq_hexlit · bytea_ge_hexlit · bytea_gt_hexlit · bytea_le_hexlit · bytea_like_hexlit · bytea_lt_hexlit · bytea_mi_hexlit · bytea_mod_hexlit · bytea_mul_hexlit · bytea_ne_hexlit · bytea_nlike_hexlit · bytea_nseq_hexlit · bytea_or_hexlit · bytea_pl_hexlit · bytea_shl_hexlit · bytea_shr_hexlit · bytea_xor_hexlit · byteaandanycompatible · byteaandbytea · byteacondandanycompatible · byteacondandbytea · byteacondoranycompatible · byteacondorbytea · byteadivanycompatible · byteadivbytea · byteaeqanycompatible · byteageanycompatible · byteagebytea · byteagtanycompatible · byteagtbytea · bytealeanycompatible · bytealebytea · bytealikeanycompatible · bytealtanycompatible · bytealtbytea · byteamianycompatible · byteamibytea · byteamodanycompatible · byteamodbytea · byteamulanycompatible · byteamulbytea · byteaneanycompatible · byteanlikeanycompatible · byteanregexpanycompatible · byteanregexpbinanycompatible · byteanregexpbinbytea · byteanregexpbytea · byteaoranycompatible · byteaorbytea · byteaplanycompatible · byteaplbytea · bytearegexpanycompatible · bytearegexpbinanycompatible · bytearegexpbinbytea · bytearegexpbytea
C
cast_bigint_to_boolean · cast_bigint_to_varbit · cast_bit_to_boolean · cast_bit_to_bytea · cast_bool_to_varbit · cast_boolean_to_bigint · cast_boolean_to_binary_n · cast_boolean_to_bytea · cast_boolean_to_float4 · cast_boolean_to_float8 · cast_boolean_to_numeric · cast_boolean_to_tinyint · cast_boolean_to_varbinary_n · cast_char · cast_char_to_bigint · cast_char_to_int · cast_char_to_tinyint · cast_int_to_varbit · cast_numeric_source · cast_smallint_to_boolean · cast_smallint_to_varbit · cast_text_to_bigint · cast_text_to_date · cast_text_to_int · cast_text_to_time · cast_text_to_timestamp · cast_text_to_timestamptz · cast_text_to_tinyint · cast_varbit_to_bigint · cast_varbit_to_boolean · cast_varbit_to_int · cast_varbit_to_smallint · cast_varchar_to_bigint · cast_varchar_to_int · cast_varchar_to_tinyint · ceil · ceil_for_mysql · ceiling · char_add_bigint · char_add_char · char_divide_bigint · char_divide_char · char_eq_char_for_date_format · char_length · char_minus_bigint · char_minus_char · char_mod_bigint · char_mod_char · char_multi_bigint · char_multi_char · character_length · check_set · clear_user_variables · column_default · column_domain · column_extra · column_generation · concat · concat_one · concat_pair · concat_ws · concat_ws_bytes · connection_id · conv · convert_bigint_to_varbit · convert_char_to_float8 · convert_date_to_float8 · convert_digit_text_to_text_for_mysql · convert_int_to_varbit · convert_smallint_to_varbit · convert_text_hex_to_text_varbit · convert_text_to_bigint_for_mysql · convert_text_to_digit_text_for_mysql · convert_text_to_float8 · convert_text_to_int8 · convert_text_varbit_to_bigint · convert_time_text_to_numeric_for_mysql · convert_time_to_float8 · convert_timestamp_to_float8 · convert_to_time_format · convert_tz · convert_using · convert_varbit_to_bigint · convert_varbit_to_int · convert_varbit_to_smallint · convert_varchar_to_float8 · curdate · curdate_add · curdate_sub · current_user · curtime
D
database · date · date_add · date_add_bigint · date_add_int · date_add_smallint · date_eq_text · date_format · date_ge_text · date_gt_text · date_le_text · date_lt_text · date_minus_bigint · date_minus_int · date_minus_smallint · date_ne_text · date_sub · datediff · dateeqtext · datenetext · day · dayname · dayofmonth · dayofweek · dayofyear · decimal_column_type · decimal_ps · div_float4_float4 · div_float4_float8 · div_float8_float4 · div_float8_float8 · div_float8_text · div_int2_int2 · div_int2_int4 · div_int2_int8 · div_int4_int2 · div_int4_int4 · div_int4_int8 · div_int8_int2 · div_int8_int4 · div_int8_int8 · div_text_float8 · div_text_text · dummy_min_finalfunc_for_bytea · dummy_min_sfunc_for_bytea
E
elt · elt_index · export_set · extract
F
field · find_in_set · float8_and_hexlit · float8_div_hexlit · float8_eq_hexlit · float8_ge_hexlit · float8_gt_hexlit · float8_le_hexlit · float8_lt_hexlit · float8_mi_hexlit · float8_mod_hexlit · float8_mul_hexlit · float8_ne_hexlit · float8_nseq_hexlit · float8_or_hexlit · float8_pl_hexlit · float8_shl_hexlit · float8_shr_hexlit · float8_xor_hexlit · floor · floor_for_mysql · flush_auth_cache · format · found_rows · from_days · from_unixtime
G
generated_column · generated_numeric · generated_value · generated_varchar · get_column_extra · get_column_key · get_func_def · get_funcs_procs_parameters · get_lock · get_mysql_proc_arg_mode · get_mysql_type_name · get_proc_def · get_seq_in_index · get_system_global_variable · get_system_session_variable · get_system_variable · get_user_var · getenv
H
hex · hexlit_and_bytea · hexlit_and_float8 · hexlit_and_hexlit · hexlit_and_int2 · hexlit_and_int4 · hexlit_and_int8 · hexlit_and_numeric · hexlit_and_text · hexlit_and_varbit · hexlit_bit · hexlit_bool · hexlit_bpchar · hexlit_cmp · hexlit_cmp_support · hexlit_div_bytea · hexlit_div_float8 · hexlit_div_hexlit · hexlit_div_int2 · hexlit_div_int4 · hexlit_div_int8 · hexlit_div_numeric · hexlit_div_text · hexlit_div_varbit · hexlit_eq · hexlit_eq_bytea · hexlit_eq_float8 · hexlit_eq_int2 · hexlit_eq_int4 · hexlit_eq_int8 · hexlit_eq_numeric · hexlit_eq_text · hexlit_eq_varbit · hexlit_float4 · hexlit_float8 · hexlit_ge · hexlit_ge_bytea · hexlit_ge_float8 · hexlit_ge_int2 · hexlit_ge_int4 · hexlit_ge_int8 · hexlit_ge_numeric · hexlit_ge_text · hexlit_ge_varbit · hexlit_gt · hexlit_gt_bytea · hexlit_gt_float8 · hexlit_gt_int2 · hexlit_gt_int4 · hexlit_gt_int8 · hexlit_gt_numeric · hexlit_gt_text · hexlit_gt_varbit · hexlit_hash · hexlit_hash_extended · hexlit_in · hexlit_int2 · hexlit_int4 · hexlit_int8 · hexlit_le · hexlit_le_bytea · hexlit_le_float8 · hexlit_le_int2 · hexlit_le_int4 · hexlit_le_int8 · hexlit_le_numeric · hexlit_le_text · hexlit_le_varbit · hexlit_like · hexlit_like_bytea · hexlit_like_text · hexlit_lt · hexlit_lt_bytea · hexlit_lt_float8 · hexlit_lt_int2 · hexlit_lt_int4 · hexlit_lt_int8 · hexlit_lt_numeric · hexlit_lt_text · hexlit_lt_varbit · hexlit_mi_bytea · hexlit_mi_float8 · hexlit_mi_hexlit · hexlit_mi_int2 · hexlit_mi_int4 · hexlit_mi_int8 · hexlit_mi_numeric · hexlit_mi_text · hexlit_mi_varbit · hexlit_mod_bytea · hexlit_mod_float8 · hexlit_mod_hexlit · hexlit_mod_int2 · hexlit_mod_int4 · hexlit_mod_int8 · hexlit_mod_numeric · hexlit_mod_text · hexlit_mod_varbit · hexlit_mul_bytea · hexlit_mul_float8 · hexlit_mul_hexlit · hexlit_mul_int2 · hexlit_mul_int4 · hexlit_mul_int8 · hexlit_mul_numeric · hexlit_mul_text · hexlit_mul_varbit · hexlit_ne · hexlit_ne_bytea · hexlit_ne_float8 · hexlit_ne_int2 · hexlit_ne_int4 · hexlit_ne_int8 · hexlit_ne_numeric · hexlit_ne_text · hexlit_ne_varbit · hexlit_nlike · hexlit_nlike_bytea · hexlit_nlike_text · hexlit_not · hexlit_nseq_bytea · hexlit_nseq_float8 · hexlit_nseq_hexlit · hexlit_nseq_int2 · hexlit_nseq_int4 · hexlit_nseq_int8 · hexlit_nseq_numeric · hexlit_nseq_text · hexlit_nseq_varbit · hexlit_numeric · hexlit_or_bytea · hexlit_or_float8 · hexlit_or_hexlit · hexlit_or_int2 · hexlit_or_int4 · hexlit_or_int8 · hexlit_or_numeric · hexlit_or_text · hexlit_or_varbit · hexlit_out · hexlit_pl_bytea · hexlit_pl_float8 · hexlit_pl_hexlit · hexlit_pl_int2 · hexlit_pl_int4 · hexlit_pl_int8 · hexlit_pl_numeric · hexlit_pl_text · hexlit_pl_varbit · hexlit_recv · hexlit_send · hexlit_shl_bytea · hexlit_shl_float8 · hexlit_shl_hexlit · hexlit_shl_int2 · hexlit_shl_int4 · hexlit_shl_int8 · hexlit_shl_numeric · hexlit_shl_text · hexlit_shl_varbit · hexlit_shr_bytea · hexlit_shr_float8 · hexlit_shr_hexlit · hexlit_shr_int2 · hexlit_shr_int4 · hexlit_shr_int8 · hexlit_shr_numeric · hexlit_shr_text · hexlit_shr_varbit · hexlit_text · hexlit_um · hexlit_varbit · hexlit_varchar · hexlit_xor_bytea · hexlit_xor_float8 · hexlit_xor_hexlit · hexlit_xor_int2 · hexlit_xor_int4 · hexlit_xor_int8 · hexlit_xor_numeric · hexlit_xor_text · hexlit_xor_varbit · hour
I
if · ifnull · index_key_name · index_key_parts · insert · instr · int2_and_bool · int2_and_hexlit · int2_and_int2 · int2_and_int4 · int2_and_int8 · int2_div_hexlit · int2_eq_hexlit · int2_eq_varbit · int2_ge_hexlit · int2_gt_hexlit · int2_le_hexlit · int2_lt_hexlit · int2_mi_hexlit · int2_mod_hexlit · int2_mul_hexlit · int2_ne_hexlit · int2_nseq_hexlit · int2_or_bool · int2_or_hexlit · int2_or_int2 · int2_or_int4 · int2_or_int8 · int2_pl_hexlit · int2_shl_hexlit · int2_shr_hexlit · int2_xor_hexlit · int2andint4 · int2andint8 · int2andnumeric · int2eqbool · int2leftmoveint2 · int2leftmoveint4 · int2leftmoveint8 · int2nebool · int2orint4 · int2orint8 · int2ornumeric · int2rightmoveint2 · int2rightmoveint4 · int2rightmoveint8 · int4_and_bool · int4_and_hexlit · int4_and_int2 · int4_and_int4 · int4_and_int8 · int4_div_hexlit · int4_eq_hexlit · int4_eq_varbit · int4_ge_hexlit · int4_gt_hexlit · int4_le_hexlit · int4_lt_hexlit · int4_mi_hexlit · int4_mod_hexlit · int4_mul_hexlit · int4_ne_hexlit · int4_nseq_hexlit · int4_or_bool · int4_or_hexlit · int4_or_int2 · int4_or_int4 · int4_or_int8 · int4_pl_hexlit · int4_shl_hexlit · int4_shr_hexlit · int4_xor_hexlit · int4andint2 · int4andint8 · int4andnumeric · int4andtext · int4eqbool · int4leftmoveint2 · int4leftmoveint4 · int4leftmoveint8 · int4nebool · int4orint2 · int4orint8 · int4ornumeric · int4rightmoveint2 · int4rightmoveint4 · int4rightmoveint8 · int8_and_bool · int8_and_hexlit · int8_and_int2 · int8_and_int4 · int8_div_hexlit · int8_eq_hexlit · int8_eq_varbit · int8_ge_hexlit · int8_gt_hexlit · int8_le_hexlit · int8_lt_hexlit · int8_mi_hexlit · int8_mod_hexlit · int8_mul_hexlit · int8_ne_hexlit · int8_nseq_hexlit · int8_or_bool · int8_or_hexlit · int8_or_int2 · int8_or_int4 · int8_pl_hexlit · int8_shl_hexlit · int8_shr_hexlit · int8_xor_hexlit · int8andint2 · int8andint4 · int8andnumeric · int8eqbool · int8leftmoveint2 · int8leftmoveint4 · int8leftmoveint8 · int8nebool · int8orint2 · int8orint4 · int8ornumeric · int8rightmoveint2 · int8rightmoveint4 · int8rightmoveint8 · int_div · integerbgeqtext · integerbgtext · integerleeqtext · integerletext · interval · interval_pl_text · is_and_eq · is_free_lock · is_numeric · is_used_lock · is_valid_binary · is_valid_hex · isnull
J
json_object_field · json_unquote
L
last_day · last_insert_id · lcase · left · length · lenient_float8 · lenient_int · lenient_numeric · lenient_varchar · load_file · locate · log · log2 · lower · lpad · ltrim
M
make_set · makedate · maketime · microsecond · mid · minute · mod · mod_int2_int2 · mod_int2_int4 · mod_int2_int8 · mod_int4_int2 · mod_int4_int4 · mod_int4_int8 · mod_int8_int2 · mod_int8_int4 · mod_int8_int8 · month · monthname · mys_div_float8 · mys_div_int8 · mys_div_numeric · mys_mod_int8 · mys_mod_numeric · mys_uint64_bitnot · mys_uint64_bitop
N
now · numeric_and_hexlit · numeric_div_hexlit · numeric_eq_hexlit · numeric_ge_hexlit · numeric_gt_hexlit · numeric_le_hexlit · numeric_lt_hexlit · numeric_mi_hexlit · numeric_mod_hexlit · numeric_mul_hexlit · numeric_ne_hexlit · numeric_nseq_hexlit · numeric_or_hexlit · numeric_pl_hexlit · numeric_shl_hexlit · numeric_shr_hexlit · numeric_timestamp · numeric_xor_hexlit · numericandint2 · numericandint4 · numericandint8 · numericbgeqtext · numericbgtext · numericeqtext · numericleeqtext · numericletext · numericnetext · numericorint2 · numericorint4 · numericorint8
O
octet_length · on_update_current_timestamp
P
part_list_columns · pending_fk_definitions · pending_fk_guard · period_add · period_diff · prefix_1042_cmp · prefix_17_cmp · prefix_25_cmp · prefix_53875699983efc79eeb9e023e66605f5_cmp · prefix_b8aba7e65857eaf6a91ca737fb14b87b_cmp · prefix_handler · prefix_like · prefix_not_like · prefix_options
Q
R
rand · raw_bytes · register_prefix_binary · register_prefix_type · regular_expr · regular_expr_not · release_all_locks · release_lock · replace · right · round · row_count · rpad · rtrim
S
schema · sec_to_time · second · session_user · set_system_charset_variable · set_system_global_variable · set_system_names_variable · set_system_session_variable · set_system_variable · set_user_var · set_user_var_in_expr · setval · show_create_function · show_create_procedure · show_create_table · show_create_table_impl · show_create_trigger · show_create_view · show_create_view_impl · show_diagnostics · show_system_variable · show_table_columns · show_table_full_columns · show_table_indexs · show_table_indexs_for_8 · sleep · smallintbgeqtext · smallintbgtext · smallintleeqtext · smallintletext · space · sqrt · str_to_date · str_to_double · strcmp · string_result · subdate · substr · substring · substring_index · subtime · sum_bool · sum_text · sum_text_final · sysdate
T
text_add_bigint · text_add_text · text_and_hexlit · text_and_text · text_avg_accum · text_div_hexlit · text_divide_bigint · text_divide_text · text_eq_date · text_eq_hexlit · text_eq_time · text_eq_timestamp · text_eq_timestamptz · text_ge_date · text_ge_hexlit · text_ge_time · text_ge_timestamp · text_ge_timestamptz · text_gt_date · text_gt_hexlit · text_gt_time · text_gt_timestamp · text_gt_timestamptz · text_instr · text_le_date · text_le_hexlit · text_le_time · text_le_timestamp · text_le_timestamptz · text_like_bigint · text_like_hexlit · text_locate2 · text_locate3 · text_lt_date · text_lt_hexlit · text_lt_time · text_lt_timestamp · text_lt_timestamptz · text_mi_hexlit · text_mi_interval · text_minus_bigint · text_minus_text · text_mod_bigint · text_mod_hexlit · text_mod_text · text_mul_hexlit · text_multi_bigint · text_multi_text · text_ne_date · text_ne_hexlit · text_ne_time · text_ne_timestamp · text_ne_timestamptz · text_nlike_hexlit · text_not_like_bigint · text_nseq_hexlit · text_or_anycompatiblenonarray · text_or_anynoarray · text_or_hexlit · text_or_text · text_pl_hexlit · text_pl_interval · text_shl_hexlit · text_shr_hexlit · text_xor_hexlit · textbgbigint · textbgeqbigint · textbgeqinteger · textbgeqnumeric · textbgeqsmallint · textbginteger · textbgnumeric · textbgsmallint · texteq · texteqdate · texteqnumeric · texteqtime · texteqtimestamp · textlebigint · textleeqbigint · textleeqinteger · textleeqnumeric · textleeqsmallint · textleinteger · textlenumeric · textlesmallint · textne · textnedate · textnenumeric · textnetime · textnetimestamp · time_add_bigint · time_eq_text · time_format · time_ge_text · time_gt_text · time_le_text · time_lt_text · time_minus_bigint · time_ne_text · time_to_sec · time_to_timestamp · timediff · timeeqtext · timenetext · timestamp · timestamp_add_bigint · timestamp_eq_text · timestamp_ge_text · timestamp_gt_text · timestamp_le_text · timestamp_lt_text · timestamp_minus_bigint · timestamp_ne_text · timestampadd · timestampdiff · timestampeqtext · timestampnetext · timestamptz_eq_text · timestamptz_ge_text · timestamptz_gt_text · timestamptz_le_text · timestamptz_lt_text · timestamptz_ne_text · to_days · truncate
U
ucase · unhex · unix_timestamp · upper · user · utc_date · utc_time · utc_timestamp · uuid · uuid_short
V
varbinary_n · varbinary_n_bpchar · varbinary_n_cmp · varbinary_n_cmp_binary_n · varbinary_n_cmp_bytea · varbinary_n_eq · varbinary_n_ge · varbinary_n_gt · varbinary_n_hash · varbinary_n_hash_extended · varbinary_n_in · varbinary_n_le · varbinary_n_lt · varbinary_n_ne · varbinary_n_out · varbinary_n_recv · varbinary_n_send · varbinary_n_text · varbinary_n_typmodin · varbinary_n_typmodout · varbinary_n_varchar · varbit_and_hexlit · varbit_div_hexlit · varbit_eq_boolean · varbit_eq_hexlit · varbit_eq_int2 · varbit_eq_int4 · varbit_eq_int8 · varbit_ge_hexlit · varbit_gt_hexlit · varbit_le_hexlit · varbit_lt_hexlit · varbit_mi_hexlit · varbit_mod_hexlit · varbit_mul_hexlit · varbit_ne_hexlit · varbit_nseq_hexlit · varbit_numeric · varbit_or_hexlit · varbit_pl_hexlit · varbit_shl_hexlit · varbit_shr_hexlit · varbit_xor_hexlit · varchar_add_bigint · varchar_add_varchar · varchar_divide_bigint · varchar_divide_varchar · varchar_minus_bigint · varchar_minus_varchar · varchar_mod_bigint · varchar_mod_varchar · varchar_multi_bigint · varchar_multi_varchar · version
W
week · weekday · weekofyear
Y
2.2.5.1 - String and binary functions
Use the return type to distinguish text and byte-string overloads.
ascii
| Signature | Purpose | Source definition |
|---|---|---|
mysql.ascii(bytea) → integer | Read the numeric value of the first byte. | Generated definition · C |
mysql.ascii(mysql.binary_n) → integer | Read the numeric value of the first byte. | Generated definition · C |
mysql.ascii(mysql.hexlit) → integer | Read the numeric value of the first byte. | Generated definition · C |
mysql.ascii(mysql.varbinary_n) → integer | Read the numeric value of the first byte. | Generated definition · C |
bin
| Signature | Purpose | Source definition |
|---|---|---|
mysql.bin(bigint) → text | Represent an integer in base two. | SQL |
btrim
| Signature | Purpose | Source definition |
|---|---|---|
mysql.btrim(bytea) → bytea | Trim both ends of the byte string. | Generated definition · C |
mysql.btrim(bytea, "any") → bytea | Trim both ends of the byte string. | Generated definition · C |
mysql.btrim(mysql.binary_n) → bytea | Trim both ends of the byte string. | Generated definition · C |
mysql.btrim(mysql.binary_n, "any") → bytea | Trim both ends of the byte string. | Generated definition · C |
mysql.btrim(mysql.hexlit) → bytea | Trim both ends of the byte string. | Generated definition · C |
mysql.btrim(mysql.hexlit, "any") → bytea | Trim both ends of the byte string. | Generated definition · C |
mysql.btrim(mysql.varbinary_n) → bytea | Trim both ends of the byte string. | Generated definition · C |
mysql.btrim(mysql.varbinary_n, "any") → bytea | Trim both ends of the byte string. | Generated definition · C |
char_length
| Signature | Purpose | Source definition |
|---|---|---|
mysql.char_length(bytea) → integer | Count characters in text or bytes in a binary string. | Generated definition |
mysql.char_length(mysql.binary_n) → integer | Count characters in text or bytes in a binary string. | Generated definition |
mysql.char_length(mysql.hexlit) → integer | Count characters in text or bytes in a binary string. | Generated definition |
mysql.char_length(mysql.varbinary_n) → integer | Count characters in text or bytes in a binary string. | Generated definition |
character_length
| Signature | Purpose | Source definition |
|---|---|---|
mysql.character_length(bytea) → integer | Count characters in text or bytes in a binary string. | Generated definition |
mysql.character_length(mysql.binary_n) → integer | Count characters in text or bytes in a binary string. | Generated definition |
mysql.character_length(mysql.hexlit) → integer | Count characters in text or bytes in a binary string. | Generated definition |
mysql.character_length(mysql.varbinary_n) → integer | Count characters in text or bytes in a binary string. | Generated definition |
concat
| Signature | Purpose | Source definition |
|---|---|---|
mysql.concat(VARIADIC "any") → text | Concatenate the arguments in order. | SQL · C |
concat_ws
| Signature | Purpose | Source definition |
|---|---|---|
mysql.concat_ws(text, VARIADIC "any") → text | Join values with the supplied separator. | SQL · C |
elt
| Signature | Purpose | Source definition |
|---|---|---|
mysql.elt(VARIADIC "any") → text | Pick the string at the given one-based position. | SQL · C |
export_set
| Signature | Purpose | Source definition |
|---|---|---|
mysql.export_set(bigint, text, text, text, bigint) → text | Render set and unset bits using the supplied strings. | SQL |
field
find_in_set
| Signature | Purpose | Source definition |
|---|---|---|
mysql.find_in_set(bigint, text) → integer | Find a value in a comma-separated list. | SQL |
mysql.find_in_set(text, text) → integer | Find a value in a comma-separated list. | SQL |
format
| Signature | Purpose | Source definition |
|---|---|---|
mysql.format(numeric, bigint) → text | Format a number with the requested decimal places. | SQL |
hex
| Signature | Purpose | Source definition |
|---|---|---|
mysql.hex(bigint) → text | Encode the value in hexadecimal. | SQL · C |
mysql.hex(bit varying) → text | Encode the value in hexadecimal. | SQL · C |
mysql.hex(boolean) → text | Encode the value in hexadecimal. | SQL |
mysql.hex(bytea) → text | Encode the value in hexadecimal. | SQL · C |
mysql.hex(character) → text | Encode the value in hexadecimal. | SQL · C |
mysql.hex(double precision) → text | Encode the value in hexadecimal. | SQL · C |
mysql.hex(integer) → text | Encode the value in hexadecimal. | SQL |
mysql.hex(mysql.binary_n) → text | Encode the value in hexadecimal. | Generated definition · C |
mysql.hex(mysql.hexlit) → text | Encode the value in hexadecimal. | Generated definition · C |
mysql.hex(mysql.varbinary_n) → text | Encode the value in hexadecimal. | Generated definition · C |
mysql.hex(numeric) → text | Encode the value in hexadecimal. | SQL · C |
mysql.hex(smallint) → text | Encode the value in hexadecimal. | SQL |
mysql.hex(text) → text | Encode the value in hexadecimal. | SQL · C |
insert
| Signature | Purpose | Source definition |
|---|---|---|
mysql.insert(text, integer, integer, text) → text | Replace part of a string at a specified position. | SQL |
instr
json_unquote
| Signature | Purpose | Source definition |
|---|---|---|
mysql.json_unquote(json) → text | Remove JSON string quoting. | SQL |
lcase
| Signature | Purpose | Source definition |
|---|---|---|
mysql.lcase(bigint) → text | Convert text to lowercase. Binary strings retain their bytes. | SQL |
mysql.lcase(bytea) → bytea | Convert text to lowercase. Binary strings retain their bytes. | Generated definition · C |
mysql.lcase(date) → text | Convert text to lowercase. Binary strings retain their bytes. | SQL |
mysql.lcase(integer) → text | Convert text to lowercase. Binary strings retain their bytes. | SQL |
mysql.lcase(mysql."smallint") → text | Convert text to lowercase. Binary strings retain their bytes. | SQL |
mysql.lcase(mysql.binary_n) → bytea | Convert text to lowercase. Binary strings retain their bytes. | Generated definition · C |
mysql.lcase(mysql.hexlit) → bytea | Convert text to lowercase. Binary strings retain their bytes. | Generated definition · C |
mysql.lcase(mysql.varbinary_n) → bytea | Convert text to lowercase. Binary strings retain their bytes. | Generated definition · C |
mysql.lcase(numeric) → text | Convert text to lowercase. Binary strings retain their bytes. | SQL |
mysql.lcase(text) → text | Convert text to lowercase. Binary strings retain their bytes. | SQL |
mysql.lcase(time without time zone) → text | Convert text to lowercase. Binary strings retain their bytes. | SQL |
mysql.lcase(timestamp with time zone) → text | Convert text to lowercase. Binary strings retain their bytes. | SQL |
mysql.lcase(timestamp without time zone) → text | Convert text to lowercase. Binary strings retain their bytes. | SQL |
left
length
| Signature | Purpose | Source definition |
|---|---|---|
mysql.length(bytea) → integer | Count the bytes in the value’s string representation. | Generated definition |
mysql.length(mysql.binary_n) → integer | Count the bytes in the value’s string representation. | Generated definition |
mysql.length(mysql.hexlit) → integer | Count the bytes in the value’s string representation. | Generated definition |
mysql.length(mysql.varbinary_n) → integer | Count the bytes in the value’s string representation. | Generated definition |
mysql.length(num bigint) → integer | Count the bytes in the value’s string representation. | SQL |
mysql.length(num character) → integer | Count the bytes in the value’s string representation. | SQL |
mysql.length(num integer) → integer | Count the bytes in the value’s string representation. | SQL |
mysql.length(num mysql."smallint") → integer | Count the bytes in the value’s string representation. | SQL |
mysql.length(num numeric) → integer | Count the bytes in the value’s string representation. | SQL |
mysql.length(text) → integer | Count the bytes in the value’s string representation. | SQL |
load_file
| Signature | Purpose | Source definition |
|---|---|---|
mysql.load_file(text) → text | Read a server-side file. EXECUTE is restricted. | SQL |
locate
| Signature | Purpose | Source definition |
|---|---|---|
mysql.locate(bytea, bytea) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(bytea, bytea, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(bytea, mysql.binary_n) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(bytea, mysql.binary_n, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(bytea, mysql.hexlit) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(bytea, mysql.hexlit, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(bytea, mysql.varbinary_n) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(bytea, mysql.varbinary_n, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(bytea, text) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(bytea, text, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.binary_n, bytea) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.binary_n, bytea, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.binary_n, mysql.binary_n) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.binary_n, mysql.binary_n, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.binary_n, mysql.hexlit) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.binary_n, mysql.hexlit, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.binary_n, mysql.varbinary_n) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.binary_n, mysql.varbinary_n, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.binary_n, text) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.binary_n, text, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.hexlit, bytea) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.hexlit, bytea, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.hexlit, mysql.binary_n) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.hexlit, mysql.binary_n, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.hexlit, mysql.hexlit) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.hexlit, mysql.hexlit, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.hexlit, mysql.varbinary_n) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.hexlit, mysql.varbinary_n, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.hexlit, text) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.hexlit, text, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.varbinary_n, bytea) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.varbinary_n, bytea, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.varbinary_n, mysql.binary_n) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.varbinary_n, mysql.binary_n, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.varbinary_n, mysql.hexlit) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.varbinary_n, mysql.hexlit, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.varbinary_n, mysql.varbinary_n) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.varbinary_n, mysql.varbinary_n, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.varbinary_n, text) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(mysql.varbinary_n, text, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(numeric, numeric) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(numeric, numeric, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(numeric, text) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(numeric, text, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(numeric, time without time zone) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(numeric, time without time zone, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(numeric, timestamp with time zone) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(numeric, timestamp with time zone, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(numeric, timestamp without time zone) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(numeric, timestamp without time zone, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(text, bytea) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(text, bytea, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(text, mysql.binary_n) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(text, mysql.binary_n, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(text, mysql.hexlit) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(text, mysql.hexlit, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(text, mysql.varbinary_n) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(text, mysql.varbinary_n, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | Generated definition · C |
mysql.locate(text, numeric) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(text, numeric, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(text, text) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(text, text, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(text, time without time zone) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(text, time without time zone, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(text, timestamp with time zone) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(text, timestamp with time zone, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(text, timestamp without time zone) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
mysql.locate(text, timestamp without time zone, integer) → integer | Find the first occurrence of a substring, optionally from a given position. | SQL |
lower
| Signature | Purpose | Source definition |
|---|---|---|
mysql.lower(bytea) → bytea | Convert text to lowercase. Binary strings retain their bytes. | Generated definition · C |
mysql.lower(mysql.binary_n) → bytea | Convert text to lowercase. Binary strings retain their bytes. | Generated definition · C |
mysql.lower(mysql.hexlit) → bytea | Convert text to lowercase. Binary strings retain their bytes. | Generated definition · C |
mysql.lower(mysql.varbinary_n) → bytea | Convert text to lowercase. Binary strings retain their bytes. | Generated definition · C |
lpad
| Signature | Purpose | Source definition |
|---|---|---|
mysql.lpad(bigint, integer, text) → text | Pad on the left to the requested length. | SQL |
mysql.lpad(text, integer, text) → text | Pad on the left to the requested length. | SQL |
ltrim
| Signature | Purpose | Source definition |
|---|---|---|
mysql.ltrim(bytea) → bytea | Trim the beginning of a byte string. | Generated definition · C |
mysql.ltrim(bytea, "any") → bytea | Trim the beginning of a byte string. | Generated definition · C |
mysql.ltrim(mysql.binary_n) → bytea | Trim the beginning of a byte string. | Generated definition · C |
mysql.ltrim(mysql.binary_n, "any") → bytea | Trim the beginning of a byte string. | Generated definition · C |
mysql.ltrim(mysql.hexlit) → bytea | Trim the beginning of a byte string. | Generated definition · C |
mysql.ltrim(mysql.hexlit, "any") → bytea | Trim the beginning of a byte string. | Generated definition · C |
mysql.ltrim(mysql.varbinary_n) → bytea | Trim the beginning of a byte string. | Generated definition · C |
mysql.ltrim(mysql.varbinary_n, "any") → bytea | Trim the beginning of a byte string. | Generated definition · C |
make_set
| Signature | Purpose | Source definition |
|---|---|---|
mysql.make_set(bigint, VARIADIC text[]) → text | Select strings using the set bits of a mask. | SQL |
mid
| Signature | Purpose | Source definition |
|---|---|---|
mysql.mid(bigint, integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(bigint, integer, integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(date, integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(date, integer, integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(integer, integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(integer, integer, integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(mysql."smallint", integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(mysql."smallint", integer, integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(str text, pos integer, len integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(text, integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(time without time zone, integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(time without time zone, integer, integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(timestamp with time zone, integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(timestamp with time zone, integer, integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(timestamp without time zone, integer) → text | Extract a slice starting at the given position. | SQL |
mysql.mid(timestamp without time zone, integer, integer) → text | Extract a slice starting at the given position. | SQL |
octet_length
| Signature | Purpose | Source definition |
|---|---|---|
mysql.octet_length(bytea) → integer | Count the bytes in the value’s string representation. | Generated definition |
mysql.octet_length(mysql.binary_n) → integer | Count the bytes in the value’s string representation. | Generated definition |
mysql.octet_length(mysql.hexlit) → integer | Count the bytes in the value’s string representation. | Generated definition |
mysql.octet_length(mysql.varbinary_n) → integer | Count the bytes in the value’s string representation. | Generated definition |
replace
| Signature | Purpose | Source definition |
|---|---|---|
mysql.replace(bytea, "any", "any") → bytea | Replace occurrences of a search string. | Generated definition · C |
mysql.replace(mysql.binary_n, "any", "any") → bytea | Replace occurrences of a search string. | Generated definition · C |
mysql.replace(mysql.hexlit, "any", "any") → bytea | Replace occurrences of a search string. | Generated definition · C |
mysql.replace(mysql.varbinary_n, "any", "any") → bytea | Replace occurrences of a search string. | Generated definition · C |
mysql.replace(text, text, text) → text | Replace occurrences of a search string. | SQL · C |
right
rpad
| Signature | Purpose | Source definition |
|---|---|---|
mysql.rpad(bigint, integer, text) → text | Pad on the right to the requested length. | SQL |
mysql.rpad(text, integer, text) → text | Pad on the right to the requested length. | SQL |
rtrim
| Signature | Purpose | Source definition |
|---|---|---|
mysql.rtrim(bytea) → bytea | Trim the end of a byte string. | Generated definition · C |
mysql.rtrim(bytea, "any") → bytea | Trim the end of a byte string. | Generated definition · C |
mysql.rtrim(mysql.binary_n) → bytea | Trim the end of a byte string. | Generated definition · C |
mysql.rtrim(mysql.binary_n, "any") → bytea | Trim the end of a byte string. | Generated definition · C |
mysql.rtrim(mysql.hexlit) → bytea | Trim the end of a byte string. | Generated definition · C |
mysql.rtrim(mysql.hexlit, "any") → bytea | Trim the end of a byte string. | Generated definition · C |
mysql.rtrim(mysql.varbinary_n) → bytea | Trim the end of a byte string. | Generated definition · C |
mysql.rtrim(mysql.varbinary_n, "any") → bytea | Trim the end of a byte string. | Generated definition · C |
space
| Signature | Purpose | Source definition |
|---|---|---|
mysql.space(integer) → text | Produce a string of spaces. | SQL |
strcmp
| Signature | Purpose | Source definition |
|---|---|---|
mysql.strcmp(text, text) → integer | Compare two strings and return their ordering. | SQL |
substr
substring
substring_index
| Signature | Purpose | Source definition |
|---|---|---|
mysql.substring_index(text, text, integer) → text | Split at a delimiter and take the requested part. | SQL · C |
ucase
| Signature | Purpose | Source definition |
|---|---|---|
mysql.ucase(bigint) → text | Convert text to uppercase. Binary strings retain their bytes. | SQL |
mysql.ucase(bytea) → bytea | Convert text to uppercase. Binary strings retain their bytes. | Generated definition · C |
mysql.ucase(date) → text | Convert text to uppercase. Binary strings retain their bytes. | SQL |
mysql.ucase(integer) → text | Convert text to uppercase. Binary strings retain their bytes. | SQL |
mysql.ucase(mysql."smallint") → text | Convert text to uppercase. Binary strings retain their bytes. | SQL |
mysql.ucase(mysql.binary_n) → bytea | Convert text to uppercase. Binary strings retain their bytes. | Generated definition · C |
mysql.ucase(mysql.hexlit) → bytea | Convert text to uppercase. Binary strings retain their bytes. | Generated definition · C |
mysql.ucase(mysql.varbinary_n) → bytea | Convert text to uppercase. Binary strings retain their bytes. | Generated definition · C |
mysql.ucase(numeric) → text | Convert text to uppercase. Binary strings retain their bytes. | SQL |
mysql.ucase(text) → text | Convert text to uppercase. Binary strings retain their bytes. | SQL |
mysql.ucase(time without time zone) → text | Convert text to uppercase. Binary strings retain their bytes. | SQL |
mysql.ucase(timestamp with time zone) → text | Convert text to uppercase. Binary strings retain their bytes. | SQL |
mysql.ucase(timestamp without time zone) → text | Convert text to uppercase. Binary strings retain their bytes. | SQL |
unhex
| Signature | Purpose | Source definition |
|---|---|---|
mysql.unhex(bigint) → bytea | Decode hexadecimal digits into bytes. | SQL |
mysql.unhex(bytea) → bytea | Decode hexadecimal digits into bytes. | SQL · C |
mysql.unhex(text) → bytea | Decode hexadecimal digits into bytes. | SQL · C |
upper
| Signature | Purpose | Source definition |
|---|---|---|
mysql.upper(bytea) → bytea | Convert text to uppercase. Binary strings retain their bytes. | Generated definition · C |
mysql.upper(mysql.binary_n) → bytea | Convert text to uppercase. Binary strings retain their bytes. | Generated definition · C |
mysql.upper(mysql.hexlit) → bytea | Convert text to uppercase. Binary strings retain their bytes. | Generated definition · C |
mysql.upper(mysql.varbinary_n) → bytea | Convert text to uppercase. Binary strings retain their bytes. | Generated definition · C |
2.2.5.2 - Numeric functions
Rounding, division, base conversion and numeric calculations.
bit_count
| Signature | Purpose | Source definition |
|---|---|---|
mysql.bit_count(bigint) → integer | Count the set bits. | SQL |
mysql.bit_count(bytea) → integer | Count the set bits. | SQL |
mysql.bit_count(text) → integer | Count the set bits. | SQL |
ceil
| Signature | Purpose | Source definition |
|---|---|---|
mysql.ceil(text) → bigint | Round up to an integer. | SQL |
ceiling
| Signature | Purpose | Source definition |
|---|---|---|
mysql.ceiling(text) → bigint | Round up to an integer. | SQL |
conv
| Signature | Purpose | Source definition |
|---|---|---|
mysql.conv(bigint, integer, integer) → text | Convert a number between bases. | SQL |
mysql.conv(text, integer, integer) → text | Convert a number between bases. | SQL |
floor
| Signature | Purpose | Source definition |
|---|---|---|
mysql.floor(text) → bigint | Round down to an integer. | SQL |
int_div
| Signature | Purpose | Source definition |
|---|---|---|
mysql.int_div(mysql.hexlit, mysql.hexlit) → bigint | Compute the integer quotient for MySQL DIV. | SQL |
mysql.int_div(mysql.hexlit, numeric) → bigint | Compute the integer quotient for MySQL DIV. | SQL |
mysql.int_div(numeric, mysql.hexlit) → bigint | Compute the integer quotient for MySQL DIV. | SQL |
mysql.int_div(numeric, numeric) → bigint | Compute the integer quotient for MySQL DIV. | SQL |
log
| Signature | Purpose | Source definition |
|---|---|---|
mysql.log(bigint) → numeric | Compute a logarithm. | SQL |
mysql.log(integer) → numeric | Compute a logarithm. | SQL |
mysql.log(numeric) → numeric | Compute a logarithm. | SQL |
mysql.log(smallint) → numeric | Compute a logarithm. | SQL |
log2
| Signature | Purpose | Source definition |
|---|---|---|
mysql.log2(double precision) → numeric | Compute the base-two logarithm. | SQL |
mysql.log2(numeric) → numeric | Compute the base-two logarithm. | SQL |
mod
| Signature | Purpose | Source definition |
|---|---|---|
mysql.mod(bigint, bigint) → bigint | Return the remainder of division. | SQL |
mysql.mod(bigint, text) → numeric | Return the remainder of division. | SQL |
mysql.mod(integer, integer) → integer | Return the remainder of division. | SQL |
mysql.mod(integer, text) → numeric | Return the remainder of division. | SQL |
mysql.mod(mysql."smallint", mysql."smallint") → mysql."smallint" | Return the remainder of division. | SQL |
mysql.mod(mysql."smallint", text) → numeric | Return the remainder of division. | SQL |
mysql.mod(numeric, numeric) → numeric | Return the remainder of division. | SQL |
mysql.mod(numeric, text) → numeric | Return the remainder of division. | SQL |
mysql.mod(text, bigint) → numeric | Return the remainder of division. | SQL |
mysql.mod(text, integer) → numeric | Return the remainder of division. | SQL |
mysql.mod(text, mysql."smallint") → numeric | Return the remainder of division. | SQL |
mysql.mod(text, numeric) → numeric | Return the remainder of division. | SQL |
mysql.mod(text, text) → numeric | Return the remainder of division. | SQL |
rand
| Signature | Purpose | Source definition |
|---|---|---|
mysql.rand() → numeric | Generate a pseudorandom number. | SQL |
mysql.rand(bigint) → numeric | Generate a pseudorandom number. | SQL |
mysql.rand(integer) → numeric | Generate a pseudorandom number. | SQL |
round
| Signature | Purpose | Source definition |
|---|---|---|
mysql.round(integer) → integer | Round to the requested precision. | SQL |
mysql.round(integer, integer) → integer | Round to the requested precision. | SQL |
mysql.round(numeric) → integer | Round to the requested precision. | SQL |
mysql.round(numeric, integer) → numeric | Round to the requested precision. | SQL |
mysql.round(text) → numeric | Round to the requested precision. | SQL |
mysql.round(text, integer) → numeric | Round to the requested precision. | SQL |
sqrt
| Signature | Purpose | Source definition |
|---|---|---|
mysql.sqrt(bigint) → numeric | Compute the square root. | SQL |
mysql.sqrt(integer) → numeric | Compute the square root. | SQL |
mysql.sqrt(numeric) → numeric | Compute the square root. | SQL |
mysql.sqrt(smallint) → numeric | Compute the square root. | SQL |
truncate
| Signature | Purpose | Source definition |
|---|---|---|
mysql.truncate(numeric, integer) → numeric | Truncate a number to the requested decimal place. | SQL |
2.2.5.3 - Date and time functions
Date arithmetic, formatting, parsing, extraction and clock values.
adddate
| Signature | Purpose | Source definition |
|---|---|---|
mysql.adddate(date, integer) → date | Add a day count or interval to a date. | SQL |
mysql.adddate(date, interval) → date | Add a day count or interval to a date. | SQL |
mysql.adddate(numeric, integer) → timestamp without time zone | Add a day count or interval to a date. | SQL |
mysql.adddate(numeric, interval) → timestamp without time zone | Add a day count or interval to a date. | SQL |
mysql.adddate(text, integer) → timestamp without time zone | Add a day count or interval to a date. | SQL |
mysql.adddate(text, interval) → timestamp without time zone | Add a day count or interval to a date. | SQL |
mysql.adddate(timestamp without time zone, integer) → timestamp without time zone | Add a day count or interval to a date. | SQL |
mysql.adddate(timestamp without time zone, interval) → timestamp without time zone | Add a day count or interval to a date. | SQL |
addtime
| Signature | Purpose | Source definition |
|---|---|---|
mysql.addtime(text, double precision) → text | Add time values. | SQL |
mysql.addtime(text, text) → text | Add time values. | SQL · C |
mysql.addtime(text, time without time zone) → text | Add time values. | SQL |
mysql.addtime(time without time zone, double precision) → time without time zone | Add time values. | SQL |
mysql.addtime(time without time zone, text) → time without time zone | Add time values. | SQL |
mysql.addtime(time without time zone, time without time zone) → time without time zone | Add time values. | SQL |
mysql.addtime(timestamp without time zone, double precision) → timestamp without time zone | Add time values. | SQL |
mysql.addtime(timestamp without time zone, text) → timestamp without time zone | Add time values. | SQL · C |
mysql.addtime(timestamp without time zone, time without time zone) → timestamp without time zone | Add time values. | SQL · C |
convert_tz
| Signature | Purpose | Source definition |
|---|---|---|
mysql.convert_tz(text, text, text) → timestamp without time zone | Convert a temporal value between time zones. | SQL |
mysql.convert_tz(timestamp without time zone, text, text) → timestamp without time zone | Convert a temporal value between time zones. | SQL |
curdate
| Signature | Purpose | Source definition |
|---|---|---|
mysql.curdate() → date | Return the current date. | SQL |
curtime
| Signature | Purpose | Source definition |
|---|---|---|
mysql.curtime() → time without time zone | Return the current time of day. | SQL |
mysql.curtime(prec integer) → time without time zone | Return the current time of day. | SQL |
date
| Signature | Purpose | Source definition |
|---|---|---|
mysql.date(numeric) → date | Extract or parse a date. | SQL |
pg_catalog.date(text) → date | Extract or parse a date. | SQL |
date_add
| Signature | Purpose | Source definition |
|---|---|---|
mysql.date_add(date, interval) → date | Add a day count or interval to a date. | SQL |
mysql.date_add(numeric, interval) → timestamp without time zone | Add a day count or interval to a date. | SQL |
mysql.date_add(text, interval) → timestamp without time zone | Add a day count or interval to a date. | SQL |
mysql.date_add(timestamp without time zone, interval) → timestamp without time zone | Add a day count or interval to a date. | SQL |
date_format
| Signature | Purpose | Source definition |
|---|---|---|
mysql.date_format(text, text) → text | Format a date with MySQL percent directives. | SQL |
mysql.date_format(timestamp with time zone, text) → text | Format a date with MySQL percent directives. | SQL |
date_sub
| Signature | Purpose | Source definition |
|---|---|---|
mysql.date_sub(date, interval) → date | Subtract a day count or interval from a date. | SQL |
mysql.date_sub(numeric, interval) → timestamp without time zone | Subtract a day count or interval from a date. | SQL |
mysql.date_sub(text, interval) → timestamp without time zone | Subtract a day count or interval from a date. | SQL |
mysql.date_sub(timestamp without time zone, interval) → timestamp without time zone | Subtract a day count or interval from a date. | SQL |
datediff
| Signature | Purpose | Source definition |
|---|---|---|
mysql.datediff(date, date) → integer | Return the difference between two dates in days. | SQL |
mysql.datediff(numeric, numeric) → integer | Return the difference between two dates in days. | SQL |
mysql.datediff(numeric, text) → integer | Return the difference between two dates in days. | SQL |
mysql.datediff(text, numeric) → integer | Return the difference between two dates in days. | SQL |
mysql.datediff(text, text) → integer | Return the difference between two dates in days. | SQL |
mysql.datediff(text, timestamp without time zone) → integer | Return the difference between two dates in days. | SQL |
mysql.datediff(timestamp without time zone, text) → integer | Return the difference between two dates in days. | SQL |
mysql.datediff(timestamp without time zone, timestamp without time zone) → integer | Return the difference between two dates in days. | SQL |
day
| Signature | Purpose | Source definition |
|---|---|---|
mysql.day(numeric) → integer | Return the day of the month. | SQL |
mysql.day(text) → integer | Return the day of the month. | SQL |
mysql.day(timestamp without time zone) → integer | Return the day of the month. | SQL |
dayname
| Signature | Purpose | Source definition |
|---|---|---|
mysql.dayname(numeric) → text | Return the weekday name. | SQL |
mysql.dayname(text) → text | Return the weekday name. | SQL |
mysql.dayname(timestamp without time zone) → text | Return the weekday name. | SQL |
dayofmonth
| Signature | Purpose | Source definition |
|---|---|---|
mysql.dayofmonth(numeric) → integer | Return the day of the month. | SQL |
mysql.dayofmonth(text) → integer | Return the day of the month. | SQL |
mysql.dayofmonth(timestamp without time zone) → integer | Return the day of the month. | SQL |
dayofweek
| Signature | Purpose | Source definition |
|---|---|---|
mysql.dayofweek(numeric) → integer | Number weekdays starting with Sunday as 1. | SQL |
mysql.dayofweek(text) → integer | Number weekdays starting with Sunday as 1. | SQL |
mysql.dayofweek(timestamp without time zone) → integer | Number weekdays starting with Sunday as 1. | SQL |
dayofyear
| Signature | Purpose | Source definition |
|---|---|---|
mysql.dayofyear(numeric) → integer | Return the ordinal day of the year. | SQL |
mysql.dayofyear(text) → integer | Return the ordinal day of the year. | SQL |
mysql.dayofyear(timestamp without time zone) → integer | Return the ordinal day of the year. | SQL |
extract
| Signature | Purpose | Source definition |
|---|---|---|
mysql."extract"(text, text) → numeric | Extract the requested date or time field. | SQL |
mysql."extract"(text, time without time zone) → numeric | Extract the requested date or time field. | SQL · C |
mysql."extract"(text, timestamp without time zone) → numeric | Extract the requested date or time field. | SQL · C |
from_days
| Signature | Purpose | Source definition |
|---|---|---|
mysql.from_days(integer) → date | Convert a MySQL day number to a date. | SQL |
from_unixtime
| Signature | Purpose | Source definition |
|---|---|---|
mysql.from_unixtime(double precision) → timestamp without time zone | Convert Unix time to a date/time value or formatted string. | SQL |
mysql.from_unixtime(double precision, text) → text | Convert Unix time to a date/time value or formatted string. | SQL |
hour
| Signature | Purpose | Source definition |
|---|---|---|
mysql.hour(text) → integer | Extract the hour. | SQL |
mysql.hour(time without time zone) → integer | Extract the hour. | SQL |
mysql.hour(timestamp without time zone) → integer | Extract the hour. | SQL |
last_day
| Signature | Purpose | Source definition |
|---|---|---|
mysql.last_day(date) → date | Find the last date of the month. | SQL |
mysql.last_day(numeric) → date | Find the last date of the month. | SQL |
mysql.last_day(text) → date | Find the last date of the month. | SQL |
mysql.last_day(timestamp with time zone) → date | Find the last date of the month. | SQL |
mysql.last_day(timestamp without time zone) → date | Find the last date of the month. | SQL |
makedate
| Signature | Purpose | Source definition |
|---|---|---|
mysql.makedate(integer, integer) → date | Build a date from a year and day of year. | SQL |
maketime
| Signature | Purpose | Source definition |
|---|---|---|
mysql.maketime(integer, integer, numeric) → time without time zone | Build a time from hours, minutes and seconds. | SQL |
microsecond
| Signature | Purpose | Source definition |
|---|---|---|
mysql.microsecond(text) → integer | Extract microseconds. | SQL |
mysql.microsecond(time without time zone) → integer | Extract microseconds. | SQL |
mysql.microsecond(timestamp without time zone) → integer | Extract microseconds. | SQL |
minute
| Signature | Purpose | Source definition |
|---|---|---|
mysql.minute(text) → integer | Extract minutes. | SQL |
mysql.minute(time without time zone) → integer | Extract minutes. | SQL |
mysql.minute(timestamp without time zone) → integer | Extract minutes. | SQL |
month
| Signature | Purpose | Source definition |
|---|---|---|
mysql.month(numeric) → integer | Return the month number. | SQL |
mysql.month(text) → integer | Return the month number. | SQL |
mysql.month(timestamp without time zone) → integer | Return the month number. | SQL |
monthname
| Signature | Purpose | Source definition |
|---|---|---|
mysql.monthname(numeric) → text | Return the month name. | SQL |
mysql.monthname(text) → text | Return the month name. | SQL |
mysql.monthname(timestamp without time zone) → text | Return the month name. | SQL |
now
| Signature | Purpose | Source definition |
|---|---|---|
mysql.now() → timestamp without time zone | Return the transaction’s current timestamp. | SQL |
mysql.now(prec integer) → timestamp without time zone | Return the transaction’s current timestamp. | SQL |
period_add
| Signature | Purpose | Source definition |
|---|---|---|
mysql.period_add(integer, integer) → text | Add months to a year-month period. | SQL |
period_diff
| Signature | Purpose | Source definition |
|---|---|---|
mysql.period_diff(integer, integer) → integer | Find the difference between year-month periods in months. | SQL |
quarter
| Signature | Purpose | Source definition |
|---|---|---|
mysql.quarter(date) → integer | Return the quarter of the year. | SQL |
mysql.quarter(numeric) → integer | Return the quarter of the year. | SQL |
mysql.quarter(text) → integer | Return the quarter of the year. | SQL |
mysql.quarter(timestamp without time zone) → integer | Return the quarter of the year. | SQL |
sec_to_time
| Signature | Purpose | Source definition |
|---|---|---|
mysql.sec_to_time(bigint) → time without time zone | Convert seconds to a time value. | SQL |
second
| Signature | Purpose | Source definition |
|---|---|---|
mysql.second(text) → integer | Extract seconds. | SQL |
mysql.second(time without time zone) → integer | Extract seconds. | SQL |
mysql.second(timestamp without time zone) → integer | Extract seconds. | SQL |
str_to_date
| Signature | Purpose | Source definition |
|---|---|---|
mysql.str_to_date(text, text) → timestamp without time zone | Parse a date or time with a MySQL format string. | SQL |
subdate
| Signature | Purpose | Source definition |
|---|---|---|
mysql.subdate(date, integer) → date | Subtract a day count or interval from a date. | SQL |
mysql.subdate(date, interval) → timestamp without time zone | Subtract a day count or interval from a date. | SQL |
mysql.subdate(numeric, integer) → timestamp without time zone | Subtract a day count or interval from a date. | SQL |
mysql.subdate(numeric, interval) → timestamp without time zone | Subtract a day count or interval from a date. | SQL |
mysql.subdate(text, integer) → timestamp without time zone | Subtract a day count or interval from a date. | SQL |
mysql.subdate(text, interval) → timestamp without time zone | Subtract a day count or interval from a date. | SQL |
mysql.subdate(timestamp without time zone, integer) → timestamp without time zone | Subtract a day count or interval from a date. | SQL |
mysql.subdate(timestamp without time zone, interval) → timestamp without time zone | Subtract a day count or interval from a date. | SQL |
subtime
sysdate
| Signature | Purpose | Source definition |
|---|---|---|
mysql.sysdate() → timestamp without time zone | Read the wall clock at execution time. | SQL |
mysql.sysdate(prec integer) → timestamp without time zone | Read the wall clock at execution time. | SQL |
time_format
| Signature | Purpose | Source definition |
|---|---|---|
mysql.time_format(time without time zone, text) → text | Format a time value. | SQL |
time_to_sec
| Signature | Purpose | Source definition |
|---|---|---|
mysql.time_to_sec(text) → bigint | Convert a time value to seconds. | SQL |
mysql.time_to_sec(time without time zone) → bigint | Convert a time value to seconds. | SQL |
mysql.time_to_sec(timestamp without time zone) → bigint | Convert a time value to seconds. | SQL |
timediff
| Signature | Purpose | Source definition |
|---|---|---|
mysql.timediff(text, text) → text | Return the difference between two time values. | SQL · C |
mysql.timediff(time without time zone, time without time zone) → text | Return the difference between two time values. | SQL |
mysql.timediff(timestamp without time zone, timestamp without time zone) → text | Return the difference between two time values. | SQL · C |
timestamp
| Signature | Purpose | Source definition |
|---|---|---|
mysql."timestamp"(text, text) → timestamp without time zone | Build a timestamp from the supplied date/time arguments. | SQL |
timestampadd
| Signature | Purpose | Source definition |
|---|---|---|
mysql.timestampadd(text, integer, timestamp without time zone) → timestamp without time zone | Add a quantity in the specified temporal unit. | SQL |
timestampdiff
| Signature | Purpose | Source definition |
|---|---|---|
mysql.timestampdiff(unit text, ts1 text, ts2 text) → bigint | Measure a timestamp difference in the specified unit. | SQL |
mysql.timestampdiff(unit text, ts1 timestamp without time zone, ts2 timestamp without time zone) → bigint | Measure a timestamp difference in the specified unit. | SQL · C |
to_days
| Signature | Purpose | Source definition |
|---|---|---|
mysql.to_days(date) → integer | Convert a date to a MySQL day number. | SQL |
mysql.to_days(text) → integer | Convert a date to a MySQL day number. | SQL |
mysql.to_days(timestamp without time zone) → integer | Convert a date to a MySQL day number. | SQL |
unix_timestamp
| Signature | Purpose | Source definition |
|---|---|---|
mysql.unix_timestamp() → bigint | Return seconds since the Unix epoch. | SQL |
mysql.unix_timestamp(numeric) → numeric | Return seconds since the Unix epoch. | SQL |
mysql.unix_timestamp(text) → numeric | Return seconds since the Unix epoch. | SQL |
mysql.unix_timestamp(timestamp without time zone) → numeric | Return seconds since the Unix epoch. | SQL |
utc_date
| Signature | Purpose | Source definition |
|---|---|---|
mysql.utc_date() → date | Return the current date in UTC. | SQL |
utc_time
| Signature | Purpose | Source definition |
|---|---|---|
mysql.utc_time() → time without time zone | Return the current time of day in UTC. | SQL |
mysql.utc_time(prec integer) → time without time zone | Return the current time of day in UTC. | SQL |
utc_timestamp
| Signature | Purpose | Source definition |
|---|---|---|
mysql.utc_timestamp() → timestamp without time zone | Return the current UTC timestamp. | SQL |
mysql.utc_timestamp(prec integer) → timestamp without time zone | Return the current UTC timestamp. | SQL |
week
| Signature | Purpose | Source definition |
|---|---|---|
mysql.week(numeric) → integer | Return the week number under the selected week mode. | SQL |
mysql.week(numeric, integer) → integer | Return the week number under the selected week mode. | SQL |
mysql.week(text) → integer | Return the week number under the selected week mode. | SQL |
mysql.week(text, integer) → integer | Return the week number under the selected week mode. | SQL |
mysql.week(timestamp without time zone) → integer | Return the week number under the selected week mode. | SQL |
mysql.week(timestamp without time zone, integer) → integer | Return the week number under the selected week mode. | SQL |
weekday
| Signature | Purpose | Source definition |
|---|---|---|
mysql.weekday(numeric) → integer | Number weekdays starting with Monday as 0. | SQL |
mysql.weekday(text) → integer | Number weekdays starting with Monday as 0. | SQL |
mysql.weekday(timestamp without time zone) → integer | Number weekdays starting with Monday as 0. | SQL |
weekofyear
| Signature | Purpose | Source definition |
|---|---|---|
mysql.weekofyear(numeric) → integer | Return the week of the year. | SQL |
mysql.weekofyear(text) → integer | Return the week of the year. | SQL |
mysql.weekofyear(timestamp without time zone) → integer | Return the week of the year. | SQL |
year
| Signature | Purpose | Source definition |
|---|---|---|
mysql.year(date) → integer | Extract the year. | SQL |
mysql.year(numeric) → integer | Extract the year. | SQL |
mysql.year(text) → integer | Extract the year. | SQL |
mysql.year(timestamp without time zone) → integer | Extract the year. | SQL |
yearweek
| Signature | Purpose | Source definition |
|---|---|---|
mysql.yearweek(numeric) → integer | Return the week and its associated year. | SQL |
mysql.yearweek(qdate numeric, mode integer) → integer | Return the week and its associated year. | SQL |
mysql.yearweek(qdate text, mode integer) → integer | Return the week and its associated year. | SQL |
mysql.yearweek(qdate timestamp without time zone, mode integer) → integer | Return the week and its associated year. | SQL |
mysql.yearweek(text) → integer | Return the week and its associated year. | SQL |
mysql.yearweek(timestamp without time zone) → integer | Return the week and its associated year. | SQL |
2.2.5.4 - Conditional functions
IF, IFNULL and ISNULL. Match each branch’s type as well as the condition type.
if
ifnull
| Signature | Purpose | Source definition |
|---|---|---|
mysql.ifnull(bigint, bigint) → bigint | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(bigint, character varying) → character varying | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(boolean, boolean) → boolean | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(bytea, bytea) → bytea | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(character varying, bigint) → character varying | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(character varying, character varying) → character varying | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(character varying, character) → character varying | Return the first value when present, otherwise the fallback. | Generated definition |
mysql.ifnull(character varying, text) → character varying | Return the first value when present, otherwise the fallback. | Generated definition |
mysql.ifnull(character, character varying) → character varying | Return the first value when present, otherwise the fallback. | Generated definition |
mysql.ifnull(character, character) → character | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(character, text) → character varying | Return the first value when present, otherwise the fallback. | Generated definition |
mysql.ifnull(date, date) → date | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(double precision, double precision) → double precision | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(integer, integer) → integer | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(mysql."smallint", mysql."smallint") → mysql."smallint" | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(mysql.double, mysql.double) → mysql.double | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(mysql.tinyint, mysql.tinyint) → mysql.tinyint | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(numeric, numeric) → numeric | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(p1 bigint, p2 text) → text | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(p1 boolean, p2 text) → text | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(p1 date, p2 text) → timestamp without time zone | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(p1 integer, p2 text) → text | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(p1 mysql."smallint", p2 text) → text | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(p1 numeric, p2 text) → text | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(p1 time without time zone, p2 text) → timestamp without time zone | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(p1 timestamp with time zone, p2 text) → timestamp with time zone | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(p1 timestamp without time zone, p2 text) → timestamp without time zone | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(text, bigint) → text | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(text, character varying) → character varying | Return the first value when present, otherwise the fallback. | Generated definition |
mysql.ifnull(text, character) → character varying | Return the first value when present, otherwise the fallback. | Generated definition |
mysql.ifnull(text, text) → text | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(time without time zone, time without time zone) → time without time zone | Return the first value when present, otherwise the fallback. | SQL |
mysql.ifnull(timestamp without time zone, timestamp without time zone) → timestamp without time zone | Return the first value when present, otherwise the fallback. | SQL |
isnull
2.2.5.5 - Session functions
Connection identity, selected database, named locks and statement state.
connection_id
| Signature | Purpose | Source definition |
|---|---|---|
mysql.connection_id() → bigint | Return the PostgreSQL backend PID for this connection. | SQL |
current_user
| Signature | Purpose | Source definition |
|---|---|---|
mysql."current_user"() → text | Effective PostgreSQL role formatted as role@%. | SQL · C |
database
| Signature | Purpose | Source definition |
|---|---|---|
mysql.database() → text | Return the MySQL database selected in this session. | SQL · C |
found_rows
| Signature | Purpose | Source definition |
|---|---|---|
mysql.found_rows() → bigint | Read the session’s found-row count. | SQL · C |
get_lock
| Signature | Purpose | Source definition |
|---|---|---|
mysql.get_lock("any", "any") → bigint | Acquire a named session lock with a timeout. | SQL · C |
is_free_lock
| Signature | Purpose | Source definition |
|---|---|---|
mysql.is_free_lock("any") → bigint | Check whether a named lock is available. | SQL · C |
is_used_lock
| Signature | Purpose | Source definition |
|---|---|---|
mysql.is_used_lock("any") → bigint | Look up the holder of a named lock. | SQL · C |
last_insert_id
| Signature | Purpose | Source definition |
|---|---|---|
mysql.last_insert_id() → bigint | Read the session’s last generated insert ID. | SQL · C |
release_all_locks
| Signature | Purpose | Source definition |
|---|---|---|
mysql.release_all_locks() → bigint | Release all named locks held by this session. | SQL · C |
release_lock
| Signature | Purpose | Source definition |
|---|---|---|
mysql.release_lock("any") → bigint | Release a named session lock. | SQL · C |
row_count
| Signature | Purpose | Source definition |
|---|---|---|
mysql.row_count() → bigint | Read the affected-row count for the previous statement. | SQL · C |
schema
| Signature | Purpose | Source definition |
|---|---|---|
mysql.schema() → text | Return the MySQL database selected in this session. | SQL · C |
session_user
| Signature | Purpose | Source definition |
|---|---|---|
mysql."session_user"() → text | Session role and client host. | SQL · C |
sleep
| Signature | Purpose | Source definition |
|---|---|---|
mysql.sleep(seconds numeric) → character varying | Wait for the requested number of seconds. | SQL |
user
| Signature | Purpose | Source definition |
|---|---|---|
mysql."user"() → text | Return PostgreSQL current_user as text. | SQL |
uuid
| Signature | Purpose | Source definition |
|---|---|---|
mysql.uuid() → text | Generate a UUID. | SQL |
uuid_short
| Signature | Purpose | Source definition |
|---|---|---|
mysql.uuid_short() → text | Generate a short MySQL-style identifier. | SQL · C |
version
| Signature | Purpose | Source definition |
|---|---|---|
mysql.version() → text | Return the advertised MySQL server version. | SQL · C |
2.2.5.6 - Type conversion helpers
Internal routines used by casts, coercion and expression rewriting.
B
C
H
I
| Signature | Purpose | Source definition |
|---|---|---|
mysql."interval"(text, integer) → interval | Convert text to interval. | SQL · C |
S
| Signature | Purpose | Source definition |
|---|---|---|
mysql.str_to_double(text) → double precision | Parse a string as a floating-point value. | SQL |
T
| Signature | Purpose | Source definition |
|---|---|---|
mysql.time_to_timestamp(time without time zone) → timestamp without time zone | Convert time without time zone to timestamp without time zone. | SQL |
V
2.2.5.7 - Comparison operator functions
Internal entry points behind equality and ordering comparisons.
A
| Signature | Purpose | Source definition |
|---|---|---|
mysql.anycompatibleeqbytea(anycompatible, bytea) → boolean | Implements = (equal). | SQL · C |
mysql.anycompatiblegebytea(anycompatible, bytea) → boolean | Implements >= (greater than or equal). | SQL · C |
mysql.anycompatiblegtbytea(anycompatible, bytea) → boolean | Implements > (greater than). | SQL · C |
mysql.anycompatiblelebytea(anycompatible, bytea) → boolean | Implements <= (less than or equal). | SQL · C |
mysql.anycompatibleltbytea(anycompatible, bytea) → boolean | Implements < (less than). | SQL · C |
mysql.anycompatiblenebytea(anycompatible, bytea) → boolean | Implements <> (not equal). | SQL · C |
B
C
| Signature | Purpose | Source definition |
|---|---|---|
mysql.char_eq_char_for_date_format(character, character) → boolean | Implements =# (compare format-specifier characters). | SQL · C |
D
| Signature | Purpose | Source definition |
|---|---|---|
mysql.date_eq_text(date, text) → boolean | Implements = (equal). | SQL |
mysql.date_ge_text(date, text) → boolean | Implements >= (greater than or equal). | SQL |
mysql.date_gt_text(date, text) → boolean | Implements > (greater than). | SQL |
mysql.date_le_text(date, text) → boolean | Implements <= (less than or equal). | SQL |
mysql.date_lt_text(date, text) → boolean | Implements < (less than). | SQL |
mysql.date_ne_text(date, text) → boolean | Implements <> (not equal). | SQL |
mysql.dateeqtext(date, text) → boolean | Test equality after converting the operands. | SQL |
mysql.datenetext(date, text) → boolean | Test inequality after converting the operands. | SQL |
F
| Signature | Purpose | Source definition |
|---|---|---|
mysql.float8_eq_hexlit(double precision, mysql.hexlit) → boolean | Implements = (equal). | Generated definition |
mysql.float8_ge_hexlit(double precision, mysql.hexlit) → boolean | Implements >= (greater than or equal). | Generated definition |
mysql.float8_gt_hexlit(double precision, mysql.hexlit) → boolean | Implements > (greater than). | Generated definition |
mysql.float8_le_hexlit(double precision, mysql.hexlit) → boolean | Implements <= (less than or equal). | Generated definition |
mysql.float8_lt_hexlit(double precision, mysql.hexlit) → boolean | Implements < (less than). | Generated definition |
mysql.float8_ne_hexlit(double precision, mysql.hexlit) → boolean | Implements <> (not equal). | Generated definition |
mysql.float8_nseq_hexlit(double precision, mysql.hexlit) → boolean | Implements <=> (null-safe equality). | Generated definition |
H
I
N
S
| Signature | Purpose | Source definition |
|---|---|---|
mysql.smallintbgeqtext(mysql."smallint", text) → boolean | Implements >= (greater than or equal). | SQL |
mysql.smallintbgtext(mysql."smallint", text) → boolean | Implements > (greater than). | SQL |
mysql.smallintleeqtext(mysql."smallint", text) → boolean | Implements <= (less than or equal). | SQL |
mysql.smallintletext(mysql."smallint", text) → boolean | Implements < (less than). | SQL |
T
V
2.2.5.8 - Arithmetic operator functions
Internal routines for arithmetic on mixed MySQL operand types.
_
| Signature | Purpose | Source definition |
|---|---|---|
mysql._add_bool(boolean) → smallint | Implements + (unary plus). | SQL |
mysql._add_null(text) → smallint | Implements + (unary plus). | SQL |
mysql._sub_bool(boolean) → smallint | Implements - (unary minus). | SQL |
mysql._sub_null(text) → smallint | Implements - (unary minus). | SQL |
A
| Signature | Purpose | Source definition |
|---|---|---|
mysql.anycompatibledivbytea(anycompatible, bytea) → numeric | Implements / (division). | SQL · C |
mysql.anycompatiblemibytea(anycompatible, bytea) → numeric | Implements - (subtraction). | SQL · C |
mysql.anycompatiblemodbytea(anycompatible, bytea) → numeric | Implements % (remainder). | SQL · C |
mysql.anycompatiblemulbytea(anycompatible, bytea) → numeric | Implements * (multiplication). | SQL · C |
mysql.anycompatibleplbytea(anycompatible, bytea) → numeric | Implements + (addition). | SQL · C |
B
C
| Signature | Purpose | Source definition |
|---|---|---|
mysql.char_add_bigint(character, bigint) → bigint | Implements + (addition). | SQL |
mysql.char_add_char(character, character) → bigint | Implements + (addition). | SQL |
mysql.char_divide_bigint(character, bigint) → bigint | Compute the quotient. | SQL |
mysql.char_divide_char(character, character) → bigint | Compute the quotient. | SQL |
mysql.char_minus_bigint(character, bigint) → bigint | Implements - (subtraction). | SQL |
mysql.char_minus_char(character, character) → bigint | Implements - (subtraction). | SQL |
mysql.char_mod_bigint(character, bigint) → bigint | Implements % (remainder). | SQL |
mysql.char_mod_char(character, character) → bigint | Implements % (remainder). | SQL |
mysql.char_multi_bigint(character, bigint) → bigint | Implements * (multiplication). | SQL |
mysql.char_multi_char(character, character) → bigint | Implements * (multiplication). | SQL |
D
F
| Signature | Purpose | Source definition |
|---|---|---|
mysql.float8_div_hexlit(double precision, mysql.hexlit) → double precision | Implements / (division). | Generated definition |
mysql.float8_mi_hexlit(double precision, mysql.hexlit) → double precision | Implements - (subtraction). | Generated definition |
mysql.float8_mod_hexlit(double precision, mysql.hexlit) → double precision | Implements % (remainder). | Generated definition |
mysql.float8_mul_hexlit(double precision, mysql.hexlit) → double precision | Implements * (multiplication). | Generated definition |
mysql.float8_pl_hexlit(double precision, mysql.hexlit) → double precision | Implements + (addition). | Generated definition |
H
I
M
N
| Signature | Purpose | Source definition |
|---|---|---|
mysql.numeric_div_hexlit(numeric, mysql.hexlit) → numeric | Implements / (division). | Generated definition |
mysql.numeric_mi_hexlit(numeric, mysql.hexlit) → numeric | Implements - (subtraction). | Generated definition |
mysql.numeric_mod_hexlit(numeric, mysql.hexlit) → numeric | Implements % (remainder). | Generated definition |
mysql.numeric_mul_hexlit(numeric, mysql.hexlit) → numeric | Implements * (multiplication). | Generated definition |
mysql.numeric_pl_hexlit(numeric, mysql.hexlit) → numeric | Implements + (addition). | Generated definition |
T
V
2.2.5.9 - Bitwise and logical operator functions
Internal routines for bit operations and truth-value tests.
A
| Signature | Purpose | Source definition |
|---|---|---|
mysql.anycompatibleandbytea(anycompatible, bytea) → bigint | Implements & (bitwise and). | SQL · C |
mysql.anycompatiblecondandbytea(anycompatible, bytea) → boolean | Implements && (logical and). | SQL · C |
mysql.anycompatiblecondorbytea(anycompatible, bytea) → boolean | Implements || (logical or). | SQL · C |
mysql.anycompatiblenonarray_or_text(anycompatiblenonarray, text) → boolean | Implements || (logical or). | SQL |
mysql.anycompatibleorbytea(anycompatible, bytea) → bigint | Implements | (bitwise or). | SQL · C |
mysql.anynonarray_or_text(anynonarray, text) → boolean | Evaluate OR after operand coercion. | SQL |
B
F
| Signature | Purpose | Source definition |
|---|---|---|
mysql.float8_and_hexlit(double precision, mysql.hexlit) → bigint | Implements & (bitwise and). | Generated definition |
mysql.float8_or_hexlit(double precision, mysql.hexlit) → bigint | Implements | (bitwise or). | Generated definition |
mysql.float8_shl_hexlit(double precision, mysql.hexlit) → bigint | Implements << (left shift). | Generated definition |
mysql.float8_shr_hexlit(double precision, mysql.hexlit) → bigint | Implements >> (right shift). | Generated definition |
mysql.float8_xor_hexlit(double precision, mysql.hexlit) → bigint | Implements ^# (bitwise xor). | Generated definition |
H
I
N
T
| Signature | Purpose | Source definition |
|---|---|---|
mysql.text_and_hexlit(text, mysql.hexlit) → bigint | Implements & (bitwise and). | Generated definition |
mysql.text_and_text(text, text) → boolean | Implements && (logical and). | SQL |
mysql.text_or_anycompatiblenonarray(text, anycompatiblenonarray) → boolean | Implements || (logical or). | SQL |
mysql.text_or_anynoarray(text, anynonarray) → boolean | Evaluate OR after operand coercion. | SQL |
mysql.text_or_hexlit(text, mysql.hexlit) → bigint | Implements | (bitwise or). | Generated definition |
mysql.text_or_text(text, text) → boolean | Implements || (logical or). | SQL |
mysql.text_shl_hexlit(text, mysql.hexlit) → bigint | Implements << (left shift). | Generated definition |
mysql.text_shr_hexlit(text, mysql.hexlit) → bigint | Implements >> (right shift). | Generated definition |
mysql.text_xor_hexlit(text, mysql.hexlit) → bigint | Implements ^# (bitwise xor). | Generated definition |
V
| Signature | Purpose | Source definition |
|---|---|---|
mysql.varbit_and_hexlit(bit varying, mysql.hexlit) → bigint | Implements & (bitwise and). | Generated definition |
mysql.varbit_or_hexlit(bit varying, mysql.hexlit) → bigint | Implements | (bitwise or). | Generated definition |
mysql.varbit_shl_hexlit(bit varying, mysql.hexlit) → bigint | Implements << (left shift). | Generated definition |
mysql.varbit_shr_hexlit(bit varying, mysql.hexlit) → bigint | Implements >> (right shift). | Generated definition |
mysql.varbit_xor_hexlit(bit varying, mysql.hexlit) → bigint | Implements ^# (bitwise xor). | Generated definition |
2.2.5.10 - Pattern and JSON operator functions
Internal routines for LIKE, regular expressions and JSON field access.
A
| Signature | Purpose | Source definition |
|---|---|---|
mysql.anycompatiblelikebytea(anycompatible, bytea) → boolean | Implements ~~ (like pattern match). | SQL · C |
mysql.anycompatiblenlikebytea(anycompatible, bytea) → boolean | Implements !~~ (negated like match). | SQL · C |
mysql.anycompatiblenregexpbinbytea(anycompatible, bytea) → boolean | Implements !~ (negated case-sensitive regular expression match). | SQL · C |
mysql.anycompatiblenregexpbytea(anycompatible, bytea) → boolean | Implements !~* (negated case-insensitive regular expression match). | SQL · C |
mysql.anycompatibleregexpbinbytea(anycompatible, bytea) → boolean | Implements ~ (case-sensitive regular expression match). | SQL · C |
mysql.anycompatibleregexpbytea(anycompatible, bytea) → boolean | Implements ~* (case-insensitive regular expression match). | SQL · C |
B
H
| Signature | Purpose | Source definition |
|---|---|---|
mysql.hexlit_like(mysql.hexlit, mysql.hexlit) → boolean | Implements ~~ (like pattern match). | Generated definition |
mysql.hexlit_like_bytea(mysql.hexlit, bytea) → boolean | Implements ~~ (like pattern match). | Generated definition |
mysql.hexlit_like_text(mysql.hexlit, text) → boolean | Implements ~~ (like pattern match). | Generated definition |
mysql.hexlit_nlike(mysql.hexlit, mysql.hexlit) → boolean | Implements !~~ (negated like match). | Generated definition |
mysql.hexlit_nlike_bytea(mysql.hexlit, bytea) → boolean | Implements !~~ (negated like match). | Generated definition |
mysql.hexlit_nlike_text(mysql.hexlit, text) → boolean | Implements !~~ (negated like match). | Generated definition |
J
| Signature | Purpose | Source definition |
|---|---|---|
mysql.json_object_field(from_json json, field_name text) → json | Implements -> (extract a json field by name). | SQL |
P
| Signature | Purpose | Source definition |
|---|---|---|
mysql.prefix_like(character, text) → boolean | Implements | SQL · C |
mysql.prefix_like(text, text) → boolean | Implements | SQL · C |
mysql.prefix_not_like(character, text) → boolean | Implements ! | SQL · C |
mysql.prefix_not_like(text, text) → boolean | Implements ! | SQL · C |
R
| Signature | Purpose | Source definition |
|---|---|---|
mysql.regular_expr(bigint, text) → boolean | Implements ~* (case-insensitive regular expression match). | SQL |
mysql.regular_expr_not(bigint, text) → boolean | Implements !~* (negated case-insensitive regular expression match). | SQL |
T
| Signature | Purpose | Source definition |
|---|---|---|
mysql.text_like_bigint(text, bigint) → boolean | Implements ~~ (like pattern match). | SQL |
mysql.text_like_hexlit(text, mysql.hexlit) → boolean | Implements ~~ (like pattern match). | Generated definition |
mysql.text_nlike_hexlit(text, mysql.hexlit) → boolean | Implements !~~ (negated like match). | Generated definition |
mysql.text_not_like_bigint(text, bigint) → boolean | Implements !~~ (negated like match). | SQL |
2.2.5.11 - String and number helpers
Internal routines used by string searches, validation and rounding.
C
| Signature | Purpose | Source definition |
|---|---|---|
mysql.ceil_for_mysql(text) → bigint | Round a number parsed from text up to an integer. | SQL · C |
mysql.check_set(text, text) → boolean | Check a value against a SET definition. | SQL · C |
F
| Signature | Purpose | Source definition |
|---|---|---|
mysql.floor_for_mysql(text) → bigint | Round a number parsed from text down to an integer. | SQL · C |
I
| Signature | Purpose | Source definition |
|---|---|---|
mysql.is_numeric(text) → boolean | Validate the numeric representation. | SQL |
mysql.is_valid_binary(text) → boolean | Validate the numeric representation. | SQL · C |
mysql.is_valid_hex(text) → boolean | Validate the numeric representation. | SQL · C |
T
| Signature | Purpose | Source definition |
|---|---|---|
mysql.text_instr(text, text) → integer | Find a substring for LOCATE or INSTR. | SQL · C |
mysql.text_locate2(text, text) → integer | Find a substring for LOCATE or INSTR. | SQL · C |
mysql.text_locate3(text, text, bigint) → integer | Find a substring for LOCATE or INSTR. | SQL · C |
2.2.5.12 - Temporal conversion helpers
Internal routines for date normalization, week modes and numeric date arithmetic.
_
C
| Signature | Purpose | Source definition |
|---|---|---|
mysql.convert_to_time_format(text) → interval | Normalize date/time input for conversion to interval. | SQL |
mysql.curdate_add(integer) → integer | Apply integer arithmetic to today’s YYYYMMDD value. | SQL |
mysql.curdate_sub(integer) → integer | Apply integer arithmetic to today’s YYYYMMDD value. | SQL |
N
| Signature | Purpose | Source definition |
|---|---|---|
mysql.numeric_timestamp(numeric) → timestamp without time zone | Normalize date/time input for conversion to timestamp without time zone. | SQL |
Function names in r4
Installation snapshot (0d51adc) | r4 source (1e631f9) |
|---|---|
mysql._convert_format_to_halo_for_number_datetime | mysql._normalize_numeric_datetime |
mysql._convert_format_to_halo_for_string_datetime | mysql._normalize_datetime_text |
mysql._convert_format_to_halo_for_string_number_datetime | mysql._normalize_compact_datetime_text |
mysql._convert_format_to_halo_for_string_string_datetime | mysql._normalize_delimited_datetime_text |
2.2.5.13 - Binary and string storage helpers
Internal routines for type I/O, binary expression evaluation and string results.
A
B
| Signature | Purpose | Source definition |
|---|---|---|
mysql.binary_n_in(cstring, oid, integer) → mysql.binary_n | Read the text format of a binary value. | Generated definition · C |
mysql.binary_n_out(mysql.binary_n) → cstring | Write the text format of a binary value. | Generated definition |
mysql.binary_n_recv(internal, oid, integer) → mysql.binary_n | Receive the PostgreSQL binary representation. | Generated definition · C |
mysql.binary_n_send(mysql.binary_n) → bytea | Send the PostgreSQL binary representation. | Generated definition |
mysql.binary_n_typmodin(cstring[]) → integer | Parse the declared length modifier. | Generated definition · C |
mysql.binary_n_typmodout(integer) → cstring | Format the length modifier. | Generated definition · C |
mysql.binary_truth("any") → boolean | Evaluate the truth value of a binary or string operand. | SQL · C |
C
| Signature | Purpose | Source definition |
|---|---|---|
mysql.cast_char("any", integer) → text | Convert an expression to the requested character representation. | SQL · C |
mysql.concat_one("any") → text | Combine string operands for CONCAT or CONCAT_WS while preserving binary results. | SQL · C |
mysql.concat_one(bytea) → bytea | Combine string operands for CONCAT or CONCAT_WS while preserving binary results. | Generated definition · C |
mysql.concat_one(character) → text | Combine string operands for CONCAT or CONCAT_WS while preserving binary results. | SQL · C |
mysql.concat_one(mysql.binary_n) → bytea | Combine string operands for CONCAT or CONCAT_WS while preserving binary results. | Generated definition · C |
mysql.concat_one(mysql.hexlit) → bytea | Combine string operands for CONCAT or CONCAT_WS while preserving binary results. | Generated definition · C |
mysql.concat_one(mysql.varbinary_n) → bytea | Combine string operands for CONCAT or CONCAT_WS while preserving binary results. | Generated definition · C |
mysql.concat_one(text) → text | Combine string operands for CONCAT or CONCAT_WS while preserving binary results. | Generated definition · C |
mysql.concat_pair(bytea, bytea) → bytea | Combine string operands for CONCAT or CONCAT_WS while preserving binary results. | Generated definition |
mysql.concat_pair(bytea, text) → bytea | Combine string operands for CONCAT or CONCAT_WS while preserving binary results. | Generated definition |
mysql.concat_pair(text, bytea) → bytea | Combine string operands for CONCAT or CONCAT_WS while preserving binary results. | Generated definition |
mysql.concat_pair(text, text) → text | Combine string operands for CONCAT or CONCAT_WS while preserving binary results. | Generated definition |
mysql.concat_ws_bytes(VARIADIC "any") → bytea | Combine string operands for CONCAT or CONCAT_WS while preserving binary results. | SQL · C |
mysql.convert_using("any", text) → text | Convert an expression to the requested character representation. | SQL · C |
E
| Signature | Purpose | Source definition |
|---|---|---|
mysql.elt_index("any") → integer | Convert the selector for ELT into a position. | SQL · C |
H
| Signature | Purpose | Source definition |
|---|---|---|
mysql.hexlit_cmp_support(internal) → internal | Provide planner support for comparisons with a hex literal. | SQL · C |
mysql.hexlit_in(cstring) → mysql.hexlit | Read the text format of a binary value. | SQL |
mysql.hexlit_out(mysql.hexlit) → cstring | Write the text format of a binary value. | SQL |
mysql.hexlit_recv(internal) → mysql.hexlit | Receive the PostgreSQL binary representation. | SQL |
mysql.hexlit_send(mysql.hexlit) → bytea | Send the PostgreSQL binary representation. | SQL |
M
| Signature | Purpose | Source definition |
|---|---|---|
mysql.mys_uint64_bitnot(numeric) → numeric | Evaluate a MySQL unsigned 64-bit bitwise expression. | SQL · C |
mysql.mys_uint64_bitop(numeric, numeric, "char") → bigint | Evaluate a MySQL unsigned 64-bit bitwise expression. | SQL · C |
R
| Signature | Purpose | Source definition |
|---|---|---|
mysql.raw_bytes("any") → bytea | Extract the underlying bytes of the value. | SQL · C |
S
| Signature | Purpose | Source definition |
|---|---|---|
mysql.string_result(anyelement, "any") → anyelement | Produce the string result of a rewritten expression. | SQL · C |
V
| Signature | Purpose | Source definition |
|---|---|---|
mysql.varbinary_n_in(cstring, oid, integer) → mysql.varbinary_n | Read the text format of a binary value. | Generated definition · C |
mysql.varbinary_n_out(mysql.varbinary_n) → cstring | Write the text format of a binary value. | Generated definition |
mysql.varbinary_n_recv(internal, oid, integer) → mysql.varbinary_n | Receive the PostgreSQL binary representation. | Generated definition · C |
mysql.varbinary_n_send(mysql.varbinary_n) → bytea | Send the PostgreSQL binary representation. | Generated definition |
mysql.varbinary_n_typmodin(cstring[]) → integer | Parse the declared length modifier. | Generated definition · C |
mysql.varbinary_n_typmodout(integer) → cstring | Format the length modifier. | Generated definition · C |
2.2.5.14 - Aggregate support functions
Internal transition and final functions invoked while computing an aggregate.
B
| Signature | Purpose | Source definition |
|---|---|---|
mysql.bit_and_varbit(bigint, bit varying) → bigint | Accumulate the next input into the aggregate state. | SQL |
mysql.bit_and_varbit_final(bigint) → bigint | Finalize the aggregate state. | SQL |
mysql.bit_or_varbit(bigint, bit varying) → bigint | Accumulate the next input into the aggregate state. | SQL |
mysql.bit_or_varbit_final(bigint) → bigint | Finalize the aggregate state. | SQL |
mysql.bit_xor_varbit(bigint, bit varying) → bigint | Accumulate the next input into the aggregate state. | SQL |
mysql.bit_xor_varbit_final(bigint) → bigint | Finalize the aggregate state. | SQL |
D
| Signature | Purpose | Source definition |
|---|---|---|
mysql.dummy_min_finalfunc_for_bytea(bytea) → bytea | Finalize the aggregate state. | SQL |
mysql.dummy_min_sfunc_for_bytea(bytea, bytea) → bytea | Accumulate the next input into the aggregate state. | SQL |
S
| Signature | Purpose | Source definition |
|---|---|---|
mysql.sum_bool(bigint, boolean) → bigint | Accumulate the next input into the aggregate state. | SQL |
mysql.sum_text(numeric, text) → numeric | Accumulate the next input into the aggregate state. | SQL |
mysql.sum_text_final(numeric) → numeric | Finalize the aggregate state. | SQL |
T
| Signature | Purpose | Source definition |
|---|---|---|
mysql.text_avg_accum(internal, text) → internal | Accumulate the next input into the aggregate state. | SQL · C |
2.2.5.15 - Index support functions
Internal functions for index access, key comparison, hashing and operator-class registration.
B
| Signature | Purpose | Source definition |
|---|---|---|
mysql.binary_n_cmp(mysql.binary_n, mysql.binary_n) → integer | Compare binary keys in B-tree order. | Generated definition |
mysql.binary_n_cmp_bytea(mysql.binary_n, bytea) → integer | Compare binary keys in B-tree order. | Generated definition |
mysql.binary_n_cmp_varbinary_n(mysql.binary_n, mysql.varbinary_n) → integer | Compare binary keys in B-tree order. | Generated definition |
mysql.binary_n_hash(mysql.binary_n) → integer | Hash the binary key for a hash index. | Generated definition |
mysql.binary_n_hash_extended(mysql.binary_n, bigint) → bigint | Hash the binary key for a hash index. | Generated definition |
mysql.bytea_cmp_binary_n(bytea, mysql.binary_n) → integer | Compare binary keys in B-tree order. | Generated definition |
mysql.bytea_cmp_varbinary_n(bytea, mysql.varbinary_n) → integer | Compare binary keys in B-tree order. | Generated definition |
H
| Signature | Purpose | Source definition |
|---|---|---|
mysql.hexlit_cmp(mysql.hexlit, mysql.hexlit) → integer | Compare binary keys in B-tree order. | SQL |
mysql.hexlit_hash(mysql.hexlit) → integer | Hash the binary key for a hash index. | SQL |
mysql.hexlit_hash_extended(mysql.hexlit, bigint) → bigint | Hash the binary key for a hash index. | SQL |
P
| Signature | Purpose | Source definition |
|---|---|---|
mysql.prefix_1042_cmp(character, character) → integer | Compare two keys for a mysql_prefix index. | Generated definition · C |
mysql.prefix_17_cmp(bytea, bytea) → integer | Compare two keys for a mysql_prefix index. | Generated definition · C |
mysql.prefix_25_cmp(text, text) → integer | Compare two keys for a mysql_prefix index. | Generated definition · C |
mysql.prefix_53875699983efc79eeb9e023e66605f5_cmp(mysql.binary_n, mysql.binary_n) → integer | Compare two keys for a mysql_prefix index. | Generated definition · C |
mysql.prefix_b8aba7e65857eaf6a91ca737fb14b87b_cmp(mysql.varbinary_n, mysql.varbinary_n) → integer | Compare two keys for a mysql_prefix index. | Generated definition · C |
mysql.prefix_handler(internal) → index_am_handler | Supply the mysql_prefix access method callbacks. | SQL · C |
mysql.prefix_options(internal) → void | Declare index operator-class options for prefix keys. | SQL · C |
R
| Signature | Purpose | Source definition |
|---|---|---|
mysql.register_prefix_binary(t regtype) → void | Register prefix-index support for a type. EXECUTE is restricted. | SQL |
mysql.register_prefix_type(t regtype, string_storage boolean) → void | Register prefix-index support for a type. EXECUTE is restricted. | SQL |
V
| Signature | Purpose | Source definition |
|---|---|---|
mysql.varbinary_n_cmp(mysql.varbinary_n, mysql.varbinary_n) → integer | Compare binary keys in B-tree order. | Generated definition |
mysql.varbinary_n_cmp_binary_n(mysql.varbinary_n, mysql.binary_n) → integer | Compare binary keys in B-tree order. | Generated definition |
mysql.varbinary_n_cmp_bytea(mysql.varbinary_n, bytea) → integer | Compare binary keys in B-tree order. | Generated definition |
mysql.varbinary_n_hash(mysql.varbinary_n) → integer | Hash the binary key for a hash index. | Generated definition |
mysql.varbinary_n_hash_extended(mysql.varbinary_n, bigint) → bigint | Hash the binary key for a hash index. | Generated definition |
2.2.5.16 - Session state and variable helpers
Internal interfaces behind SET, SHOW, user variables and authentication cache management.
C
| Signature | Purpose | Source definition |
|---|---|---|
mysql.clear_user_variables() → void | Clear the session’s user variables. | SQL · C |
F
| Signature | Purpose | Source definition |
|---|---|---|
mysql.flush_auth_cache() → bigint | Clear the fast-authentication cache. EXECUTE is restricted. | SQL · C |
G
| Signature | Purpose | Source definition |
|---|---|---|
mysql.get_system_global_variable(text) → text | Read a global @@ variable. | SQL |
mysql.get_system_session_variable(text) → text | Read a session @@ variable. | SQL |
mysql.get_system_variable(text, boolean) → text | Resolve a system variable for its requested scope. | SQL · C |
mysql.get_user_var(variable_name character varying) → bytea | Read a MySQL @user variable. | SQL · C |
mysql.getenv(text) → text | Read a server environment variable for installation. EXECUTE is restricted. | SQL · C |
S
2.2.5.17 - DDL and write helpers
Internal routines invoked by column expressions, sequences and row triggers.
auto_increment_advance
| Signature | Purpose | Source definition |
|---|---|---|
mysql.auto_increment_advance() → trigger | Advance the sequence after an explicit AUTO_INCREMENT value. | SQL · C |
column_default
| Signature | Purpose | Source definition |
|---|---|---|
mysql.column_default(oid, integer) → text | Read a column’s default expression. | SQL · C |
generated_column
| Signature | Purpose | Source definition |
|---|---|---|
mysql.generated_column(text, anyelement) → anyelement | Carry a generated-column value through a rewritten expression. | SQL |
generated_numeric
| Signature | Purpose | Source definition |
|---|---|---|
mysql.generated_numeric(numeric, integer) → numeric | Apply the declared type modifier to a generated value. | SQL · C |
generated_value
| Signature | Purpose | Source definition |
|---|---|---|
mysql.generated_value(anyelement) → anyelement | Carry a generated-column value through a rewritten expression. | SQL |
generated_varchar
| Signature | Purpose | Source definition |
|---|---|---|
mysql.generated_varchar(text, integer, boolean) → text | Apply the declared type modifier to a generated value. | SQL · C |
lenient_float8
| Signature | Purpose | Source definition |
|---|---|---|
mysql.lenient_float8(text) → double precision | Coerce a value for a non-strict INSERT or UPDATE. | SQL · C |
lenient_int
| Signature | Purpose | Source definition |
|---|---|---|
mysql.lenient_int(text, bigint, bigint) → bigint | Coerce a value for a non-strict INSERT or UPDATE. | SQL · C |
lenient_numeric
| Signature | Purpose | Source definition |
|---|---|---|
mysql.lenient_numeric(text, integer) → numeric | Coerce a value for a non-strict INSERT or UPDATE. | SQL · C |
lenient_varchar
| Signature | Purpose | Source definition |
|---|---|---|
mysql.lenient_varchar(text, integer) → text | Coerce a value for a non-strict INSERT or UPDATE. | SQL · C |
on_update_current_timestamp
| Signature | Purpose | Source definition |
|---|---|---|
mysql.on_update_current_timestamp() → trigger | Update timestamp columns from a row trigger. | SQL · C |
part_list_columns
| Signature | Purpose | Source definition |
|---|---|---|
mysql.part_list_columns(VARIADIC "any") → text | Build a list-partition column key. | SQL · C |
pending_fk_definitions
| Signature | Purpose | Source definition |
|---|---|---|
mysql.pending_fk_definitions(oid) → SETOF text | Format deferred foreign key definitions for a child relation. | SQL |
pending_fk_guard
| Signature | Purpose | Source definition |
|---|---|---|
mysql.pending_fk_guard() → trigger | Run the trigger for a pending foreign key. | SQL · C |
setval
| Signature | Purpose | Source definition |
|---|---|---|
mysql.setval(regclass, bigint, boolean) → bigint | Set a sequence value and its called flag. | SQL · C |
2.2.5.18 - SHOW and metadata helpers
Internal routines that format catalog values and construct result sets for MySQL clients.
amend_def_val
| Signature | Purpose | Source definition |
|---|---|---|
mysql.amend_def_val(text) → text | Format a PostgreSQL default expression for MySQL metadata. | SQL |
amend_def_val_for_internal
| Signature | Purpose | Source definition |
|---|---|---|
mysql.amend_def_val_for_internal(text) → text | Format a PostgreSQL default expression for MySQL metadata. | SQL |
column_domain
| Signature | Purpose | Source definition |
|---|---|---|
mysql.column_domain(oid, integer) → oid | Find the declared domain for a column. | SQL |
column_extra
| Signature | Purpose | Source definition |
|---|---|---|
mysql.column_extra(oid, integer) → text | Build the Extra field in column metadata. | SQL · C |
column_generation
| Signature | Purpose | Source definition |
|---|---|---|
mysql.column_generation(oid, integer) → text | Read the generation expression for a column. | SQL · C |
decimal_column_type
| Signature | Purpose | Source definition |
|---|---|---|
mysql.decimal_column_type(integer) → text | Decode DECIMAL precision and scale from a type modifier. | SQL · C |
decimal_ps
| Signature | Purpose | Source definition |
|---|---|---|
mysql.decimal_ps(integer) → integer[] | Decode DECIMAL precision and scale from a type modifier. | SQL |
get_column_extra
| Signature | Purpose | Source definition |
|---|---|---|
mysql.get_column_extra(text) → text | Build the Extra field in column metadata. | SQL |
get_column_key
| Signature | Purpose | Source definition |
|---|---|---|
mysql.get_column_key(oid, text) → text | Classify the index key for a column. | SQL |
mysql.get_column_key(text, text, text) → text | Classify the index key for a column. | SQL |
get_func_def
| Signature | Purpose | Source definition |
|---|---|---|
mysql.get_func_def(funcname text, procowner text, prorettype oid, proargtypes oidvector, proargnames text[], prosrc text) → text | Reconstruct a routine definition from its catalog fields. | SQL |
get_funcs_procs_parameters
| Signature | Purpose | Source definition |
|---|---|---|
mysql.get_funcs_procs_parameters() → SETOF record | List routine parameters for metadata clients. | SQL |
get_mysql_proc_arg_mode
| Signature | Purpose | Source definition |
|---|---|---|
mysql.get_mysql_proc_arg_mode(text) → text | Translate a PostgreSQL argument mode into a MySQL mode. | SQL |
get_mysql_type_name
| Signature | Purpose | Source definition |
|---|---|---|
mysql.get_mysql_type_name(oid) → text | Map a catalog type to its MySQL display name. | SQL |
get_proc_def
| Signature | Purpose | Source definition |
|---|---|---|
mysql.get_proc_def(funcname text, proallargtypes oid[], proargmodes "char"[], proargnames text[], prosrc text) → text | Reconstruct a routine definition from its catalog fields. | SQL |
mysql.get_proc_def(procname text, procowner text, proargtypes oidvector, proallargtypes oid[], proargmodes "char"[], proargnames text[], prosrc text) → text | Reconstruct a routine definition from its catalog fields. | SQL |
get_seq_in_index
| Signature | Purpose | Source definition |
|---|---|---|
mysql.get_seq_in_index(text, int2vector) → smallint | Find a column’s ordinal position in an index. | SQL |
index_key_name
| Signature | Purpose | Source definition |
|---|---|---|
mysql.index_key_name(oid) → text | Expose the MySQL index name or its key parts for SHOW INDEX. | SQL · C |
index_key_parts
| Signature | Purpose | Source definition |
|---|---|---|
mysql.index_key_parts(oid, OUT seq integer, OUT column_name text, OUT sub_part integer) → SETOF record | Expose the MySQL index name or its key parts for SHOW INDEX. | SQL · C |
show_create_function
| Signature | Purpose | Source definition |
|---|---|---|
mysql.show_create_function(text, text) → SETOF record | Construct the definition displayed by SHOW CREATE. | SQL |
show_create_procedure
| Signature | Purpose | Source definition |
|---|---|---|
mysql.show_create_procedure(text, text) → SETOF record | Construct the definition displayed by SHOW CREATE. | SQL |
show_create_table
| Signature | Purpose | Source definition |
|---|---|---|
mysql.show_create_table(text, text) → text | Construct the definition displayed by SHOW CREATE. | SQL |
show_create_table_impl
| Signature | Purpose | Source definition |
|---|---|---|
mysql.show_create_table_impl(oid, oid, text, text) → text | Construct the definition displayed by SHOW CREATE. | SQL |
show_create_trigger
show_create_view
| Signature | Purpose | Source definition |
|---|---|---|
mysql.show_create_view(text, text) → text | Construct the definition displayed by SHOW CREATE. | SQL |
show_create_view_impl
| Signature | Purpose | Source definition |
|---|---|---|
mysql.show_create_view_impl(text, text) → text | Construct the definition displayed by SHOW CREATE. | SQL · C |
show_diagnostics
| Signature | Purpose | Source definition |
|---|---|---|
mysql.show_diagnostics(boolean) → TABLE("Level" text, "Code" integer, "Message" text) | Return the session diagnostics used by SHOW WARNINGS or SHOW ERRORS. | SQL · C |
show_table_columns
| Signature | Purpose | Source definition |
|---|---|---|
mysql.show_table_columns(text, text) → SETOF record | Build the rows for SHOW COLUMNS. | SQL |
show_table_full_columns
| Signature | Purpose | Source definition |
|---|---|---|
mysql.show_table_full_columns(text, text) → SETOF record | Build the rows for SHOW COLUMNS. | SQL |
show_table_indexs
| Signature | Purpose | Source definition |
|---|---|---|
mysql.show_table_indexs(text, text) → SETOF record | Build the rows for SHOW INDEX. | SQL |
show_table_indexs_for_8
| Signature | Purpose | Source definition |
|---|---|---|
mysql.show_table_indexs_for_8(text, text) → SETOF record | Build the rows for SHOW INDEX. | SQL |
2.2.6 - Aggregates
SQL aggregates, their input types and the result produced for a group.
| Signature | Purpose | Source definition |
|---|---|---|
mysql.avg(text) → numeric | Average numeric values read from text. | SQL |
mysql.bit_and(bit varying) → bigint | Combine inputs with bitwise AND. | SQL |
mysql.bit_or(bit varying) → bigint | Combine inputs with bitwise OR. | SQL |
mysql.bit_xor(bit varying) → bigint | Combine inputs with bitwise XOR. | SQL |
mysql.dummy_min_for_bytea(bytea) → bytea | Internal aggregate that retains the input passed to its transition function. | SQL |
mysql.sum(boolean) → bigint | Sum the converted inputs. | SQL |
mysql.sum(text) → numeric | Sum the converted inputs. | SQL |
2.2.7 - Operators
Match the symbol and both operand types. NONE in the left slot denotes a unary prefix operator.
The spelling is the PostgreSQL catalog symbol. For example, MySQL LIKE resolves to a pattern operator such as ~~.
Arithmetic
Bitwise and logical
Comparison
Pattern matching and JSON
2.2.8 - Metadata views
Query the MySQL name through the dialect or the PostgreSQL name from psql. SHOW helpers and the pending foreign key view are identified by their purpose.
mys_informa_schema
| PostgreSQL object | MySQL name | Purpose | Source definition |
|---|---|---|---|
mys_informa_schema.columns | information_schema.columns | Column order, data types, defaults, keys and generated expressions. | SQL |
mys_informa_schema.empty_global_variables | information_schema.empty_global_variables | Global system variable names and values for SHOW GLOBAL VARIABLES. | SQL |
mys_informa_schema.empty_session_variables | information_schema.empty_session_variables | Session system variable names and values for SHOW VARIABLES. | SQL |
mys_informa_schema.functions | information_schema.functions | Routine names and attributes for SHOW FUNCTION or PROCEDURE STATUS. | SQL |
mys_informa_schema.indexs | information_schema.indexs | Index columns and constraint keys in the shape expected by SHOW. | SQL |
mys_informa_schema.key_column_usage | information_schema.key_column_usage | Columns participating in keys, including referenced foreign-key columns. | SQL |
mys_informa_schema.parameters | information_schema.parameters | Positional and named routine parameters with their SQL types. | SQL |
mys_informa_schema.partitions | information_schema.partitions | Partition names, partitioning methods and catalog estimates. | SQL |
mys_informa_schema.procedures | information_schema.procedures | Routine names and attributes for SHOW FUNCTION or PROCEDURE STATUS. | SQL |
mys_informa_schema.referential_constraints | information_schema.referential_constraints | Foreign keys, referenced tables and referential actions. | SQL |
mys_informa_schema.routines | information_schema.routines | Procedure and function metadata derived from pg_proc. | SQL |
mys_informa_schema.schemata | information_schema.schemata | Database names derived from PostgreSQL namespaces. | SQL |
mys_informa_schema.statistics | information_schema.statistics | One row per index key part, including its ordinal and prefix length. | SQL |
mys_informa_schema.table_constraints | information_schema.table_constraints | Constraint names and kinds for each table. | SQL |
mys_informa_schema.tables | information_schema.tables | Table and view names and their MySQL table types. | SQL |
mys_informa_schema.triggers | information_schema.triggers | Trigger names, event timing and action metadata. | SQL |
mys_informa_schema.views | information_schema.views | View names and MySQL-compatible view attributes. | SQL |
mysql
| PostgreSQL object | MySQL name | Purpose | Source definition |
|---|---|---|---|
mysql.dual | mysql.dual | Single dummy row for expressions queried FROM DUAL. | SQL |
mysql.pending_foreign_keys | mysql.pending_foreign_keys | Deferred foreign-key definitions awaiting their referenced tables. | SQL |
mysql.proc | mysql.proc | Procedure and function metadata derived from pg_proc. | SQL |
2.2.9 - Metadata tables
These physical tables provide compatibility metadata. Seed counts describe a fresh install. Performance Schema tables start empty.
Column names below are examples of the fields available. Seed links open the statements for that table.
mys_informa_schema
| PostgreSQL object | MySQL name | Purpose | Source definition |
|---|---|---|---|
mys_informa_schema.administrable_role_authorizations | information_schema.administrable_role_authorizations | Role grants and their enabled or grantable status. Empty on installation. Fields include user, host, grantee. | SQL |
mys_informa_schema.applicable_roles | information_schema.applicable_roles | Role grants and their enabled or grantable status. Empty on installation. Fields include user, host, grantee. | SQL |
mys_informa_schema.base_variables | information_schema.base_variables | Definitions, scope and default values for MySQL system variables. 198 seed rows. Fields include variable_name, def_value, conf_value. | SQL · Seeds |
mys_informa_schema.character_sets | information_schema.character_sets | Character set names, descriptions and default collations. 41 seed rows. Fields include character_set_name, default_collate_name, description. | SQL · Seeds |
mys_informa_schema.charsets | information_schema.charsets | Character set names, descriptions and default collations. 1 seed rows. Fields include charset, description, default collation. | SQL · Seeds |
mys_informa_schema.check_constraints | information_schema.check_constraints | Check constraint names and predicates. Empty on installation. Fields include constraint_catalog, constraint_schema, constraint_name. | SQL |
mys_informa_schema.collation_character_set_applicability | information_schema.collation_character_set_applicability | Character set associated with each collation. 286 seed rows. Fields include collation_name, character_set_name. | SQL · Seeds |
mys_informa_schema.collations | information_schema.collations | Collation names, identifiers and character sets. 286 seed rows. Fields include collation_name, character_set_name, id. | SQL · Seeds |
mys_informa_schema.column_privileges | information_schema.column_privileges | Compatibility fields for column privileges. Empty on installation. Fields include grantee, table_catalog, table_schema. | SQL |
mys_informa_schema.column_statistics | information_schema.column_statistics | Compatibility fields for column statistics. Empty on installation. Fields include schema_name, table_name, column_name. | SQL |
mys_informa_schema.columns_extensions | information_schema.columns_extensions | Extended metadata fields for the named catalog objects. 3,576 seed rows. Fields include table_catalog, table_schema, table_name. | SQL · Seeds |
mys_informa_schema.enabled_roles | information_schema.enabled_roles | Role grants and their enabled or grantable status. Empty on installation. Fields include role_name, role_host, is_default. | SQL |
mys_informa_schema.engines | information_schema.engines | Storage engine names and reported compatibility capabilities. 9 seed rows. Fields include engine, support, comment. | SQL · Seeds |
mys_informa_schema.events | information_schema.events | Compatibility fields for events. Empty on installation. Fields include event_catalog, event_schema, event_name. | SQL |
mys_informa_schema.files | information_schema.files | Compatibility fields for files. Empty on installation. Fields include file_id, file_name, file_type. | SQL |
mys_informa_schema.innodb_buffer_page | information_schema.innodb_buffer_page | InnoDB metadata for buffer page. Empty on installation. Fields include pool_id, block_id, space. | SQL |
mys_informa_schema.innodb_buffer_page_lru | information_schema.innodb_buffer_page_lru | InnoDB metadata for buffer page lru. Empty on installation. Fields include pool_id, lru_position, space. | SQL |
mys_informa_schema.innodb_buffer_pool_stats | information_schema.innodb_buffer_pool_stats | InnoDB metadata for buffer pool stats. Empty on installation. Fields include pool_id, pool_size, free_buffers. | SQL |
mys_informa_schema.innodb_cached_indexes | information_schema.innodb_cached_indexes | InnoDB metadata for cached indexes. Empty on installation. Fields include space_id, index_id, n_cached_pages. | SQL |
mys_informa_schema.innodb_cmp | information_schema.innodb_cmp | InnoDB metadata for cmp. Empty on installation. Fields include page_size, compress_ops, compress_ops_ok. | SQL |
mys_informa_schema.innodb_cmp_per_index | information_schema.innodb_cmp_per_index | InnoDB metadata for cmp per index. Empty on installation. Fields include database_name, table_name, index_name. | SQL |
mys_informa_schema.innodb_cmp_per_index_reset | information_schema.innodb_cmp_per_index_reset | InnoDB metadata for cmp per index reset. Empty on installation. Fields include database_name, table_name, index_name. | SQL |
mys_informa_schema.innodb_cmp_reset | information_schema.innodb_cmp_reset | InnoDB metadata for cmp reset. Empty on installation. Fields include page_size, compress_ops, compress_ops_ok. | SQL |
mys_informa_schema.innodb_cmpmem | information_schema.innodb_cmpmem | InnoDB metadata for cmpmem. Empty on installation. Fields include page_size, buffer_pool_instance, pages_used. | SQL |
mys_informa_schema.innodb_cmpmem_reset | information_schema.innodb_cmpmem_reset | InnoDB metadata for cmpmem reset. Empty on installation. Fields include page_size, buffer_pool_instance, pages_used. | SQL |
mys_informa_schema.innodb_columns | information_schema.innodb_columns | InnoDB metadata for columns. Empty on installation. Fields include table_id, name, pos. | SQL |
mys_informa_schema.innodb_datafiles | information_schema.innodb_datafiles | InnoDB metadata for datafiles. Empty on installation. Fields include space, path. | SQL |
mys_informa_schema.innodb_fields | information_schema.innodb_fields | InnoDB metadata for fields. Empty on installation. Fields include index_id, name, pos. | SQL |
mys_informa_schema.innodb_foreign | information_schema.innodb_foreign | InnoDB metadata for foreign. Empty on installation. Fields include id, for_name, ref_name. | SQL |
mys_informa_schema.innodb_foreign_cols | information_schema.innodb_foreign_cols | InnoDB metadata for foreign cols. Empty on installation. Fields include id, for_col_name, ref_col_name. | SQL |
mys_informa_schema.innodb_ft_being_deleted | information_schema.innodb_ft_being_deleted | InnoDB metadata for ft being deleted. Empty on installation. Fields include doc_id. | SQL |
mys_informa_schema.innodb_ft_config | information_schema.innodb_ft_config | InnoDB metadata for ft config. Empty on installation. Fields include key_, value_. | SQL |
mys_informa_schema.innodb_ft_default_stopword | information_schema.innodb_ft_default_stopword | InnoDB metadata for ft default stopword. Empty on installation. Fields include value. | SQL |
mys_informa_schema.innodb_ft_deleted | information_schema.innodb_ft_deleted | InnoDB metadata for ft deleted. Empty on installation. Fields include doc_id. | SQL |
mys_informa_schema.innodb_ft_index_cache | information_schema.innodb_ft_index_cache | InnoDB metadata for ft index cache. Empty on installation. Fields include word, first_doc_id, last_doc_id. | SQL |
mys_informa_schema.innodb_ft_index_table | information_schema.innodb_ft_index_table | InnoDB metadata for ft index table. Empty on installation. Fields include word, first_doc_id, last_doc_id. | SQL |
mys_informa_schema.innodb_indexes | information_schema.innodb_indexes | InnoDB metadata for indexes. Empty on installation. Fields include index_id, name, table_id. | SQL |
mys_informa_schema.innodb_metrics | information_schema.innodb_metrics | InnoDB metadata for metrics. Empty on installation. Fields include name, subsystem, count. | SQL |
mys_informa_schema.innodb_session_temp_tablespaces | information_schema.innodb_session_temp_tablespaces | InnoDB metadata for session temp tablespaces. Empty on installation. Fields include id, space, path. | SQL |
mys_informa_schema.innodb_tables | information_schema.innodb_tables | InnoDB metadata for tables. Empty on installation. Fields include table_id, name, flag. | SQL |
mys_informa_schema.innodb_tablespaces | information_schema.innodb_tablespaces | InnoDB metadata for tablespaces. Empty on installation. Fields include space, name, flag. | SQL |
mys_informa_schema.innodb_tablespaces_brief | information_schema.innodb_tablespaces_brief | InnoDB metadata for tablespaces brief. Empty on installation. Fields include space, name, path. | SQL |
mys_informa_schema.innodb_tablestats | information_schema.innodb_tablestats | InnoDB metadata for tablestats. Empty on installation. Fields include table_id, name, stats_initialized. | SQL |
mys_informa_schema.innodb_temp_table_info | information_schema.innodb_temp_table_info | InnoDB metadata for temp table info. Empty on installation. Fields include table_id, name, n_cols. | SQL |
mys_informa_schema.innodb_virtual | information_schema.innodb_virtual | InnoDB metadata for virtual. Empty on installation. Fields include table_id, pos, base_pos. | SQL |
mys_informa_schema.keywords | information_schema.keywords | MySQL keywords and reserved-word flags. 747 seed rows. Fields include word, reserved. | SQL · Seeds |
mys_informa_schema.optimizer_trace | information_schema.optimizer_trace | Compatibility fields for optimizer trace. Empty on installation. Fields include query, trace, missing_bytes_beyond_max_mem_size. | SQL |
mys_informa_schema.plugins | information_schema.plugins | Compatibility fields for plugins. Empty on installation. Fields include name, status, type. | SQL |
mys_informa_schema.processlist | information_schema.processlist | Session and statement fields expected by process-list queries. Empty on installation. Fields include id, user, host. | SQL |
mys_informa_schema.profiling | information_schema.profiling | Compatibility fields for profiling. Empty on installation. Fields include query_id, seq, state. | SQL |
mys_informa_schema.resource_groups | information_schema.resource_groups | Compatibility fields for resource groups. Empty on installation. Fields include resource_group_name, resource_group_type, resource_group_enabled. | SQL |
mys_informa_schema.role_column_grants | information_schema.role_column_grants | Compatibility fields for role column grants. Empty on installation. Fields include grantor, grantor_host, grantee. | SQL |
mys_informa_schema.role_routine_grants | information_schema.role_routine_grants | Compatibility fields for role routine grants. Empty on installation. Fields include grantor, grantor_host, grantee. | SQL |
mys_informa_schema.role_table_grants | information_schema.role_table_grants | Compatibility fields for role table grants. Empty on installation. Fields include grantor, grantor_host, grantee. | SQL |
mys_informa_schema.schema_privileges | information_schema.schema_privileges | Compatibility fields for schema privileges. Empty on installation. Fields include grantee, table_catalog, table_schema. | SQL |
mys_informa_schema.st_geometry_columns | information_schema.st_geometry_columns | Compatibility fields for st geometry columns. Empty on installation. Fields include table_catalog, table_schema, table_name. | SQL |
mys_informa_schema.st_spatial_reference_systems | information_schema.st_spatial_reference_systems | Spatial reference system definitions. The supplied SRS seed statements are commented out. | SQL |
mys_informa_schema.st_units_of_measure | information_schema.st_units_of_measure | Compatibility fields for st units of measure. Empty on installation. Fields include unit_name, unit_type, conversion_factor. | SQL |
mys_informa_schema.table_constraints_extensions | information_schema.table_constraints_extensions | Extended metadata fields for the named catalog objects. Empty on installation. Fields include constraint_catalog, constraint_schema, constraint_name. | SQL |
mys_informa_schema.table_privileges | information_schema.table_privileges | Compatibility fields for table privileges. Empty on installation. Fields include grantee, table_catalog, table_schema. | SQL |
mys_informa_schema.tables_extensions | information_schema.tables_extensions | Extended metadata fields for the named catalog objects. Empty on installation. Fields include table_catalog, table_schema, table_name. | SQL |
mys_informa_schema.tablespaces | information_schema.tablespaces | Compatibility fields for tablespaces. Empty on installation. Fields include tablespace_name, engine, tablespace_type. | SQL |
mys_informa_schema.tablespaces_extensions | information_schema.tablespaces_extensions | Extended metadata fields for the named catalog objects. Empty on installation. Fields include tablespace_name, engine_attribute. | SQL |
mys_informa_schema.user_attributes | information_schema.user_attributes | Compatibility fields for user attributes. Empty on installation. Fields include user, host, attribute. | SQL |
mys_informa_schema.user_privileges | information_schema.user_privileges | Compatibility fields for user privileges. Empty on installation. Fields include grantee, table_catalog, privilege_type. | SQL |
mys_informa_schema.view_routine_usage | information_schema.view_routine_usage | Compatibility fields for view routine usage. Empty on installation. Fields include table_catalog, table_schema, table_name. | SQL |
mys_informa_schema.view_table_usage | information_schema.view_table_usage | Compatibility fields for view table usage. Empty on installation. Fields include view_catalog, view_schema, view_name. | SQL |
mys_sys
| PostgreSQL object | MySQL name | Purpose | Source definition |
|---|---|---|---|
mys_sys.innodb_lock_waits | sys.innodb_lock_waits | Lock request and blocker details. Empty on installation. Fields include wait_started, wait_age, wait_age_secs. | SQL |
mysql
| PostgreSQL object | MySQL name | Purpose | Source definition |
|---|---|---|---|
mysql."user" | mysql.user | Account, authentication and privilege fields for mysql.user queries. Empty on installation. Fields include host, user, select_priv. | SQL |
performance_schema
| PostgreSQL object | MySQL name | Purpose | Source definition |
|---|---|---|---|
performance_schema.accounts | performance_schema.accounts | Connection counters grouped by account, host or user. Empty on installation. Fields include user, host, current_connections. | SQL |
performance_schema.binary_log_transaction_compression_stats | performance_schema.binary_log_transaction_compression_stats | Compatibility fields for binary log transaction compression stats. Empty on installation. Fields include log_type, compression_type, transaction_counter. | SQL |
performance_schema.cond_instances | performance_schema.cond_instances | Compatibility fields for cond instances. Empty on installation. Fields include name, object_instance_begin. | SQL |
performance_schema.data_lock_waits | performance_schema.data_lock_waits | Lock request and blocker details. Empty on installation. Fields include engine, requesting_engine_lock_id, requesting_engine_transaction_id. | SQL |
performance_schema.data_locks | performance_schema.data_locks | Lock identities, owners and lock modes. Empty on installation. Fields include engine, engine_lock_id, engine_transaction_id. | SQL |
performance_schema.error_log | performance_schema.error_log | Compatibility fields for error log. Empty on installation. Fields include logged, thread_id, prio. | SQL |
performance_schema.events_errors_summary_by_account_by_error | performance_schema.events_errors_summary_by_account_by_error | Events errors summary by account by error. Empty on installation. Fields include user, host, error_number. | SQL |
performance_schema.events_errors_summary_by_host_by_error | performance_schema.events_errors_summary_by_host_by_error | Events errors summary by host by error. Empty on installation. Fields include host, error_number, error_name. | SQL |
performance_schema.events_errors_summary_by_thread_by_error | performance_schema.events_errors_summary_by_thread_by_error | Events errors summary by thread by error. Empty on installation. Fields include thread_id, error_number, error_name. | SQL |
performance_schema.events_errors_summary_by_user_by_error | performance_schema.events_errors_summary_by_user_by_error | Events errors summary by user by error. Empty on installation. Fields include user, error_number, error_name. | SQL |
performance_schema.events_errors_summary_global_by_error | performance_schema.events_errors_summary_global_by_error | Events errors summary global by error. Empty on installation. Fields include error_number, error_name, sql_state. | SQL |
performance_schema.events_stages_current | performance_schema.events_stages_current | Events stages current. Empty on installation. Fields include thread_id, event_id, end_event_id. | SQL |
performance_schema.events_stages_history | performance_schema.events_stages_history | Events stages history. Empty on installation. Fields include thread_id, event_id, end_event_id. | SQL |
performance_schema.events_stages_history_long | performance_schema.events_stages_history_long | Events stages history long. Empty on installation. Fields include thread_id, event_id, end_event_id. | SQL |
performance_schema.events_stages_summary_by_account_by_event_name | performance_schema.events_stages_summary_by_account_by_event_name | Events stages summary by account by event name. Empty on installation. Fields include user, host, event_name. | SQL |
performance_schema.events_stages_summary_by_host_by_event_name | performance_schema.events_stages_summary_by_host_by_event_name | Events stages summary by host by event name. Empty on installation. Fields include host, event_name, count_star. | SQL |
performance_schema.events_stages_summary_by_thread_by_event_name | performance_schema.events_stages_summary_by_thread_by_event_name | Events stages summary by thread by event name. Empty on installation. Fields include thread_id, event_name, count_star. | SQL |
performance_schema.events_stages_summary_by_user_by_event_name | performance_schema.events_stages_summary_by_user_by_event_name | Events stages summary by user by event name. Empty on installation. Fields include user, event_name, count_star. | SQL |
performance_schema.events_stages_summary_global_by_event_name | performance_schema.events_stages_summary_global_by_event_name | Events stages summary global by event name. Empty on installation. Fields include event_name, count_star, sum_timer_wait. | SQL |
performance_schema.events_statements_current | performance_schema.events_statements_current | Events statements current. Empty on installation. Fields include thread_id, event_id, end_event_id. | SQL |
performance_schema.events_statements_histogram_by_digest | performance_schema.events_statements_histogram_by_digest | Events statements histogram by digest. Empty on installation. Fields include schema_name, digest, bucket_number. | SQL |
performance_schema.events_statements_histogram_global | performance_schema.events_statements_histogram_global | Events statements histogram global. Empty on installation. Fields include bucket_number, bucket_timer_low, bucket_timer_high. | SQL |
performance_schema.events_statements_history | performance_schema.events_statements_history | Events statements history. Empty on installation. Fields include thread_id, event_id, end_event_id. | SQL |
performance_schema.events_statements_history_long | performance_schema.events_statements_history_long | Events statements history long. Empty on installation. Fields include thread_id, event_id, end_event_id. | SQL |
performance_schema.events_statements_summary_by_account_by_event_name | performance_schema.events_statements_summary_by_account_by_event_name | Events statements summary by account by event name. Empty on installation. Fields include user, host, event_name. | SQL |
performance_schema.events_statements_summary_by_digest | performance_schema.events_statements_summary_by_digest | Events statements summary by digest. Empty on installation. Fields include schema_name, digest, digest_text. | SQL |
performance_schema.events_statements_summary_by_host_by_event_name | performance_schema.events_statements_summary_by_host_by_event_name | Events statements summary by host by event name. Empty on installation. Fields include host, event_name, count_star. | SQL |
performance_schema.events_statements_summary_by_program | performance_schema.events_statements_summary_by_program | Events statements summary by program. Empty on installation. Fields include object_type, object_schema, object_name. | SQL |
performance_schema.events_statements_summary_by_thread_by_event_name | performance_schema.events_statements_summary_by_thread_by_event_name | Events statements summary by thread by event name. Empty on installation. Fields include thread_id, event_name, count_star. | SQL |
performance_schema.events_statements_summary_by_user_by_event_name | performance_schema.events_statements_summary_by_user_by_event_name | Events statements summary by user by event name. Empty on installation. Fields include user, event_name, count_star. | SQL |
performance_schema.events_statements_summary_global_by_event_name | performance_schema.events_statements_summary_global_by_event_name | Events statements summary global by event name. Empty on installation. Fields include event_name, count_star, sum_timer_wait. | SQL |
performance_schema.events_transactions_current | performance_schema.events_transactions_current | Events transactions current. Empty on installation. Fields include thread_id, event_id, end_event_id. | SQL |
performance_schema.events_transactions_history | performance_schema.events_transactions_history | Events transactions history. Empty on installation. Fields include thread_id, event_id, end_event_id. | SQL |
performance_schema.events_transactions_history_long | performance_schema.events_transactions_history_long | Events transactions history long. Empty on installation. Fields include thread_id, event_id, end_event_id. | SQL |
performance_schema.events_transactions_summary_by_account_by_event_name | performance_schema.events_transactions_summary_by_account_by_event_name | Events transactions summary by account by event name. Empty on installation. Fields include user, host, event_name. | SQL |
performance_schema.events_transactions_summary_by_host_by_event_name | performance_schema.events_transactions_summary_by_host_by_event_name | Events transactions summary by host by event name. Empty on installation. Fields include host, event_name, count_star. | SQL |
performance_schema.events_transactions_summary_by_thread_by_event_name | performance_schema.events_transactions_summary_by_thread_by_event_name | Events transactions summary by thread by event name. Empty on installation. Fields include thread_id, event_name, count_star. | SQL |
performance_schema.events_transactions_summary_by_user_by_event_name | performance_schema.events_transactions_summary_by_user_by_event_name | Events transactions summary by user by event name. Empty on installation. Fields include user, event_name, count_star. | SQL |
performance_schema.events_transactions_summary_global_by_event_name | performance_schema.events_transactions_summary_global_by_event_name | Events transactions summary global by event name. Empty on installation. Fields include event_name, count_star, sum_timer_wait. | SQL |
performance_schema.events_waits_current | performance_schema.events_waits_current | Events waits current. Empty on installation. Fields include thread_id, event_id, end_event_id. | SQL |
performance_schema.events_waits_history | performance_schema.events_waits_history | Events waits history. Empty on installation. Fields include thread_id, event_id, end_event_id. | SQL |
performance_schema.events_waits_history_long | performance_schema.events_waits_history_long | Events waits history long. Empty on installation. Fields include thread_id, event_id, end_event_id. | SQL |
performance_schema.events_waits_summary_by_account_by_event_name | performance_schema.events_waits_summary_by_account_by_event_name | Events waits summary by account by event name. Empty on installation. Fields include user, host, event_name. | SQL |
performance_schema.events_waits_summary_by_host_by_event_name | performance_schema.events_waits_summary_by_host_by_event_name | Events waits summary by host by event name. Empty on installation. Fields include host, event_name, count_star. | SQL |
performance_schema.events_waits_summary_by_instance | performance_schema.events_waits_summary_by_instance | Events waits summary by instance. Empty on installation. Fields include event_name, object_instance_begin, count_star. | SQL |
performance_schema.events_waits_summary_by_thread_by_event_name | performance_schema.events_waits_summary_by_thread_by_event_name | Events waits summary by thread by event name. Empty on installation. Fields include thread_id, event_name, count_star. | SQL |
performance_schema.events_waits_summary_by_user_by_event_name | performance_schema.events_waits_summary_by_user_by_event_name | Events waits summary by user by event name. Empty on installation. Fields include user, event_name, count_star. | SQL |
performance_schema.events_waits_summary_global_by_event_name | performance_schema.events_waits_summary_global_by_event_name | Events waits summary global by event name. Empty on installation. Fields include event_name, count_star, sum_timer_wait. | SQL |
performance_schema.file_instances | performance_schema.file_instances | Compatibility fields for file instances. Empty on installation. Fields include file_name, event_name, open_count. | SQL |
performance_schema.file_summary_by_event_name | performance_schema.file_summary_by_event_name | Compatibility fields for file summary by event name. Empty on installation. Fields include event_name, count_star, sum_timer_wait. | SQL |
performance_schema.file_summary_by_instance | performance_schema.file_summary_by_instance | Compatibility fields for file summary by instance. Empty on installation. Fields include file_name, event_name, object_instance_begin. | SQL |
performance_schema.global_status | performance_schema.global_status | Compatibility fields for global status. Empty on installation. Fields include variable_name, variable_value. | SQL |
performance_schema.global_variables | performance_schema.global_variables | Compatibility fields for global variables. Empty on installation. Fields include variable_name, variable_value. | SQL |
performance_schema.host_cache | performance_schema.host_cache | Compatibility fields for host cache. Empty on installation. Fields include ip, host, host_validated. | SQL |
performance_schema.hosts | performance_schema.hosts | Connection counters grouped by account, host or user. Empty on installation. Fields include host, current_connections, total_connections. | SQL |
performance_schema.innodb_redo_log_files | performance_schema.innodb_redo_log_files | InnoDB metadata for redo log files. Empty on installation. Fields include file_id, file_name, start_lsn. | SQL |
performance_schema.keyring_component_status | performance_schema.keyring_component_status | Compatibility fields for keyring component status. Empty on installation. Fields include status_key, status_value. | SQL |
performance_schema.keyring_keys | performance_schema.keyring_keys | Compatibility fields for keyring keys. Empty on installation. Fields include key_id, key_owner, backend_key_id. | SQL |
performance_schema.log_status | performance_schema.log_status | Compatibility fields for log status. Empty on installation. Fields include server_uuid, local, replication. | SQL |
performance_schema.memory_summary_by_account_by_event_name | performance_schema.memory_summary_by_account_by_event_name | Compatibility fields for memory summary by account by event name. Empty on installation. Fields include user, host, event_name. | SQL |
performance_schema.memory_summary_by_host_by_event_name | performance_schema.memory_summary_by_host_by_event_name | Compatibility fields for memory summary by host by event name. Empty on installation. Fields include host, event_name, count_alloc. | SQL |
performance_schema.memory_summary_by_thread_by_event_name | performance_schema.memory_summary_by_thread_by_event_name | Compatibility fields for memory summary by thread by event name. Empty on installation. Fields include thread_id, event_name, count_alloc. | SQL |
performance_schema.memory_summary_by_user_by_event_name | performance_schema.memory_summary_by_user_by_event_name | Compatibility fields for memory summary by user by event name. Empty on installation. Fields include user, event_name, count_alloc. | SQL |
performance_schema.memory_summary_global_by_event_name | performance_schema.memory_summary_global_by_event_name | Compatibility fields for memory summary global by event name. Empty on installation. Fields include event_name, count_alloc, count_free. | SQL |
performance_schema.metadata_locks | performance_schema.metadata_locks | Lock identities, owners and lock modes. Empty on installation. Fields include object_type, object_schema, object_name. | SQL |
performance_schema.mutex_instances | performance_schema.mutex_instances | Compatibility fields for mutex instances. Empty on installation. Fields include name, object_instance_begin, locked_by_thread_id. | SQL |
performance_schema.objects_summary_global_by_type | performance_schema.objects_summary_global_by_type | Compatibility fields for objects summary global by type. Empty on installation. Fields include object_type, object_schema, object_name. | SQL |
performance_schema.performance_timers | performance_schema.performance_timers | Compatibility fields for performance timers. Empty on installation. Fields include timer_name, timer_frequency, timer_resolution. | SQL |
performance_schema.persisted_variables | performance_schema.persisted_variables | Compatibility fields for persisted variables. Empty on installation. Fields include variable_name, variable_value. | SQL |
performance_schema.prepared_statements_instances | performance_schema.prepared_statements_instances | Compatibility fields for prepared statements instances. Empty on installation. Fields include object_instance_begin, statement_id, statement_name. | SQL |
performance_schema.processlist | performance_schema.processlist | Session and statement fields expected by process-list queries. Empty on installation. Fields include id, user, host. | SQL |
performance_schema.replication_applier_configuration | performance_schema.replication_applier_configuration | MySQL replication metadata for applier configuration. Empty on installation. Fields include channel_name, desired_delay, privilege_checks_user. | SQL |
performance_schema.replication_applier_filters | performance_schema.replication_applier_filters | MySQL replication metadata for applier filters. Empty on installation. Fields include channel_name, filter_name, filter_rule. | SQL |
performance_schema.replication_applier_global_filters | performance_schema.replication_applier_global_filters | MySQL replication metadata for applier global filters. Empty on installation. Fields include filter_name, filter_rule, configured_by. | SQL |
performance_schema.replication_applier_status | performance_schema.replication_applier_status | MySQL replication metadata for applier status. Empty on installation. Fields include channel_name, service_state, remaining_delay. | SQL |
performance_schema.replication_applier_status_by_coordinator | performance_schema.replication_applier_status_by_coordinator | MySQL replication metadata for applier status by coordinator. Empty on installation. Fields include channel_name, thread_id, service_state. | SQL |
performance_schema.replication_applier_status_by_worker | performance_schema.replication_applier_status_by_worker | MySQL replication metadata for applier status by worker. Empty on installation. Fields include channel_name, worker_id, thread_id. | SQL |
performance_schema.replication_asynchronous_connection_failover | performance_schema.replication_asynchronous_connection_failover | MySQL replication metadata for asynchronous connection failover. Empty on installation. Fields include channel_name, host, port. | SQL |
performance_schema.replication_asynchronous_connection_failover_managed | performance_schema.replication_asynchronous_connection_failover_managed | MySQL replication metadata for asynchronous connection failover managed. Empty on installation. Fields include channel_name, managed_name, managed_type. | SQL |
performance_schema.replication_connection_configuration | performance_schema.replication_connection_configuration | MySQL replication metadata for connection configuration. Empty on installation. Fields include channel_name, host, port. | SQL |
performance_schema.replication_connection_status | performance_schema.replication_connection_status | MySQL replication metadata for connection status. Empty on installation. Fields include channel_name, group_name, source_uuid. | SQL |
performance_schema.replication_group_member_stats | performance_schema.replication_group_member_stats | MySQL replication metadata for group member stats. Empty on installation. Fields include channel_name, view_id, member_id. | SQL |
performance_schema.replication_group_members | performance_schema.replication_group_members | MySQL replication metadata for group members. Empty on installation. Fields include channel_name, member_id, member_host. | SQL |
performance_schema.rwlock_instances | performance_schema.rwlock_instances | Compatibility fields for rwlock instances. Empty on installation. Fields include name, object_instance_begin, write_locked_by_thread_id. | SQL |
performance_schema.session_account_connect_attrs | performance_schema.session_account_connect_attrs | Compatibility fields for session account connect attrs. Empty on installation. Fields include processlist_id, attr_name, attr_value. | SQL |
performance_schema.session_connect_attrs | performance_schema.session_connect_attrs | Compatibility fields for session connect attrs. Empty on installation. Fields include processlist_id, attr_name, attr_value. | SQL |
performance_schema.session_status | performance_schema.session_status | Compatibility fields for session status. Empty on installation. Fields include variable_name, variable_value. | SQL |
performance_schema.session_variables | performance_schema.session_variables | Compatibility fields for session variables. Empty on installation. Fields include variable_name, variable_value. | SQL |
performance_schema.setup_actors | performance_schema.setup_actors | Compatibility fields for setup actors. Empty on installation. Fields include host, user, role. | SQL |
performance_schema.setup_consumers | performance_schema.setup_consumers | Compatibility fields for setup consumers. Empty on installation. Fields include name, enabled. | SQL |
performance_schema.setup_instruments | performance_schema.setup_instruments | Compatibility fields for setup instruments. Empty on installation. Fields include name, enabled, timed. | SQL |
performance_schema.setup_objects | performance_schema.setup_objects | Compatibility fields for setup objects. Empty on installation. Fields include object_type, object_schema, object_name. | SQL |
performance_schema.setup_threads | performance_schema.setup_threads | Compatibility fields for setup threads. Empty on installation. Fields include name, enabled, history. | SQL |
performance_schema.socket_instances | performance_schema.socket_instances | Compatibility fields for socket instances. Empty on installation. Fields include event_name, object_instance_begin, thread_id. | SQL |
performance_schema.socket_summary_by_event_name | performance_schema.socket_summary_by_event_name | Compatibility fields for socket summary by event name. Empty on installation. Fields include event_name, count_star, sum_timer_wait. | SQL |
performance_schema.socket_summary_by_instance | performance_schema.socket_summary_by_instance | Compatibility fields for socket summary by instance. Empty on installation. Fields include event_name, object_instance_begin, count_star. | SQL |
performance_schema.status_by_account | performance_schema.status_by_account | Compatibility fields for status by account. Empty on installation. Fields include user, host, variable_name. | SQL |
performance_schema.status_by_host | performance_schema.status_by_host | Compatibility fields for status by host. Empty on installation. Fields include host, variable_name, variable_value. | SQL |
performance_schema.status_by_thread | performance_schema.status_by_thread | Compatibility fields for status by thread. Empty on installation. Fields include thread_id, variable_name, variable_value. | SQL |
performance_schema.status_by_user | performance_schema.status_by_user | Compatibility fields for status by user. Empty on installation. Fields include user, variable_name, variable_value. | SQL |
performance_schema.table_handles | performance_schema.table_handles | Compatibility fields for table handles. Empty on installation. Fields include object_type, object_schema, object_name. | SQL |
performance_schema.table_io_waits_summary_by_index_usage | performance_schema.table_io_waits_summary_by_index_usage | Compatibility fields for table io waits summary by index usage. Empty on installation. Fields include object_type, object_schema, object_name. | SQL |
performance_schema.table_io_waits_summary_by_table | performance_schema.table_io_waits_summary_by_table | Compatibility fields for table io waits summary by table. Empty on installation. Fields include object_type, object_schema, object_name. | SQL |
performance_schema.table_lock_waits_summary_by_table | performance_schema.table_lock_waits_summary_by_table | Compatibility fields for table lock waits summary by table. Empty on installation. Fields include object_type, object_schema, object_name. | SQL |
performance_schema.threads | performance_schema.threads | Compatibility fields for threads. Empty on installation. Fields include thread_id, name, type. | SQL |
performance_schema.tls_channel_status | performance_schema.tls_channel_status | Compatibility fields for tls channel status. Empty on installation. Fields include channel, property, value. | SQL |
performance_schema.user_defined_functions | performance_schema.user_defined_functions | Compatibility fields for user defined functions. Empty on installation. Fields include udf_name, udf_return_type, udf_type. | SQL |
performance_schema.user_variables_by_thread | performance_schema.user_variables_by_thread | Compatibility fields for user variables by thread. Empty on installation. Fields include thread_id, variable_name, variable_value. | SQL |
performance_schema.users | performance_schema.users | Connection counters grouped by account, host or user. Empty on installation. Fields include user, current_connections, total_connections. | SQL |
performance_schema.variables_by_thread | performance_schema.variables_by_thread | Compatibility fields for variables by thread. Empty on installation. Fields include thread_id, variable_name, variable_value. | SQL |
performance_schema.variables_info | performance_schema.variables_info | Compatibility fields for variables info. Empty on installation. Fields include variable_name, variable_source, variable_path. | SQL |
2.2.10 - Index access method, classes and families
Find the access method, the default operator class for a type and its family. Class and family names can coincide.
A class that omits FAMILY creates a family of the same name. The binary_n and varbinary_n B-tree and hash classes instead join the existing pg_catalog.bytea_ops families.
Operator classes
Operator families
Access method
| Signature | Purpose | Source definition |
|---|---|---|
mysql_prefix | Index access method for MySQL prefix keys. | SQL |
2.2.11 - Operator family members
Index dependencies by family, access method, strategy or support number, and operand pair. Each row names the registered operator or function.
Strategy operators
Support functions
2.2.12 - Table indexes
Physical indexes on the compatibility tables, including the unique indexes that enforce their primary keys.
Primary keys
Secondary indexes
2.2.13 - Primary keys and domain checks
Find the database-assigned constraint name, its owning table or domain and the installed expression.
Domain checks
| Signature | Purpose | Source definition |
|---|---|---|
"bigint unsigned_check" on mysql."bigint unsigned" | CHECK ((0 <= VALUE)) | SQL |
"int unsigned_check" on mysql."int unsigned" | CHECK (((0 <= VALUE) AND (VALUE <= '4294967295'::bigint))) | SQL |
"mediumint signed_check" on mysql."mediumint signed" | CHECK ((('-8388608'::integer <= VALUE) AND (VALUE <= 8388607))) | SQL |
"mediumint unsigned_check" on mysql."mediumint unsigned" | CHECK (((0 <= VALUE) AND (VALUE <= 16777215))) | SQL |
"smallint unsigned_check" on mysql."smallint unsigned" | CHECK (((0 <= VALUE) AND (VALUE <= 65535))) | SQL |
"tinyint signed_check" on mysql."tinyint signed" | CHECK ((('-128'::integer <= VALUE) AND (VALUE <= 127))) | SQL |
"tinyint unsigned_check" on mysql."tinyint unsigned" | CHECK (((0 <= VALUE) AND (VALUE <= 255))) | SQL |
"tinyint1 signed_check" on mysql."tinyint1 signed" | CHECK ((('-128'::integer <= VALUE) AND (VALUE <= 127))) | SQL |
"tinyint1 unsigned_check" on mysql."tinyint1 unsigned" | CHECK (((0 <= VALUE) AND (VALUE <= 255))) | SQL |
mediumint_check on mysql.mediumint | CHECK ((('-8388608'::integer <= VALUE) AND (VALUE <= 8388607))) | SQL |
tinyint1_check on mysql.tinyint1 | CHECK ((('-128'::integer <= VALUE) AND (VALUE <= 127))) | SQL |
tinyint_check on mysql.tinyint | CHECK ((('-128'::integer <= VALUE) AND (VALUE <= 127))) | SQL |
year__check on mysql.year_ | CHECK (((1901 <= VALUE) AND (VALUE <= 2155))) | SQL |
Primary keys
2.2.14 - NOT NULL in metadata schemas
Column constraints in the compatibility catalogs outside Performance Schema, ordered by the owning table’s initial.
A
| Signature | Purpose | Source definition |
|---|---|---|
administrable_role_authorizations_is_grantable_not_null on mys_informa_schema.administrable_role_authorizations | NOT NULL is_grantable | SQL |
administrable_role_authorizations_is_mandatory_not_null on mys_informa_schema.administrable_role_authorizations | NOT NULL is_mandatory | SQL |
applicable_roles_is_grantable_not_null on mys_informa_schema.applicable_roles | NOT NULL is_grantable | SQL |
applicable_roles_is_mandatory_not_null on mys_informa_schema.applicable_roles | NOT NULL is_mandatory | SQL |
B
| Signature | Purpose | Source definition |
|---|---|---|
base_variables_variable_name_not_null on mys_informa_schema.base_variables | NOT NULL variable_name (implied by the primary key) | SQL |
C
E
| Signature | Purpose | Source definition |
|---|---|---|
enabled_roles_is_mandatory_not_null on mys_informa_schema.enabled_roles | NOT NULL is_mandatory | SQL |
F
| Signature | Purpose | Source definition |
|---|---|---|
files_engine_not_null on mys_informa_schema.files | NOT NULL engine | SQL |
files_table_catalog_not_null on mys_informa_schema.files | NOT NULL table_catalog | SQL |
files_tablespace_name_not_null on mys_informa_schema.files | NOT NULL tablespace_name | SQL |
I
O
| Signature | Purpose | Source definition |
|---|---|---|
optimizer_trace_insufficient_privileges_not_null on mys_informa_schema.optimizer_trace | NOT NULL insufficient_privileges | SQL |
optimizer_trace_missing_bytes_beyond_max_mem_size_not_null on mys_informa_schema.optimizer_trace | NOT NULL missing_bytes_beyond_max_mem_size | SQL |
optimizer_trace_query_not_null on mys_informa_schema.optimizer_trace | NOT NULL query | SQL |
optimizer_trace_trace_not_null on mys_informa_schema.optimizer_trace | NOT NULL trace | SQL |
P
| Signature | Purpose | Source definition |
|---|---|---|
processlist_command_not_null on mys_informa_schema.processlist | NOT NULL command | SQL |
processlist_host_not_null on mys_informa_schema.processlist | NOT NULL host | SQL |
processlist_id_not_null on mys_informa_schema.processlist | NOT NULL id | SQL |
processlist_time_not_null on mys_informa_schema.processlist | NOT NULL "time" | SQL |
processlist_user_not_null on mys_informa_schema.processlist | NOT NULL "user" | SQL |
R
S
| Signature | Purpose | Source definition |
|---|---|---|
schema_privileges_grantee_not_null on mys_informa_schema.schema_privileges | NOT NULL grantee | SQL |
schema_privileges_is_grantable_not_null on mys_informa_schema.schema_privileges | NOT NULL is_grantable | SQL |
schema_privileges_privilege_type_not_null on mys_informa_schema.schema_privileges | NOT NULL privilege_type | SQL |
schema_privileges_table_catalog_not_null on mys_informa_schema.schema_privileges | NOT NULL table_catalog | SQL |
schema_privileges_table_schema_not_null on mys_informa_schema.schema_privileges | NOT NULL table_schema | SQL |
st_spatial_reference_systems_definition_not_null on mys_informa_schema.st_spatial_reference_systems | NOT NULL definition | SQL |
st_spatial_reference_systems_srs_id_not_null on mys_informa_schema.st_spatial_reference_systems | NOT NULL srs_id | SQL |
st_spatial_reference_systems_srs_name_not_null on mys_informa_schema.st_spatial_reference_systems | NOT NULL srs_name | SQL |
T
U
V
| Signature | Purpose | Source definition |
|---|---|---|
view_routine_usage_specific_name_not_null on mys_informa_schema.view_routine_usage | NOT NULL specific_name | SQL |
2.2.15 - NOT NULL in performance_schema.events_*
Catalog constraint names and column definitions for Performance Schema event tables.
E
2.2.16 - NOT NULL in other performance_schema tables
Catalog constraint names and column definitions for the remaining Performance Schema tables.
A
| Signature | Purpose | Source definition |
|---|---|---|
accounts_current_connections_not_null on performance_schema.accounts | NOT NULL current_connections | SQL |
accounts_total_connections_not_null on performance_schema.accounts | NOT NULL total_connections | SQL |
B
C
| Signature | Purpose | Source definition |
|---|---|---|
cond_instances_name_not_null on performance_schema.cond_instances | NOT NULL name | SQL |
cond_instances_object_instance_begin_not_null on performance_schema.cond_instances | NOT NULL object_instance_begin | SQL |
D
E
| Signature | Purpose | Source definition |
|---|---|---|
error_log_data_not_null on performance_schema.error_log | NOT NULL data | SQL |
error_log_logged_not_null on performance_schema.error_log | NOT NULL logged | SQL |
error_log_prio_not_null on performance_schema.error_log | NOT NULL prio | SQL |
F
G
| Signature | Purpose | Source definition |
|---|---|---|
global_status_variable_name_not_null on performance_schema.global_status | NOT NULL variable_name | SQL |
global_variables_variable_name_not_null on performance_schema.global_variables | NOT NULL variable_name | SQL |
H
I
| Signature | Purpose | Source definition |
|---|---|---|
innodb_redo_log_files_consumer_level_not_null on performance_schema.innodb_redo_log_files | NOT NULL consumer_level | SQL |
innodb_redo_log_files_end_lsn_not_null on performance_schema.innodb_redo_log_files | NOT NULL end_lsn | SQL |
innodb_redo_log_files_file_id_not_null on performance_schema.innodb_redo_log_files | NOT NULL file_id | SQL |
innodb_redo_log_files_file_name_not_null on performance_schema.innodb_redo_log_files | NOT NULL file_name | SQL |
innodb_redo_log_files_is_full_not_null on performance_schema.innodb_redo_log_files | NOT NULL is_full | SQL |
innodb_redo_log_files_size_in_bytes_not_null on performance_schema.innodb_redo_log_files | NOT NULL size_in_bytes | SQL |
innodb_redo_log_files_start_lsn_not_null on performance_schema.innodb_redo_log_files | NOT NULL start_lsn | SQL |
K
| Signature | Purpose | Source definition |
|---|---|---|
keyring_component_status_status_key_not_null on performance_schema.keyring_component_status | NOT NULL status_key | SQL |
keyring_component_status_status_value_not_null on performance_schema.keyring_component_status | NOT NULL status_value | SQL |
keyring_keys_key_id_not_null on performance_schema.keyring_keys | NOT NULL key_id | SQL |
L
| Signature | Purpose | Source definition |
|---|---|---|
log_status_local_not_null on performance_schema.log_status | NOT NULL local | SQL |
log_status_replication_not_null on performance_schema.log_status | NOT NULL replication | SQL |
log_status_server_uuid_not_null on performance_schema.log_status | NOT NULL server_uuid | SQL |
log_status_storage_engines_not_null on performance_schema.log_status | NOT NULL storage_engines | SQL |
M
O
| Signature | Purpose | Source definition |
|---|---|---|
objects_summary_global_by_type_avg_timer_wait_not_null on performance_schema.objects_summary_global_by_type | NOT NULL avg_timer_wait | SQL |
objects_summary_global_by_type_count_star_not_null on performance_schema.objects_summary_global_by_type | NOT NULL count_star | SQL |
objects_summary_global_by_type_max_timer_wait_not_null on performance_schema.objects_summary_global_by_type | NOT NULL max_timer_wait | SQL |
objects_summary_global_by_type_min_timer_wait_not_null on performance_schema.objects_summary_global_by_type | NOT NULL min_timer_wait | SQL |
objects_summary_global_by_type_sum_timer_wait_not_null on performance_schema.objects_summary_global_by_type | NOT NULL sum_timer_wait | SQL |
P
R
S
T
U
| Signature | Purpose | Source definition |
|---|---|---|
user_defined_functions_udf_name_not_null on performance_schema.user_defined_functions | NOT NULL udf_name | SQL |
user_defined_functions_udf_return_type_not_null on performance_schema.user_defined_functions | NOT NULL udf_return_type | SQL |
user_defined_functions_udf_type_not_null on performance_schema.user_defined_functions | NOT NULL udf_type | SQL |
users_current_connections_not_null on performance_schema.users | NOT NULL current_connections | SQL |
users_total_connections_not_null on performance_schema.users | NOT NULL total_connections | SQL |
V
| Signature | Purpose | Source definition |
|---|---|---|
variables_by_thread_thread_id_not_null on performance_schema.variables_by_thread | NOT NULL thread_id | SQL |
variables_by_thread_variable_name_not_null on performance_schema.variables_by_thread | NOT NULL variable_name | SQL |
variables_info_variable_name_not_null on performance_schema.variables_info | NOT NULL variable_name | SQL |
3 - SQL and type compatibility
The examples on this page use an ordinary MySQL connection to a scratch schema. The native PostgreSQL connection sees the same stored rows. Parser rules, transaction boundaries and driver result types depend on the entry point.
SQL at the two endpoints
| Task | MySQL behavior in 19.0.1 | Migration consequence |
|---|---|---|
| Create and alter tables | Backticks, inline KEY, AUTO_INCREMENT, MODIFY and CHANGE are handled by the dialect. Auto-increment uses a PostgreSQL identity sequence. | Compare the next generated value after loading explicit keys. A change to a default or generation expression deserves a write test. |
| Query and join | Backticks, LIMIT offset,count, single-target UPDATE … JOIN and selected DELETE FROM target USING … forms are implemented. | Rewrite multi-target writes and DELETE target FROM … JOIN as explicit single-target operations. Compare affected rows inside the intended transaction. |
| Update a duplicate key | ON DUPLICATE KEY UPDATE checks unique keys. REPLACE deletes conflicting rows and inserts a new row using column defaults. FK actions and triggers can run. | Use an explicit update when omitted columns or referencing rows must survive. Plain UPDATE counts matched rows, including unchanged rows. |
| Use a boolean or integer predicate | SELECT 1 WHERE 1 returns 1; inserting 1=1 into an INT column stores 1. Native psql rejects the integer predicate (SQLSTATE 42804). | Write WHERE flag <> 0 in portable SQL. Native integer/boolean conversions require explicit casts. Some extension-provided casts and types are visible database-wide. |
| Inspect or replay definitions | SHOW CREATE TABLE, SHOW COLUMNS and SHOW INDEX expose MySQL-facing definitions. information_schema, SHOW STATUS and system variables cover a subset. | Replay the DDL in a scratch schema. Compare constraints and physical storage via native catalogs. |
This example returned affected-row counts 1, 1, 2, 2 for the four writes. The final row was (1,9): the omitted column took its default on replacement.
Types, bytes and collation
| Source value or DDL | Observed result in the example database | Representation or check |
|---|---|---|
CREATE TABLE ids(k BIGINT UNSIGNED), then INSERT INTO ids VALUES(9223372036854775808) | Error 1264, row count remains zero. The target domain ranges from 0 through 9223372036854775807. | For the full uint64 range, design a DECIMAL(20,0) column with bounds and review driver decoding, key generation and FKs. |
CREATE TABLE cents(n DECIMAL), then insert 1.6 | Reading n returns 2. A bare declaration means DECIMAL(10,0). | Specify precision and scale. A native unbounded numeric can be reported as decimal(65,30) with a warning when exported. |
Insert 0x610062 into TEXT; repeat with VARBINARY(4) | Text rejects NUL with 1366. HEX(binary_column) returns 610062. BINARY(n) additionally pads with zero bytes. | Use a binary column for payloads that require arbitrary bytes. Compare HEX() and length, including trailing zeros. |
Insert '27:30:00' into TIME; evaluate CAST('0000-00-00' AS DATE) | Both return 1292. The time column represents a time of day. | Store signed durations as integer microseconds or convert explicitly to PostgreSQL interval. Map zero dates to a business-approved value or nullable field. |
CREATE TABLE e(v ENUM('a','b')) or CREATE TABLE s(v SET('a','b')) | Both fail with 1091 in a fresh database. | Use checked text, a lookup table or an explicit bitmask according to membership and ordering requirements. |
CREATE TABLE calc(i INT, twice INT AS(i*2) VIRTUAL), insert i=4 | Reading the row returns (4,8). Both VIRTUAL and STORED values are materialized on write. | Use deterministic expressions, compare stored values after loading, and budget for storage and write cost. |
Compare strings before rebuilding unique keys
Strings are stored and returned as UTF-8. SET NAMES updates session character settings; other encodings can be approximated with warning 1105. Convert legacy-encoded source bytes explicitly and check the decoded strings.
The dialect recognizes utf8_general_ci and utf8mb4_general_ci as the general-ci implementation, and utf8_bin and utf8mb4_bin as the binary implementation. Both use PAD SPACE. Other MySQL names ending in _ci map to general-ci weights; other suffixes map to binary order. Locale-specific equivalence, ordering, uniqueness and duplicate-key arbitration can change. String literals can behave differently from columns: in the C-locale example database SELECT 'a'='A' returned 0.
The warning code was 1105, the effective definition contained utf8mb4_general_ci, and the last insert returned 1062. Load candidate keys into a staging table without a unique index and group by the proposed target key, including any prefix length. Resolve collisions before creating the unique index.
Transaction boundaries and snapshots
With MySQL autocommit disabled, COMMIT and ROLLBACK delimit application work. DDL, a new BEGIN, and enabling autocommit can commit preceding writes. In a scratch schema, BEGIN; INSERT INTO counters VALUES (2,7); CREATE TABLE boundary(i INT); ROLLBACK; leaves row 2 and the new table. Separate schema changes from work the application expects to roll back. Native PostgreSQL transactions retain PostgreSQL transactional DDL and error semantics.
At the MySQL endpoint, read-uncommitted, read-committed and read-write repeatable-read use PostgreSQL statement snapshots. Read-only repeatable-read and a consistent snapshot retain a transaction snapshot. For a two-connection check, create meter(id INT PRIMARY KEY,v INT) with row (1,10). Set A to SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ. Read v in A, let B commit UPDATE meter SET v=20 WHERE id=1, then read again in A. Reset to 10 between trials.
| A starts with | First read | Second read |
|---|---|---|
START TRANSACTION READ WRITE | 10 | 20 |
START TRANSACTION READ ONLY | 10 | 10 |
START TRANSACTION WITH CONSISTENT SNAPSHOT | 10 | 10 |
For reports, request a stable snapshot explicitly. For concurrent writes, retry the whole transaction after 1213 / SQLSTATE 40001. Serializable uses PostgreSQL isolation. InnoDB gap locking is unavailable. LOCK TABLES and UNLOCK TABLES are accepted without taking table locks or committing, so quiesce writers when a migration needs exclusivity.
Indexes and foreign keys
A normal bounded full key can use a native B-tree. A true prefix key such as PRIMARY KEY(k(3)) enforces uniqueness on the prefix. In the round-trip test, inserting abcZ next to abc1 returned 1062 after restore. True prefix and oversized indexes recheck the heap, with no index-only scan or index-provided ordering. MySQL index hints are accepted and ignored. Examine the native query plan and benchmark your actual key distribution.
A table-level FOREIGN KEY(i) REFERENCES parent(i) requires a type-compatible primary or unique parent key. With only KEY(i) on the parent, creation failed (SQLSTATE 42830). Check for duplicates before adding a unique constraint. New orphan inserts under enforcement report 1452. Re-enabling checks leaves historical orphans in place; run an anti-join after a bulk load.
SET FOREIGN_KEY_CHECKS=0 is session-local. In this release, skipping a specific FK requires ownership rights on the referencing (child) table or superuser status. Otherwise the constraint and parent-side actions still apply, with a warning. SECURITY DEFINER execution keeps checks active. A pending FK created before its parent still requires proper parent access when bound. Preserve the extension’s metadata triggers in native backups.
Prepared statements
The SQL-level example below returned 42. Wire-level server preparation is a separate path. The Go and JDBC runs used binary parameters and checked result types, errors and subsequent connection use. Driver results and settings
Check the application connection
A successful CLI login establishes reachability. For supported HBA methods and TLS see authentication. For JDBC and Go parameter modes, result types, generated IDs and reuse after a database error, see tested clients.
GTID replication and stored procedures also affect the cutover plan. Known gaps and troubleshooting
4 - Clients and drivers
What a successful connection proves
All results below used the matching Mimus 19.0.1 full kernel and pg_mysql 1.0 on Rocky Linux 10 x86-64. A handshake identifies the advertised protocol. A simple query exercises parsing and one result set. An application test goes further by binding values, mutating rows, checking types and observing commit or rollback from another connection.
| Client | Login and query | Workload actually exercised |
|---|---|---|
MariaDB mysql 10.11.19 | TCP, certificate-verified TLS, SCRAM-backed role, schema selection, @@version | Ordinary user created a table, inserted one row and read it. Native psql read the same key and text. |
| PyMySQL 1.1.1 | Advertised version 5.7.32-log, utf8mb4, selected schema | Orders workflow: parameterized insert, lastrowid=1, three-row executemany, aggregates and Python Decimal / datetime results. Updated two rows, rolled back, then counted zero rows with the new status. Missing table reported 1146. |
Go database/sql + go-sql-driver/mysql 1.9.3 | Default connection and TLS exercised | Server-side parameters, generated ID and row count, NULL, bytes, decimal, temporal scans with parseTime=true, duplicate key 1062 and subsequent reuse. A second connection saw the write only after commit. |
| MySQL Connector/J 8.4.0 | Preferred and required TLS, a separate RSA login and cached login | useServerPrepStmts=true: prepare-time metadata, generated keys, BLOB/NULL, batch and duplicate-key handling. setAutoCommit(false), rollback, commit and re-enabling autocommit passed. |
Oracle MySQL mysqldump and mysql 5.7.32 | Authenticated and selected the fixture schema | Exported and replayed supported DDL, a view, binary/generated values, a prefix PK and foreign keys. Destination was Mimus. Restore procedure |
Connect an application
With the schema and role from the quick start, use TCP and pass the application schema as database. This Python example prompts for the password. Set MYSQL_CA to the trusted CA file or the public certificate from the loopback example.
Choose the preparation mode your application uses
PyMySQL binds %s in this example by escaping values client-side and sending text SQL. The Go driver’s default parameter path and Connector/J with useServerPrepStmts=true use the binary statement protocol. COM_STMT_PREPARE, EXECUTE, CLOSE, RESET and SEND_LONG_DATA are implemented. A single prepared statement accepts one SQL statement. Distinguish statement reset from COM_RESET_CONNECTION, which also rolls back active work and clears session state. A pool that issues COM_CHANGE_USER will need a new connection instead.
Reproduce the checks for your driver
Record the driver version, TLS mode, interpolation/server preparation, autocommit and pool reset behavior. On a disposable schema insert a value containing quotes and binary zero, read its type and bytes, check duplicate-key handling, roll back and read from a second connection. Use a binary column for the zero byte. The 19.0.1 session transaction run passed 56 checks; the named versions in the table bound the result. Other drivers, ORM schema discovery and connection pools need their own runs.
5 - Migration and recovery
Plan the move
Build a fresh target cluster with the matching kernel, module and SQL installation. Migrate application objects and data logically. An old OpenHalo data directory, a physical pg_upgrade from that line, and ALTER EXTENSION aux_mysql UPDATE have no supported path to this fresh pg_mysql 1.0 installation. Keep the original DDL: old catalogs may already have lost a prefix length, binary width or generated expression.
Inventory PostgreSQL roles, owners, grants and schema dependencies separately from rows. Translate application objects that refer to historical extension names or C libraries. Decide how to represent uint64, durations, zero dates, ENUM/SET, NUL and collated keys before loading. Examples and alternatives
Restore a native archive
For a same-version Mimus rehearsal, use the matching PostgreSQL 19 tools. This example runs on the quick-start cluster using its native local socket as the database administrator. It restores schema app into a new database. The role app_user already exists cluster-wide; create reviewed roles and grants on a different cluster before restoring. Include external dependencies separately when selecting a single schema.
Keep security labels and metadata triggers for MySQL definitions, including pending foreign keys. Preserve owners and reviewed privileges. Use native psql for inspection of restore_check; the MySQL listener continues to enter its configured database. To check restored MySQL behavior on another target, set that isolated instance’s mysql.database to the restored database and reconnect.
Restore a MySQL SQL dump
The 19.0.1 round trip used Oracle MySQL 5.7.32 tools. Run mysqldump --version before exporting. Tools shipped under the same command name can differ: MariaDB 10.5’s dump client can include generated column values that cannot be inserted. Stop source writes and DDL for this rehearsal, or arrange a separately verified consistent snapshot. The example uses TCP and interactive passwords. Supply the TLS identity options and CA for your endpoints.
These two commands copy only the quick-start table. Its only trigger is maintained by pg_mysql for auto-increment. With the default trigger export, Oracle 5.7.32 exited with status 2 after writing the row, leaving a partial file. With --skip-triggers, export exited 0, table DDL recreated the identity behavior, and the first new insert after restore received ID 2. Check the exit status before replay. For tables with business triggers, use the native archive or separately translate, restore and exercise every trigger. For the schema-level test below, trigger export stayed at its default.
Use a fresh target instance, initialize the extension and create the empty app schema for its owner. The dump account needs read and view-definition privileges on its objects, the restore account must be able to create and populate them. Replay through the MySQL port to preserve quoting, executable comments and session variables. In the fixture, both archive paths preserved binary bytes, generated values, the view and prefix primary key. The tests checked new-orphan rejection, historical orphans, binding a missing parent, and cascading deletes after restore. Restoring this dump on an independent Oracle MySQL server was outside this run.
Verify encrypted tables
Before using ENCRYPTION='Y', preload both pg_tde and pg_mysql, install both in the target PostgreSQL database and configure its key provider and principal key. The MySQL clause selects the table access method. A displayed ENGINE=InnoDB is compatible spelling. Check the PostgreSQL access method and encryption flag to identify the actual storage. A logical dump contains readable data and requires protection of its own. Prepare keys on the restore destination and check physical encryption after loading. PG TDE setup and key management
In mysql, the definition included ENCRYPTION='Y' and the row read back as 7. In native psql -d postgres, the following returned notes | heap | f, sealed | tde_heap | t, sealed_copy | tde_heap | t, and sealed_pkey | btree | t. The primary index still reports its index access method; check the encryption flag separately.
The full-kernel two-node test also read a MySQL write via TDS and a TDS write via MySQL, with encrypted tables and primary indexes on both nodes. Explicit ENCRYPTION='N' requests heap and is subject to the database encryption policy. Rehearse encrypted recovery with your actual key provider; the logical round-trip fixture above used ordinary tables.
Cut over and roll back
- Rehearse on a separate target. Compare row counts and key ranges,
HEXof binary values, collated duplicates, orphan counts, generated values, next identity value, ownership and application grants. Test a commit and a rollback over the actual driver. - Quiesce source writes, drain open transactions, take the final consistent export and repeat the comparisons. MySQL GTID replication is unavailable (
@@gtid_mode='OFF', both GTID sets empty). A PostgreSQL WAL position cannot resume a MySQL GTID stream. - Switch application connections and keep the source and backup intact. Before the first target write, rollback can route clients to the source. After any target commits, stop writes and reconcile those transactions before reopening the source.
6 - Limits and troubleshooting
Connection problems
| Symptom | What to check | Action |
|---|---|---|
mysql looks for a socket file, or gets a protocol error | The MySQL listener is TCP-only. Port 5432 normally speaks PostgreSQL. | Use --protocol=TCP -h 127.0.0.1 -P 3306 or substitute the configured address and port. |
| Connection refused after a configuration change | Via psql, check SHOW shared_preload_libraries and pg_settings.pending_restart. In the server log look for MySQL protocol listening on port or a socket bind warning. | Restart after changing the preloads, addresses or port. Check port conflicts, mysql.listener_on and whether mysql.port=0. |
| Login fails before any SQL | Check the first matching HBA line using the PostgreSQL database name, role, client IP and TLS mode. Check the role has LOGIN, a current password and the required verifier. | Correct the matching rule, reload HBA, reconnect and verify the certificate. For cold-cache SHA-2 login use TLS or a client configured for RSA exchange. |
| Ordinary role is told to install the extension | In psql check SHOW mysql.database. Connect to that database and query pg_extension there. | As a superuser run CREATE EXTENSION pg_mysql in the target. Grant the application access to its schema. |
| Login works but tables are missing | Compare MySQL SELECT DATABASE() with native SELECT current_database() and the table’s schema. | Use USE app in MySQL and a schema-qualified name such as app.notes in the native target database. |
| Module missing or server refuses to start after removing a preload | Check the selected installation’s pg_config --pkglibdir, the preload list and the startup log. A cluster can record mysql in mimus_required_features once it has installed MySQL objects. | Restore the matching kernel, module and preload. To close the port while keeping the required callbacks, restart with mysql.listener_on=off. Kernel checks |
Unexpected results or failed restore
| Observation | Check or remedy |
|---|---|
| 1264 on a large positive ID, 1366 on text, 1292 on a date or time | Compare the source range, raw bytes or temporal value. Convert explicitly before replay. Type examples |
| Unique-key conflicts differ or ordering changed | Run SHOW WARNINGS immediately after DDL, then SHOW CREATE TABLE. Compare the effective collation, key prefix and candidate duplicates. For a comparator version warning, inventory dependent indexes and partition keys before rebuilding and checking them. Collation example |
| A foreign-key violation persists after disabling checks | Check referenced-key uniqueness and the owner of each referencing table. Re-enabling checks does not repair old rows. FK behavior |
| A dump contains rows, but the client exited nonzero | Treat the dump as incomplete. Inspect generated columns, trigger definitions and the exact client version. Oracle 5.7.32 returned 2 on the quick-start identity table with default trigger export. Rehearsed alternatives |
pgcmp installation conflicts over the bit to bytea cast | Install pgcmp and pg_mysql in separate PostgreSQL databases. |
Limits to account for before cutover
Stored procedures through the MySQL dialect, MySQL Unix sockets, KILL [QUERY], COM_CHANGE_USER and MySQL GTID replication are unavailable. Applications requiring these interfaces need changes before cutover. For consistent reporting or exclusive maintenance, use the tested transaction behavior.
Workloads using other drivers or pool reset policies, MySQL 8-specific metadata and collation tailoring, arbitrary stored DDL, or their own triggers need application-level verification. An advertised version string, an ORM login and a single successful query each leave those paths open. The published examples also leave production key-provider recovery and the performance of large prefix-key collision groups to the operator’s rehearsal. Driver coverage · Restore coverage
7 - Protocol, dialect and origins
From TCP connection to table
Patch 300 imports the OpenHalo server hooks. At startup the preloaded extension registers a TCP listener. On connection, a PostgreSQL backend exchanges a MySQL handshake, chooses the native database configured in mysql.database and authenticates the PostgreSQL role. It checks for the extension in that database before accepting application SQL. The database name sent by the client selects a schema inside it. 300/301 kernel patches
Parsing and execution
The extension implements the MySQL grammar, rewrites supported DDL and DML, implements compatibility types and functions, and encodes results in MySQL packets. PostgreSQL plans and executes the query and stores its rows. Patch 301 integrates dialect-specific coercions, managed collation callbacks, foreign-key checks and startup requirements. A native client uses the PostgreSQL protocol and parser against the same catalogs. SQL behavior at each endpoint
Names in the native database
The example MySQL database app maps to schema app. The extension installs its own schemas too: mysql for compatibility objects, mys_informa_schema for information-schema compatibility, performance_schema and mys_sys. Export application objects separately so the target installer can create the extension-owned objects.
Identify this build
| Component | 19.0.1-r4 identity |
|---|---|
| Native kernel | pgsty/mimus at 0d8a551aa121, tree 07fbb73680de. This integrates the nine patches on PostgreSQL REL_19_0. |
| OpenHalo kernel input | pgsty/openhalo at a7e6d509db7f for the upstream part of 300. 301 carries the Mimus adaptations. |
| Standalone extension | pgsty/pg_mysql at 1e631f9802c5, tree 53dd9be3e87b. Build this commit directly with the matching kernel’s pg_config. pg_extension.extversion and pg_get_loaded_modules() report 1.0. |
| MySQL protocol | The handshake, VERSION() and @@version return mysql.compat_version, which defaults to 5.7.32-log. @@version_comment returns mimus. |
Origins and license
The grammar, original SQL definitions and compatibility routines descend from Halo Tech’s PostgreSQL 14 work. PGSTY ported the work to PostgreSQL 18/19 and extracted the standalone pg_mysql from OpenHalo’s aux_mysql. Ruohang Feng maintains the extension at PGSTY PTE. LTD. Earlier cross-kernel experiments belong to the OpenHalo 18 porting history. OpenHalo source · History of the earlier port
The standalone extension carries GPL-3.0-or-later and retains the original Halo Tech Co., Ltd. and openHalo.org notices, copyright 2019–2026. The parser retains Jet C.X. ZHANG’s credit. The source also credits PGSTY PTE. LTD. (2026), the PostgreSQL Global Development Group (1996–2026) and the Regents of the University of California (1994). PostgreSQL-derived portions and keyword tools retain the PostgreSQL License. The distributed LICENSE, COPYRIGHT and 3party-legal-notices contain the full notices. Original Halo Tech copyright notice
Other kernels
The examples here require Mimus 19.0.1’s matching server callbacks and module. The old experiments with IvorySQL and Babelfish used different kernels and extension identities. For SQL Server access on this Mimus kernel, use its paired Babelfish extensions. SQL Server manual · Encrypted table access methods