Description: pq_driver: [PGRES_FATAL_ERROR]ERREUR: la colonne pg_attrdef.adsrc n'existe pas LINE 1: ....attnotnull, pg_type.typdefault, pg_type.typtype, pg_attrdef... ^ (caused by statement 'SELECT pg_namespace.nspname, pg_class.relname, pg_attribute.attname, pg_type.typname, pg_attribute.atttypmod, pg_attribute.attnotnull, pg_type.typdefault, pg_type.typtype, pg_attrdef.adsrc, pg_description.description, pg_type.typbasetype, pg_attribute.attnum FROM pg_class, pg_attribute LEFT JOIN pg_attrdef ON pg_attribute.attrelid = pg_attrdef.adrelid AND pg_attribute.attnum = pg_attrdef.adnum LEFT JOIN pg_description ON pg_attribute.attrelid = pg_description.objoid AND pg_attribute.attnum=pg_description.objsubid, pg_type, pg_namespace WHERE pg_attribute.attrelid = pg_class.oid AND pg_attribute.atttypid = pg_type.oid AND pg_class.relnamespace = pg_namespace.oid AND NOT pg_attribute.attisdropped AND pg_namespace.nspname LIKE 'public' AND pg_class.relname LIKE 'stat_tirage' AND pg_attribute.attname LIKE '%' ORDER BY pg_namespace.nspname, pg_class.relname, pg_attribute.attnum') Steps to Reproduce: 1.open base with postgresql 12 2. 3. Actual Results: no query work with postgresql 12 only Expected Results: the query work with postgresql 12 Reproducible: Always User Profile Reset: No Additional Info: the column pg_attrdef.adsrc don't exist
Indeed, from 8.0, we can read this: "The adsrc field is historical, and is best not used, because it does not track outside changes that might affect the representation of the default value. Reverse-compiling the adbin field (with pg_get_expr for example) is a better way to display the default value." (see https://www.postgresql.org/docs/8.0/catalog-pg-attrdef.html) This field disappears from 12.0 version: See https://www.postgresql.org/docs/12/catalog-pg-attrdef.html compared to: https://www.postgresql.org/docs/11/catalog-pg-attrdef.html Searching "adsrc" in Opengrok gives: https://opengrok.libreoffice.org/search?project=core&full=adsrc&defs=&refs=&path=&hist=&type=&si=full
Replacement should be "pg_get_expr(adbin, adrelid)" but it's incompatible with Postgresql < 8. I submitted a patch on gerrit here: https://gerrit.libreoffice.org/#/c/80722
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0c46c81e04530e8f6ce4f34195d8f0443ed8bfc3 tdf#128111: "adsrc" doesn't exist from Postgresql 12 It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
For 6.3 branch, patch is on gerrit review here: https://gerrit.libreoffice.org/#/c/80736/ Thank you Daniel for the report!
I wanteed to test on Windows but there's no Windows Postgresql binary. Daniel: on which env are you?
the server postgres is on debian 10
I also tested LibreOffice 3.2.2 under linux (debian 10), with the same problem in fact, a simple query doesn't work!
yes for windows -> "https://www.enterprisedb.com/downloads/postgres-postgresql-downloads"
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-6-3": https://git.libreoffice.org/core/commit/0872f7dc87445f81afd56b5a096d026df75d3a05 tdf#128111: "adsrc" doesn't exist from Postgresql 12 It will be available in 6.3.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Thank you Daniel for the link! Just for the record, i just installed Postgresql 12.0 and had the same error with LO 6.3.2 just when trying to open a table.
With master sources updated today, I could open the database and the tables. I just noticed that when providing password, I had this log: warn:connectivity.postgresql:25568:26308:connectivity/source/drivers/postgresql/pq_connection.cxx:474: sdbc-postgresql: unknown argument 'Type' having value: <Any: (string) simple> Also when creating a new file to connect to Postgresql, I have this: warn:connectivity.postgresql:25568:26308:connectivity/source/drivers/postgresql/pq_connection.cxx:474: sdbc-postgresql: unknown argument 'BooleanComparisonMode' having value: <Any: (long) 2> warn:connectivity.postgresql:25568:26308:connectivity/source/drivers/postgresql/pq_connection.cxx:474: sdbc-postgresql: unknown argument 'EnableOuterJoinEscape' having value: <Any: (boolean) 0> warn:connectivity.postgresql:25568:26308:connectivity/source/drivers/postgresql/pq_connection.cxx:474: sdbc-postgresql: unknown argument 'EscapeDateTime' having value: <Any: (boolean) 0>
*** Bug 128488 has been marked as a duplicate of this bug. ***
strange, under linux with version libreoffice 6.3.3.2 I can attack PostgreSQL 12, but not with the windows version ...
(In reply to danielv8888 from comment #13) > strange, under linux with version libreoffice 6.3.3.2 I can attack > PostgreSQL 12, but not with the windows version ... Could you please provide error message?
yes, always the same errors, can not open the query in "edit" mode - "the query is based on an SQL command that cannot be analyzed". SQL:HY000 error code status:1000. I would say the patch is in version 6.3.3.2 linux debian and not in the windows version ... I installed the 6.4alpha version, and this version works very well for me
Daniel: just re read the whole bugtracker, patch is available from next release 6.3.4. Unless you use prerelease/daily build on Linux, are you sure it works on Linux with Postgresql 12?
under debian linux the version i use is 6.3.3.2.0+ build ID:1:6.3.3-2 how to know the version I use (stable, unstable, testing) ? I think I'm using testing ...
(In reply to danielv8888 from comment #17) > under debian linux the version i use is 6.3.3.2.0+ build ID:1:6.3.3-2 > how to know the version I use (stable, unstable, testing) ? > I think I'm using testing ... Taking a look to https://packages.debian.org/search?keywords=libreoffice it can't be stable, only unstable or testing (both are 6.3.3-2 for amd64) Then you can take a look to /etc/apt/sources.lst to be sure. So since you confirmed you use 6.3.3, you don't have yet the patch. Are you sure you connect to Postgresql 12 from Linux? If yes, I don't understand how it can work since you don't use yet the patched version. On the contrary, it's normal it doesn't work on Windows (if you try to connect Postgresql 12 of course).
Also, on which env did you install "6.4alpha version" ? if it's on Linux, it would mean you have several LO versions in Linux. The one from Debian package 6.3.3, the one you installed manually with 6.4 alpha version. Please check carefully LO version and Postgresql server version when you test.
The Debian 6.3.3-2 package has this patch backported; see https://metadata.ftp-master.debian.org/changelogs//main/libr/libreoffice/libreoffice_6.3.3-2_changelog : libreoffice (1:6.3.3-2) unstable; urgency=medium * debian/patches/Postgresql-12-no-adsrc.diff: add from libreoffice-6-3 branch; fix the postgresql driver with PostgreSQL 12 (closes: #943873)
I hadn't thought about backports! It explains now why it works with Linux and not with Windows. Thank you Lionel!