plpgsql
How to call Postgres function returning SETOF record?
I have written the following function: -- Gets stats for all markets CREATE OR REPLACE FUNCTION GetMarketStats ([详细]
2023-01-02 16:37 分类:问答text search query building in postgres
I need to build a stored procedure that takes input an array of varchars . It will search for these using syntax like[详细]
2023-01-02 00:18 分类:问答How to find the first and last occurrences of a specific character inside a string in PostgreSQL
I want to find the first and the last occurrences of a specific character inside a string. As an examp开发者_Python百科le, consider a string named \"2010-####-3434\", and suppose the character to be s[详细]
2023-01-01 21:28 分类:问答Syntax error with Postgres FOR LOOP
I have a problem in postgres function: CREATE OR REPLACE FUNCTION linkedRepoObjects(id bigint) RETURNS intAS $$[详细]
2022-12-31 09:49 分类:问答How to write this function as a pL/pgSQl function?
I am trying to implement some business logic in a PL/pgSQL function. I have hacked together some pseudo code that explains the type of business logic I want to include in the function.[详细]
2022-12-30 09:21 分类:问答Truncating all tables in a Postgres database
I regularly need to delete all the data from my PostgreSQL database before a rebuild. How would I do this directly in SQL?[详细]
2022-12-30 09:01 分类:问答Can a PL/pgSQL function contain a dynamic subquery?
I am writing a PL/pgSQL function. The function has input parameters which specify (indirectly), which tables to read filtering informa开发者_如何学Ction from.[详细]
2022-12-30 07:04 分类:问答Regular expression replace in PL/pgSQL
If I have the following input (excluding quotes): \"The ancestralterritorialimperatives of thetrumpeter swan\"[详细]
2022-12-29 03:14 分类:问答Query has no destination for result data after trigger
I have a problem with my trigger. On inserting a new line it will check if the article has not sold. I can do it in the software but I think its better when the DB this does.[详细]
2022-12-28 13:11 分类:问答PostgreSQL custom exceptions?
In Firebird we can declare custom exceptions like so: CREATE EXCEPTION EXP_CUSTOM_0 \'Exception: Custom exception\';[详细]
2022-12-28 03:20 分类:问答