Home >Database >Mysql Tutorial >Can PostgreSQL Execute Cross-Database Queries?
Can PostgreSQL perform cross-database queries?
One limitation of PostgreSQL is the inability to perform cross-database queries. This is evident from the error message "Cross-database references not implemented" referenced in the initial query.
For data that spans multiple database partitions, an alternative exists: postgres_fdw
(Foreign Data Wrapper). This makes it possible to connect to tables in any PostgreSQL database, whether local or remote.
Old PostgreSQL version notes:
For versions prior to 9.3, a function named dblink
can be used. This feature is distributed with PostgreSQL, but users may need to install the postgresql-contrib
package. It should be noted that older versions of PostgreSQL are no longer supported.
The above is the detailed content of Can PostgreSQL Execute Cross-Database Queries?. For more information, please follow other related articles on the PHP Chinese website!