David Van Isacker
09/23/2022, 1:48 AMconst data = await this.prisma.$queryRaw(
Prisma.sql`SELECT time_bucket('1 day'::interval, p.time::timestamptz) from prices p limit 10`,
);
I get the following error:
Exception occured : Error in processing the request : \nInvalid `prisma.$queryRaw()` invocation:\n\n\nRaw query failed. Code: `42883`. Message: `db error: ERROR: function time_bucket(interval, timestamp with time zone) does not exist\nHINT: No function matches the given name and argument types. You might need to add explicit type casts.`"}
The same query works perfectly in my SQL editor. I've tried with and without type casts but i doesn't seem to work.
Any ideas ?
Thanks!Nurul
09/23/2022, 12:53 PMDavid Van Isacker
09/23/2022, 7:11 PMNurul
09/26/2022, 7:22 AM