go-vise

Constrained Size Output Virtual Machine
Info | Log | Files | Refs | README | LICENSE

commit dadd6d24bdd8ff97ec8ead0069afb67edbd551f9
parent e2d329b3f739ce7dbb1957b015f1a64e70ea8784
Author: lash <dev@holbrook.no>
Date:   Wed, 15 Jan 2025 14:52:41 +0000

Exclude prefix in postgres dump

Diffstat:
Mdb/db.go | 2+-
Mdb/postgres/dump.go | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/db/db.go b/db/db.go @@ -241,6 +241,6 @@ func(bd *DbBase) ToKey(ctx context.Context, key []byte) (LookupKey, error) { lk.Translation = ToDbKey(db.pfx, b, ln) } } - logg.TraceCtxf(ctx, "made key", "lk", lk.Default, "pfx", db.pfx) + logg.TraceCtxf(ctx, "made db lookup key", "lk", lk.Default, "pfx", db.pfx) return lk, nil } diff --git a/db/postgres/dump.go b/db/postgres/dump.go @@ -31,7 +31,7 @@ func(pdb *pgDb) Dump(ctx context.Context, key []byte) (*db.Dumper, error) { tx.Commit(ctx) pdb.it = rs pdb.itBase = k - return db.NewDumper(pdb.dumpFunc).WithClose(pdb.closeFunc).WithFirst(r[0], r[1]), nil + return db.NewDumper(pdb.dumpFunc).WithClose(pdb.closeFunc).WithFirst(r[0][1:], r[1]), nil } return nil, db.NewErrNotFound(k) @@ -45,7 +45,7 @@ func(pdb *pgDb) dumpFunc(ctx context.Context) ([]byte, []byte) { return nil, nil } r := pdb.it.RawValues() - return r[0], r[1] + return r[0][1:], r[1] } func(pdb *pgDb) closeFunc() error {