plpgsql
How to profile plpgsql procedures
I\'m trying to improve the performance of a long-running plpgsql stored procedure, but I have no idea what开发者_如何学运维, if any, profiling tools are available.Can anyone offer suggestions for how[详细]
2023-02-09 12:58 分类:问答Postgres: check returns from xpath()
I have an SQL statement like such: select coalesce(nullif(xpath(\'//consumer/contact_address/\\@postcode\', xml),\'{}\'), \'\') from consumer where docid = 12345;[详细]
2023-02-08 10:56 分类:问答PostgreSQL Exception Handling
I am new to PostgreSQL. Could anybody please correct this query. BEGIN TRANSACTION; BEGIN; CREATE TABLE \"Logs\".\"Events\"[详细]
2023-02-08 08:16 分类:问答Select and use one column
Please consider the following (working) stored procedure. This function receives an integer as its first parameter, indicating which privilegeid has to be checked against the current user. Privileges[详细]
2023-02-06 11:32 分类:问答Making emacs to highlight postgresql syntax by default
I use emacs for editing my sql code. I work 99% of time on pos开发者_如何学运维tgresql plpgsql code. All my files with extension .sql contain postgresql. I\'m curious is there a way to set sql-highlig[详细]
2023-02-06 10:04 分类:问答Passing parameters to EXECUTE in plpgsql function
I get following error from the function below: ERROR:column \"_df\" does not exist create or replace function lax()returns setof record as[详细]
2023-02-05 11:14 分类:问答Keep a certain number of records in a table
I have an SQL-table holding the last hands received by a player in card game. The hand is represented by an integer (32 bits == 32 cards):[详细]
2023-02-03 15:59 分类:问答Can Postgres stored functions have both a return value AND out parameters?
I know Oracle and PL/SQL Compared to what I know about Oracle PL/SQL, I\'m not very familiar with PostgreSQL\'s stored procedures and plpgsql. In Oracle, there are two types of callables:[详细]
2023-02-03 06:48 分类:问答Converting MySQL Stored Procedures to PostgreSQL function. What do I do with these replace() calls?
I am just about finished converting 84 stored procedures from MySQL to PostgreSQL functions. The only thing that has not been figured out is what to do with the replace() calls. The function doesn\'t[详细]
2023-02-03 05:06 分类:问答How to write this pl/pgsql function?
I want to write a stored procedure that returns a \'flattened\' object. By \'flattening\', I am essentially selecting a set of rows, and returning specific fields in the rows, into the data returned f[详细]
2023-02-02 01:54 分类:问答