Executing Queries
This section describes how to execute queries using PostgreSQL remoting from any tool that can connect to PostgreSQL.
When executing queries, use a two-part name, in the format:
"<Schema Name>"."<Table Name>"where
- Schema Name is the name of the schema containing the table. In pgAdmin, the schema name is found in (your linked server name) > Databases > (your database name) > Schemas.
- Table Name is the name of the table you are querying data from.
SELECT Statements
To select records:SELECT * FROM "PostgreSQL".""postgres"."schema01".Orders" WHERE ShipCountry = 'USA'
INSERT, UPDATE, and DELETE Statements
To insert, update, or delete a single row of data against a writable database, use the two-part name. For example:INSERT INTO "PostgreSQL".""postgres"."schema01".Orders" (ShipCountry) VALUES ('USA');