Today, a netizen asked PostgreSQL 9.0 how to debug functions in the group. I remember there was a plug-in named edb-debugger in 8.3 that could be used. there is no 9.0 database at hand, so I tested it and it could not be used at 9.1. The result is
CREATE OR REPLACE FUNCTION get_user (Test integer)
RETURNS setof test as $BODY $
DECLARE R Record;
BEGIN
for R in SELECT * from Test where id=$1 LOOP
RETURN NEXT R;
END LOOP;
If not found then
For R in with a (ID, a, c) as (
INSERT into test values (
This post is transferred from Http://bbs.pgsqldb.com, and two posts are joined together.
A lot of content is online search information, I just tidy up, there are missing places, welcome to add
First Use tool (ORA2PG) to automatically
Article title: Change your program from sqlserver to PostgreSQL -- 1. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open
First, the problem descriptionWhen the number of records for a table in PostgreSQL recently increased from million to 1 million (design capability is 100 million), the query performance of a multi-table associated view built on top of the table was
PostgreSQL tables, function names are strictly case-sensitive, so when used without notice that the case of the problem is easy to find the function name error, but in the last two days we found that if the function parameters use a custom data type,
1. Exception error HandlingIn the Pl/pgsql function, if there is no exception capture, the function exits directly when an error occurs, and the things associated with it are rolled back. We can catch and recover the exception by using the Begin
Anyone familiar with MySQL may know that MySQL has an "insert ignore" syntax to ignore existing records. PostgreSQL does not currently provide such syntax, but it can be replaced by other methods.T_girl = # \ d insert_ignore Table "ytt.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.