File: view-without-pk.html

package info (click to toggle)
pgadmin3 1.4.3-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 29,796 kB
  • ctags: 10,758
  • sloc: cpp: 55,356; sh: 6,164; ansic: 1,520; makefile: 576; sql: 482; xml: 100; perl: 18
file content (22 lines) | stat: -rw-r--r-- 816 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="STYLESHEET" type="text/css" href="../pgadmin3.css">
<title>Guru Hints</title>
</head>

<body>

<h3>Edit table data without primary key</h3>
<p>
Since the table <INFO> doesn't have a primary key or OIDs, you can view the data only.
Inserting new rows and changing existing rows isn't possible for the Edit Data tool without primary key.
</p>
<p>
In order to edit data, pgAdmin III requires a primary key on the table, which is a good database design practice anyway.
Alternatively, the table can be created WITH OIDS. Please note that oids are <B>not</B> guaranteed to be unique over a very 
long period of time, so using oids as kind-of primary key is only second choice.
</p>
</body>
</html>