Top "Plpgsql" questions

PL/pgSQL is the default procedural language for PostgreSQL.

Rename column names in postgresql database

I want rename all column names to lower case in PostgreSQL database I have just coded a sql function. Below …

postgresql plpgsql
Refactor a PL/pgSQL function to return the output of various SELECT queries

I wrote a function that outputs a PostgreSQL SELECT query well formed in text form. Now I don't want to …

sql database postgresql plpgsql dynamic-sql
How to find if a function exists in PostgreSQL?

Unlike tables or sequences, user-defined functions cannot be found through pg_class. There are questions on how find a list …

function postgresql plpgsql
SQL Sub queries in check constraint

Can I make SQL sub queries in Check constraint ? I've a post table with columns id, owner I've another table …

postgresql foreign-key-relationship plpgsql check-constraints
Could not access file "$libdir/plpgsql": No such file or directory

I'm at a loss, I'm having issues creating a stored proc in my local Postgres server (postgres.app, Mac OS …

postgresql osx-lion plpgsql postgresql-9.3 postgres.app
plpgsql: calling a function with 2 OUT parameters

I'm trying to fetch to values from a plpgsql function with 2 OUT paramenters but I have some problem. These are …

postgresql plpgsql
Declare row type variable in PL/pgSQL

As I found SELECT * FROM t INTO my_data; works only if: DO $$ DECLARE my_data t%ROWTYPE; BEGIN SELECT * …

postgresql types plpgsql declare select-into
PostgreSQL CASE usage in functions

Can't we use CASE condition outside SQL SELECT statements? E.g.: CASE WHEN old.applies_to = 'admin' THEN _applies_to = …

postgresql conditional case plpgsql
ERROR: must be owner of language plpgsql

I'm using PostgreSQL v9.0.1 with Rails (and it's deps) @ v2.3.8, owing to the use of the fulltext capability of postgres, …

ruby-on-rails ruby postgresql activerecord plpgsql
How can I send some http request from postgresql function or trigger

I need to send data via http protocol (GET or POST request) from the function or trigger. Is it possible?

postgresql httprequest plpgsql