Statistics
| Branch: | Tag: | Revision:

qgis / src / providers / postgres / qgspostgresprovider.cpp @ master

History | View | Annotate | Download (211 KB)

# Date Author Comment
9b095c56 2023-10-23 05:47 AM Sandro Mani

Revert "Revert "Allowing storing GPGK raster layer styles to DB""

This reverts commit 9d8a72256893bd31a51d85927e9abd9cdb5eed29.

0ec5f0de 2023-10-19 08:03 PM Sandro Santilli

Add QgsRectangle::setNull(), deprecating setMinimal()

9d8a7225 2023-10-06 04:15 AM Nyall Dawson

Revert "Allowing storing GPGK raster layer styles to DB"

4bc4f48f 2023-10-05 04:16 PM Sandro Mani

Merge pull request #54558 from manisandro/rasterstyles

Allowing storing GPGK raster layer styles to DB

3cac4c0b 2023-09-30 09:34 AM Alessandro Pasotti

Make convertToProviderType static to bypass thread check

add14bfb 2023-09-19 01:47 PM Alessandro Pasotti

PG: fix issue GH #54572 st_geographyfromtext

Fix #54572 Error saving edit on PostGIS geometry when table also contains geography

e2169be0 2023-09-18 02:16 PM Sandro Mani

Introduce Qgis::ProviderStyleStorageCapabilities

c3611c60 2023-07-19 10:10 AM Vincent Cloarec

create postgres RO connection in the thread where the provider live

bfe4fce0 2023-07-17 03:33 PM Jacky Volpes

Postgres provider discover relations: add composite relation test + minor refacto

4585148d 2023-06-14 09:44 PM Nyall Dawson

When invalid postgres credentials (username or password) are interactively
updated when loading a project, ensure that the updated credentials
are stored when the project is resaved

Otherwise the outdated credentials remain in the project and the
user is forced to re-enter the correct credentials on every...

fe79e16a 2023-06-12 01:03 AM MorriganR

move some PG connection options from QgsPostgresProvider to QgsPostgresConn

6711e97d 2023-05-30 09:55 PM Nyall Dawson

thread_local all const QRegularExpression objects

8a2c0e35 2023-05-20 08:19 AM Nyall Dawson

Replace QgsDebugMsg(...) with QgsDebugError(...) and ensure it
is ONLY used for error message reporting

Everything else gets bumped to QgsDebugMsg(..., >= 2)

e2fa27e4 2023-05-18 04:11 PM Vincent Cloarec

Load layers in parallel threads when opening project (#53069)

  • load layers in parallel threads when opening project
  • parallel loading by default and settingsin advanced settings
  • fix freezing when no layer supports parallel loading
  • clean leftover...
0229d8dc 2023-05-18 02:29 AM Martin Dobias

Mark common postgresql types as non-enumerable upon load

This fixes a big performance issue when loading projects with PostgreSQL layers.
In the last stage of project loading, code in QgisApp would run code
to resolve broken layer dependencies, which in turn tried to find out best...

276ff978 2023-04-14 06:14 AM Nyall Dawson

When creating new fields, only expose the 'Comment' option for
datasources which support editing comments

This support is currently limited to the postgres provider,
so exposing the comment field for all other vector layer types
is just misleading to users. The comment will be completed discarded...

afc48e0f 2023-04-06 09:18 AM Nyall Dawson

De-duplicate methods for determining relkind for postgres items

2e7b0dd4 2023-04-06 09:18 AM Nyall Dawson

Deprecated unused, not-useful QgsVectorDataProvider::palAttributeIndexNames

0bc7bf5a 2023-04-06 09:18 AM Nyall Dawson

Move postgres relkind enum to Qgis

Avoids having to include qgspostgresprovider header in a bunch
of non-provider related files

d5d8e3d5 2023-03-19 02:00 PM Even Rouault

Fix insufficiently escaped backslash in regular expressions

Genealizes the fix of https://github.com/qgis/QGIS/pull/52293 to
other places exhibiting the same issue.

8c3f0010 2023-02-22 07:47 PM Sandro Santilli

[postgres] Do not discard geometry attributes having no SRID

See https://github.com/qgis/QGIS/issues/49380#issuecomment-1282913470

046883fa 2023-02-22 03:39 AM Nyall Dawson

Promote QgsWkbTypes enums to enum class, move to Qgis

a88e5666 2023-02-21 07:32 AM Sandro Santilli

Make SRID/CRS cache a per-connection object, rather than a process-static

Static cache is wrong (same SRID may have different meaning in
different databases) and dangerous (can result in segfaults).

Closes GH-51893

Includes simple testcase for EWKT input/output in...

1142e8ff 2023-02-16 01:02 PM Nyall Dawson

Move QgsMapLayerType enum to Qgis.LayerType (#51874)

For consistency with other enums

d6fae8ca 2023-01-30 12:09 PM Alessandro Pasotti

Fix PG identity default value with long field names

Fix #51563

c513bad5 2023-01-24 11:27 PM Sandro Santilli

Use ad-hoc WHERE clause for TopoGeometry layers

This is aimed at using spatial indexes on primitive tables.
Only affects non-hierarchical TopoGeometry layers access.

Thanks Laurențiu Nicola (grayshade) for excellent feedback and
Salvatore Fiandaca (pigreco) for testing !

3455982e 2022-12-09 03:10 AM Julien Cabieces

[Clazy] remove unused-non-trivial-variable

c80a0d66 2022-11-07 06:24 PM Alessandro Pasotti

Tests for style DB storage

9c2923aa 2022-11-07 10:16 AM Alessandro Pasotti

Optionally load all stored styles from DB with correct names.

Fixes #37434

Funded by: Ministère des Forêts, de la Faune et des Parcs - Québec

46a2458c 2022-09-19 09:59 AM Julien Cabieces

Merge pull request #50230 from elpaso/bugfix-gh50168-pg-identity-default

Bugfix gh50168 pg identity default

265edb41 2022-09-15 11:00 PM René-Luc ReLuc

Fix: PostgreSQL provider force read-only and in recovery

The PR feat: Open layers in a read only mode with Qgis::ProjectReadFlag::ForceReadOnlyLayers #49440 contains an error when checking write capabilities.

The write capabilities has to be checked when the database is not in recovery and when the provider is not forced to be in read-only. The old code checks...

c068e176 2022-09-15 07:12 PM Alessandro Pasotti

Fix identity sequence

49d521b2 2022-09-12 02:41 PM René-Luc ReLuc

Merge pull request #49960 from rldhont/postgres-uri-param-session-role

feature(postgres): Define session role for connection

0fc64b10 2022-09-12 01:17 AM René-Luc ReLuc

feat: Open layers in a read only mode with Qgis::ProjectReadFlag::ForceLayerReadOnly

In most cases of use of QGIS Server, it is not necessary to access the layers in write mode.
The read-only mode is sufficient.

We would like to introduce a new flag Qgis::ProjectReadFlag::ForceLayerReadOnly to...

bb631466 2022-09-09 09:14 PM René-Luc ReLuc

feature(postgres): Define session role for connection

Be able to define a session role for postgres connection.

Documentation: https://www.postgresql.org/docs/current/sql-set-role.html

The `session_role` setting will be used to set the current user identifier...

b87ae905 2022-08-31 06:57 PM Alessandro Pasotti

Refactoring after PR review

35403d50 2022-08-31 06:53 PM Alessandro Pasotti

Layer metadata provider API

Implementation of QEP #250 DB metadata storage.

- General API for registering layer metadata providers
- Metadata provider GPKG
- Metadata provider POSTGRES
- Metadata provider POSTGRES RASTER

Tests and custom python metadata provider implementation....

f88cf5f8 2022-08-20 07:35 AM Nyall Dawson

Update core and gui to use QgsVariantUtils::isNull

df43151c 2022-08-15 01:53 AM Alessandro Pasotti

Check for result

6884b2ca 2022-08-15 01:53 AM Alessandro Pasotti

PG: Fix unreported credentials exposure on connection lost

also fixes a few crashes when connection is lost due to missing
check of PG result.

221e63cd 2022-06-16 05:55 AM Nyall Dawson

Add icon to QgsProviderMetada

fc9b6053 2022-06-15 07:04 AM Nyall Dawson

Add QgsProviderMetadata::supportedLayerTypes() so that we can
query the layer types supported by a data provider

f54c521e 2022-05-23 10:30 AM Alessandro Pasotti

PG: Log prepared statements and exec prepared

I'm still in doubt if/how to log params too, they can be huge or binary.

Not logged for now.

3a59a371 2022-05-06 01:25 AM Jacky Volpes

Use explain plan to estimate featureCount with filter (fixes #48446)

3ab63838 2022-04-26 02:02 PM Alessandro Pasotti

More query logging

f388ef7a 2022-04-26 02:02 PM Alessandro Pasotti

More on query logging

3f959a9c 2022-04-26 02:02 PM Nyall Dawson

wip

affa44e4 2022-02-21 12:13 AM Sandro Santilli

Use read-only connection when writing is not needed

b2711334 2022-02-16 03:28 PM Sandro Santilli

Re-use possibly cached postgis_version from pgsql description method

0e543ab6 2022-01-24 08:26 AM Nyall Dawson

Address review

f1365b1a 2022-01-24 08:26 AM Nyall Dawson

[api] Don't use widgets in QgsProviderMetadata::saveStyle implementations

This is not safe to do -- it causes a crash if the api is used in
a background thread

Fixes #46954
Fixes #46914

77bc1959 2022-01-24 08:26 AM Nyall Dawson

[postgres] Add styleExists test, minor fix for listStylesInDatabase returning error when layer_styles table not present

1be383a3 2022-01-24 08:26 AM Nyall Dawson

[api] Add QgsProviderMetadata method to test whether a style with
a specified ID already exists

d78517e0 2022-01-07 11:59 PM Matthias Kuhn

Preserve feature map on layer clone

Make sure postgres provider internals are preserved across a layer
clone.
This helps to keep feature ids stable for things like extract labels

8bf29023 2021-12-10 01:06 AM Nyall Dawson

[postgres] Don't try to retrieve values from srs query if no results are returned

dcf0cfe5 2021-11-29 02:54 AM Nyall Dawson

Fix API issues causing malformed python stub files

Fixes #46240

4ba46b86 2021-11-19 09:16 PM Matthias Kuhn

simplify code

b15c5200 2021-11-19 09:16 PM Matthias Kuhn

Fix NULL ewkt

49f003f5 2021-11-19 09:16 PM Matthias Kuhn

Remove useless check

4b610b95 2021-11-19 09:16 PM Matthias Kuhn

Adjust naming

1b2dd549 2021-11-19 09:16 PM Matthias Kuhn

Reverse select CRS

e3fa91bd 2021-11-19 09:14 PM Matthias Kuhn

[postgis] expose additional geometry columns as QgsReferencedGeometry

Good bye ewkt

c5f956db 2021-11-04 09:29 PM Alessandro Pasotti

Introduce VectorLayerType flags

a04112d7 2021-11-04 09:29 PM Alessandro Pasotti

Add isQuery() to vector layer and data provider

The method returns TRUE if the layer is a query/sql layer.

This allows to selectively show the "Update SQL Layer..." menu
entry in the legend.

Partial fix for #45796

77c831ef 2021-10-06 03:41 AM Alessandro Pasotti

Fix PG error when failing to update geom & constrained field (#45266)

The problem was that throwing an exception the prepared statement
was not deallocated.

Fix #45100