Enum ProxyServer.DataFormat (0.18.2)

public enum ProxyServer.DataFormat extends Enum<ProxyServer.DataFormat>

The PostgreSQL wire protocol can send data in both binary and text format. When using text format, the Server will normally send output back to the client using a format understood by PostgreSQL clients. If you are using the server with a text-only client that does not try to interpret the data that is returned by the server, such as for example psql, then it is advisable to use Cloud Spanner formatting. The server will then return all data in a format understood by Cloud Spanner.

The default format used by the server is DataFormat#POSTGRESQL_TEXT.

Static Fields

NameDescription
POSTGRESQL_BINARY

Data is returned to the client in binary form. This is the most compact format, but it is not supported by all clients for all data types. Only when the client specifically requests that the data should be returned in binary format, will the server do so.

POSTGRESQL_TEXT

The default format. Data is returned to the client in a format that PostgreSQL clients should be able to understand and stringParse. Use this format if you are using the Server with a client that tries to interpret the data that is returned by the server, such as for example the PostgreSQL JDBC driver.

SPANNER

Data is returned to the client in Cloud Spanner format. Use this format if you are using the server with a text-only client, such as psql, that does not try to interpret and stringParse the data that is returned.

Static Methods

NameDescription
byCode(short code, OptionsMetadata.TextFormat textFormat)
fromTextFormat(OptionsMetadata.TextFormat textFormat)
getDataFormat(int index, IntermediateStatement statement, ConnectionHandler.QueryMode mode, OptionsMetadata options)
valueOf(String name)
values()

Methods

NameDescription
getCode()