Opened 12 years ago

Closed 12 years ago

#2068 closed defect (invalid)

[raster] Make out_db column of raster_columns view behave correctly

Reported by: Bborie Park Owned by: Bborie Park
Priority: medium Milestone: PostGIS 2.0.2
Component: raster Version: 2.0.x
Keywords: Cc: mateusz@…


When there is no out_db constraint, out_db = NULL.

When out_db constraint is applied, out_db = array of boolean.

From the looks of ticket #1216, out_db did not behave the same as the other columns as out-db support for rasters were NOT implemented at the time. By the release of 2.0.0, out-db support was implemented but it looks like the out_db column fell through the cracks.

So, this needs to be fixed for 2.0.x and -trunk

Change History (4)

comment:1 by Bborie Park, 12 years ago

Status: newassigned

comment:2 by mloskot, 12 years ago

Cc: mateusz@… added

Here is my chat on this problem with dustymags last night, copied from

00:17:41	mloskot:	dustymugs: here is the story
00:17:50	mloskot:	1. create table with raster column
00:18:03	mloskot:	2. Insert images
00:18:44	mloskot:	3. AddRasterConstraints(..., FALSE, TRUE) -- means I say FALSE for out_db constraints
00:19:05	dustymugs:	ok
00:19:07	mloskot:	Does it mean, I require the out_db field in raster_columns has NULL value?
00:19:48	mloskot:	or default value (whatever it is)
00:19:48	dustymugs:	let me jog my memory
00:20:36	mloskot:	dustymugs: no rush, I'll try to catch you tomorrow, it's afte 1am for me, so heading off now
00:20:44	dustymugs:	OK
00:21:01	dustymugs:	looking at my main raster db, the out_db column is NULL...
00:21:06	mloskot:	dustymugs: simply, I have an impression the constraints could be documented better, but first I have to understand it well :)
00:21:10	mloskot:	right
00:21:23	dustymugs:	yeah... I really need to refresh my memory about this
00:21:32	mloskot:	but, if the out_db constraint is set to TRUE, then we have two options:
00:21:51	dustymugs:	probably need to check the tickets related to this very column
00:21:57	mloskot:	a) if it's in-db raster, e.g. 3 bands, value will be {f,f,f}
00:22:01	dustymugs:	I think there is something historical...
00:22:06	mloskot:	b) if out-db ratser, then {t,t,t}
00:22:24	dustymugs:	your A and B examples are what the ideal should be
00:22:25	mloskot:	so, FALSE means UNKNOWN, thus seems imply NULL
00:23:09	dustymugs:	FALSE in the addrasterconstraint means that the function does NOT attempt to add the outdb constraint... so, the out_db column would be NULL
00:23:22	mloskot:	ok, that makes sense
00:23:27	dustymugs:	BUT!!!!
00:23:30	mloskot:	?
00:23:56	dustymugs:	by the looks of my production database, I DO have the outdb constraint on my raster columns
00:24:05	dustymugs:	AND the out_db column is NULL
00:24:23	dustymugs:	It should have some {t} or {f} combinations
00:24:35	mloskot:	yup
00:25:03	dustymugs:	I'm almost certain there is something historical reason why I didn't follow through with it
00:25:16	dustymugs:	I'll need to dig through emails and the tickets to see what is up
00:25:38	dustymugs:	for 2.1, I will make the behavior consistent though... heck... new ticket time
00:25:50	mloskot:	it's not that important, but in case you'd have a spare moment to find that, I'd appreciate, no rush though
00:25:52	mloskot:	cheers

comment:3 by Bborie Park, 12 years ago

In looking to fix this, I found that the code is already present and working correctly. Double-checking my production data warehouse, everything looks to be working… I just forgot to add the outdb constraint to a large set of columns. Once the constraint was added, everything worked as expected.

comment:4 by Bborie Park, 12 years ago

Resolution: invalid
Status: assignedclosed

Closing ticket as invalid.

Note: See TracTickets for help on using tickets.