Opened 17 years ago

Closed 16 years ago

Last modified 15 years ago

#741 closed bug (fixed)

identify not working for some postgis layers

Reported by: rhys Owned by: nobody
Priority: major: does not work as expected Milestone:
Component: Data Provider Version: Trunk
Keywords: postgis, identify Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

Identify returns no features found when in fact features are within the region clicked.

Looking at the query sent to the server it seems that there are two problems:

  • the column names aren't being properly quoted so this will raise an error and abort the xaction.
  • all columns are being converted to text and not all columns are convertible to text. In my case I had a bytea column and that raised an error which aborted the transaction.

This might also affect the attribute table.

Attachments (1)

qgspostgresprovider.cpp.diff (815 bytes ) - added by rhys 17 years ago.
patch fixing part of ticket 741..... I think

Download all attachments as: .zip

Change History (7)

comment:1 by rhys, 17 years ago

Further, when the tool does identify a feature (i.e. neither of the aforementioned problems raise an error and aborts the transaction) the primary key of the table always comes back as 0. Also affects the attribute table.

by rhys, 17 years ago

patch fixing part of ticket 741..... I think

comment:2 by gsherman, 16 years ago

Resolution: fixed
Status: newclosed

Patch applied. Please test to make sure it solves the issue and doesn't introduce any other issues.

comment:3 by mhugent, 16 years ago

Resolution: fixed
Status: closedreopened

The problem with this patch is that all the numeric columns now appear as 0. This is because their values are now transfered in binary format, but in the postgresprovider, they are interpreted as strings.

The problem with the primary key coming as 0 has already been adressed in a former fix.

comment:4 by gsherman, 16 years ago

So is the issue only the handling of bytea fields?

comment:5 by jef, 16 years ago

Resolution: fixed
Status: reopenedclosed

the quoting part looks like a good thing. You could have mixed-case or uppercase column names that postgres will choke on unless properly quoted.

There's no support for BLOB attributes in QGIS anywhere anyway, so it's probably best to simply ignore columns that are of unsupported types, ie. bytea and maybe more.

I did that with r7443.

comment:6 by (none), 15 years ago

Milestone: Version 0.9.1

Milestone Version 0.9.1 deleted

Note: See TracTickets for help on using tickets.