pgcopy

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

package pgcopy - parser for PostgreSQL `COPY TO ... WITH BINARY` command result

FileFormat Docs: https://www.postgresql.org/docs/14/sql-copy.html#id-1.9.3.55.9.4.5

If docs are confusing, check sources instead: metadata and headers: https://github.com/postgres/postgres/blob/26b3455/src/backend/commands/copyto.c#L824-L834 row/tuple implementation: https://github.com/postgres/postgres/blob/26b3455/src/backend/commands/copyto.c#L931-L1000

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidSignature = errors.New(`invalid file signature: expected PGCOPY\n\377\r\n\0`)
)

Functions

This section is empty.

Types

type Parser

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

func NewParser

func NewParser() *Parser

func (*Parser) Next

func (p *Parser) Next(ctx context.Context) ([][]byte, error)

func (*Parser) Parse

func (p *Parser) Parse(r io.Reader) error

Jump to

Keyboard shortcuts

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