Skip to content

Commit

Permalink
docs: update README to reflect recent updates (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite authored Jun 16, 2022
1 parent bc778ec commit d0c52bf
Showing 1 changed file with 20 additions and 31 deletions.
51 changes: 20 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ This option is only available for Java/JVM-based applications.
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner-pgadapter</artifactId>
<version>0.3.0</version>
<version>0.5.0</version>
</dependency>
```

Expand Down Expand Up @@ -138,6 +138,7 @@ The following options are required to run the proxy:
in psql will change the underlying database that PGAdapter connects to.
-c <credentialspath>
* This argument should not be used in combination with -a (authentication mode).
* This is only required if you have not already set up default credentials on the system where you
are running PGAdapter. See https://cloud.google.com/spanner/docs/getting-started/set-up#set_up_authentication_and_authorization
for more information on setting up authentication for Cloud Spanner.
Expand Down Expand Up @@ -169,23 +170,14 @@ The following options are optional:
See DDL options for more information.
-a
* Use authentication when connecting. Currently authentication is not strictly
implemented in the proxy layer, as it is expected to be run locally, and
will ignore any connection not stemming from localhost. However, it is a
useful compatibility option if the PostgreSQL client is set to always
authenticate. Note that SSL is not included for the same reason that
authentication logic is not: since all connections are local, sniffing
traffic should not generally be a concern.
-c <multi-statementcommand>
Runs a single command before exiting. This command can be comprised of multiple
statments separated by ';'. Each SQL command string passed to -c is sent to the
server as a single request. Because of this, the server executes it as a single
transaction even if the string contains multiple SQL commands. There are some
limitations in Cloud Spanner which require this option to operate in a different
manner from PSQL. 'SELECT' statements are not allowed in batched commands. Mixing
DML and DDL is not allowed in a single multi-statement command. Also,
'BEGIN TRANSACTION' and 'COMMIT' statements are not allowed in batched commands.
* Turns on authentication for the proxy server. Clients are then requested
to supply a username and password during a connection request.
* The username and password must contain one of the following:
1. The password field must contain the JSON payload of a credentials file, for example from a service account key file. The username will be ignored in this case.
2. The password field must contain the private key from a service account key file. The username must contain the email address of the corresponding service account.
* Note that SSL is not supported for the connection between the client and
PGAdapter. The proxy should therefore only be used within a private network.
The connection between PGAdapter and Cloud Spanner is always secured with SSL.
-b
* Force the server to send data back in binary PostgreSQL format when no
Expand Down Expand Up @@ -268,15 +260,12 @@ a transformation of the [PostgreSQL wire protocol](https://www.postgresql.org/do
except for some cases concerning PSQL, wherein the query itself is translated.

Simple query mode and extended query mode are supported, and any data type
supported by Spanner is also supported. Items, tables and language not native to
Spanner are not supported, unless otherwise specified.
supported by Spanner is also supported. Cloud Spanner databases created with
PostgreSQL dialect do not support all `pg_catalog` tables.

Though the majority of functionality inherent in most PostgreSQL clients
(including PSQL and JDBC) are included out of the box, the following items are
not supported:
* Prepared Statement DESCRIBE
Though the majority of functionality inherent in most PostgreSQL clients are included
out of the box, the following items are not supported:
* SSL
* Functions
* COPY <table_name> TO ...
* COPY <table_name> FROM <filename | PROGRAM program>

Expand Down Expand Up @@ -358,13 +347,13 @@ psql -h localhost -p 5432 -d my-local-db \
## Limitations

PGAdapter has the following known limitations at this moment:
- [PostgreSQL prepared statements](https://www.postgresql.org/docs/current/sql-prepare.html) are not
- fully supported. It is not recommended to use this feature.
Note: This limitation relates specifically to server side PostgreSQL prepared statements.
The JDBC `java.sql.PreparedStatement` interface is supported.
- DESCRIBE statement wire-protocol messages currently return `Oid.UNSPECIFIED` for all parameters in the query.
- DESCRIBE statement wire-protocol messages return `NoData` as the row description of the statement.
- SSL connections are not supported.
- Only [password authentication](https://www.postgresql.org/docs/current/auth-password.html) using
the `password` method is supported. All other authentication methods are not supported.
- The COPY protocol only supports COPY FROM STDIN.
- DDL transactions are not supported. PGAdapter allows DDL statements in implicit transactions,
and executes SQL strings that contain multiple DDL statements as a single DDL batch on Cloud
Spanner. See [DDL transaction options](docs/ddl.md) for more information.

## Logging

Expand Down

0 comments on commit d0c52bf

Please sign in to comment.