Error: column p.proisagg does not exist in PostgreSQL 11 - postgresql

When I tried to copy paste the tables from my connection database and paste the tables into my local database in postgres I'm getting this error. I've been using navicat version 12 and postgres version 11. Is there any conflict in terms of versioning between the two extension?
Some resources says: p.proisagg should change into p.prokind: the question is how can I change this? I've been using windows.It would be great if anybody could figure out where I am doing something wrong. thank you so much in advance.

The software version(navicat version 12) is inconsistent with the PGSQL version(postgres version 11). As a result, some configurations are not associated. You can upgrade the software version to resolve the problem,like navicat 15 or final (now is 16).

Related

Upgraded pgAdmin shows warning, not displaying Tables list, queries working without problem

I upgraded my local Postgresql test server to PostgreSQL15 today morning.
Opening pgAdmin gave me a warning that some of the features may not work correctly because I have a server with version 9 added to pgAdmin.
Steps done:
Upgraded Postgresql v14 to v15.
PgAdmin shows warnings and couldn't see the tables list.
Uninstalled v15 and installed v14. Again the same issue.
Uninstalled v14 and get v12 of Postgresql.
Clean uninstall was done by removing the Postgresql folder from the "ProgamFiles" folder and "AppData/Roaming"
Current situation:
Still, pgAdmin is not showing the list of tables for the older server version (v9).
I cannot upgrade this server, but have to use it in PgAdmin as before.
But I can run the all queries without any problem.
When adding the V9 server, pgAdmin shows a warning like this
It is listing up all schemas, views, and sequences. But when clicking the Tables, it keeps loading and never gives the list of tables.
By the way, I am using Windows 10 64bit OS.
After five days, I degraded my Postgresql to V12 and now getting an error like this:
ERROR: column "wait_event_type" does not exist LINE 10: wait_event_type || ': ' || wait_event AS wait_event, ^
enter code here
Have anybody gone through such an issue? Need some help. Thanks in advance.

Issue related to timescaledb backup: "ERROR: function timescaledb_pre_restore() does not exist"

Scenario:
PostgreSQL 11.4
TimescaleDB 1.2.2
When trying to dump and restore a database, and following this documentation, I'm getting the following error message:
function timescaledb_pre_restore() does not exist
It seems to be something obvious, but I don't get it. ¿Any help?
Thanks.
This function didn’t exist in 1.2.2. Check out the backup/restore docs for this version here: https://docs.timescale.com/v1.2/using-timescaledb/backup
You are using a fairly old version of TimescaleDB, and the instructions were different for 1.2. But our docs are versioned (see the version switcher in the top of the left-hand nav). So navigate over to version 1.2, and there are slightly different instructions:
https://docs.timescale.com/v1.2/using-timescaledb/backup

PostGIS & QGIS - PostGIS extension not accessible?

I am having an odd problem with PostGreSQL/PostGIS on a Windows 10 machine.
I have successfully installed PostGIS many times without issue over the years, most recently last week on a Windows 10 machine at work. I typically use QGIS as my client, so have a fair idea how these things need to be configured and operated.
Over the weekend, I downloaded the latest PostGres 11 installer with Stackbuilder, and installed PostGres & PostGIS. pgAdmin4 seems to show everything is as it should be, and the sample 'postgis_23_sample' database is present and correct.
However, using QGIS DB Manager, when I try to connect to the database (on port 5432), whilst I can see the sample database and public schema, I cannot create a new table with geometry, or load any data (e.g. a simple shapefile) into the database. The error message tells me that the 'addGeometryColumn' function does not exist. I checked that the PostGIS extension is installed - which it is. (I ran 'CREATE EXTENSION postgis' again to confirm this.)
So, I went back to pgAdmin, and tried creating a table with geometry via SQL, but got the same error: Creating a table without geometry works just fine. As soon as I try to create a geometry column, I get the error. It seems to me that the PostGIS extension is somehow not being 'found' by PostGres.
I have uninstalled and reinstalled various combinations of PostGres, PostGIS and QGIS over the weekend - but get the same error. I created a new Windows account, and tried installing the stack there: same thing happened.
I also tried uninstalling everything and then installing the 'Portable GIS' stack by Astun. These are much older versions of QGIS and PostGIS, but in theory the installer configures them all to work together. (That, at least, has been my past experience of using Portable GIS at work.) In this instance, I got the same error about the missing AddGeometryColumn function.
I am wondering if the various installs of PostGIS, QGIS and other tools over the last year or so have left some stubborn configuration entries (maybe in the registry?) that uninstallers have not been able to remove. Could something like that be upsetting my recent PostGres insatllations? It feels as though something is preventing DB clients from locating the PostGIS services on the assigned port. Having said that, PostGres iteslef seems to be working fine, so maybe that is nonsense.
In any case, if anyone has any ideas how I can begin to debug and fix this, I would be hugely grateful. (In the meantime, I am about to try the OSGeoLive Lubuntu VM, which at least will enable me to get some proper work done - I hope.)
Thank you...

flyway 3.3 migrations with postgresql and postgis extension

I am at my wits end, and I don't what else I can try. I am trying to do a flyway clean on my local database. I have Postgres 9.4 latest with latest PostGIS extension. I am using the public schema to store 10 tables, and 7 sequences ... it's very small.
Now I am trying to do a simple FlywayDB 3.3 clean instruction with maven. I have the username and password and public schema listed in the maven configuration file. I constantly kept getting errors to suggest various views and tables are used by the PostGIS extension, so it won't delete them.
So, a search here, and on the Internet in general suggested I do:
ALTER USER myuser WITH SUPERUSER; This did not solve my problems.
In other research, it was suggested to use another schema for data, and not the public schema. So, I created a new schema for my app, and moved over my sequences and tables, including table spatial_ref_sys. I updated the maven config to clean only this new schema ... but it says it cannot delete "spatial_ref_sys" because it is used by PostGIS.
I have 10 tables uses for my app, with 7 sequences ... I just want Flyway to clean my database, so I can try the baseline file to rebuild it. I am no expert in PostGIS, so I don't know if I can remnove that table without killing any spatial functionality I want to use in the future.
Thanks for any help, and please let me know if I can provide any other data.
This is a known issue with no trivial solution but 2 good workarounds: https://github.com/flyway/flyway/issues/100
As noted it's a known issue with flyway.
adding a file called beforeClean.sql with the statement:
DROP EXTENSION IF EXISTS PostGIS;
Solves the problem

how function pg_ls_dir () work in postgresql 8.0.6?

Behold, I send such a request to the database
select pg_ls_dir('. . . /data/pg_log/') as files_dir;
and I get an answer here:
ERROR: function pg_ls_dir("unknown") does not exist
HINT: No function matches the given name and argument types. You may need to add explicit type casts.
It says here that there is no function version of postgresql c I work with (8.0.6), is there any way to connect to the desired function, or the other way is even files from the directory?
That's because you're using an old version of Postgres. pg_ls_dir() appeared in version 8.1.
I would strongly suggest you upgrade to the latest version (9.3 as of this writing) if at all possible, as version 8.0 is nine years old and no longer supported.
The pg_ls_dir() function was introduced in PostgreSQL 8.1 so it's not available in 8.0.
You could try adding the function to the installation manually but I would advise against it. Here's the source regardless: http://doxygen.postgresql.org/builtins_8h.html#a35b15cee7a44663710a7125c5b57484d