Tested on Linux 32bit master : Version 4.1.0.0.alpha0+ (Build ID: 7e2f34a3172a756a0fd70cae1294250206945a6) When using the Table Design mode, one can set a field to be AUTOINCREMENT. In postgres this is the SEQUENCE or SERIAL function. However, setting an INT(4) field to AUTO in the Table Design mode and then saving the table does not provide the appropriate statement or activate the corresponding postgres function. The table then has to be modified by hand separately using an ALTER TABLE statement. Alex
Adding Lionel to CC.
This happens in connectivity/source/commontools/dbtools2.cxx, function dbtools::createStandardColumnPart, around lines 90-91 and 171-175. This generates the SQL for creating the new column. That code pretty much expects to be able to just stack some text behind the: "colName" colType NOT NULL and that would magically make it an autoincrement column. Alas, that is not how it happens in PostgreSQL; we need to either explicitly create the sequence and set the default value to nextval('seqname') OR change colType to one of smallserial, serial or bigserial (depending on the underlying type: int2, int4 or int8). See http://www.postgresql.org/docs/9.2/static/datatype-numeric.html#DATATYPE-SERIAL Since dbtools::createStandardColumnPart merrily ignores the auto_increment (column 12) of getTypeInfo(), we cannot even use that at the pgsql-sdbc level to assert *some* control. So, "any" solution will have to happen by a redesign of dbtools::createStandardColumnPart, and probably some new SDBCX interface that drivers would have to implement.
Marking as NEW as Lionel appears to have confirmed the issue
Adding self to CC if not already on
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.0.4 or later) https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT: - Update the version field - Reply via email (please reply directly on the bug tracker) - Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for your help! -- The LibreOffice QA Team This NEW Message was generated on: 2016-01-17
Still present in Version: 5.3.0.0.alpha0+ Build ID: 36e61d03a252e73139a472c5be04ffc54a5c8efb CPU Threads: 2; OS Version: Mac OS X 10.11.6; UI Render: default; Locale: fr-FR (fr.UTF-8); Calc: group
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.4.1 or 5.3.6 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20170901
Still present in Version: 5.4.1.2 Build ID: ea7cb86e6eeb2bf3a5af73a8f7777ac570321527 CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; Locale: fr-FR (fr_FR.UTF-8); Calc: group
Still present in Version: 5.4.7.2 Build ID: c838ef25c16710f8838b1faec480ebba495259d0 Threads CPU : 8; OS : Mac OS X 10.13.5; UI Render : par défaut; Locale : fr-FR (fr_FR.UTF-8); Calc: group
*** Bug 125186 has been marked as a duplicate of this bug. ***
Still present in Version: 6.3.3.2 Build ID: a64200df03143b798afd1ec74a12ab50359878ed Threads CPU : 8; OS : Mac OS X 10.14.6; UI Render : par défaut; VCL: osx; Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR Calc: threaded
*** Bug 133349 has been marked as a duplicate of this bug. ***
The table design UI no longer has the possibility to designate a field as autoincrement on macOS, only whether or not the field allows NULL entries or forces NOT NULL. postgres server 15 Direct/native postgres SDBC driver Version: 7.6.2.1 (AARCH64) / LibreOffice Community Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333 CPU threads: 8; OS: Mac OS X 14.0; UI render: Skia/Raster; VCL: osx Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR Calc: threaded
(In reply to Alex Thurgood from comment #13) > The table design UI no longer has the possibility to designate a field as > autoincrement on macOS, only whether or not the field allows NULL entries or > forces NOT NULL. Correction: > Direct/native postgres SDBC driver xxxxx JDBC Driver xxxxxxxx With the native driver, the problem remains (obviously, as the code point indicated hasn't been touched in 10 years).
Still present in: Version: 7.5.8.2 (X86_64) / LibreOffice Community Build ID: 50(Build:2) CPU threads: 16; OS: Linux 6.6; UI render: default; VCL: gtk3 Locale: es-MX (en_US.UTF-8); UI: en-US 7.5.8-1 Calc: threaded
Still present in LO 7.6.2.1 Manjaro Linux, kernel 6.1.60-1-MANJARO.
Version has to be the earliest affected version. Please don't set it to newer version. It should be the earliest version, because it could find to get the buggy code, which introduces this bug. For this bug it could be it never worked well.