Giter Club home page Giter Club logo

roc-pg's People

Contributors

agu-z avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

roc-pg's Issues

`ErrorResponse` message is failing to decode

TCP dump of an error that failed to decode:

4500 00f3 0000 4000 4006 0000 7f00 0001  E.....@.@.......
7f00 0001 1538 c969 5d5e 99e1 ab26 0f7a  .....8.i]^...&.z
8018 18e9 fee7 0000 0101 080a c7e5 05c0  ................
26ba 4ed6 4500 0000 be53 4552 524f 5200  &.N.E....SERROR.
5645 5252 4f52 0043 3432 3732 3500 4d6f  VERROR.C42725.Mo
7065 7261 746f 7220 6973 206e 6f74 2075  perator.is.not.u
6e69 7175 653a 2075 6e6b 6e6f 776e 202b  nique:.unknown.+
2075 6e6b 6e6f 776e 0048 436f 756c 6420  .unknown.HCould.
6e6f 7420 6368 6f6f 7365 2061 2062 6573  not.choose.a.bes
7420 6361 6e64 6964 6174 6520 6f70 6572  t.candidate.oper
6174 6f72 2e20 596f 7520 6d69 6768 7420  ator..You.might.
6e65 6564 2074 6f20 6164 6420 6578 706c  need.to.add.expl
6963 6974 2074 7970 6520 6361 7374 732e  icit.type.casts.
0050 3131 0046 7061 7273 655f 6f70 6572  .P11.Fparse_oper
2e63 004c 3634 3500 526f 705f 6572 726f  .c.L645.Rop_erro
7200 00

Unable to connect with password

I'm trying to run this example https://github.com/agu-z/roc-pg/blob/main/examples/query.roc, but using a password in clear text instead like so

@@ -21,7 +21,7 @@ task =
         host: "localhost",
         port: 5432,
         user: "postgres",
-        auth: None,
+        auth: Password "foo",
         database: "postgres",
     }

with this postgres setup in docker compose

services:
  db:
    image: postgres:15
    ports:
      - 5432:5432
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: foo
      POSTGRES_DB: postgres

but I get

[examples/query.roc:67] (TcpPerformErr UnsupportedAuth)
Something went wrong

I can connect to it using psql postgres://postgres:foo@localhost/postgres

And if I switch the compose config to POSTGRES_HOST_AUTH_METHOD: trust I can connect from query.roc

Connected!
John: 32
Julio: 23

No License

I don't see a license for roc-pg, could you add one? I'd like to use it for samples in this Linguist PR but it requires a license.

Thanks for your work on this.

Better examples

  • Get database config from Env
  • Separate connection module
  • Real table examples
  • Example in README

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.