[odb-users] Invalid postgresql type with `[` on odb 2.5.0

Jarryd Beck jarryd.beck at akunacapital.com
Wed Nov 1 17:27:45 EDT 2023


> it is coming from this piece of code:
>
> #pragma db type("TEXT[]")
> std::vector<std::string> attr;

I get the same error until I add something along these lines:

#pragma db map type("TEXT *\\[(\\d*)\\<file:///d*)/>]") \
               as("TEXT")                 \
               to("(?)::TEXT[$1]")        \
               from("(?)::TEXT")

I am pretty sure you will get the same error in 2.4.0 without such
a mapping. So it looks like it's not in effect in your build when
using 2.5.0 for some reason?

That’s interesting, we have this in our code:

   #pragma db map type("TEXT *\\[([^]]*)\\]")  \
              as("TEXT")                       \
              to("(?)::TEXT[$1]")              \
              from("(?)::TEXT")

so I’ll have to try to work out why this isn’t working in 2.5.0.

________________________________
[http://www.akunacapital.com/wp-content/uploads/2018/04/akuna-logo_email-signature_4-3-18.png]
Jarryd Beck | Senior Software Engineer
Akuna Capital
Level 10 / 1 Shelley St Sydney NSW 2000 | www.akunacapital.com <http://www.akunacapital.com>
p: | m: | f: | jarryd.beck at akunacapital.com
Learn More About the New Wave in Tech and Trading<https://www.youtube.com/watch?v=oAS29_yxVcc&feature=youtu.be)>
Visit Us- A 360° Virtual Reality Experience<https://vr.akunacapital.com/registration/>

[http://www.akunacapital.com/images/linkedin.png]<https://www.linkedin.com/company/2322562> [http://www.akunacapital.com/images/facebook.png] <https://www.facebook.com/Akuna-Capital-145809642176373/>  [http://www.akunacapital.com/images/instagram.png] <https://www.instagram.com/akunacapital/>  [http://www.akunacapital.com/images/twitter.png] <https://twitter.com/akunacapital>

Please consider the environment before printing this email.

This electronic message contains information from Akuna Capital LLC that may be confidential, legally privileged or otherwise protected from disclosure. This information is intended for the use of the addressee only and is not offered as investment advice to be relied upon for personal or professional use. Additionally, all electronic messages are recorded and stored in compliance pursuant to applicable SEC rules. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, printing or any other use of, or any action in reliance on, the contents of this electronic message is strictly prohibited. If you have received this communication in error, please notify us by telephone at (312)994- 4640 and destroy the original message.


More information about the odb-users mailing list