Javier Goizueta
2b69823949
💄 indent/parenthesize for clarity
2016-06-13 10:39:05 +02:00
Javier Goizueta
1f01ecae30
Exclude overviews from user data size
...
Fixes #261
Some internal functions from the Overviews module
have been moved to a separate file because they're now
used from Quaota function.
2016-06-13 10:04:13 +02:00
Raul Ochoa
50169e58d5
Raise better notice on _CDB_total_relation_size errors
2015-08-17 10:25:31 +02:00
Raul Ochoa
6bc91c7125
Using exception with pg_total_relation_size for better performance
...
IF EXISTS is too slow, one order of magnitude, than using exception
handling. In combination with thousands of tables to check total
relation size that's a problem.
Exception handles specifically undefined_table as it was the original
issue but also any other exception to guarantee a size is always
returned and no error is raised.
2015-08-17 10:17:07 +02:00
Raul Ochoa
4e31d3a37e
Fixes CDB_UserDataSize failing due ERROR: relation "*" does not exist.
...
Adds new _CDB_total_relation_size function that handles nonexistent
tables and does fallback to size=0.
That function could be used to cache total relation size or query another
table view with a cached total relation size.
Fixes #108
2015-08-13 13:23:35 +02:00
Kartones
0a3d08edc3
#revert-size_calc
2015-02-27 10:53:14 +01:00
Kartones
6c7706672f
#69 now using pg_relation_size
2015-02-17 15:40:26 +01:00
Rafa de la Torre
693b147ef1
Fix corner case (no tables) in CDB_UserDataSize #65
2015-01-29 15:46:08 +00:00
Rafa de la Torre
a4e42571cd
Add a comment to CDB_UserDataSize (from PR) #65
2015-01-28 17:10:04 +00:00
Rafa de la Torre
bf622ae5a6
Optimize CDB_UserDataSize (on behalf of @javisantana) #65
2015-01-28 16:54:50 +00:00
Kartones
dbb6f42b99
#1368 fixed escapings
2014-12-05 17:30:47 +01:00
Kartones
3b5c1f65cb
#1138 Quota changes, raster import cartodbfication and quota spec
2014-11-18 15:24:54 +01:00
Kartones
b7c2336ae0
#1138 not counting raster overviews for quota
2014-11-14 10:34:18 +01:00
Kartones
6c57640901
CDB-3870 replaced priority of qmax inside checkquota
2014-08-11 15:26:13 +02:00
Raul Ochoa
2bd0b223a6
CDB_SetUserQuotaInBytes returning set value instead of previous value.
2014-07-07 10:36:51 +02:00
Raul Ochoa
5806ac8f8d
Force schema so it can calculate the size of the database with the proper schema
2014-07-04 18:50:46 +02:00
Kartones
1c86599f9d
CDB-3094 Discovered that EXECUTE FORMAT seems to quote schema names when it needs to
2014-07-04 16:39:19 +02:00
Kartones
3c5251e6c6
CDB-3303 Cartodbfication also supporting optional schemas
2014-07-04 15:55:08 +02:00
Kartones
3d595976f6
CDB-3302 CDB_CheckQuota now also accepts a schema name. Added a convenience method to check if a schema is valid or not
2014-07-04 11:48:53 +02:00
Kartones
021d922d84
CDB-3304 Method cdb_userdatasize now has schema_name param, and added backwards-compatible version without it
2014-07-04 10:57:55 +02:00
Sandro Santilli
f5ad0d0434
Fully qualify call to CDB_UserDataSize from quota trigger
2014-05-28 17:42:11 +02:00
Sandro Santilli
8d6188e282
Have _CDB_UserQuotaInBytes() take precedence over parameter-based quota
...
Closes #16
2014-05-12 13:37:47 +02:00
Sandro Santilli
b69ded8f66
Let CDB_CheckQuota second parameter override configured user quota
...
Closes #13
Includes automated test
2014-05-09 12:55:41 +02:00
Sandro Santilli
30186ac8cb
Pretend _CDB_UserQuotaInBytes has to stay in public
...
Fixes run of the testsuite in the pre-extension model
2014-05-08 17:20:40 +02:00
Sandro Santilli
acf3097c3a
Add CDB_SetUserQuotaInBytes function
...
Closes #2
2014-05-08 17:14:06 +02:00
Sandro Santilli
15740f2ef6
Enable running all tests via "installcheck"
...
NOTE: also makes CDB_TableMetadata triggers still functional
when user quota and varnish invalidation functions are missing
from the database (currently installed by cartodb ruby)
2014-05-06 10:18:38 +02:00
Sandro Santilli
2f1fdf5a15
Copy cartodb lib/sql scripts from CDB_CartodbfyTable branch
2014-05-05 17:13:06 +02:00