Closed chrisgoddard closed 11 months ago
Ok, so I changed the postgres function itself - the first type I just changed the return type to text but I still got the same error.
In the second, I changed the data type of the internal variables (removing all us of the custom domain ulid) and this time it worked - so, at least it's working but I'm curious why different internal types would be causing the query to fail?
The error is coming from Postgres. It's likely you're not careful with qualifying the type with the schema name if you happen to define it outside of public
.
version: 0.27.0 postgres: 15.1
Hi there - I have a database that has a domain of
ulid
which is defined as:From the standpoint of the client this should just be interpreted as text - which is what happens when I perform a select query against a table that has that type.
Where I'm getting an error is I have a custom function called
upsert_record
with a return type ofulid
- the function returns the ulid of the upserted record.I get the error:
UndefinedObjectError: type "ulid" does not exist
I've tried setting a type codec (which doesn't appear the correct way for domains based on other issues), and i've tried
set_builtin_type_codec( 'ulid', schema='core', codec_name='text')
- but that doesn't do anything.Any suggestions?