1

I have a PostgreSQL 9.5 back-end and with LibreOffice Base v 5.1.3.2 (x64) I am trying to create some data entry forms for various tables all with 1:many relationships. These tables all have UUID auto generated primary-keys.

LibreOffice does not like these PostgreSQL auto generated primary keys. It keeps giving me errors when I try to create a new record, sometimes when I try to edit a new record and won't give me access to the sub-form after I try to create a new parent record. Its like it cannot commit the records and isn't getting an "update" from PSQL upon a new create record.

I have discovered on the net that this is a known problem with all PostgreSQL auto generated PKEYS (UUID, SERIAL, etc) and the LibreOffice native PostgreSQL drivers.

Does anyone have a solution to this problem?

Phil

  • Can you add rows directly into the table view (i.e. not in a form)? – Lyrl Jun 06 '16 at 14:13
  • 1
    Yes I can add a record in the table view...sort of. If I create a new record in the table view the uuid doesn't appear until I close the table view and re-open it. Also if I create new record, move to another record, then return to the newly created record i cannot edit it. But if I then close the table view and re-open it I can then edit it. That is why I think there is an update/commit type problem. – Phillip Allen Jun 07 '16 at 00:06
  • If you have some familiarity with macros you could experiment with, from inside the form, issuing table row update and form refresh commands to see if that helps as a workaround. Otherwise it sounds like this bug may prevent any use of Base with UUID keys. – Lyrl Jun 07 '16 at 13:42
  • 1
    I added a push button and put the following code behind it. Sub pgsql_update_record_main( event as Object ) dim myForm as Object myForm = event.Source.Model.Parent myForm.insertRow() rem myForm.reload() End Sub The reload just bounced me to the previous record and the insertrow() command produced the following error: Error code: 1 pq_driver: [PGRES_FATAL_ERROR]ERROR: invalid input syntax for uuid: "public.uuid_generate_v1()" LINE 1: ...m_cert" WHERE ( "gobs_data"."rm_cert"."rm_uuid" = 'public.uu.. – Phillip Allen Jun 10 '16 at 14:37

0 Answers0