---------- Forwarded message ----------
Date: Wed, 7 Jul 1999 19:43:00 +0700 (GMT+0700)
From: Nuchanach Klinjun <nuchk@inet.co.th>
To: questions@postgresql.org
Subject: upgrade problem
Dear Sir/Madam,
After Upgrade Database to the latest version I got some problem like this
1. ODBC connection I used to link table from postgresql to my database file (MS
Access) but now I cannot and it gives me error "Invalid field definition
'accont' in definition of index or relationship"
2. Cannot execute some query which I could excute before upgrade.
the query is complicate but it used to work well both with MS Access
and with db prompt it returned me error like it terminated my query
abnormally i.e. "Memory exhausted in AlloSetAlloc() (#1)",
"No response from the backend, Socket has been closed (#1)".
my sql is ..
"select date(s.stop) as accdate,sum(date_part('epoch',s.stop-s.start)/3600)
,sum((s.rate/t.rate)*date_part('epoch',s.stop-s.start)/3600)
,sum(s.value*100/107),sum(t.balance)
from session s,ticket t
where s.stop is not null and date(s.stop) between '1999/06/01' and
'1999/06/15' group by accdate;"
3.Some query work abnormally since upgrade.
I did attached the infomation I have
Table Schema which I use in my query in 2. and I used to link it
into my Access Database file.
=> \d ticket
Table = ticket
+----------------------------------+----------------------------------+-------+
| Field | Type |
Length|
+----------------------------------+----------------------------------+-------+
| id | text not null |
var |
| registered | datetime not null |
8 |
| lifetime | timespan not null default '@ 180 |
12 |
| value | money not null |
4 |
| balance | money not null default 0 |
4 |
| rate | float8 not null |
8 |
| account | text not null |
var |
| free | bool not null default 'f' |
1 |
| priority | int4 not null default 0 |
4 |
| marker | int4 |
4 |
+----------------------------------+----------------------------------+-------+
Indices: ticket_account ticket_pkey
=> \d session
Table = session
+----------------------------------+----------------------------------+-------+
| Field | Type |
Length|
+----------------------------------+----------------------------------+-------+
| id | int4 not null default nextval ( |
4 |
| seq | int4 not null default 1 |
4 |
| last | bool not null default 'f' |
1 |
| nas | text not null |
var |
| sessionid | text not null |
var |
| description | text |
var |
| account | text not null |
var |
| ticket | text not null |
var |
| rate | float8 |
8 |
| value | money |
4 |
| start | datetime not null default dateti |
8 |
| stop | datetime |
8 |
| reserved | datetime |
8 |
| approved | datetime |
8 |
| cancelled | datetime |
8 |
| clientip | text |
var |
+----------------------------------+----------------------------------+-------+
Indices: i_session_stop session_account session_pkey session_ticket
Here's the backtrace:
(gdb) bt
#0 0xd9a4c in AllocSetReset ()
#1 0xdaa0a in EndPortalAllocMode ()
#2 0x19147 in AtCommit_Memory ()
#3 0x19302 in CommitTransaction ()
#4 0x19550 in CommitTransactionCommand ()
#5 0xa8665 in PostgresMain ()
#6 0x8e4ba in DoBackend ()
#7 0x8dfbe in BackendStartup ()
#8 0x8d35e in ServerLoop ()
#9 0x8cbd7 in PostmasterMain ()
#10 0x4a102 in main ()
access=> select version();
version
--------------------------------------------------------------
PostgreSQL 6.5.0 on i386-unknown-freebsd2.2.8, compiled by cc
> PostgreSQL ODBC driver 6.40.00.06
set up with valid user name and password, valid port.
Thank you very much and I really hope to hear from you really soon.
Cheers,
Nuchanach K.
-----------------------------------------
Nuchanach Klinjun
R&D Project. Internet Thailand
Email: nuchk@inet.co.th