Showing posts with the label plpgsql

[FIXED] execute sql inside plpgsql function

Issue Using postgreSQL 9.1.9, I have some SQL requests like this: INSERT INTO "my_table&quo…

[FIXED] pl/pgsql Return true if update was successful

Issue Given the following skeleton pl/pgsql function, how can I make it return true if the update …

[FIXED] How secure is format() for dynamic queries inside a function?

Issue After reading Postgres manual and many posts here, I wrote this function tacking in mind all …

[FIXED] PosgreSQL function passing parameters by name

Issue Is it possible to create a function like this: CREATE FUNCTION Testing(p_1 INTEGER DEFAULT N…

[FIXED] Is it possible to tokenize text in PL/PGSQL using regular expressions?

Issue I want to tokenize text in my database with RegEx and store the resulting tokens in a table. …

[FIXED] How do I use the conditional WHERE date >= current_date - INTERVAL '{time interval)' using column values?

Issue I have a table which looks something like this: create table drugs_list ( rule …

[FIXED] how to assign variable to unnest in PostgreSQL

Issue I have tried assign variable(W_SPLIT_MSG) but getting error like ERROR: syntax error at or n…

[FIXED] Truncating all tables in a Postgres database

Issue I regularly need to delete all the data from my PostgreSQL database before a rebuild. How wou…