2

What is the syntax in PostgreSQL for inserting varbinary values?

SQL Server's syntax using a constant like 0xFFFF, it didn't work.

1 Answer 1

3

Given there's no "varbinary" data type in Postgres I believe you mean "bytea". Take a look at the docs about the way to specify "bytea" literals.

Depending on the language and the bindings you use there could be more sophisticated ways for transferring binary data - you could find a .Net/C#/Npgsql example here (under "Working with binary data and bytea datatype").

Sign up to request clarification or add additional context in comments.

1 Comment

thanks that was exhaustive answer ps luckily I use NHibernate to deal with all DB things)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.