PYO Posted November 4, 2007 Posted November 4, 2007 Can I use 'plpgsql' language in my PostgreSQL? In phpPgAdmin I didn't find it. I need it for some triggers in db. It can be done in psql by command: createlang plpgsql pyohost_ph; Thanks.
Ashoat Posted November 5, 2007 Posted November 5, 2007 I'm sorry, but I don't believe that cPanel provides that feature. I don't know much about PgSQL, but my guess is that that language is potentially dangerous.
PYO Posted November 5, 2007 Author Posted November 5, 2007 I'm sorry, but I don't believe that cPanel provides that feature. I don't know much about PgSQL, but my guess is that that language is potentially dangerous. Bad. It's not dangerous at all. I need some of them to make triggers (i.e. when you add record in one table the trigger adds record to another table). Thi is from PgSQL docs: Chapter 34. Triggers Trigger functions can be written in most of the available procedural languages, including PL/pgSQL, PL/Tcl, PL/Perl, and PL/Python. It is not currently possible to write a trigger function in the plain SQL function language. Any help?
Ashoat Posted November 6, 2007 Posted November 6, 2007 Sorry - the only thing that is provided is available in cPanel. PostgreSQL support is sort of mediocre in cPanel, to be honest.
PYO Posted November 10, 2007 Author Posted November 10, 2007 My research shows thet only on PostreSQL 8.1 or higher it is possible to use CREATE LANGUAGE plpgsql; to make it enabled for a db. In other versions you can only ask admin to make it availible. Will you ever upgrade to 8.1+ ver?
Kelso Posted November 10, 2007 Posted November 10, 2007 The problem with Triggers is that people can make an infinite loop with them, effectively locking a table. Hackers have been known to do that...
PYO Posted November 10, 2007 Author Posted November 10, 2007 The problem with Triggers is that people can make an infinite loop with them, effectively locking a table. Hackers have been known to do that... Well... 1. I will not lock my table if I'll use it. 2. There is many other ways to abuse db server: for example expensive SQL queries.
PYO Posted November 11, 2007 Author Posted November 11, 2007 What exactly are you trying to do? A mass join or mass update perhaps? No. Some are simple db driven user access control. Other autocount updates, so I don't need to have use 'count(...)' sql command. Abuses to server are: - more memory needed for executing php script, - more sql commands and results passing between script and db. They are not very big, but...
fernandinand Posted December 30, 2009 Posted December 30, 2009 Can I use 'plpgsql' language in my PostgreSQL? In phpPgAdmin I didn't find it. I need it for some triggers in db. It can be done in psql by command: createlang plpgsql pyohost_ph; Thanks. Any news about this issue? I would like to be able to access plpgslq, because PostGIS functions use this language. It is possible to create a function to enable PL language, but it must be known the location of plpgsql.so file, usually something like /usr/local/pgsql/lib. Another way is to simply provide users database templates to use with plsql language enabled. Please more info about this and it wrong to think that plpgsql is a bad thing. Simple SQL can do a lot of harm... Cheers!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now