Commit graph

408 commits

Author SHA1 Message Date
Habeas Codice
1a5a5c7edb PostgreSQL support initial commit
There were 11 main types of changes:
- UPDATE's and DELETE's sometimes had LIMIT 1 at the end of them. This is not only non-compliant but
it would certainly not do what whoever wrote it thought it would. It is likely this mistake was just
copied from Friendica. All of these instances, the LIMIT 1 was simply removed.
- Bitwise operations (and even some non-zero int checks) erroneously rely on MySQL implicit
integer-boolean conversion in the WHERE clauses. This is non-compliant (and bad programming practice
to boot). Proper explicit boolean conversions were added. New queries should use proper conventions.
- MySQL has a different operator for bitwise XOR than postgres. Rather than add yet another dba_
func, I converted them to "& ~" ("AND NOT") when turning off, and "|" ("OR") when turning on. There
were no true toggles (XOR). New queries should refrain from using XOR when not necessary.
- There are several fields which the schema has marked as NOT NULL, but the inserts don't specify
them. The reason this works is because mysql totally ignores the constraint and adds an empty text
default automatically. Again, non-compliant, obviously. In these cases a default of empty text was
added.
- Several statements rely on a non-standard MySQL feature
(http://dev.mysql.com/doc/refman/5.5/en/group-by-handling.html). These queries can all be rewritten
to be standards compliant. Interestingly enough, the newly rewritten standards compliant queries run
a zillion times faster, even on MySQL.
- A couple of function/operator name translations were needed (RAND/RANDOM, GROUP_CONCAT/STRING_AGG,
UTC_NOW, REGEXP/~, ^/#) -- assist functions added in the dba_
- INTERVALs: postgres requires quotes around the value, mysql requires that there are not quotes
around the value -- assist functions added in the dba_
- NULL_DATE's -- Postgres does not allow the invalid date '0000-00-00 00:00:00' (there is no such
thing as year 0 or month 0 or day 0). We use '0001-01-01 00:00:00' for postgres. Conversions are
handled in Zot/item packets automagically by quoting all dates with dbescdate().
- char(##) specifications in the schema creates fields with blank spaces that aren't trimmed in the
code. MySQL apparently treats char(##) as varchar(##), again, non-compliant. Since postgres works
better with text fields anyway, this ball of bugs was simply side-stepped by using 'text' datatype
for all text fields in the postgres schema. varchar was used in a couple of places where it actually
seemed appropriate (size constraint), but without rigorously vetting that all of the PHP code
actually validates data, new bugs might come out from under the rug.
- postgres doesn't store nul bytes and a few other non-printables in text fields, even when quoted.
bytea fields were used when storing binary data (photo.data, attach.data). A new dbescbin() function
was added to handle this transparently.
- postgres does not support LIMIT #,# syntax. All databases support LIMIT # OFFSET # syntax.
Statements were updated to be standard.

These changes require corresponding changes in the coding standards. Please review those before
adding any code going forward.

Still on my TODO list:
- remove quotes from non-reserved identifiers and make reserved identifiers use dba func for quoting
- Rewrite search queries for better results (both MySQL and Postgres)
2014-11-13 12:21:58 -08:00
friendica
e32a339a3d doc updates 2014-11-01 00:36:01 -07:00
friendica
7f0bd5a6e5 doc updates 2014-10-31 05:05:31 -07:00
Thomas Willingham
fbd027709a Debian doco - no longer uses dropbear. 2014-10-31 01:13:56 +00:00
friendica
1b53d1c1d3 Merge https://github.com/friendica/red into pending_merge 2014-10-27 16:20:59 -07:00
friendica
583b445bc0 add "repository" permissions role and make sure we have a sane "accept" default for the custom role. 2014-10-27 16:19:30 -07:00
Jeroen
6ff795a9f2 Merge branch 'master' of https://github.com/friendica/red 2014-10-27 15:06:34 +00:00
Jeroen
eec0a67dde update nl + Terms of Service more prominent in the help files. 2014-10-27 15:05:59 +00:00
friendica
bc3e7c4cad some documentation of permission roles and what the differences are. 2014-10-27 02:17:30 -07:00
friendica
98bce0e719 the to-do list is getting longer again. 2014-10-24 14:31:21 -07:00
zottel
4d0455befd correction to addon footer 2014-10-24 17:09:37 +02:00
zottel
d98fcdf3fb update to German help 2014-10-24 17:08:50 +02:00
friendica
5ede7bd654 doc updates 2014-10-24 04:16:45 -07:00
Thomas Willingham
b27790302b Doco - politics, unwritten pages, links, and stuff. Nothing major. 2014-10-22 23:13:17 +01:00
friendica
bae3029c63 merge madness 2014-10-19 16:12:05 -07:00
friendica
88d63d1b77 new doc added to doc checkin 2014-10-19 15:55:22 -07:00
friendica
478e7c4479 doc updates 2014-10-19 15:54:51 -07:00
marijus
1ee2b631db lighttpd sample conf security enhancement 2014-10-16 22:52:28 +02:00
Thomas Willingham
11ad127c68 Let's not play security expert. Use Mozillas recommended server
config, even if it's ridiculously verbose.  Reasoning - they make
the browser, so if they've got it wrong, you're buggered anyway.
2014-10-16 01:57:04 +01:00
Thomas Willingham
1eb478ba54 SSL is broken you say? Well bah gum.
Someone probably needs to update Lighttpd and Apache too.
2014-10-16 00:47:02 +01:00
tuscanhobbit
9f95162593 one more hidden config 2014-10-13 21:29:47 +02:00
friendica
1f976fbfe6 bit of cleanup of hidden_configs. This is a start - we've got hundreds more. 2014-10-12 17:59:03 -07:00
Thomas Willingham
fd00a24957 Some more previously undocumented configs. 2014-10-11 18:37:07 +01:00
Thomas Willingham
2e2f101e0b Doco: Hidden configs - you won't believe what happens next!
Covered the P's, still need to do the X and just the configs.  Work in
progress, so not linked from the index yet.
2014-10-11 15:15:55 +01:00
friendica
8e7e488ffe doc updates 2014-10-10 00:13:00 -07:00
Klaus Weidenbach
33394f58ff Moved RedBrowser class from reddav.php to it's own file.
First step on cleaning up ReadDAV classes and restructuring it bit in
preparation for adding some more DAV features, photo access, CalDAV, etc.
and hopefully also some PHPunits.
Add a PHP5.3 namespace for RedDAV classes. Any objections against this or
the vendor namespace?
Add some more documentation for RedBrowser.
2014-10-06 23:38:33 +02:00
Michael Johnston
5eba3c17cb typo 2014-10-03 20:36:52 -04:00
friendica
f5623ae11d doc updates 2014-10-03 03:34:50 -07:00
habeascodice
5f58603158 relevant now that site statistics are all the hotness 2014-09-28 19:32:13 -07:00
friendica
1e7fbac6c1 doc updates, clean up buttons on PM edit template to match other edit buttons 2014-09-26 01:52:30 -07:00
friendica
81ee35e03b fix url mismatches of a single trailing slash for feed author/owner comparisons; update diaspora_compat 2014-09-23 20:55:22 -07:00
zottel
ccc97ffdc0 update German main help page 2014-09-23 16:35:30 +02:00
friendica
1c56442818 Repeat after me - we always refer to our clientelle as 'members'. If your software calls you a "user" - get rid of it. 2014-09-19 23:35:16 -07:00
friendica
083b5da967 doc updates 2014-09-19 02:22:12 -07:00
Thomas Willingham
595be9919b Merge branch 'master' of https://github.com/friendica/red 2014-09-18 17:08:23 +01:00
Thomas Willingham
65441b95bb Doco - permissions needs some work, but this is a relative whopper. 2014-09-18 17:07:47 +01:00
friendica
7167208345 forgot this one... 2014-09-17 22:30:25 -07:00
friendica
4014093572 implement permission roles - the backend should be done except for maybe a couple of small tweaks. Now we just need to define the rest of the roles and create a chooser for them. Adam started on this some time back but I don't know where that has gone. 2014-09-17 17:59:46 -07:00
friendica
cd79044778 no sense maintaining 2 to-do files. I think the one I'm removing is referenced online somewhere - which is why it wasn't done earlier. Can't find it, so just note that somebody will complain and we'll have to edit the pointer someday. 2014-09-16 23:12:50 -07:00
friendica
171719a774 additions and edits to the faq 2014-09-15 17:59:47 -07:00
friendica
56c1c5cd88 couple of edits to make this more current 2014-09-15 17:43:40 -07:00
Thomas Willingham
d2a4b34c98 Trivial typo - concatenated string that should be. Doesn't really
deserve it's own commit, but if I don't fix it now, nobody will notice for
another18 months.
2014-09-16 00:55:41 +01:00
Jeroen
eaf3bd3326 See comments on commit 5ab85b0. Also fixed some bb typo's in docu index. 2014-09-15 15:35:40 +00:00
Thomas Willingham
969f2530cc Doco - kill dupe 2014-09-13 19:56:30 +01:00
Thomas Willingham
d84eb8c79a Bring DB doco up to date 2014-09-13 19:27:24 +01:00
Thomas Willingham
f85aba3a1e Doco - some links that got stripped at some point 2014-09-13 18:51:51 +01:00
Thomas Willingham
a5a501c90f Here, have a semi-colon 2014-09-13 15:25:05 +01:00
Thomas Willingham
c8508a310f Only use one install file 2014-09-13 15:23:40 +01:00
friendica
701ae2981d doc updates 2014-09-12 01:59:31 -07:00
friendica
ab7f2db4d7 doc updates and a couple of issues spotted in the logs (diaspora likes, feed author import) 2014-09-12 00:59:23 -07:00