Postgresql push uuid field to Clickhouse data type error - postgresql

I am trying to push data from PG-12 to Clickhouse via FDW extension ("clickhouse_fdw") and it gives me error:
SQL Error [HV004]: ERROR: cannot convert constant value to clickhouse
value Hint: Constant value data type: 2950
Sherlocking gave me error in uuid, excepting this field passes on to data transfer. If I cast it to text it gives error, that target field is uuid not text. I am confused. Which data type casting is appropriate here? Please advise DB gurus :) Thanks beforehands.

Related

Problems with setting the dataType in the dBeaver

Whenever I try to choose a data type for any column I get this message. I don't type by myself but choose from drop-down menu instead.
Details message as follows,
Error setting property 'dataType' value
Bad data type name specified: serial
it can be any type instead of serial, the result message will be the same.
The database is PostgreSQL.
Same problem :(
Dbeaver 5.2.5, Fedora 29, PostgreSQL 9.6

Conversion failed error when it shouldn't be trying to convert anything

Message "Conversion failed when converting the nvarchar value '\"United States\"' to data type int."
I use entity framework for data access to a SQL DB.
It is set as a string in my table and it is set as a string in my entity.
This is happening in a CSV parsing programme, when trying to call the save changes method of the DbSet.
Any ideas why this is happening and how to fix this problem?
Are you sure you havent made changes on your database? If so, run
UpdateDatabase
in your PM console. If not, check the parsing of the CSV columns. Maybe you're mapping them wrong.

Is it possible to the read data from bytea type field using getBlob() method in postgresql9.2

I am using postgresql 9.2 and ,when I read the data from Bytea(used to store binary large object data in postgresql) field using getBlob() method but I'm getting the same error
Error: type bad value for long.
I know that I'm getting this error because of only getBinaryStream() and getBytes() method works with this(Bytea) and getBlob() method works with OID type field. But I have situation.So I would like to know that, is there any way to read the data from Bytea using getBlob() method in Postgresql9.2 . Thank you in advance.

Grails byte array and PostgreSQL

I'm trying to implement the Simple Avatar Uploader on my User domain class but I seem to have encountered a conflicting issue with grails implementation of byte[] and PostgreSQL. I have implemented it exactly as the plugin page suggests but on compilation I get the error:
Error: Error executing SQL ALTER TABLE user ADD avatar bytea(16384): ERROR: type modifier is not allowed for type "bytea"
I have found some help suggesting that PostgreSQL does not accept a size modifier but removing the maxSize: 16384 constraint only leads to the exact same error with a different size:
Error: Error executing SQL ALTER TABLE user ADD avatar bytea(255): ERROR: type modifier is not allowed for type "bytea"
So it seems that grails will automatically set the size to 255 if no maxSize is provided. Is there a way to override this? Or perhaps a more suitable data type for byte arrays?
Thanks!
Not sure if it was directly responsible or not but we are using Grails Database Migration and we solved the issue by editing the latest migration script changing the line
column(name: "avatar", type: "bytea(255)")
to
column(name: "avatar", type: "bytea")

Using the Time data type in Postgres with a Microsoft Access Front-end

I have a field in my postgres database using the time (without time zone) data type. I have a Microsoft Access front-end for the database connected using psqlODBC, which reads this field as a "Date/Time" data type.
If I try to insert something into the field through the front end, I get the following error:
ODBC - insert on a linked table "table_name" failed.
ERROR: column "column_name" is of type time without time zone but expression is of type date;
I'm assuming that access is trying to input a time stamp instead.
Basically my question is it even really possible to use the time data type with Access? Or should I just be using the timestamp datatype instead?
If you are manually typing data into a linked table then no this won't be possible at present, if you have the option of updating your table via forms or VB then you could try this to get access to produce only a time value:
TimeSerial(Hour(Now()), Minute(Now()), Second(Now()))
Otherwise as you say, it's probably a good idea to change your data type to timestamp.