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

Commita00a1a5

Browse files
committed
bring it all into -current again
1 parent25acbc5 commita00a1a5

File tree

93 files changed

+3460
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+3460
-0
lines changed

‎src/bin/pgaccess/lib/help/abort.hlp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.pgaw:Help.f.t insert end \
2+
"ABORT" {bold} " rolls back the current transaction and causes all the updates made by the transaction to be discarded. This command is identical in behavior to the SQL92 command ROLLBACK, and is present only for historical reasons.
3+
4+
" {} "Synopsis" {bold} "
5+
6+
" {} "ABORT" {code} "
7+
8+
" {} "Compatibility SQL92" {bold} "
9+
10+
This command is a Postgres extension present for historical reasons. " {} "ROLLBACK" {bold} " is the SQL92 equivalent command."
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.pgaw:Help.f.t insert end \
2+
"Adding new records to an existing table" {bold} "
3+
4+
" {} "Open a table for viewing and editing" {link open_table} " and move to the end of the displayed records using the vertical scrollbar. You will find there a single row containing only * characters. Click with the mouse on a field and start edit the new record. Move through the fields using Tab and Shift-Tab.
5+
The new record will be saved into the database when you will select another record (or press on the mouse right-button).
6+
"
7+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.pgaw:Help.f.t insert end "ALTER TABLE" {bold} " changes the definition of an existing table. The new columns and their types are specified in the same style and with the the same restrictions as in CREATE TABLE. The RENAME clause causes the name of a table or column to change without changing any of the data contained in the affected table. Thus, the table or column will remain of the same type and size after this command is executed.
2+
3+
" {} "Synopsis" {bold} "
4+
5+
ALTER TABLE table \[ * \] ADD \[ COLUMN \] column type
6+
ALTER TABLE table \[ * \] RENAME \[ COLUMN \] column TO newcolumn
7+
ALTER TABLE table RENAME TO newtable
8+
9+
" {code} "table" {italic} "
10+
The name of an existing table to alter.
11+
12+
" {} "column" {italic} "
13+
Name of a new or existing column.
14+
15+
" {} "type " {italic} "
16+
Type of the new column.
17+
18+
" {} "newcolumn " {italic} "
19+
New name for an existing column.
20+
21+
" {} "newtable " {italic} "
22+
New name for an existing column.
23+
24+
You must own the table in order to change its schema.
25+
26+
" {} "Notes:" {italic} " The keyword COLUMN is noise and can be omitted.
27+
28+
\"\[*\]\" following a name of a table indicates that statement should be run over that table and all tables below it in the inheritance hierarchy. The PostgreSQL User's Guide has further information on inheritance.
29+
30+
Refer to " {} "CREATE TABLE" {link create_table} " for a further description of valid arguments."
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
.pgaw:Help.f.t insert end "ALTER USER" {bold} " is used to change the attributes of a user's Postgres account. Please note that \
2+
it is not possible to alter a user's " {} "usesysid" {bold} " via the alter user statement. Also, it is only possible for \
3+
the Postgres user or any user with read and modify permissions on " {} "pg_shadow" {bold} " to alter user passwords. \
4+
If any of the clauses of the alter user statement are omitted, the corresponding value in the " {} "pg_shadow" {bold} " table is left unchanged. \
5+
6+
" {} "Synopsis" {bold} "
7+
8+
ALTER USER username
9+
\[ WITH PASSWORD password \]
10+
\[ CREATEDB | NOCREATEDB \]
11+
\[ CREATEUSER | NOCREATEUSER \]
12+
\[ IN GROUP groupname \[, ...\] \]
13+
\[ VALID UNTIL 'abstime' \]
14+
15+
16+
" {code} "Inputs" {bold} "
17+
Refer to CREATE USER for a detailed description of each clause.
18+
19+
" {} "username" {italic} "
20+
The Postgres account name of the user whose details are to be altered.
21+
22+
" {} "password" {italic} "
23+
The new password to be used for this account.
24+
25+
" {} "groupname" {italic} "
26+
The name of an access group into which this account is to be put.
27+
28+
" {} "abstime" {italic} "
29+
The date (and, optionally, the time) at which this user's access is to be terminated.
30+
31+
" {} "Outputs" {bold} "
32+
33+
" {} "ALTER USER" {italic} "
34+
Message returned if the alteration was successful.
35+
36+
" {} "ERROR: alterUser: user 'username' does not exist" {italic} "
37+
Error message returned if the user specified doesn't exist.
38+
39+
" {} "Notes" {italic} "
40+
41+
" {} "ALTER USER" {bold} " statement is a Postgres language extension.
42+
Refer to CREATE/DROP USER to create or remove a user account.
43+
In the current release (v6.5), the IN GROUP clause is parsed but has no affect. When it is fully implemented, it is intended to modify the pg_group relation.
44+
45+
" {} "Compatibility" {bold} "
46+
47+
SQL92
48+
There is no ALTER USER statement in SQL92. The standard leaves the definition of users to the \
49+
implementation."

‎src/bin/pgaccess/lib/help/author.hlp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.pgaw:Help.f.t insert end \
2+
"The author of PgAccess\n" {title} \
3+
"
4+
My name is Constantin Teodorescu, I'm 36 years old, I have graduated the Faculty of Computers and Automation Bucharest, ROMANIA, I have a 16 year experience in developing applications in various languages, Pascal, C, C++, Visual Basic, Delphi, Perl , Tcl/Tk and Java for different platforms. Currently working as a manager of a team that works in Unix with Java , SQL databases (Oracle, SYBASE) currently using PostgreSQL database for developing professional client/server multi-platform applications (standalone Java or Tcl/Tk ,Java applets) for different customers and various projects (accounting, invoicing, stock inventory).
5+
6+
In present I am the technical manager of FLEX Consulting Braila, a computer shop, software company, networking designer and consultant, ISP provider for Braila city. I'm also a columnist in the romanian technical magazine \"PC-Magazine\" and \"BYTE\".
7+
8+
I have discovered PostgreSQL in 1995 and from the first moment I decided to help it's development writting PgAccess, a graphical interface.
9+
10+
The work has been done using Visual Tcl, in my opinion the best tool for developing Tcl/Tk projects. Visual Tcl is free, more information at http://www.neuron.com/stewart/vtcl/index.html
11+
12+
I'm waiting for any suggestions at e-mail address teo@flex.ro"

‎src/bin/pgaccess/lib/help/begin.hlp

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.pgaw:Help.f.t insert end "BEGIN" {bold} "
2+
By default, Postgres executes transactions in unchained mode (also known as " {} "autocommit" {bold} " in other database systems). In other words, each user statement is executed in its own transaction \
3+
and a commit is implicitly performed at the end of the statement (if execution was successful, otherwise a rollback is done). BEGIN initiates a user transaction in chained mode, i.e. all user \
4+
statements after BEGIN command will be executed in a single transaction until an explicit COMMIT, ROLLBACK or execution abort. Statements in chained mode are executed much faster, \
5+
because transaction start/commit requires significant CPU and disk activity. Execution of multiple statements inside a transaction is also required for consistency when changing several related \
6+
tables. \
7+
The default transaction isolation level in Postgres is READ COMMITTED, where queries inside the transaction see only changes committed before query execution. So, you have to use SET \
8+
TRANSACTION ISOLATION LEVEL SERIALIZABLE just after BEGIN if you need more rigorous transaction isolation. In SERIALIZABLE mode queries will see only changes committed \
9+
before the entire transaction began (actually, before execution of the first DML statement in a serializable transaction). \
10+
If the transaction is committed, Postgres will ensure either that all updates are done or else that none of them are done. Transactions have the standard ACID (atomic, consistent, isolatable, and durable) property.
11+
12+
" {} "Synopsis" {bold} "
13+
" {} "
14+
BEGIN \[ WORK | TRANSACTION \]
15+
16+
" {code} "Notes" {bold} "
17+
The keyword TRANSACTION is just a cosmetic alternative to WORK. Neither keyword need be specified.
18+
Refer to the LOCK statement for further information about locking tables inside a transaction.
19+
Use " {} "COMMIT" {link commit} " or " {} "ROLLBACK" {link rollback} " to terminate a transaction.
20+
21+
" {} "Usage" {bold} "
22+
To begin a user transaction:
23+
24+
" {} "BEGIN WORK;" {italic} "
25+
26+
" {} "Compatibility" {bold} "
27+
BEGIN is a Postgres language extension.
28+
29+
" {} "SQL92" {bold} "
30+
31+
There is no explicit BEGIN WORK command in SQL92; transaction initiation is always implicit and it terminates either with a COMMIT or with a ROLLBACK statement.
32+
33+
Note: Many relational database systems offer an autocommit feature as a convenience.
34+
35+
SQL92 also requires SERIALIZABLE to be the default transaction isolation level. "

‎src/bin/pgaccess/lib/help/close.hlp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.pgaw:Help.f.t insert end "CLOSE" {bold} " frees the resources associated with an open cursor. After the cursor is closed, no subsequent operations are allowed on it. A cursor should be closed when it is no longer needed. \
2+
An implicit close is executed for every open cursor when a transaction is terminated by \
3+
" {} "COMMIT" {link commit} " or " {} "ROLLBACK" {link rollback} ".
4+
5+
" {} "Synopsis" {bold} "
6+
7+
CLOSE cursor
8+
9+
" {} "Usage" {bold} "
10+
11+
Close the cursor liahona:
12+
13+
CLOSE liahona;
14+
15+
" {} "Compatibility" {bold} "
16+
17+
SQL92
18+
CLOSE is fully compatible with SQL92
19+
20+
" {} "Notes" {bold} "
21+
22+
Postgres does not have an explicit OPEN cursor statement; a cursor is considered open when it is declared. Use the DECLARE statement to declare a cursor."

‎src/bin/pgaccess/lib/help/cluster.hlp

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
.pgaw:Help.f.t insert end "CLUSTER" {bold} " instructs Postgres to cluster the class specified by classname approximately based on the index specified by indexname. The index must already have been defined on classname. \
2+
When a class is clustered, it is physically reordered based on the index information. The clustering is static. In other words, as the class is updated, the changes are not clustered. No attempt is \
3+
made to keep new instances or updated tuples clustered. If one wishes, one can recluster manually by issuing the command \
4+
again.
5+
6+
" {} "Synopsis" {bold} "
7+
CLUSTER indexname ON table
8+
9+
" {} "Inputs" {bold} "
10+
11+
" {} "indexname" {italic} "
12+
The name of an index.
13+
14+
" {} "table" {italic} "
15+
The name of a table.
16+
17+
" {} "Outputs" {bold} "
18+
19+
CLUSTER
20+
The clustering was done successfully.
21+
ERROR: relation <tablerelation_number> inherits \"invoice\"
22+
ERROR: Relation x does not exist!
23+
24+
" {} "Usage" {bold} "
25+
Cluster the employees relation on the basis of its salary attribute
26+
27+
CLUSTER emp_ind ON emp
28+
29+
" {} "Notes" {bold} "
30+
31+
The table is actually copied to a temporary table in index order, then renamed back to the original name. For this reason, all grant permissions and other indexes are lost when clustering is \
32+
performed.
33+
In cases where you are accessing single rows randomly within a table, the actual order of the data in the heap table is unimportant. However, if you tend to access some data more than others, \
34+
and there is an index that groups them together, you will benefit from using CLUSTER.
35+
Another place CLUSTER is helpful is in cases where you use an index to pull out several rows from a table. If you are requesting a range of indexed values from a table, or a single indexed \
36+
value that has multiple rows that match, CLUSTER will help because once the index identifies the heap page for the first row that matches, all other rows that match are probably already on the \
37+
same heap page, saving disk accesses and speeding up the query.
38+
There are two ways to cluster data. The first is with the CLUSTER command, which reorders the original table with the ordering of the index you specify. This can be slow on large tables \
39+
because the rows are fetched from the heap in index order, and if the heap table is unordered, the entries are on random pages, so there is one disk page retrieved for every row moved. Postgres \
40+
has a cache, but the majority of a big table will not fit in the cache.
41+
42+
Another way to cluster data is to use
43+
44+
SELECT ... INTO TABLE temp FROM ... ORDER BY ...
45+
46+
This uses the Postgres sorting code in ORDER BY to match the index, and is much faster for unordered data. You then drop the old table, use ALTER TABLE/RENAME to rename temp to \
47+
the old name, and recreate any indexes. The only problem is that OIDs will not be preserved. From then on, CLUSTER should be fast because most of the heap data has already been ordered, \
48+
and the existing index is used. "

‎src/bin/pgaccess/lib/help/commit.hlp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.pgaw:Help.f.t insert end "COMMIT" {bold} " commits the current transaction. All changes made by the transaction become visible to others and are guaranteed to be durable if a crash occurs.
2+
3+
" {} "Synopsis" {bold} "
4+
" {} "
5+
COMMIT \[ WORK | TRANSACTION \]
6+
7+
" {code} "Usage" {bold} "
8+
9+
To make all changes permanent:
10+
11+
COMMIT WORK;
12+
13+
" {} "Notes" {bold} "
14+
15+
The keywords WORK and TRANSACTION are noise and can be omitted.
16+
17+
Use " {} "ROLLBACK" {link rollback} " to abort a transaction."

‎src/bin/pgaccess/lib/help/copy.hlp

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
.pgaw:Help.f.t insert end "COPY" {bold} " moves data between Postgres tables and standard Unix files. COPY instructs the Postgres backend to directly read from or write to a file. The file must be directly visible to the backend \
2+
and the name must be specified from the viewpoint of the backend. If stdin or stdout are specified, data flows through the client frontend to the backend.
3+
4+
" {} "Synopsis" {bold} "
5+
" {} "
6+
COPY \[ BINARY \] table \[ WITH OIDS \]
7+
FROM { 'filename' | stdin }
8+
\[ USING DELIMITERS 'delimiter' \]
9+
COPY \[ BINARY \] table \[ WITH OIDS \]
10+
TO { 'filename' | stdout }
11+
\[ USING DELIMITERS 'delimiter' \]
12+
13+
" {code} "Inputs" {bold} "
14+
15+
" {} "BINARY" {italic} "
16+
Changes the behavior of field formatting, forcing all data to be stored or read as binary objects rather than as text.
17+
18+
" {} "table" {italic} "
19+
The name of an existing table.
20+
21+
" {} "WITH OIDS" {italic} "
22+
Copies the internal unique object id (OID) for each row.
23+
24+
" {} "filename" {italic} "
25+
The absolute Unix pathname of the input or output file.
26+
27+
" {} "stdin" {italic} "
28+
Specifies that input comes from a pipe or terminal.
29+
30+
" {} "stdout" {italic} "
31+
Specifies that output goes to a pipe or terminal.
32+
33+
" {} "delimiter" {italic} "
34+
A character that delimits the input or output fields.
35+
36+
" {} "Outputs" {bold} "
37+
38+
" {} "COPY" {italic} "
39+
The copy completed successfully.
40+
41+
" {} "ERROR: error message" {italic} "
42+
The copy failed for the reason stated in the error message.
43+
44+
" {} "Usage" {bold} "
45+
46+
The following example copies a table to standard output, using a vertical bar \(\"|\"\) as the field delimiter:
47+
COPY country TO stdout USING DELIMITERS '|';
48+
49+
To copy data from a Unix file into a table \"country\":
50+
COPY country FROM '/usr1/proj/bray/sql/country_data';
51+
52+
Here is a sample of data suitable for copying into a table from stdin \(so it has the termination sequence on the last \
53+
line\):
54+
55+
AF AFGHANISTAN
56+
AL ALBANIA
57+
DZ ALGERIA
58+
...
59+
ZM ZAMBIA
60+
ZW ZIMBABWE
61+
\.
62+
63+
" {} "File Formats" {bold} "
64+
65+
" {} "Text Format" {italic} "
66+
When COPY TO is used without the BINARY option, the file generated will have each row \(instance\) on a single line, with each column \
67+
\(attribute\) separated by the delimiter character. Embedded delimiter characters will be preceded by a backslash character \
68+
\(\"\\\"\). The attribute values themselves are strings generated by the output function associated with each attribute type. \
69+
The output function for a type should not try to generate the backslash character; this will be handled by COPY itself.
70+
71+
The actual format for each instance is
72+
73+
<attr1><separator><attr2><separator>...<separator><attrn><newline>
74+
The oid is placed on the beginning of the line if WITH OIDS is specified.
75+
76+
If " {} "COPY" {bold} " is sending its output to standard output instead of a file, it will send a backslash\(\"\\\"\) and a period \
77+
\(\".\"\) followed immediately by a newline, on a separate line, when it is done. Similarly, \
78+
if " {} "COPY" {bold} " is reading from standard input, it will expect a backslash \(\"\\\"\) and a period \
79+
\(\".\"\) followed by a newline, as the first three characters on a line to denote end-of-file. However, COPY will \
80+
terminate \(followed by the backend itself\) if a true EOF is encountered before this special end-of-file pattern is found.
81+
82+
The backslash character has other special meanings. NULL attributes are represented as \"\\N\". A literal backslash character is represented as two consecutive backslashes \
83+
\(\"\\\\\"\). A literal tab character is represented as a backslash and a tab. A literal newline character is represented as a backslash and a newline. When loading text data not generated by Postgres, you will need to \
84+
convert backslash characters \(\"\\\"\) to double-backslashes \(\"\\\\\"\) to ensure that they are loaded properly.
85+
86+
" {} "Binary Format" {italic} "
87+
88+
In the case of " {} "COPY BINARY" {bold} ", the first four bytes in the file will be the number of instances in the file. If this number is zero, the \
89+
" {} "COPY BINARY" {bold} " command will read until end of file is encountered. Otherwise, it will stop reading when this number of instances has been read. Remaining data in the file will be ignored. \
90+
The format for each instance in the file is as follows. Note that this format must be followed exactly. Unsigned four-byte integer quantities are called uint32 in the table below.
91+
92+
" {} "Notes" {bold} "
93+
94+
The " {} "BINARY" {bold} " keyword will force all data to be stored/read as binary objects rather than as text. It is somewhat faster than the normal copy command, but is not generally portable, and the files \
95+
generated are somewhat larger, although this factor is highly dependent on the data itself. By default, a text copy uses a tab \
96+
\(\"\\t\"\) character as a delimiter. The delimiter may also be changed to any other single character with the keyword phrase USING DELIMITERS. Characters in data fields which happen to match the delimiter character will be quoted.
97+
98+
You must have select access on any table whose values are read by " {} "COPY" {bold} ", and either insert or update access to a table into which values are being inserted by \
99+
" {} "COPY" {bold} ". The backend also needs appropriate Unix permissions for any file read or written by \
100+
" {} "COPY" {bold} ".
101+
102+
The keyword phrase " {} "USING DELIMITERS" {bold} " specifies a single character to be used for all delimiters between columns. If multiple characters are specified in the delimiter string, only the first \
103+
character is used.
104+
105+
Tip: Do not confuse " {} "COPY" {bold} " with the psql instruction \\copy. "
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.pgaw:Help.f.t insert end \
2+
"Copyrights\n\n" {title} \
3+
"
4+
PostgreSQL is Copyright � 1996-9 by the PostgreSQL Global Development Group, and is distributed under the terms of the Berkeley license.
5+
6+
Postgres95 is Copyright � 1994-5 by the Regents of the University of California. Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.
7+
8+
In no event shall the University of California be liable to any party for direct, indirect, special, incidental, or consequential damages, including lost profits, arising out of the use of this software and its documentation, even if the University of California has been advised of the possibility of such damage.
9+
10+
The University of California specifically disclaims any warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The software provided hereunder is on an \"as-is\" basis, and the University of California has no obligations to provide maintainance, support, updates, enhancements, or modifications.
11+
"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp