{"modulePath":"github.com/uber/cadence","version":"v1.4.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package postgres\n\n## Constants\n\n```go\nconst (\n\tErrDuplicateTable  = \"42P07\"\n\tErrDuplicateColumn = \"42701\"\n\tErrDuplicateObject = \"42710\"\n)\n```\nErrors returned when a DDL statement creates an element that already exists\n\n```go\nconst ErrDupEntry = \"23505\"\n```\nErrDupEntry indicates a duplicate primary key i.e. the row already exists, check [http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html](http://www.postgresql.org/docs/9.3/static/errcodes-appendix.html)\n\n```go\nconst ErrInsufficientResources = \"53000\"\n```\n\n```go\nconst ErrTooManyConnections = \"53300\"\n```\n\n```go\nconst (\n\t// PluginName is the name of the plugin\n\tPluginName = \"postgres\"\n)\n```\n\n## Functions\n\n```go\nfunc GetTestConfig() (config.DataStore, error)\n```\nGetTestConfig return test options\n\n## Types\n\n```go\ntype DataConverter interface {\n\tToPostgresDateTime(t time.Time) time.Time\n\tFromPostgresDateTime(t time.Time) time.Time\n}\n```\nDataConverter defines the API for conversions to/from go types to postgres datatypes TODO [https://github.com/uber/cadence/issues/2892](https://github.com/uber/cadence/issues/2892) There are some reasons: r application layer is not consistent with timezone: for example, in some case we write timestamp with local timezone but when the time.Time is converted from \"JSON\"(from paging token), the timezone is missing\n\n","path":"github.com/uber/cadence/common/persistence/sql/sqlplugin/postgres","name":"postgres","synopsis":"","isRedistributable":true}
