mpartel / postgres-protobuf Goto Github PK
View Code? Open in Web Editor NEWProtocol Buffer extension for PostgreSQL
License: MIT License
Protocol Buffer extension for PostgreSQL
License: MIT License
Hello,
I get wrong results when fetching nested repeated fields. I'm not sure what I missed since this use case seems to be tested here
SELECT protobuf_query_multi(
'pgpb.test.ExampleMessage:repeated_inner[*].inner_repeated[*]',
'\x2a0a120361626312036465662a0a12036161611203626262'::BYTEA
) AS result;
result
abc
def
aaa
bbb
(4 rows)
I created a repo in order to reproduce it: https://github.com/Allsimon/postgres-protobuf/blob/bug/reproduction/bug/README.md
There should be an easy and correct way to construct queries like some_map_field[?]
where ?
can be any string.
We are using protobuf to transmit real-time telemetry of watercraft over GSM. We'd be interested in storing the original protobuf messages rather than decoding so I'm curious if your lib supports the following:
Hi,
more an Info than an Issue...
To compile postgres-protobuf 0.2.0 to be used with a Postgres 11.7 compiled from source on Centos 8 (8.1.1911) with g++ (GCC) 8.3.1 20190507 (Red Hat 8.3.1-4) I needed to add the two arguments
-lz -lstdc++
to the PG_LDFLAGS line in the Makefile.
Otherwise I would get undefined symbols when executing CREATE EXTENSION.
Thanks,
Chris.
Hi,
thanks for the nice extension!
I've found a problem related to floats... When floats are decoded to text by protobuf_query() or
protobuf_query_array() precision is (heavily) lost.!
The floats appear to be decoded here:
postgres-protobuf/querying.cpp
Line 429 in d8c1c16
using std::to_string(), which corresponds to sprintf("%f", ..) and would always print with six digits right to the decimal point.
So, for example a value like 1.0E-7 just get decoded to the text '0.000000' :(
I'm going to need to patch around this for my use case, maybe with a custom sprintf("%e", ..) for floats in particular.
Do you have any suggestion?
I would be willing to do a pull request...
-- Chris
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.