postgresql

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package postgresql is the PostgreSQL direct engine (#82): Baleia runs SQL on a PostgreSQL connection itself, without Trino. A session is one dedicated pool connection; results stream as Arrow, mapped from the pgx field descriptions. Every dial goes through connections.Dialer (docs/adr/0011).

Index

Constants

View Source
const Kind = "postgresql"

Kind is the registered engine kind.

Variables

This section is empty.

Functions

func Spec

Spec is the kind's entry for a queryengine.Registry (#364).

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine is a PostgreSQL server reached directly.

func (*Engine) Cancel

func (e *Engine) Cancel(ctx context.Context, h queryengine.QueryHandle) error

Cancel cancels a running statement from any process with pg_cancel_backend, using the handle's backend pid. A statement that is gone is not an error.

pg_cancel_backend stops whatever the backend runs at that moment, and the handle is reported before the statement reaches it (#505). So it is sent only while the backend runs the statement tagged in the handle, retried until it does: a cancel never hits another statement on a pooled connection, and one that arrives early is not lost. A handle without a tag (an older worker) cancels at once.

func (*Engine) Capabilities

func (e *Engine) Capabilities() queryengine.Capabilities

Capabilities of PostgreSQL in v1.

func (*Engine) Class

func (e *Engine) Class() queryengine.Class

func (*Engine) Close

func (e *Engine) Close() error

func (*Engine) Dialect

func (e *Engine) Dialect() queryengine.Dialect

func (*Engine) ID

func (e *Engine) ID() string

func (*Engine) Introspector

func (e *Engine) Introspector() queryengine.Introspector

func (*Engine) Kind

func (e *Engine) Kind() string

func (*Engine) OpenSession

func (e *Engine) OpenSession(ctx context.Context, spec queryengine.SessionSpec) (queryengine.Session, error)

func (*Engine) Ping

func (e *Engine) Ping(ctx context.Context) error

Ping fails while the server is unreachable.

func (*Engine) Version

func (e *Engine) Version(ctx context.Context) (string, error)

Version reports the server version.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL