You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/src/FAQ.html
+12-6
Original file line number
Diff line number
Diff line change
@@ -725,11 +725,13 @@ <H4><A NAME="3.11">3.11</A>) What debugging features are available in
725
725
semicolon. If you have compiled with debugging symbols, you can use a
726
726
debugger to see what is happening. Because the backend was not started
727
727
from the postmaster, it is not running in an identical environment and
728
-
locking/backend interaction problems may not be duplicated. Some
729
-
debuggers can attach to an already-running backend; that is the most
730
-
convenient way to diagnose problems in the normal multi-backend
731
-
environment.
732
-
<P>
728
+
locking/backend interaction problems may not be duplicated.<P>
729
+
730
+
Another method is to start <I>psql</I> in one window, then find the
731
+
<small>PID</small> of the <i>postgres</i> process being used by the
732
+
<i>psql.</i> Use a debugger to attach to the <i>postgres</i>
733
+
<small>PID.</small> You can set breakpoints in the debugger and issues
734
+
queries from <i>psql.</i>
733
735
734
736
The postgres program has -s, -A, and -t options that can be very useful
735
737
for debugging and performance measurements.<P>
@@ -1061,7 +1063,11 @@ <H4><A NAME="4.16.2">4.16.2</A>) How do I get the back the generated SERIAL valu
1061
1063
INSERT INTO person (name) VALUES ('Blaise Pascal');
1062
1064
$newID = currval('person_id_seq');
1063
1065
</PRE>
1064
-
Finally, you could use the <AHREF="#4.17">oid</A> returned from the INSERT statement to lookup the default value, though this is probably the least portable approach. In perl, using DBI with Edmund Mergl's DBD::Pg module, the oid value is made available via $sth->{pg_oid_status} after $sth->execute().
1066
+
Finally, you could use the <AHREF="#4.17">oid</A> returned from the
1067
+
INSERT statement to lookup the default value, though this is probably
1068
+
the least portable approach. In perl, using DBI with Edmund Mergl's
1069
+
DBD::Pg module, the oid value is made available via
1070
+
$sth->{pg_oid_status} after $sth->execute().
1065
1071
1066
1072
<H4><ANAME="4.16.3">4.16.3</A>) Don't currval() and nextval() lead to a race condition with other
0 commit comments