Enviroment (Környezet):

Server (Linux Debian), PostgreSQL 6.4.2 (64 Mbyte RAM)

Client: Windows Nt 4.0 Service Pack 4 (64 Mbyte RAM)

Network: Ethernet 10baseT, Protocol: TCP/IP

 

POSTGRES START (Debug):

User: root

Command: su – postgres –c ’cd /usr/local/pgsql/bin;./postmasrer –d 2 –i –o –F –B 1024 –D/var/pgsql/data’

status OK postmaster running

 

Create database

1 Login postgres

2 createuser babo

Enter user’s postgres ID or RETURN to use unix user ID: 1000 ->

Is user “babo” allowed to create databases (y/n) y

Is user “babo” allowed to add users (y/n) y

createuser: babo was successfully added

$

1 Login babo

2 createdb teszt

$

psql teszt

teszt=>\i /home/babo/teszt/createszt.sql

CREATE TABLE teszt (

Ssz int,

city varchar(20), -- varos nev

temp_lo int, -- alacsony hofok

temp_hi int, -- magas hofok

datum date -- adat datuma

);

CREATE UNIQUE INDEX teszt_idx

ON teszt USING BTREE (Ssz) ;

CREATE

EOF

teszt=>\i /home/babo/teszt/adat10.sql

.

.

INSERT 38616 1

INSERT INTO teszt

VALUES (10,'Budapest',10,19,'11/10/1998');

INSERT 38617 1

EOF

teszt=>

teszt=> select * from teszt ;

ssz|city |temp_lo|temp_hi| datum

---+--------+-------+-------+----------

1|Budapest| 1| 10|11-01-1998

2|Eger | 2| 11|11-02-1998

3|Budapest| 3| 12|11-03-1998

4|Eger | 4| 13|11-04-1998

5|Pozsony | 5| 14|11-05-1998

6|Budapest| 6| 15|11-06-1998

7|Budapest| 7| 16|11-07-1998

8|Budapest| 8| 17|11-08-1998

9|Eger | 9| 18|11-09-1998

10|Budapest| 10| 19|11-10-1998

(10 rows)

teszt=>

the teszt table ok

 

client start program

 

user login: ok

postgres debug:

./postmaster: ServerLoop: handling reading 5

./postmaster: ServerLoop: handling reading 5

./postmaster: ServerLoop: handling writing 5

./postmaster: BackendStartup: pid 239 user babo db teszt socket 5

./postmaster child[239]: starting with (/usr/local/pgsql/bin/./postgres, -p,

-d2, -P5, -F, -B, 1024, -v131072, teszt, )

FindExec: found "/usr/local/pgsql/bin/./postgres" using argv[0]

debug info:

User = babo

RemoteHost = 192.168.1.33

RemotePort = 1076

DatabaseName = teszt

Verbose = 2

Noversion = f

.

.

.

query: set ksqo to 'ON'

ProcessUtility: set ksqo to 'ON'

CommitTransactionCommand

StartTransactionCommand

query: BEGIN

ProcessUtility: BEGIN

CommitTransactionCommand

StartTransactionCommand

query: declare SQL_CUR03300040 cursor for select oid from pg_type where

typname='lo'

ProcessQuery

CommitTransactionCommand

StartTransactionCommand

query: fetch 100 in SQL_CUR03300040

ProcessUtility: fetch 100 in SQL_CUR03300040

CommitTransactionCommand

StartTransactionCommand

query: close SQL_CUR03300040

ProcessUtility: close SQL_CUR03300040

CommitTransactionCommand

StartTransactionCommand

query: END

ProcessUtility: END

CommitTransactionCommand

No problem

Client

 

 

Select menu “1.Lista”

Ok no problem

postgres debug:

StartTransactionCommand

query: BEGIN

ProcessUtility: BEGIN

CommitTransactionCommand

StartTransactionCommand

query: declare SQL_CUR03300040 cursor for SELECT city, temp_lo, temp_hi,

datum FROM teszt ORDER BY datum;

ProcessQuery

CommitTransactionCommand

StartTransactionCommand

query: fetch 100 in SQL_CUR03300040

ProcessUtility: fetch 100 in SQL_CUR03300040

CommitTransactionCommand

StartTransactionCommand

query: close SQL_CUR03300040

ProcessUtility: close SQL_CUR03300040

CommitTransactionCommand

StartTransactionCommand

query: END

ProcessUtility: END

CommitTransactionCommand

Ok no problem

Select menu “3 Data Update 1 record”

Push button “SELECT (Pozsony)”

Postgres debug

StartTransactionCommand

query: BEGIN

ProcessUtility: BEGIN

CommitTransactionCommand

StartTransactionCommand

query: declare SQL_CUR03300040 cursor for SELECT ssz, temp_hi , temp_lo,

city FROM teszt WHERE city='Pozsony';

ProcessQuery

CommitTransactionCommand

StartTransactionCommand

query: fetch 100 in SQL_CUR03300040

ProcessUtility: fetch 100 in SQL_CUR03300040

CommitTransactionCommand

StartTransactionCommand

query: close SQL_CUR03300040

ProcessUtility: close SQL_CUR03300040

CommitTransactionCommand

StartTransactionCommand

query: END

ProcessUtility: END

CommitTransactionCommand

Ok no problem

Push button “Update 1 record”

No problem

Postgres debug

StartTransactionCommand

query: BEGIN

ProcessUtility: BEGIN

CommitTransactionCommand

StartTransactionCommand

query: UPDATE teszt SET temp_lo = -100, temp_hi = 100 WHERE city='Pozsony'

ProcessQuery

CommitTransactionCommand

StartTransactionCommand

query: COMMIT

ProcessUtility: COMMIT

CommitTransactionCommand

StartTransactionCommand

query: BEGIN

ProcessUtility: BEGIN

CommitTransactionCommand

StartTransactionCommand

query: declare SQL_CUR03310110 cursor for SELECT ssz, temp_hi , temp_lo,

city FROM teszt WHERE city='Pozsony';

ProcessQuery

CommitTransactionCommand

StartTransactionCommand

query: fetch 100 in SQL_CUR03310110

ProcessUtility: fetch 100 in SQL_CUR03310110

CommitTransactionCommand

StartTransactionCommand

query: close SQL_CUR03310110

ProcessUtility: close SQL_CUR03310110

CommitTransactionCommand

StartTransactionCommand

query: END

ProcessUtility: END

CommitTransactionCommand

No problem

Select menu “3 Data Update all”

Push button “Select all”

No problem

Postgres debug

StartTransactionCommand

query: BEGIN

ProcessUtility: BEGIN

CommitTransactionCommand

StartTransactionCommand

query: declare SQL_CUR03300040 cursor for Select "teszt"."ssz",

"teszt"."city",

"teszt"."temp_lo", "teszt"."temp_hi", "teszt"."datum" From "teszt"

ProcessQuery

CommitTransactionCommand

StartTransactionCommand

query: fetch 100 in SQL_CUR03300040

ProcessUtility: fetch 100 in SQL_CUR03300040

CommitTransactionCommand

No problem

Push button “Update all”

!!!! PROBLEM: Update failed

postgres debug:

StartTransactionCommand

query: update "teszt" set temp_lo = -100, temp_hi = 100

ProcessQuery

CommitTransactionCommand

StartTransactionCommand

query: COMMIT

ProcessUtility: COMMIT

CommitTransactionCommand

No problem /update all ok/

User babo

Psql teszt

teszt=> select * from teszt;

ssz|city |temp_lo|temp_hi| datum

---+--------+-------+-------+----------

1|Budapest| -100| 100|11-01-1998

2|Eger | -100| 100|11-02-1998

3|Budapest| -100| 100|11-03-1998

4|Eger | -100| 100|11-04-1998

6|Budapest| -100| 100|11-06-1998

7|Budapest| -100| 100|11-07-1998

8|Budapest| -100| 100|11-08-1998

9|Eger | -100| 100|11-09-1998

10|Budapest| -100| 100|11-10-1998

5|Pozsony | -100| 100|11-05-1998

(10 rows)

teszt=>

 

Summary:

Ha egy borland (delphi 4.0, update pack 1 vagy delphi 3.02) kornyzetbol kiadott parancs mely lehet az

UPDATE

INSERT

DELETE

Tobb mint 1 recordot erint, a postgres ugyan vegre hajtja de de amit vissza ad abbol a szoftver sikertelennek (pl.: Update failed) látja.

Ha csak 1 record kerul manipulálásra akkor minden rendbent lát mindenki

ODBC settings