prisma1 icon indicating copy to clipboard operation
prisma1 copied to clipboard

Other postgres column types

Open timwis opened this issue 6 years ago • 15 comments

Feature Request

What feature are you missing? The ability to use postgres column types other than the basic string, integer, date, etc. Personally, I need to use ltree to represent a hierarchy, but others may want to use a geometry type, etc.

How could this feature look like in detail? Tradeoffs? Probably something like a custom scalar where we describe how to serialise and deserialise into PostgreSQL or something. Many of these types will require specific operators or functions to query them propery (e.g. SELECT path FROM test WHERE path ~ '*.Astronomy.*' or ST_AsGeoJSON(geometry)), so there would need to be a way to run raw SQL like most ORMs have.

Any chance this is already possible? I'm interested in how I'd accomplish this in the meantime because I need to use an ltree for my project, so otherwise I'd need to use something else to access my database :/

timwis avatar May 18 '18 14:05 timwis

This would be very useful for my project as well. In my case I need to support Date, Time, DateTime, Timestamp, Interval, Duration PostgreSQL types. I have failed to find a way to add my own custom scalar types

BenoitRanque avatar Aug 02 '18 19:08 BenoitRanque

Here's a extract of the unsupported types I got when I introspected one of my client's postgres DBs:

  • Type 'daterange' is not yet supported.
  • Type 'time without time zone' is not yet supported.
  • Type 'ARRAY' is not yet supported.
  • Type 'tstzrange' is not yet supported.
  • Type 'interval' is not yet supported.
  • Type 'ARRAY' is not yet supported.
  • Type 'jsonb' is not yet supported.
  • Type 'bytea' is not yet supported.

Note: this project isn't something that will use prisma (most probably not), so feel free to prioritise as much or as less as you see fit. This is just to add some documentation on what is missing right now I suppose :)

arnabkd avatar Aug 09 '18 08:08 arnabkd

Any updates on this?

gijo-varghese avatar Aug 26 '18 02:08 gijo-varghese

We'd also love jsonb support. Happy to help out if we can get some kind of consensus on how to implement

HariSeldon23 avatar Oct 15 '18 21:10 HariSeldon23

Hello, Can we know if this issue is part of the roadmap? If not, how can we do to make it available faster? In my case, this is a must, and I wish it could be available so we could adopt prisma! Thanks

plmercereau avatar Nov 21 '18 10:11 plmercereau

Also wondering on support for these field types. At the very least ARRAY and JSONB are musts for many of my use cases.

stephen-bunn avatar Nov 29 '18 22:11 stephen-bunn

Support for jsonb would be very nice.

tutturen avatar Dec 11 '18 13:12 tutturen

Any news on jsonb type support?

speix avatar Dec 14 '18 13:12 speix

Add another voice for jsonb support. Ideally int4range would also be supported

anthozep avatar Dec 27 '18 23:12 anthozep

+1 jsonb

arush avatar Jan 19 '19 10:01 arush

+1 ARRAY

ARRAY type is a critical part of our application. Would it be possible to get the visibility on the timeframe on type support?

I believe it helps people make an informed decision on adoption. Thanks.

randolphpark avatar Jan 21 '19 22:01 randolphpark

+1 jsonb and array

brafdlog avatar Mar 19 '19 15:03 brafdlog

Hi Any update on the support of following columns types JSONB TSVECTOR CITEXT

secabhi avatar Jul 23 '19 07:07 secabhi

+1 jsonb

mikicho avatar Apr 03 '20 09:04 mikicho

any updates on this?

beez-dev avatar Jun 22 '22 07:06 beez-dev