Adding and retrieving files from PostgreSQL with ZPsycopgDA

Maciej Zięba <[email protected]>
Newsgroups gmane.comp.web.zope.database
Message-ID <[email protected]>
Hi :)

I wanted to ask if there's any way to send a file to PostgreSQL database?

The file I have is taken from REQUEST, from multipart form. I need to
send it to the database and later retrieve it when needed. I guess I
should use the bytea field and an Z SQL Methods.

But how can I send the file? - dtml-sqlvar can only be of "string",
"int", "float" or "nb" type. How should the method's template look like?

And how do I get the bytes back and re-create the file object?

I guess what I need to know is how you send binary data with ZPsycopgDA...

I really need help with this :-( Any suggestions are really, really
welcome. If there's any more information needed please let me know.

Please excuse my poor English :)

Best regards,
Maciej Zieba
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.