--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
The fields in the database, apart from the bytea, are being correctly inserted. The []byte array is being populated and passed but the bytea field remains empty. The db log file records no error. There are signs that insert is being carried out twice, once with the correct payload and a second time with an empty []byte. I have as yet been unable to isolate this second call if it exists.
// type Attachment
type MsgAttachment struct{
Mattachmentnr sql.NullInt64
Messagefk sql.NullInt64
Aname sql.NullString
Mblob []byte
}
// DML vom db
CREATE TABLE msgattachment
(
mattachnr serial NOT NULL,
messagefk int,
aname text,
ablob bytea
)
//call after declaration and population
msga.InsertAttachment()