Timeline for In PostGIS is it possible to create a View with a unique ID?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 25, 2019 at 15:02 | comment | added | jpmc26 | I would not trust ArcMap to function properly with an inconsistent ID. How do you know it doesn't requery the database when you pan but not refresh the attribute table? Then you'd have a mismatch trying to select features. | |
Jan 25, 2019 at 13:18 | comment | added | geographika | @jpmc - by its very nature a view will change if its underlying data changes. A reliable ID isn't part of the question requirements. Some GISs simply require a unique ID for each feature just to load the layer (e.g. ArcMap). | |
Jan 25, 2019 at 1:38 | comment | added | jpmc26 |
This is usually a very poor design decision, as row_number is effectively a random value. You can't depend on it being consistent between SELECT s, particularly when the underlying data changes.
|
|
Feb 12, 2016 at 17:43 | comment | added | falcacibar |
You also can do row_number() OVER() AS "id" without ORDER over column
|
|
Jul 24, 2011 at 22:08 | vote | accept | Ando | ||
Jul 16, 2011 at 0:04 | comment | added | Ando | Cool - I'll give it ago and get back to you. | |
Jul 15, 2011 at 9:51 | history | edited | geographika | CC BY-SA 3.0 |
added 6 characters in body
|
Jul 15, 2011 at 9:36 | history | answered | geographika | CC BY-SA 3.0 |