#130 closed bug (fixed)
database default fields
Reported by: | Owned by: | morb_au | |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | |
Component: | Digitising | Version: | Trunk |
Keywords: | PostGIS database digitizing | Cc: | jef |
Must Fix for Release: | Yes | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
When inserting data in postgis, qgis does not take the default values from the database (eg nextvalue in cat, etc.). The user have to fill up all fields. This is very unconvenient.
Attachments (3)
Change History (25)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
It works - great improvement. To be really perfect, default values should show up in the dable during digitizing, otherwise the user has no way of kwowing which values will be filled automatically.
comment:3 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Default fields now show the postgres default value. Note that this includes an explicit postgres style cast (e.g., 'abc'::text). Available in SVN r5602.
comment:4 by , 18 years ago
after commit #5694 (fix for bugs 131 and 134), default fields are no longer shown
comment:5 by , 18 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:6 by , 18 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:7 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Works for me as of today, and I'm not sure how r5694 would have broken it ...
If somebody else can reproduce this behaviour, please re-open.
I suppose there's the possibility that my working copy is more functional than the HEAD version, but I'd like someone else to confirm before I spend time on that.
comment:8 by , 18 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
We confirm that it is not working: default fields are not pre-filled (r 5742).
comment:9 by , 18 years ago
Further testing: the default values are actually committed (which is good), they're just not shown in the dialog window (which is not good, as the user cannot know which values should be filled).
comment:11 by , 18 years ago
CREATE TABLE fix (
cat integer DEFAULT nextval('cat_fix'::regclass) NOT NULL, id_radio smallint, data date, ora time without time zone, meteo character varying(2), vento smallint, terreno character varying(1), zona character varying(2), attivita boolean, ambiente character varying, visto boolean, note text, verificato_db boolean, cova boolean DEFAULT false, morto boolean DEFAULT false, schiusa boolean DEFAULT false, operatore character varying, anno smallint DEFAULT 2006, the_geom public.geometry, nido boolean DEFAULT false);
);
comment:12 by , 18 years ago
That table definition works for me - see attachment. What version of postgres are you using? I can't think of much else that could be causing the problem.
comment:13 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
version
PostgreSQL 8.1.4 on x86_64-pc-linux-gnu, compiled by GCC cc (GCC) 4.1.2 20060729 (prerelease) (Debian 4.1.1-10)
Now is working also for me. I don't know why. I just run with gdb for other questions. Sorry and thank you for all.
comment:14 by , 16 years ago
Awaiting user input: | unset |
---|---|
Cc: | added |
Milestone: | Version 0.8 → Version 0.9.2 |
Must Fix for Release: | → Yes |
Platform: | Debian → All |
Platform Version: | etch |
Priority: | minor: annoyance or enhancement → major: does not work as expected |
Resolution: | fixed |
Status: | closed → reopened |
Type: | defect → bug |
I reopen this ticket due to QGIS 0.10.0 shows the same behaviour.
follow-up: 16 comment:15 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
fixed in r8390
follow-up: 17 comment:16 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to jef:
fixed in r8390
mmm....
For me it does not work.
- Take a layer with columns with default values
- Load to QGIS and start editing
- Capture a polygon and stop polygon capturing
- A GUI for input column values appears and all fields for columns with default values are empty
My System: PostgreSQL 8.3.0 QGIS 0.10.0 r8392
Is it my fault??
follow-up: 18 comment:17 by , 16 years ago
Awaiting user input: | set |
---|
Replying to hdus:
Replying to jef:
fixed in r8390
mmm....
For me it does not work.
mmmm..... For me it does. I tested with following table:
CREATE TABLE test ( myid integer NOT NULL, wkb_geometry geometry, mytext character varying DEFAULT 'Foo!'::character varying, mynr integer, mydate date DEFAULT now() );
and the attribute dialog looks like the attached image and works as expected. What's different in your case?
comment:18 by , 16 years ago
Replying to jef:
Replying to hdus:
Replying to jef:
fixed in r8390
mmm....
For me it does not work.
mmmm..... For me it does. I tested with following table:
CREATE TABLE test ( myid integer NOT NULL, wkb_geometry geometry, mytext character varying DEFAULT 'Foo!'::character varying, mynr integer, mydate date DEFAULT now() );and the attribute dialog looks like the attached image and works as expected. What's different in your case?
I create your table and than I try to capture a polygon. See the attached image as the result. I doesn't work for me.
comment:19 by , 16 years ago
I just installed QGIS 0.10.0 Windows and I don't get default values too.
follow-up: 21 comment:20 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:21 by , 16 years ago
Awaiting user input: | unset |
---|
Replying to mhugent:
If it works or not seems to depend on the Qt version. The last try is r8435. It did not work for me with Qt-4.3.4 and after the commit it works also with this version. Reopen this patch if you still have problems after r8435.
Ok, looks like I tried with Qt 4.4 on Debian unstable only. r8435 doesn't work there. But given this hint, I found that <r8435 didn't work on Windows using Qt 4.3.4 (MSVC build).
r8436 now works on both.
This is changed in r5509 to take DEFAULT as default value for the postgres provider instead of NULL. Unfortunately, i don't have a database with default values to test. Could you test it with your database and close the bug if it works?