PGSQL cannot use the language to express. His support for plPHP.

PGSQL cannot use the language to express. His support for plPHP.

Ha ha ha ha ha ha ha... Ha-ha. Ha ha ha ha ha ha ha... Ha-ha. Ha ha ha ha ha ha ha... Ha-ha. Ha ha ha ha ha ha ha... Ha-ha. Ha ha ha ha ha ha ha... Ha-ha. Ha ha ha ha ha ha ha... Ha-ha. Ha ha ha ha ha ha ha... Ha-ha. Ha ha ha ha ha ha ha... Ha-ha. Ha ha ha ha ha ha ha... Ha-ha. Ha ha ha ha ha ha ha... Ha-ha. Ha ha ha ha ha ha ha... Ha-ha. Ha ha ha ha ha ha ha... Ha-ha. Ha ha ha ha ha ha ha... Ha-ha. Ha ha ha ha ha ha ha... Ha-ha. .

Examples:


Simple echo example:

CREATE OR REPLACE FUNCTION echo() RETURNS integer AS '
echo "Something\n";
return 0;
' LANGUAGE 'plphp';

A more complicated Array example:

CREATE OR REPLACE FUNCTION insertIntoArray() RETURNS varchar AS '
function array_insert(&$array, $value, $pos)
{
if (!is_array($array))
return FALSE;

$last = array_splice($array, $pos);

array_push($array, $value);
$array = array_merge($array, $last);
}

function array_2string($array)
{
$vals=array_values($array);
$keys=array_keys($array);
$x=0;
while($x<count($keys))
{
if ($x!=0)
{
$result.=\"|\";
}
$result.=$keys[$x].\"=\".$vals[$x];
$x++;
}
return $result;
}


$a = array(\"zero\", \"one\", \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\";
array_insert($a, \"OOP\", 4);

return array_2string($a);

' LANGUAGE 'plphp';

A great example of a really bad idea:

CREATE OR REPLACE FUNCTION dangerousFunc() RETURNS integer AS '
readfile("/etc/passwd";
return 0;
' LANGUAGE 'plphp';


Using PL to write PHP.. This is very attractive to many people. . .
Have a look PHP gold partner. Is Postgresql only. .

Started by Adam at February 09, 2016 - 10:49 AM

Good. Select the object so that the database is much

Posted by Harry at February 20, 2016 - 10:56 AM

PostgreSQL is stronger than mysql.:
1, Powerful transaction processing system tested
2, And the issuance of strong
3, Server code interface rich
4, Easy extension
5, The complex query optimization system tested (including sub query and multi table join etc.)
6, Rich resources
7, Various users (have a look MySQL in addition to web class BBS applications, there are no others? )
8, Excellent compatibility with SQL
9, The rich diversity of development interface
10, Steadfast steady style (PostgreSQL never say others is not good, you have a look MySQL? )
These are large, if each segment may have a dozen items.

---- (www.pgsqldb.org)laser


My comparison
Characteristic:
Mysql PostgreSQL
SQL-2/SQL92 Y Y
SQL-3/SQL99 N Y
The View view N Y
PRIMARY KEY Y Y primary key? ? ?
FOREIGN KEY, Y(4.0.x)Y
Subselect subquery N Y ?
TRIGGER triggers N Y ?
The rules of RULE N Y ?
FUNCTION N Y ?
The FUNCTION function N Y ?
N Y CURSOR cursor ?
PLSQL ? N Y(PL/pgSQL,PL/Tcl,PL/Perl,PL/Python,The new plPHP) ?
Transaction processing of Y(4.0.x) Y
Lock the Y Y table ?
OO support ? N(RDBMS) Y(O-RDBMS) ?
HA solution N Y? ? ?
The replication N Y data(7.2.x) ?

Performance:
Mysql PostgreSQL Openldap
Fast fast fast
The capacity of GB database TB database is not clear
Connection method of thread process is not clear

Posted by Adam at February 25, 2016 - 11:03 AM

It is not just the speed advantage.,
But the MySQL is simple to be true,
But PgSQL is the true meaning of the database! See the application.!
Most places with MySQL because he is good, useful, enough!
But if in the financial and operational considerations!
PgSQL is another option MySQL!

Posted by Olina at February 28, 2016 - 11:56 AM

NO,
I use PGSQL instead of ORACLE
I'm MYSQ, PGSQL will compare...

Posted by Adam at March 05, 2016 - 12:32 PM

So good? Next try.

Posted by Diana at March 11, 2016 - 1:03 PM

I said, PgSQL is not instead of Oracle,
This thing, when the beginning of the design, is completely in accordance with the large RDBMS to do,
But also because of this, some places are not implemented!

Posted by Olina at March 25, 2016 - 1:54 PM

Time.

The development of PGSQL hacker have offices all over the world.. Such coordination, communication, language. Wait. .
Will affect the speed of development. . .

PGSQL really very far sighted. There are a lot of things. Commercial DB would have dreamed of.

Posted by Adam at March 26, 2016 - 2:03 PM

POSTGRES is the developer of the database

Posted by Richie at April 03, 2016 - 2:19 PM

This is the version of the PgSQL?

Posted by Eva at April 11, 2016 - 2:24 PM

The direct use of the new 8.1.

Posted by Ailsa at April 19, 2016 - 2:54 PM

Not used, looks good, collection

Posted by Quennel at April 25, 2016 - 3:16 PM

Well, I found out that she fell in love with her.

Posted by Rupert at May 02, 2016 - 3:36 PM

Nice
Look very inspired!

Posted by Ronald at May 12, 2016 - 4:01 PM

Looks good

Posted by Van at May 25, 2016 - 4:24 PM

Netkiller was so keen to post, in the first half of this year, I have been using mysql, the feeling can also be mysql+innodb, so long as the big table table, very boring

Posted by Kevin at June 05, 2016 - 4:31 PM

I had used plperl write a stored procedure

Posted by Kevin at June 20, 2016 - 4:55 PM

You too can dig.

Posted by Ella at June 24, 2016 - 5:10 PM

An ancient tomb parties!!

Posted by Abby at July 02, 2016 - 5:35 PM

That is so good, I want to try.

Posted by Luke at July 04, 2016 - 6:25 PM