PostgreSQL.jl icon indicating copy to clipboard operation
PostgreSQL.jl copied to clipboard

Handling citext and uuid as types

Open johannspies opened this issue 8 years ago • 1 comments

More a question or request than an issue:

How can I add citext and uuid as PostgreSQL-types handled by PostgreSQL.jl?

At the moment I have do casting in the query like this:

Select title::text from wos_2016_2.article where title = 'Mouse Clicks and Key StrOkes';

where title is of the type 'citext';

johannspies avatar Jul 12 '16 13:07 johannspies

In https://github.com/JuliaDB/PostgreSQL.jl/blob/master/src/types.jl:

  • Make a newpgtype call (you have to know the OID for the type)
  • Define a jldata method
  • Define a pgdata method

timestamp is a good example to follow.

iamed2 avatar Jul 12 '16 14:07 iamed2