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] 
> <javascript:>> 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] <javascript:>.
>> 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/cb2ea3f6-fc41-44e8-b6d3-8a3e0eda74d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to