Giter Site home page Giter Site logo

Comments (4)

FxKu avatar FxKu commented on May 22, 2024 1

Same question here: Have you tried to restore to relational columns and not JSONB? Looks like with missing type information to_jsonb can not work properly for more complex types.

from pgmemento.

foxfriends avatar foxfriends commented on May 22, 2024

I did try with relational columns and had the same error yes:

testdb=# select * from pgmemento.restore_record(1, 100, 'test2', 'public', 2) as (id INTEGER, values TEXT[], pgmemento_audit_id bigint);
ERROR:  malformed array literal: "ghi"
DETAIL:  Array value must start with "{" or dimension information.
CONTEXT:  PL/pgSQL function restore_record(integer,integer,text,text,bigint,boolean) line 11 at RETURN QUERY

from pgmemento.

FxKu avatar FxKu commented on May 22, 2024

Hm, too bad. As said, I will only find time next week to take a closer look. I think I'll extract values from the logs with ->> operator, which returns text and then hope Postgres is able to cast it implicitly to the given datatype, e.g. ['ghi'] is extracted, but for arrays {'ghi'} is needed. I guess, it could be fixed with checking for special characters at string's start. Let's see

from pgmemento.

FxKu avatar FxKu commented on May 22, 2024

@foxfriends fixed it. Thanks for raising it!

from pgmemento.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.