Rafa de la Torre
b82025a866
Add another test case for clashing column names
2019-10-15 16:20:55 +02:00
Rafa de la Torre
e5b1345311
Avoid name clashing no geom columns provided but existing the_geom
...
Fix for CDB_SetUp_PG_Federated_Table('server', 'schema', 'table', 'id)
when the table contains the_geom and/or the_geom_webmercator columns
but they are not part of the input.
Otherwise it fails with
ERROR: column "the_geom" specified more than once
2019-10-15 16:01:16 +02:00
Rafa de la Torre
e0e15a9886
Fix for __ft_assert_numeric doesn't exists
2019-10-15 13:19:09 +02:00
Rafa de la Torre
31ef9d54f2
Rename function for clarity
...
__ft_add_default_options renamed to __ft_add_default_readonly_options
to state clearly it is for the read only configuration.
2019-10-14 15:52:59 +02:00
Rafa de la Torre
5a33e0bc02
Improve and add a couple more tests
2019-10-14 15:52:59 +02:00
Rafa de la Torre
595ed219b9
Remove a bit of noise from tests
...
s/ --.*//
s/carto_remote_table/remote_table/
2019-10-14 15:52:59 +02:00
Rafa de la Torre
4861a21e81
Check for numeric id column
2019-10-14 15:52:59 +02:00
Rafa de la Torre
42a16070c9
Marginally improve test case data
2019-10-14 15:52:59 +02:00
Rafa de la Torre
2b1046dec3
Basic implementation of CDB_SetUp_PG_Federated_Table (WIP)
2019-10-14 15:52:59 +02:00
Rafa de la Torre
2b0aca2d08
Rename private functions
...
Rename __cdb_* "private" functions to __ft_*, kind of a namespace to
avoid name clashing.
2019-10-14 15:52:59 +02:00
Rafa de la Torre
32eae57551
__cdb_add_default_options function and tests
2019-10-14 15:52:59 +02:00
Rafa de la Torre
45f60e06b7
__cdb_credentials_to_user_mapping function & test
2019-10-14 15:52:59 +02:00
Rafa de la Torre
46347249cb
Minimal implementation
2019-10-14 15:52:59 +02:00
Rafa de la Torre
e24c550195
Simplify setup and teardown of fdw_target
2019-10-14 15:52:59 +02:00
Rafa de la Torre
1a587c3101
Extract setup and teardown of fdw_target
2019-10-14 15:52:59 +02:00
Rafa de la Torre
8e005e556e
Skeleton for CDB_SetUp_PG_Federated_Server
2019-10-14 15:52:59 +02:00
Raul Marin
5a12033609
Adapt tests to changes
2019-10-03 18:58:27 +02:00
Rafa de la Torre
e41d2ec019
Add a flag to force drop of user FDW and related objects
...
If force = true then it will add the subclause `CASCADE` to the SQL
DDL sentences that support it, otherwise it'll use `RESTRICT` which is
the default and exact opposite.
2019-07-16 17:40:05 +02:00
Rafa de la Torre
076207c49c
Make sure there are no (double)escaping issues
2019-07-16 16:24:02 +02:00
Rafa de la Torre
ce1e9ac41c
Prefix all objects created with cdb_fdw_
...
Build the DB objects related to a user FDW with the following form:
`cdb_fdw_name`. This is aimed at easily inspect and filter them.
As requested in code review.
2019-07-16 15:35:35 +02:00
Rafa de la Torre
0f33ee8b22
Prepend an underscore (_) to functions meant to be run by superuser
...
_CDB_SetUp_User_PG_FDW_Server and _CDB_Drop_User_PG_FDW_Server are
meant to be executed by a superuser. Therefore they shouldn't be
considered part of the public API and hence the _CDB_Private_Function
naming convention.
2019-07-16 14:32:32 +02:00
Rafa de la Torre
a32dea0282
Remove SECURITY DEFINER from user-defined FDW's
2019-07-16 13:26:03 +02:00
Rafa de la Torre
3a255df9d0
Rename PG-FDW's-specific functions to _PG_FDW_
...
As per review comment.
2019-07-16 13:14:11 +02:00
Rafa de la Torre
c4e2549dc8
A few more permissions tests for completeness
2019-07-15 18:14:23 +02:00
Rafa de la Torre
2e9f642378
Check when users shall not have permissions to the FDW
2019-07-15 17:32:48 +02:00
Rafa de la Torre
99096d41e0
Drop the role when dropping a user-defined FDW
2019-07-15 17:25:48 +02:00
Rafa de la Torre
3a10ef7e76
Add ability to grant fdw role to org members
2019-07-15 16:54:23 +02:00
Rafa de la Torre
a20676f391
Add a test/example of granting the fdw role
2019-07-15 16:19:06 +02:00
Rafa de la Torre
37004db047
Add new function to drop a user-defined foreign server
2019-07-15 16:14:07 +02:00
Rafa de la Torre
8cfc8e65cf
Test with a regular user (non-superadmin)
2019-07-15 14:44:21 +02:00
Rafa de la Torre
6e34e16b8d
Add basic test for user-defined FDW's
2019-07-15 13:16:14 +02:00
Rafa de la Torre
d378ca6fe0
Test for missing foreign CDB_TableMetadata
2019-07-03 16:25:16 +02:00
Rafa de la Torre
b0b4a92240
Add a test case for missing foreign CDB_Tablementadata
2019-06-28 16:19:57 +02:00
Raul Marin
78077a6ec1
Bash tests improvements
...
- Stop loading sql files manually.
- Make tests independent.
- Single DB setup (not once per test)
2019-05-31 15:37:15 +02:00
Eneko Lakasta
b209726b1c
Merge pull request #320 from bloomberg/v0_18_5/cdb_tablemetadata_text_hotfix
...
Fix incorrect timestamps in CDB_TableMetadata_Text
2018-07-23 16:00:19 +02:00
Tyler Parsons
5c86029029
Test for correct timestamps in cdb_tablemetadata_text
2018-01-25 23:08:28 -05:00
Tyler Parsons
acd101af9b
Use PGPORT as fdw port if specified
2018-01-25 23:08:12 -05:00
Raul Marin
0f7a1c4882
Remove PARALLEL mode in older versions (up to 9.6)
2017-11-13 09:35:20 +01:00
Javier Goizueta
399b680b41
Merge pull request #283 from CartoDB/157-test-fixes
...
Fix tests: race condition with publicuser #157
2016-11-30 16:08:21 +01:00
Rafa de la Torre
30cd4cf1f9
Fix tests: race condition with publicuser #157
2016-10-17 16:31:10 +02:00
Javier Goizueta
1356131ec1
Fix tests
2016-10-14 11:22:06 +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
de5a702510
Adds table for storing camshaft analysis nodes
2016-04-18 17:41:39 +02:00
Alejandro Martínez
90c16fdb13
Fully qualify invalidations
2016-03-02 16:22:22 +01:00
Alejandro Martínez
56fed12392
Add CDB_TableMetadata_Text view as a proxy to access FDW tablemetadata
2016-02-11 19:16:00 +01:00
Rafa de la Torre
9596e8d9bc
A couple checks for quoted idents in CDB_Last_Updated_Time
2016-02-10 19:10:57 +01:00
Rafa de la Torre
06036e2fe8
Quote identifiers returned by CDB_QueryTables_Updated_At
2016-02-10 18:58:01 +01:00
Rafa de la Torre
2bce771488
Add some tests
...
Tests for:
* CDB_QueryTables_Updated_At
* CDB_Last_Updated_Time
2016-02-09 19:24:08 +01:00
Alejandro Martínez
fdbad0f93c
Fix specs on 9.3
2016-02-08 17:33:41 +01:00
Alejandro Martínez
131aee1503
Fully qualify function names
2016-02-08 16:35:26 +01:00