473,378 Members | 1,346 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Postgresql with PHP Procedural Language

Hi,

I was surprised to see that my fav. database offers PHP as a scripting
language Procedural language (eg stored procedures).
Untill now I always used PgPL/SQL for that.

Offered by command prompt:
http://www.commandprompt.com/community/plphp/

Did anybody in here use it?
What are your experiences?
Any advise?

Regards,
Erwin Moller
Mar 26 '08 #1
4 2356
Erwin Moller wrote:
Hi,

I was surprised to see that my fav. database offers PHP as a scripting
language Procedural language (eg stored procedures).
Untill now I always used PgPL/SQL for that.

Offered by command prompt:
http://www.commandprompt.com/community/plphp/

Did anybody in here use it?
What are your experiences?
Any advise?

Regards,
Erwin Moller
Ullo Erwin.

Not with Postgres, but its cool with MySql.

What ever rocks yer boat...if it works for you,use it.

PHP has its irritations, but I find it infinitely preferable to other
languages like *shudder* PERL..
Mar 26 '08 #2
The Natural Philosopher wrote:
Erwin Moller wrote:
>I was surprised to see that my fav. database offers PHP as a scripting
language Procedural language (eg stored procedures). Untill now I
always used PgPL/SQL for that.

Not with Postgres, but its cool with MySql.
I think you misunderstand Erwin's post. He's talking about the programming
language used for creating stored procedures within the database. That is,
not accessing database from a script, but the other way around: accessing
a script from the database.

See <http://en.wikipedia.org/wiki/Stored_procedure>.

MySQL only supports stored procedures written in SQL. (And has only
supported stored procedures *at all* since 5.0.)

PostgreSQL allows you to use SQL, C, Tcl, Perl or Python and allows you to
use others through plugins. Plugins are available for Java, Shell script,
and Scheme amongst others.

Erwin posted a link to a plugin allowing the use of PHP as a scripting
language within PostgreSQL. Indeed it looks doubleplusgood. I tend to use
PgPL/SQL (and T-SQL on MS SQL server) but will certainly give this a try.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 3:50.]

Best... News... Story... Ever!
http://tobyinkster.co.uk/blog/2008/03/23/hypnotist/
Mar 26 '08 #3
Toby A Inkster wrote:
The Natural Philosopher wrote:
>Erwin Moller wrote:
>>I was surprised to see that my fav. database offers PHP as a scripting
language Procedural language (eg stored procedures). Untill now I
always used PgPL/SQL for that.
Not with Postgres, but its cool with MySql.

I think you misunderstand Erwin's post. He's talking about the programming
language used for creating stored procedures within the database. That is,
not accessing database from a script, but the other way around: accessing
a script from the database.

See <http://en.wikipedia.org/wiki/Stored_procedure>.

MySQL only supports stored procedures written in SQL. (And has only
supported stored procedures *at all* since 5.0.)

PostgreSQL allows you to use SQL, C, Tcl, Perl or Python and allows you to
use others through plugins. Plugins are available for Java, Shell script,
and Scheme amongst others.

Erwin posted a link to a plugin allowing the use of PHP as a scripting
language within PostgreSQL. Indeed it looks doubleplusgood. I tend to use
PgPL/SQL (and T-SQL on MS SQL server) but will certainly give this a try.
Muy Bad.
Mar 27 '08 #4
Toby A Inkster schreef:
The Natural Philosopher wrote:
>Erwin Moller wrote:
>>I was surprised to see that my fav. database offers PHP as a scripting
language Procedural language (eg stored procedures). Untill now I
always used PgPL/SQL for that.
Not with Postgres, but its cool with MySql.

I think you misunderstand Erwin's post. He's talking about the programming
language used for creating stored procedures within the database. That is,
not accessing database from a script, but the other way around: accessing
a script from the database.

See <http://en.wikipedia.org/wiki/Stored_procedure>.

MySQL only supports stored procedures written in SQL. (And has only
supported stored procedures *at all* since 5.0.)

PostgreSQL allows you to use SQL, C, Tcl, Perl or Python and allows you to
use others through plugins. Plugins are available for Java, Shell script,
and Scheme amongst others.

Erwin posted a link to a plugin allowing the use of PHP as a scripting
language within PostgreSQL. Indeed it looks doubleplusgood. I tend to use
PgPL/SQL (and T-SQL on MS SQL server) but will certainly give this a try.
Yes, indeed.
I wasn't talking about accessing Postgresql through PHP, which has been
my hobby for years anyway. ;-)

100% personal perspective:
I have never been very confortable with PgPL/SQL 'scripting language'
inside procedures, and tend to solve as much as possible inside the main
PHP script.
I have had a few nasty bugs, totally created by myself, by using stored
procedures that seemed an easy way out of a nasty problem, at that time...
Using procedures just adds another layer of possible problems, and I
find them harder to spot than pure PHP bugs.
That is why I avoid using SPs, if possible, partly because I don't like
the PgPL/SQL language too much.

But now we can use PHP for that... yummy. :-)

I'll just give it a shot, and see how it works.

Regards,
Erwin Moller
Mar 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Flash | last post by:
I have been playing with postgresql at home. This is on a fedora core 2 linux box. Here are the packages yum installed: $ rpm -qa | grep postgres postgresql-libs-7.4.2-1...
1
by: Marc G. Fournier | last post by:
After several fixes were backpatches to the 7_3_STABLE branch, we have now released a 7.3.5. As the list of Changes since 7.3.4 is quite small, they are included in this email: * Force...
29
by: Paul Ganainm | last post by:
Hi all, Following up on another thread, here is a comparison between FB and PG from an FB'ers POV. BTW, FB is the love-child of Open-Source-Interbase. BTW, I have tried to be as accurate as I...
6
by: Hervé Piedvache | last post by:
Hi, Does anyone know a predictive or a database scoring solution for PostgreSQL ? I'm looking for a system able to take a database with for example 100 000 records in total, inside them we...
3
by: Rod Early | last post by:
I have the task of converting a SQL Server 2000 database to PostgreSQL. The data itself does not need to be converted, but the structure and stored procedures must be. I expect that converting...
6
by: Andy | last post by:
Someone posted this official proposal to create comp.databases.postgresql.general again. He wrote his own charter. As far as I know, he did not consult any of the postgresql groups first. There...
0
by: Gerhard Würth | last post by:
Hi, I tried to install Postgresql 8.0-beta2-dev3 on Windows 2000. Already during installation i got messages like that: Failed to connect to database. Procedural languages files are installed,...
16
by: Manuel | last post by:
Please, excuse me for starting this discussion. I'm not a troll, and I love the OOP architecture. However I'm a C++ newbie, and sometimes it's hard for me to fully understand the improvement of...
4
by: Mohitz | last post by:
Any pointers as to how one should go about porting procedural type code into object oriented code?? --- Mohit
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.