Hubzilla-archive
This repository has been archived on 2024-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
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
app adding a bug report app 2014-09-05 16:31:19 -07:00
assets Finally updated/re-translated the Dutch introduction text 2014-08-31 23:26:17 +00:00
doc PostgreSQL support initial commit 2014-11-13 12:21:58 -08:00
images Rainbow_man with alpha channel turns out very ugly in the directory for some hosts. Reset to rainbow_man with alpha, with alpha to rainbow_man_trans. Did the same for red_koala to be sure. You now have a red_koala_trans too. 2014-10-07 04:20:24 +00:00
include PostgreSQL support initial commit 2014-11-13 12:21:58 -08:00
install PostgreSQL support initial commit 2014-11-13 12:21:58 -08:00
library update bootstrap library to version 3.3 2014-10-30 14:28:49 +01:00
mod PostgreSQL support initial commit 2014-11-13 12:21:58 -08:00
tests rev update, fix autoname test "random" failure 2012-04-26 01:33:41 -07:00
util doc updates 2014-10-31 05:05:31 -07:00
vendor PostgreSQL support initial commit 2014-11-13 12:21:58 -08:00
view PostgreSQL support initial commit 2014-11-13 12:21:58 -08:00
.gitattributes Required for github/Windows 2012-06-14 18:39:48 +10:00
.gitignore add site apps directory to .gitignore 2014-10-09 15:25:08 -07:00
.htaccess cherry pick pull request #544 2014-07-24 19:07:04 -07:00
boot.php PostgreSQL support initial commit 2014-11-13 12:21:58 -08:00
index.php PostgreSQL support initial commit 2014-11-13 12:21:58 -08:00
LICENSE It's no longer simply "Red" and the jury is still out on whether or not it's a "project". Most of the time it doesn't seem like one or act like one. It doesn't seem to be anything cohesive that you can put your finger on and everybody involved is mostly doing their own thing and marching to their own drummer. It is however the RedMatrix, whatever that means to you. 2014-02-28 01:53:39 -08:00
README.md context check 2014-10-12 21:59:22 -07:00
version.inc disable request message response until we work through this 2014-11-01 00:36:21 -07:00

the Red Matrix

One of the traditional problems with independent publishing on the internet has always been the fact that independent publishers often operate as isolated islands within their own website, and spend most of their resources attracting visitors. The rise of corporate providers and social networking services alleviated many of these problems; however centralisation has led to a situation where your content is no longer under your direct control. It is shared fully with corporate advertisers and governments, but ironically you are now often asked to pay money to ensure that your friends can see it. What if you could have advantages of scale and connections that centralisation typically offers whilst maintaining independent control over your own web presence?

The RedMatrix is a super network created from a huge number of smaller independent and autonomous websites - which are linked together into a cooperative publishing and social platform. It consists of an open source webapp providing a complete multi-user decentralised publishing, sharing, and communications system - known as a "hub". Each hub provides communications (private messaging, chat, blogging, forums, and social networking), along with media management (photos, events, files, web pages, shareable apps) for its members; all in a feature-rich platform. These hubs automatically reach out and connect with each other and the rest of the matrix. Privacy and content ownership always remain under the direct personal control of the individual; and permission to access any item can be granted or denied to anybody in the entire matrix.

What makes the RedMatrix unique is what we call "magic authentication" - which is based on our groundbreaking work in decentralised identity services. No other platform provides this ability. Within the matrix the boundaries between different hubs are blurred or seemingly non-existent. Identity in the matrix is considered transient and potentially nomadic. "Who you are" has nothing to do with "what computer you're connected to", and website content can adapt itself according to who is viewing it. You have the ability to "clone" your identity to other hubs; which allows you to continue to communicate with your friends seamlessly if your primary hub is ever disabled (temporarily or permanently).

The RedMatrix is ideal for communities of any size, from private individuals and families to online forums, business websites, and organisations. It can be used by anybody who has communications or web content that they wish to share, but where they desire complete control of whom they share it with.

The Red Matrix is free and open source distributed under the MIT license.

For a list of public hubs see redmatrix.me/pubsites. For installation instructions see install/INSTALL.txt