Ecosyste.ms: Repos
An open API service providing repository metadata for many open source software ecosystems.
Package Usage: go: github.com/lib/pq
Package pq is a pure Go Postgres driver for the database/sql package.
In most cases clients will use the database/sql package instead of
using this package directly. For example:
You can also connect to a database using a URL. For example:
Similarly to libpq, when establishing a connection using pq you are expected to
supply a connection string containing zero or more parameters.
A subset of the connection parameters supported by libpq are also supported by pq.
Additionally, pq also lets you specify run-time parameters (such as search_path or work_mem)
directly in the connection string. This is different from libpq, which does not allow
run-time parameters in the connection string, instead requiring you to supply
them in the options parameter.
For compatibility with libpq, the following special connection parameters are
supported:
Valid values for sslmode are:
See http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
for more information about connection string parameters.
Use single quotes for values that contain whitespace:
A backslash will escape the next character in values:
Note that the connection parameter client_encoding (which sets the
text encoding for the connection) may be set but must be "UTF8",
matching with the same rules as Postgres. It is an error to provide
any other value.
In addition to the parameters listed above, any run-time parameter that can be
set at backend start time can be set in the connection string. For more
information, see
http://www.postgresql.org/docs/current/static/runtime-config.html.
Most environment variables as specified at http://www.postgresql.org/docs/current/static/libpq-envars.html
supported by libpq are also supported by pq. If any of the environment
variables not supported by pq are set, pq will panic during connection
establishment. Environment variables have a lower precedence than explicitly
provided connection parameters.
The pgpass mechanism as described in http://www.postgresql.org/docs/current/static/libpq-pgpass.html
is supported, but on Windows PGPASSFILE must be specified explicitly.
database/sql does not dictate any specific format for parameter
markers in query strings, and pq uses the Postgres-native ordinal markers,
as shown above. The same marker can be reused for the same parameter:
pq does not support the LastInsertId() method of the Result type in database/sql.
To return the identifier of an INSERT (or UPDATE or DELETE), use the Postgres
RETURNING clause with a standard Query or QueryRow call:
For more details on RETURNING, see the Postgres documentation:
For additional instructions on querying see the documentation for the database/sql package.
Parameters pass through driver.DefaultParameterConverter before they are handled
by this package. When the binary_parameters connection option is enabled,
[]byte values are sent directly to the backend as data in binary format.
This package returns the following types for values from the PostgreSQL backend:
All other types are returned directly from the backend as []byte values in text format.
pq may return errors of type *pq.Error which can be interrogated for error details:
See the pq.Error type for details.
You can perform bulk imports by preparing a statement returned by pq.CopyIn (or
pq.CopyInSchema) in an explicit transaction (sql.Tx). The returned statement
handle can then be repeatedly "executed" to copy data into the target table.
After all data has been processed you should call Exec() once with no arguments
to flush all buffered data. Any call to Exec() might return an error which
should be handled appropriately, but because of the internal buffering an error
returned by Exec() might not be related to the data passed in the call that
failed.
CopyIn uses COPY FROM internally. It is not possible to COPY outside of an
explicit transaction in pq.
Usage example:
PostgreSQL supports a simple publish/subscribe model over database
connections. See http://www.postgresql.org/docs/current/static/sql-notify.html
for more information about the general mechanism.
To start listening for notifications, you first have to open a new connection
to the database by calling NewListener. This connection can not be used for
anything other than LISTEN / NOTIFY. Calling Listen will open a "notification
channel"; once a notification channel is open, a notification generated on that
channel will effect a send on the Listener.Notify channel. A notification
channel will remain open until Unlisten is called, though connection loss might
result in some notifications being lost. To solve this problem, Listener sends
a nil pointer over the Notify channel any time the connection is re-established
following a connection loss. The application can get information about the
state of the underlying connection by setting an event callback in the call to
NewListener.
A single Listener can safely be used from concurrent goroutines, which means
that there is often no need to create more than one Listener in your
application. However, a Listener is always connected to a single database, so
you will need to create a new Listener instance for every database you want to
receive notifications in.
The channel name in both Listen and Unlisten is case sensitive, and can contain
any characters legal in an identifier (see
http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
for more information). Note that the channel name will be truncated to 63
bytes by the PostgreSQL server.
You can find a complete, working example of Listener usage at
https://godoc.org/github.com/lib/pq/example/listen.
If you need support for Kerberos authentication, add the following to your main
package:
This package is in a separate module so that users who don't need Kerberos
don't have to download unnecessary dependencies.
When imported, additional connection string parameters are supported:
24 versions
Latest release: almost 1 year ago
27,676 dependent packages
View more package details: https://packages.ecosyste.ms/registries/proxy.golang.org/packages/github.com/lib/pq
View more repository details: https://repos.ecosyste.ms/hosts/GitHub/repositories/lib%2Fpq
Dependent Repos 81,738
admariner/jitsu Fork of jitsucom/jitsu
Jitsu is an open-source data integration platform- v1.10.2 configurator/backend/go.mod
- v1.10.2 configurator/backend/go.sum
- v1.10.2 server/go.mod
- v1.10.2 server/go.sum
Size: 29.4 MB - Last synced: about 1 month ago - Pushed: 10 months ago
vearutop/cache-story
Demo repository for a blog post.- v1.2.0 go.sum
Size: 4.59 MB - Last synced: 2 months ago - Pushed: 2 months ago
ossf/scorecard-action
Official GitHub Action for OpenSSF Scorecard.- v1.10.4 go.sum
- v1.0.0 go.sum
- v1.1.0 go.sum
- v1.1.1 go.sum
- v1.2.0 go.sum
- v1.3.0 go.sum
- v1.8.0 go.sum
- v1.9.0 go.sum
- v1.10.2 go.sum
- v1.10.3 go.sum
Size: 6.43 MB - Last synced: 1 day ago - Pushed: 1 day ago
zeromike/syft Fork of anchore/syft
CLI tool and library for generating a Software Bill of Materials from container images and filesystems- v1.0.0 go.sum
- v1.1.1 go.sum
- v1.8.0 go.sum
- v1.9.0 go.sum
- v1.10.3 go.sum
- v1.10.4 go.sum
Size: 10.4 MB - Last synced: 11 months ago - Pushed: almost 2 years ago
aberja/argo Fork of argoproj/argo-workflows
Argo Workflows: Get stuff done with Kubernetes.- v1.10.4 go.mod
- v1.10.4 go.sum
Size: 67.2 MB - Last synced: about 1 year ago - Pushed: about 1 year ago
krasish/test-infra Fork of kyma-project/test-infra
Test infrastructure for the Kyma project.- v1.10.0 development/gcp/cloud-functions/getfailureinstancedetails/go.sum
- v1.10.1 development/gcp/cloud-functions/getfailureinstancedetails/go.sum
- v1.0.0 development/gcp/cloud-functions/getfailureinstancedetails/go.sum
- v1.1.1 development/gcp/cloud-functions/getfailureinstancedetails/go.sum
- v1.2.0 development/gcp/cloud-functions/getfailureinstancedetails/go.sum
- v1.8.0 development/gcp/cloud-functions/getfailureinstancedetails/go.sum
- v1.0.0 development/kyma-ci-force-bot/ciforcebot/go.sum
- v1.1.1 development/kyma-ci-force-bot/ciforcebot/go.sum
- v1.2.0 development/kyma-ci-force-bot/ciforcebot/go.sum
- v1.8.0 development/kyma-ci-force-bot/ciforcebot/go.sum
- v1.10.0 development/kyma-ci-force-bot/ciforcebot/go.sum
- v1.10.1 development/kyma-ci-force-bot/ciforcebot/go.sum
- v1.0.0 go.sum
- v1.1.1 go.sum
- v1.2.0 go.sum
- v1.8.0 go.sum
- v1.10.0 go.sum
- v1.10.1 go.sum
Size: 15.3 MB - Last synced: about 1 year ago - Pushed: about 1 year ago
whayoung27/AI-Burning-Day_Result
- v1.3.0 [WEB][WHALE][DEEPLOL]/ga/go.mod
- v1.3.0 [WEB][WHALE][DEEPLOL]/ga/go.sum
Size: 582 MB - Last synced: 4 days ago - Pushed: over 1 year ago
ffuf-glanz/terraform-provider-azuredevops Fork of feilfeilundfeil/terraform-provider-azuredevops
Terraform provider for Azure DevOps- v1.0.0 go.sum
Size: 19.8 MB - Last synced: about 1 year ago - Pushed: about 1 year ago
spolti/kie-cloud-operator Fork of kiegroup/kie-cloud-operator
OCP Operator for KIE- v1.0.0 go.sum
- v1.2.0 go.sum
- v1.3.0 go.sum
Size: 100 MB - Last synced: 8 months ago - Pushed: 8 months ago
cheqd/tendermint Fork of tendermint/tendermint
⟁ Tendermint Core (BFT Consensus) in Go- v1.0.0 go.sum
- v1.2.0 go.sum
- v1.10.6 go.sum
- v1.10.6 go.mod
Size: 142 MB - Last synced: 16 days ago - Pushed: about 1 year ago
alicefr/kubevirt Fork of kubevirt/kubevirt
Kubernetes Virtualization API and runtime in order to define and manage virtual machines.- v0.0.0-20180201184707-88edab080323 cluster-up/cluster/kind-k8s-sriov-1.17.0/csrcreator/go.sum
Size: 255 MB - Last synced: 8 days ago - Pushed: 8 days ago
ryanlycch/go-zero-looklook Fork of Mikaelemmmm/go-zero-looklook
🔥基于go-zero(go zero) 微服务全技术栈开发最佳实践项目。Develop best practice projects based on the full technology stack of go zero (go zero) microservices.- v1.0.0 go.sum
- v1.10.4 go.sum
- v1.10.6 go.sum
Size: 101 MB - Last synced: 15 days ago - Pushed: 15 days ago
ahmedabu98/beam Fork of apache/beam
Apache Beam is a unified programming model for Batch and Streaming- v1.10.6 sdks/go.mod
- v1.0.0 sdks/go.sum
- v1.10.6 sdks/go.sum
Size: 365 MB - Last synced: 12 days ago - Pushed: 13 days ago
xav-b/crypto-stuff
Tinkering around- v1.10.2 streaming-ethereum-on-chain-data-to-questdb/go.sum
- v1.0.0 streaming-ethereum-on-chain-data-to-questdb/go.sum
- v1.1.0 streaming-ethereum-on-chain-data-to-questdb/go.sum
- v1.2.0 streaming-ethereum-on-chain-data-to-questdb/go.sum
Size: 7.6 MB - Last synced: about 1 year ago - Pushed: about 1 year ago
observIQ/grafana-agent Fork of grafana/agent
Telemetry agent for the LGTM stack.- v1.10.2 go.mod
- v0.0.0-20150723085316-0dad96c0b94f go.sum
- v0.0.0-20180327071824-d34b9ff171c2 go.sum
- v0.0.0-20180523175426-90697d60dd84 go.sum
- v1.0.0 go.sum
- v1.3.0 go.sum
- v1.10.1 go.sum
- v1.10.2 go.sum
Size: 48.3 MB - Last synced: 5 months ago - Pushed: 5 months ago
nostprumprajee/Traveler
- v1.0.0 go-contacts/go.mod
- v1.0.0 go-contacts/go.sum
- v1.0.0 gokit-examples/go.mod
- v1.0.0 gokit-examples/go.sum
Size: 77.6 MB - Last synced: about 1 year ago - Pushed: over 1 year ago
tharun208/loki Fork of grafana/loki
Like Prometheus, but for logs.- v0.0.0-20180523175426-90697d60dd84 go.sum
- v1.0.0 go.sum
- v1.3.0 go.sum
- v1.0.0 tools/lambda-promtail/go.sum
Size: 168 MB - Last synced: 7 days ago - Pushed: about 1 year ago
tranminhduc4796/far_cry_online
The last project of Intek- v1.0.0 server/go.sum
Size: 16.1 MB - Last synced: about 1 year ago - Pushed: over 1 year ago
SharanSK001/GO-CRUD-GIN-ENT
- v1.10.7 go.mod
- v1.0.0 go.sum
- v1.10.7 go.sum
Size: 51.8 KB - Last synced: 3 months ago - Pushed: 4 months ago
go-farmyard/farmyard
- v1.2.0 go.sum
Size: 30.3 KB - Last synced: 10 months ago - Pushed: 11 months ago
Team-Kujira/ibc-go Fork of cosmos/ibc-go
Interblockchain Communication Protocol (IBC) implementation in Golang.- v1.10.7 e2e/go.mod
- v1.10.7 e2e/go.sum
- v1.10.7 go.mod
- v1.10.7 go.sum
Size: 30.2 MB - Last synced: 4 days ago - Pushed: 7 months ago
antonyggvzvmnxxcx/linkerd2 Fork of linkerd/linkerd2
Ultralight, security-first service mesh for Kubernetes. Main repo for Linkerd 2.x.- v1.2.0 go.sum
- v1.10.0 go.sum
- v1.10.4 go.sum
Size: 33.5 MB - Last synced: about 1 year ago - Pushed: about 1 year ago
jan--f/telemeter Fork of openshift/telemeter
Prometheus push federation- v1.0.0 tools/go.sum
- v1.3.0 tools/go.sum
Size: 35 MB - Last synced: 11 months ago - Pushed: 11 months ago
FranLucchini/try_seldonCore_JenkinsX
Check how to use Seldon Core with Jenkins X- v1.2.0 versionStream/tests/go.sum
- v1.10.0 versionStream/tests/go.sum
Size: 244 KB - Last synced: about 1 year ago - Pushed: almost 2 years ago
carlkyrillos/integreatly-operator Fork of integr8ly/integreatly-operator
An Openshift Operator based on the Operator SDK for installing and reconciling Integreatly services- v1.0.0 go.sum
Size: 126 MB - Last synced: 7 days ago - Pushed: 7 days ago
rancher-max/rancher Fork of rancher/rancher
Complete container management platform- v1.8.0 cmd/rancherd/go.sum
- v1.10.4 go.mod
Size: 131 MB - Last synced: 14 days ago - Pushed: 14 days ago
msrinivasssa/go-trial-app
- v1.0.0 go.sum
- v1.1.0 go.sum
Size: 397 KB - Last synced: about 1 year ago - Pushed: about 1 year ago