Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit47b55d4

Browse files
committed
doc: Put callouts in SQL comments
This makes copy-and-pasting the SQL code easier.From: Thomas Munro <thomas.munro@enterprisedb.com>
1 parent6f236e1 commit47b55d4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎doc/src/sgml/plpgsql.sgml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5328,14 +5328,14 @@ SELECT * FROM cs_parse_url('http://foobar.com/query.cgi?baz');
53285328
<programlisting>
53295329
CREATE OR REPLACE PROCEDURE cs_create_job(v_job_id IN INTEGER) IS
53305330
a_running_job_count INTEGER;
5331-
PRAGMA AUTONOMOUS_TRANSACTION;<co id="co.plpgsql-porting-pragma">
5331+
PRAGMA AUTONOMOUS_TRANSACTION; --<co id="co.plpgsql-porting-pragma">
53325332
BEGIN
5333-
LOCK TABLE cs_jobs IN EXCLUSIVE MODE;<co id="co.plpgsql-porting-locktable">
5333+
LOCK TABLE cs_jobs IN EXCLUSIVE MODE; --<co id="co.plpgsql-porting-locktable">
53345334

53355335
SELECT count(*) INTO a_running_job_count FROM cs_jobs WHERE end_stamp IS NULL;
53365336

53375337
IF a_running_job_count &gt; 0 THEN
5338-
COMMIT; -- free lock<co id="co.plpgsql-porting-commit">
5338+
COMMIT; -- free lock<co id="co.plpgsql-porting-commit">
53395339
raise_application_error(-20000,
53405340
'Unable to create a new job: a job is currently running.');
53415341
END IF;
@@ -5402,7 +5402,7 @@ BEGIN
54025402
SELECT count(*) INTO a_running_job_count FROM cs_jobs WHERE end_stamp IS NULL;
54035403

54045404
IF a_running_job_count &gt; 0 THEN
5405-
RAISE EXCEPTION 'Unable to create a new job: a job is currently running';<co id="co.plpgsql-porting-raise">
5405+
RAISE EXCEPTION 'Unable to create a new job: a job is currently running'; --<co id="co.plpgsql-porting-raise">
54065406
END IF;
54075407

54085408
DELETE FROM cs_active_job;
@@ -5411,7 +5411,7 @@ BEGIN
54115411
BEGIN
54125412
INSERT INTO cs_jobs (job_id, start_stamp) VALUES (v_job_id, now());
54135413
EXCEPTION
5414-
WHEN unique_violation THEN <co id="co.plpgsql-porting-exception">
5414+
WHEN unique_violation THEN--<co id="co.plpgsql-porting-exception">
54155415
-- don't worry if it already exists
54165416
END;
54175417
END;

‎doc/src/sgml/query.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ SELECT city, max(temp_lo)
754754
<programlisting>
755755
SELECT city, max(temp_lo)
756756
FROM weather
757-
WHERE city LIKE 'S%'<co id="co.tutorial-agg-like">
757+
WHERE city LIKE 'S%' --<co id="co.tutorial-agg-like">
758758
GROUP BY city
759759
HAVING max(temp_lo) &lt; 40;
760760
</programlisting>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp