Rafa de la Torre
446f4113d9
Return NULL instead of NOW()
...
The absence of foreign CDB_TableMetadata actually means that we cannot
really tell when a remote table was modified.
Therefore we're using NULL with the meaning of "I don't know when it
was last modified".
To be taken in other caching layers, to adjust headers accordingly.
2019-07-03 16:19:46 +02:00
Rafa de la Torre
c06d24aa19
Make CDB_Get_Foreign_Updated_At robust to missing CDB_TableMetadata
...
This may happen with non-carto DB's, when checking the updated_at
times and not finding the corresponding remote.cdb_tablemetadata
imported from the foreign non-carto DB.
Instead of failing, return a NOW() timestampt, so that caching logic
just assumes there may have been changes.
This makes it work today, and leaves open the possibility of adding
the required carto metadata for homogeneous caching in the future.
2019-06-28 16:25:52 +02:00
Gonzalo Riestra
e6ecde4346
add CREATE/ALTER/DROP FOREIGN TABLE to ddl commands
2019-06-20 11:20:48 +02:00
Gonzalo Riestra
2d42e6197a
use bigint to store values from txid_current()
2019-06-20 11:20:03 +02:00
Gonzalo Riestra
5605fdd9b2
fix event trigger
2019-06-19 15:27:28 +02:00
Raul Marin
a43abb37e0
Add missing qualifications
2019-06-03 15:22:52 +02:00
Raul Marin
c45ef6c540
Fully qualify function calls
2019-05-31 15:37:15 +02:00
Gonzalo Riestra
85d6164956
add log when there is no tig config
2019-03-14 11:39:10 +01:00
Gonzalo Riestra
3faa389860
improve logs
2019-03-13 18:16:08 +01:00
Gonzalo Riestra
bc5d532735
remove default TIS config
2019-03-13 18:12:48 +01:00
Gonzalo Riestra
45fed9cf1b
more explicit schemas
2019-03-13 10:29:50 +01:00
Gonzalo Riestra
e19489144c
simplify queries
2019-03-13 09:08:13 +01:00
Gonzalo Riestra
83707297de
add explicit schema for all functions
2019-03-12 18:39:48 +01:00
Gonzalo Riestra
65d51fd8bd
move cdb_ddl_execution table creation/drop to functions
2019-03-11 14:02:45 +01:00
Gonzalo Riestra
9c6294d95b
move trigger drop/creation inside functions
2019-03-11 11:28:45 +01:00
Gonzalo Riestra
c7bba14e9a
simplify code
2019-03-11 09:20:05 +01:00
Gonzalo Riestra
667f896cfb
add again views to the trigger
2019-03-08 13:21:11 +01:00
Gonzalo Riestra
a794fb3d31
read tis config from cdb_conf
2019-03-08 12:03:55 +01:00
Gonzalo Riestra
e3138cd56a
make enable/disable trigger idempotent
2019-03-08 08:43:22 +01:00
Gonzalo Riestra
ab6720ad32
add create/drop/alter view to the trigger
2019-03-08 08:28:24 +01:00
Gonzalo Riestra
5f154a5859
use TIS instead of Redis
2019-03-08 08:28:06 +01:00
Gonzalo Riestra
99dd7cefc7
ghost tables functions using redis
2019-03-06 18:20:04 +01:00
Raul Marin
5d4f1d98d7
Update ST_Shift_Longitude to ST_ShiftLongitude
2019-03-01 11:27:09 +01:00
Gonzalo Riestra
0568b36a90
use session_user instead of current_user
2019-02-20 14:45:57 +01:00
Gonzalo Riestra
2a4ecd4850
Add CDB_Username() function
2019-02-20 10:38:00 +01:00
Raul Marin
6c57751579
CDB_TransformToWebmercator: Yet another hack over a function that shouldn't exist
2019-01-02 19:33:28 +01:00
Raul Marin
80fdd00541
Drop functions removed in 0.11.1
2019-01-02 18:56:24 +01:00
Raul Marin
d2a00852a8
Jenks: Iterate increasing the number of moved elements exponentially
2018-09-11 19:22:48 +02:00
Raul Marin
e605234d38
Jenks: Remove log messages
2018-09-10 15:53:02 +02:00
Raul Marin
0e7d797400
Jenks: Fix multiple bugs
2018-09-10 15:42:35 +02:00
Raul Marin
7e131143f9
_cdb_estimated_extent: Adapt to ST_EstimatedExtent change
...
The behaviour was changed in Postgis 1.5.4 to return NULL instead of throwing
2018-09-04 18:21:28 +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
Javier Torres
5659275c0c
Don't rely on regexp to identify non explainable queries
2018-07-20 13:01:51 +02:00
Javier Goizueta
2766bbc83a
Fix PARALLEL tags
...
Fixes #333
2018-07-18 12:13:31 +02:00
Rafa de la Torre
61d2024eb5
Make the code nicer by avoiding IF/THEN/ELSE
...
As suggested by Algunenano.
2018-07-03 15:35:05 +02:00
Rafa de la Torre
af142306aa
Mark _CDB_Table_Exists()
as PARALLEL UNSAFE
...
As pointed out by Algunenano, PL/pgSQL function which establishes an
EXCEPTION block to catch errors must be qualified with it.
2018-07-03 15:26:48 +02:00
Rafa de la Torre
82f90e618c
Use CREATE OR REPLACE FUNCTION
2018-07-03 13:04:39 +02:00
Rafa de la Torre
55a77b0ef0
Add a new helper function _CDB_Table_Exists
2018-07-03 13:00:24 +02:00
Javier Torres
ccbabaa3b4
Missing quote idents
2018-05-31 17:06:39 +02:00
Javier Torres
7f5bef1203
Escape regclass call with quote_ident
2018-05-29 14:04:53 +02:00
Javier Torres
625d62c448
Remove unneeded variable
2018-05-28 20:29:36 +02:00
Javier Torres
f06418c99b
Extract sequence-listing function
2018-05-28 20:14:57 +02:00
Javier Torres
1958f2de5b
Working code to add permission to all table sequences
2018-05-28 20:07:16 +02:00
Mario de Frutos
c9f4685e5d
Fix error with hyphens, moving logic to the Format part
2018-03-21 16:33:05 +01:00
Mario de Frutos
f96c334f48
Fixed a trucate problem with the seq rename. See #325
2018-03-21 12:05:56 +01:00
Andy Eschbacher
697a0a3a36
Merge branch 'master' into quantiles-bins-updates
2018-03-12 09:50:01 -04:00
Paul Ramsey
62c27ab140
Merge branch 'master' of github.com:CartoDB/cartodb-postgresql into seq-drop
2018-03-09 09:58:25 -08:00
Andy Eschbacher
b6b0ef704a
Merge branch 'master' into quantiles-bins-updates
2018-03-08 10:33:01 -05:00
Andy Eschbacher
39998a9c88
fix syntax error oof oof
2018-03-08 10:21:43 -05:00
Andy Eschbacher
cf38d4cf25
oof include SELECT
2018-03-08 10:14:08 -05:00