Hi Alex:
Thanks a lot for your fast response and for your input!
How are you connecting to your pg database ?
Via a JDBC driver or using the native postgres driver provided within LibreOffice ?
Depending on which one you are using, support for a given data type, in this case, an array, might be different (I don't know off-hand, I haven't tested).
I use the native connector, on a Debian 9 aka stretch Linux boxe; sorry for omitting this information in my first post…
It can actually deal properly with array data afaict; in the table view, it is displayed in the “usual” Postgres style (i.e. in braces).
Using a macro that takes your form control text and inserts it into a preparedStatement object, it would/should probably be possible. I doubt that the Form GUI supports this kind of thing directly though (but I'm far from being an expert with postgres data type support in LibreOffice).
As you mention, it might be more efficient to do this via a stored procedure in the backend rather than fudging something in the frontend.
Hmmm, thinking again about it, if I have to write a stored procedure anyway, it is probably easier to change the data base model and replace the array of single-line texts by a single multiline text. All the validation work would be performed in a post-insert or -update trigger function in Postgres. And it saves me the time to learn coding macros in Libreoffice (lazy me). For the data consumer (not Libreoffice), it doesn't make a big difference; to keep the API as it is now, I just write an other stored procedure splitting the multilines into arrays.
> Or is there an other "standard" way for dealing with array data types?
>
Not without using macros, that I know of, but I would love to be proven wrong.
The ability to deal with arrays would be a cool extension for Libreoffice (IIRC, arrays are part of the SQL standard).
Thanks again,
cheers,
Albrecht.