RegisterDriver registers a Postgres driver that uses the alloydbconn.Dialer
configured with the provided options. The choice of name is entirely up to
the caller and may be used to distinguish between multiple registrations of
differently configured Dialers. The driver uses pgx/v4 internally.
RegisterDriver returns a cleanup function that should be called one the
database connection is no longer needed.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-05 UTC."],[[["\u003cp\u003eThe latest version of the AlloyDB driver for pgx v4 is 1.15.0.\u003c/p\u003e\n"],["\u003cp\u003eThis page lists available versions of the AlloyDB driver, ranging from the latest 1.15.0 down to 0.1.1.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003epgxv4\u003c/code\u003e package is designed for use with the \u003ccode\u003edatabase/sql\u003c/code\u003e package, offering a way to interface with AlloyDB.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRegisterDriver\u003c/code\u003e function allows registration of a Postgres driver using \u003ccode\u003ealloydbconn.Dialer\u003c/code\u003e, and accepts configuration options.\u003c/p\u003e\n"],["\u003cp\u003eA cleanup function is provided by \u003ccode\u003eRegisterDriver\u003c/code\u003e that should be used when the database connection is no longer needed.\u003c/p\u003e\n"]]],[],null,["# Package cloud.google.com/go/alloydbconn/driver/pgxv4 (v1.15.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.15.1 (latest)](/go/docs/reference/cloud.google.com/go/alloydbconn/latest/driver/pgxv4)\n- [1.15.0](/go/docs/reference/cloud.google.com/go/alloydbconn/1.15.0/driver/pgxv4)\n- [1.14.1](/go/docs/reference/cloud.google.com/go/alloydbconn/1.14.1/driver/pgxv4)\n- [1.13.2](/go/docs/reference/cloud.google.com/go/alloydbconn/1.13.2/driver/pgxv4)\n- [1.12.1](/go/docs/reference/cloud.google.com/go/alloydbconn/1.12.1/driver/pgxv4)\n- [1.11.1](/go/docs/reference/cloud.google.com/go/alloydbconn/1.11.1/driver/pgxv4)\n- [1.10.0](/go/docs/reference/cloud.google.com/go/alloydbconn/1.10.0/driver/pgxv4)\n- [1.9.0](/go/docs/reference/cloud.google.com/go/alloydbconn/1.9.0/driver/pgxv4)\n- [1.8.0](/go/docs/reference/cloud.google.com/go/alloydbconn/1.8.0/driver/pgxv4)\n- [1.7.0](/go/docs/reference/cloud.google.com/go/alloydbconn/1.7.0/driver/pgxv4)\n- [1.6.0](/go/docs/reference/cloud.google.com/go/alloydbconn/1.6.0/driver/pgxv4)\n- [1.5.2](/go/docs/reference/cloud.google.com/go/alloydbconn/1.5.2/driver/pgxv4)\n- [1.4.0](/go/docs/reference/cloud.google.com/go/alloydbconn/1.4.0/driver/pgxv4)\n- [1.3.3](/go/docs/reference/cloud.google.com/go/alloydbconn/1.3.3/driver/pgxv4)\n- [1.2.2](/go/docs/reference/cloud.google.com/go/alloydbconn/1.2.2/driver/pgxv4)\n- [1.1.0](/go/docs/reference/cloud.google.com/go/alloydbconn/1.1.0/driver/pgxv4)\n- [1.0.0](/go/docs/reference/cloud.google.com/go/alloydbconn/1.0.0/driver/pgxv4)\n- [0.4.0](/go/docs/reference/cloud.google.com/go/alloydbconn/0.4.0/driver/pgxv4)\n- [0.3.1](/go/docs/reference/cloud.google.com/go/alloydbconn/0.3.1/driver/pgxv4)\n- [0.2.2](/go/docs/reference/cloud.google.com/go/alloydbconn/0.2.2/driver/pgxv4)\n- [0.1.1](/go/docs/reference/cloud.google.com/go/alloydbconn/0.1.1/driver/pgxv4) \n**Note:** To get more information about this package, such as access to older versions, view [this package on pkg.go.dev](https://pkg.go.dev/cloud.google.com/go/alloydbconn/driver/pgxv4). \n\u003cbr /\u003e\n\nPackage pgxv4 provides an AlloyDB driver that uses pgx v4 and works with the\ndatabase/sql package. \n\nFunctions\n---------\n\n### func RegisterDriver\n\n func RegisterDriver(name https://pkg.go.dev/builtin#string, opts .../go/docs/reference/cloud.google.com/go/alloydbconn/latest./go/docs/reference/cloud.google.com/go/alloydbconn/latest#cloud_google_com_go_alloydbconn_Option) (func() https://pkg.go.dev/builtin#error, https://pkg.go.dev/builtin#error)\n\nRegisterDriver registers a Postgres driver that uses the alloydbconn.Dialer\nconfigured with the provided options. The choice of name is entirely up to\nthe caller and may be used to distinguish between multiple registrations of\ndifferently configured Dialers. The driver uses pgx/v4 internally.\nRegisterDriver returns a cleanup function that should be called one the\ndatabase connection is no longer needed."]]