You should open up an issue in Postgrex. Maybe we can allow a types
configuration that you would set in the format that Postgrex expects and,
when this configuration is available, Postgrex would no longer perform the
query.



*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

On Wed, Jul 6, 2016 at 4:11 PM, Nick Pavlica <[email protected]> wrote:

> Jose,
>
>
>>
>> Postgrex does a query to get all of the database types once it connects.
>> Maybe you can try rewriting the query yourself in a way it doesn't use
>> ARRAY? You may need to slightly change the code after too but you should
>> definitely give it a try. :)
>>
>>
>>
> This gave me a great place to start investigating.  While trying to
> rewrite the query in lib/postgrex/types.ex, I discovered that there are
> features other than ARRAY that haven't yet been implemented in
> CockroachDB.  I posted my questions to the CockroachDB group, and got this
> response: (
> https://groups.google.com/forum/#!topic/cockroach-db/WVm4P8PX1cM).
> Essentially stating that they don't have any meta data tables, but do plan
> to support information_schema in the near term.  At the moment, they are
> using a static map (
> https://github.com/cockroachdb/cockroach/blob/master/sql/pgwire/types.go#L362)
> of all the available types.  If I understand  the Postgrex code properly,
> it builds the type map dynamically in types.ex.  I'm guessing that I would
> need to modify types.ex so that it would use the static type map that
> CockroachDB uses.  That being said, is there a way to add this
> functionality/behavior to Postgrex, without having to create a whole new
> thing, like PostgrexCDB?
>
>
> Thanks!
> -- Nick
>
>
>
>
>>
>> *José Valim*
>> www.plataformatec.com.br
>> Skype: jv.ptec
>> Founder and Director of R&D
>>
>> On Tue, Jul 5, 2016 at 8:53 PM, Nick Pavlica <[email protected]> wrote:
>>
>>> All,
>>>   I'm trying to use Elixir with CockroachDB (
>>> https://github.com/cockroachdb/cockroach).  They are implementing the
>>> Postgresql protocol for their SQL interface, but haven't implemented the
>>> Array type.  There is a ticket open for adding arrays, but they haven't had
>>> a chance to implement it yet.  I've been trying to connect with Postgrex,
>>> but get the following error:
>>>
>>> 11:28:55.749 [error] Postgrex.Protocol (#PID<0.157.0>) failed to
>>> connect: ** (Postgrex.Error) ERROR (internal_error): syntax error at or
>>> near "("
>>> SELECT t.oid, t.typname, t.typsend, t.typreceive, t.typoutput,
>>> t.typinput,
>>>        t.typelem, coalesce(r.rngsubtype, 0), ARRAY (
>>>                                                    ^
>>> Is it possible to connect without calling for an ARRAY type?  They have
>>> several Postgresql drivers working, so I know that it can be done :)  I've
>>> been looking at the Postgrex source, but haven't found a solution yet.
>>> Your guidance is appreciated!
>>>
>>>
>>> Thanks!
>>> --Nick
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "elixir-lang-talk" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/elixir-lang-talk/e722f476-2b4a-46e1-b902-6b5315ce3c33%40googlegroups.com
>>> <https://groups.google.com/d/msgid/elixir-lang-talk/e722f476-2b4a-46e1-b902-6b5315ce3c33%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-talk/CAGnRm4%2BExku%3Dwz0qas0tmAa_Pu6ay33a3afpz88e50TpXO4w%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to