Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Troubleshooting PostgreSQL
  • Table Of Contents Toc
Troubleshooting PostgreSQL

Troubleshooting PostgreSQL

By : Hans-Jürgen Schönig
4.2 (5)
close
close
Troubleshooting PostgreSQL

Troubleshooting PostgreSQL

4.2 (5)
By: Hans-Jürgen Schönig

Overview of this book

If you are a database administrator looking for solutions to common PostgreSQL problems, this is the book for you. The book is suitable for people with intermediate and professional expertise.
Table of Contents (12 chapters)
close
close
11
Index

The PostgreSQL transaction model

The PostgreSQL transaction model differs quite a lot from other systems. In many cases, these differences are a root source of trouble. In this section, some basic examples have been included to make you aware of the way PostgreSQL works.

The first thing to take into account is that a transaction block has to be started with BEGIN statement and finished with a simple COMMIT statement All statements inside the transaction block have to be correct:

test=# BEGIN;
BEGIN
test=# SELECT now();
              now              
-------------------------------
 2014-09-22 13:27:24.952578+02
(1 row)

test=# SELECT now();
              now              
-------------------------------
 2014-09-22 13:27:24.952578+02
(1 row)

test=# COMMIT;
COMMIT

Note that now() will return the transaction time. Therefore it is always the same, regardless of how often it is used. Many people like to use DEFAULT now() in their column definitions. Always keep in mind that DEFAULT now() sets...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Troubleshooting PostgreSQL
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon