Commit Graph

149 Commits

Author SHA1 Message Date
Raul Ochoa
1eabc5e880 Merge pull request #131 from CartoDB/column-regclass-functions
Column regclass
2015-09-07 12:11:59 +02:00
Raul Ochoa
c6cdaea626 Merge pull request #124 from CartoDB/add-kurtosis
Add kurtosis and skewness
2015-09-07 12:11:34 +02:00
Andy Eschbacher
83b7f47617 removing raise notices and lower test bounds 2015-09-03 22:43:25 -04:00
Raul Ochoa
afecef0e31 Removing redundant ::regclass casting 2015-09-02 12:25:44 +02:00
Raul Ochoa
7582f2cbc5 CDB_ColumnType uses schema and table from regclass
Fixes #130
2015-09-02 12:06:04 +02:00
Raul Ochoa
4b5c5dd275 CDB_ColumnNames uses schema and table name from regclass
Fixes #122
2015-09-02 12:04:52 +02:00
Rafa de la Torre
0ba57f436a Do not remove old function #120
The `DROP FUNCTION IF EXISTS` was added as transient code and not needed
anymore. See the ticket #120 for more information on this.
2015-08-31 12:01:04 +02:00
Rafa de la Torre
0057e2ddec Fix for index generation when renaming table #123 2015-08-27 16:33:46 +02:00
Rafa de la Torre
79cacb8ef4 Modify sampling of table quota trigger #126 2015-08-27 12:52:30 +02:00
Andy Eschbacher
d723487f67 updated definition 2015-08-25 23:10:26 -04:00
Andy Eschbacher
db323f3e13 adding skewness 2015-08-25 22:58:31 -04:00
Andy Eschbacher
49c4cea4e7 adding kurtosis 2015-08-25 22:45:55 -04:00
Rafa de la Torre
7f63688a2f New version 0.9.2 2015-08-24 15:20:50 +02:00
Paul Ramsey
8c2252a9cb Handle text 'the_geom' columns as desired in #117 2015-08-21 13:10:05 -07:00
Rafa de la Torre
5dd497bf20 Fix transformation to webmercator in corner cases #116 2015-08-19 19:37:50 +02:00
Rafa de la Torre
74e6807c2f Merge pull request #78 from CartoDB/new_cartodbfy
[wip] New cartodbfy function (overwrites CDB_CartodbfyTable)
2015-08-19 15:11:55 +02:00
Rafa de la Torre
805af3babf Review of format strings and escaping of id's
Just found cartodbfy failed for schema-names-with-dashes. This should
fix it.
2015-08-18 17:05:32 +02:00
Rafa de la Torre
78bf202b17 Fix for schema-with-dashes 2015-08-18 15:41:11 +02:00
Rafa de la Torre
3f588df6f6 Drop function in order to change return value 2015-08-17 15:28:37 +02:00
Rafa de la Torre
2b48f90374 Merge remote-tracking branch 'origin/master' into new_cartodbfy
Conflicts:
	test/CDB_QuotaTest.sql
2015-08-17 15:27:33 +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
Rafa de la Torre
47d8429277 Use return value from cartodbfy 2015-08-14 17:41:55 +02:00
Rafa de la Torre
565edcb50d Make cartodbfy return destoid 2015-08-14 16:53:43 +02:00
Rafa de la Torre
b7b5be1f3f Add minor piece of doc 2015-08-14 16:10:38 +02:00
Rafa de la Torre
72ebc398f8 Recover _CDB_check_prerequisites (sorry, my fault) 2015-08-14 12:30:01 +02:00
Paul Ramsey
7f55a0263b Fix regclass mismatch on column alter/drop
This logic SHOULD BE MOVED TO Cartodbfy internals.
2015-08-13 16:10:23 -07:00
Paul Ramsey
d268cd07cb Fix many tests and handle ownership issues involved
with Cartodbfy being invoked by schema triggers. Some
issues with regclass interpretation in tests still remain.
Some issues with slightly different behavior to old version
remain. Some issues with error messages / notification messages
changing a little still remain.
2015-08-13 15:59:45 -07: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
Rafa de la Torre
a5321ec7a5 Replace CDB_CartodbfyTable by new CartodbfyTable2
- Delete old CDB_CartodbfyTable code
- Delete auxiliary functions no longer used
- Modify the new CDB_CartodbfyTable signature to be backwards
  compatible.
2015-08-12 18:39:07 +02:00
Rafa de la Torre
c00d607ee2 Merge pull request #107 from CartoDB/new_cartodbfy_rtorre
Do not create timestamp columns/triggers on cartodbfy
2015-08-12 18:34:33 +02:00
Rafa de la Torre
8c41203db6 Fix for the_geom does not exist
When creating triggers, expectation is to have the columns the_geom and
the_geom_webmercator even if the source table does not have any geometry
columns. Populate it in the rewrite with NULL values and right types.
2015-08-12 17:34:47 +02:00
Rafa de la Torre
d6afdf751f Do not create timestamp columns/triggers on cartodbfy 2015-08-11 19:07:01 +02:00
Paul Ramsey
1a1f45cdad Add raster table calls, like the old function has 2015-08-11 05:40:31 -07:00
Paul Ramsey
b195aa4b68 Enable trigger addition routine 2015-08-10 08:42:13 -07:00
javi
df36e83cb5 revoke permissions to list private tables to public user 2015-07-27 10:31:55 +02:00
Paul Ramsey
734561de4c Use 'publicuser' as public role, not 'public', closes #95.
This is consistent with cartodb behaviour, but not exactly
the same as the contract that the 'public' role guarantees
access to public resources. Possibly a better fix would be
to audit (ug) everything and make sure that it's really
using the public role to mean public, rather than the
'publicuser' connection role. That CDB creates.
2015-07-07 05:49:28 -07:00
Rafa de la Torre
a6fd829669 Fix for upgrade issue from 0.7.4 to 0.8.0
This fixes the following problem found during testing:
```
ALTER EXTENSION cartodb UPDATE TO '0.8.0';
ERROR:  cannot change return type of existing function
HINT:  Use DROP FUNCTION cdb_usertables(text) first.
```
2015-06-30 12:20:29 +02:00
Raul Ochoa
8190edb461 Merge pull request #83 from CartoDB/64-usertables
Replace CDB_UserTables with something that can handle multi-user accounts
2015-06-30 11:33:32 +02:00
Andy Eschbacher
e5897f3dad Merge pull request #87 from CartoDB/categ-distrib
Function deciding criteria for using a category column in a map
2015-06-25 11:50:56 -04:00
Andy Eschbacher
b9fe204007 Merge pull request #81 from CartoDB/equalint
adding equal interval function for consistency
2015-06-25 11:08:24 -04:00
Andy Eschbacher
13946b4d47 update test output 2015-06-25 08:17:41 -04:00
Andy Eschbacher
97140b17c9 added more flexible output values 2015-06-24 11:03:16 -04:00
Rafa de la Torre
ddb6b2c5b5 Return text instead of regclass #86
This way the schema is always returned and backwards compatibility is
kept, should it be needed.
2015-06-24 14:14:00 +02:00
Rafa de la Torre
9a94b3879a Add a new function CDB_QueryTablesRegclass #86
The return values of it can be safely used when len(schema.table_name)
exceeds the 63 char limit of the postgres type `name`.
2015-06-24 11:53:09 +02:00
Andy Eschbacher
d124776c4e simplified assignment 2015-06-23 18:49:59 -04:00
Andy Eschbacher
5941b473ca removed notice 2015-06-23 18:39:15 -04:00
Andy Eschbacher
cda6953ea6 initial commit 2015-06-23 16:27:27 -04:00
Andy Eschbacher
1d223b77cc changed subfunction name, replaced function with case statement 2015-06-10 10:50:01 -04:00
Andy Eschbacher
6ab1b1d3d0 removed unneeded variables 2015-06-08 18:36:07 -04:00