Coder Social home page Coder Social logo

Comments (4)

rcoup avatar rcoup commented on May 26, 2024

@gunnarmorling wal2json sets OUTPUT_PLUGIN_TEXTUAL_OUTPUT, so AFAIK it's in the server's encoding.

#40 discusses a couple of other quirks.

from wal2json.

eulerto avatar eulerto commented on May 26, 2024

@gunnarmorling From the PostgreSQL manual:

PostgreSQL allows only one character set encoding per database. It is therefore not possible for the JSON types to conform rigidly to the JSON specification unless the database encoding is UTF8. Attempts to directly include characters that cannot be represented in the database encoding will fail; conversely, characters that can be represented in the database encoding but not in UTF8 will be allowed.

from wal2json.

gunnarmorling avatar gunnarmorling commented on May 26, 2024

@eulerto, that text above applies to JSONB-typed columns, right? So unless I'm mistaken, the wal2json plug-in could still use any other encoding? As per @rcoup, it's the server's encoding. So I suppose we can query the server for that and use the server encoding when parsing incoming messages.

We'll have to see though how that works with Jackson which we use as a parser; I'm not sure whether it supports any encodings other than UTF-8/16/32.

from wal2json.

eulerto avatar eulerto commented on May 26, 2024

@eulerto, that text above applies to JSONB-typed columns, right? So unless I'm mistaken, the wal2json plug-in could still use any other encoding? As per @rcoup, it's the server's encoding. So I suppose we can query the server for that and use the server encoding when parsing incoming messages.

That is not limited to JSONB. It is valid for JSON data types. I said that because we use the same API/rules as JSON data types. Hence, this difference in the encoding between JSON standard and Postgres is also valid for wal2json.

We'll have to see though how that works with Jackson which we use as a parser; I'm not sure whether it supports any encodings other than UTF-8/16/32.

server_encoding is available while establishing a connection.

from wal2json.

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.