Commit Graph

36 Commits

Author SHA1 Message Date
Sandro Santilli
75bc36039d Remove done TODOs 2013-10-11 17:25:38 +02:00
Sandro Santilli
82f965fa57 Upgrade node-pg dependency to 2.6.2
Simplifies PSQL.quoteIdentifier and exposes PSQL.quoteLiteral
2013-10-02 12:32:24 +02:00
Sandro Santilli
0d84a704df Fix missing .prj file in shapefile format
Finds srid, when needed, with an additional query.
Closes #110.
Includes testcases.
2013-10-02 11:44:06 +02:00
Sandro Santilli
7f7ef682ac Improve recognition of non-standard field types names by db lookup
Closes #112.
Only looks up "geometry" and "raster" types for now, can be improved
over time.
2013-10-02 10:22:13 +02:00
Sandro Santilli
23d092f768 Use float parsing for int8 too
This makes us ready to upgrade to node-pg 2.x
2013-07-22 18:22:30 +02:00
Sandro Santilli
46b7f7a309 Parse all numbers as floats. Closes #100 2013-07-09 21:51:40 +02:00
Sandro Santilli
5e379012a8 Add support for CTE in sql windowing, add unit tests
This is still an undocumented feature, but as long as it's present
and used (by cartodb UI) better tested than broken...

NOTE: more tests are needed for CTE and RETURNING queries
2013-06-17 16:36:36 +02:00
Sandro Santilli
510ac0533f Switch to using evented query model for postgresql
This enables formats for processing rows as they arrive from the
database, thus possibly reducing memory use. For a start the skip
fields are immediately removed from the result, rather than only
at the end.
2013-05-29 15:39:39 +02:00
Sandro Santilli
ab8494ab12 Survive postgresql connection losses. Closes #95. 2013-05-24 18:18:17 +02:00
Sandro Santilli
11a61d16c4 Drop unused code. Spring cleanups! \o/ 2013-05-24 17:13:05 +02:00
Sandro Santilli
7712d6f2a5 Expose PostgreSQL client pooling settings in environment files
Actually also moves to a real pooling model, managed by node-pg.
Closes #47
See .example files for new configurations
2013-05-24 12:09:06 +02:00
Sandro Santilli
64c0494105 Hide dangerous methods of the PSQL model class
These steps are prepatorial to recactoring to event-based model
2013-05-24 10:38:27 +02:00
Sandro Santilli
cf6bed9bdb Bubble paging UI hack up from model to controller
... one day we'll need to completely drop this hack!
2013-05-24 10:22:17 +02:00
Sandro Santilli
e7437ba7cd Rework system catalogue prevention access check to use CDB_QueryTables
This change reduces the chances of false positive
(forbidding legit queries). Doesn't solve the problem of false
negative (allowing illegit queries).
2013-04-09 12:36:37 +02:00
Sandro Santilli
d54d953e75 Another bit of improvement for the system-table query prevention
This work is more important for the testcases than the actual code
2013-04-09 12:20:27 +02:00
Sandro Santilli
1bcffbc68c Make using SET or querying system catalogues harder
An hack to "prevent" querying system tables already existed but
was pretty weak. This commits makes that a bit stronger. The
filter for SET is new.
2013-04-09 11:52:34 +02:00
Sandro Santilli
d4b1f580ff Fix X-Cache-Channel computation with paging parameters. Closes #85. 2013-02-18 16:19:12 +01:00
Sandro Santilli
0a53d1cd17 Make PSQL.end a no-op, to avoid breaking pooled clients. Closes #48 2012-09-04 12:31:38 +02:00
Luis Bosque
86e1439c2c Re-enabled the psql connections pooler. It is
essential.

Related to:
e36bfdef5b
2012-08-29 20:52:17 +02:00
Sandro Santilli
e36bfdef5b Block while connecting, fixing #37
See https://github.com/brianc/node-postgres/issues/81
2012-07-12 20:13:47 +02:00
Simon Tokumine
025f201ea8 add system table sanitizer 2011-11-22 00:06:14 +00:00
Simon Tokumine
8ebdd0474c Add test for system tables 2011-11-21 23:06:38 +00:00
javi
4874568c5c added staging enviorment 2011-09-16 13:43:10 +02:00
Simon Tokumine
4547ae932a Reference bug 2011-09-07 16:58:53 +01:00
Simon Tokumine
47db0644c9 reverted to non-native bindings while we bug check the PQsendQuery error 2011-09-07 16:50:35 +01:00
Simon Tokumine
082807695c updated error messages 2011-08-25 11:15:52 +01:00
Simon Tokumine
ce4413cbda added body_hash to oauth check and stopped firing exception if incomplete oauth variables sent 2011-08-22 13:33:12 +01:00
Simon Tokumine
af4461cb58 test for select with uppercased SQL 2011-08-05 14:15:08 +01:00
Simon Tokumine
21f369aaf1 add lowercase too 2011-08-05 13:50:37 +01:00
Simon Tokumine
1a1493327f patched windowing function to only work on selects 2011-08-05 13:35:32 +01:00
Simon Tokumine
6b67fc4877 catch page 0 2011-07-05 17:56:31 +01:00
Simon Tokumine
ae2890c42a added rows_per_page and page to url params 2011-07-05 17:31:01 +01:00
Simon Tokumine
f47c611dfc added redis pool, and fixed to use pg_bouncer 2011-06-16 18:23:38 +02:00
Simon Tokumine
870ae7d325 fix psql bug 2011-06-16 11:55:36 +02:00
Fernando Blat
21277ff9d2 Introduced a new parameter db_port to change it in a easy way
Some space and linebreaks cleaning
2011-06-13 12:31:50 +02:00
Simon Tokumine
bcd56de458 first draft, tidied, unit tests, modules, refactor, environments, see TODO for next steps" 2011-06-13 04:23:02 +01:00