[GENERAL] Migrating from a DB2/400 to Postgres.

2001-03-28 Thread Adam Huuva

Hello,

I have no experience of AS400 but I might be finding myself migrating a
database from db2/400 to postgres/linux shortly. I suppose it is a
question of making a dump on the db2 and then importing it to postgres.
(The fact that I get more search hits on db2 *core* dumps than data
dumps is not so incouraging...)

Does anybody know what the incompatibilities between these two
file-formats might be, i.e dump format of db2 and import/populate format
of postgres? 

Is there some general file format incompatibilities between as400 and
linux/unix??? 

Might it be wiser to do an intermediary step to a linux db2?

On another note, anybody know how postgres competes with db2?

Questions, questions.. now ideas and answers, yes?

Cheers,
--
Adam Huuva / Easter-eggs Spcialiste GNU/Linux
44-46 rue de l'Ouest  -  75014 Paris  -  France -  Mtro Gait
Phone: +33 (0) 1 43 35 00 37-   Fax: +33 (0) 1 43 35 00 76
mailto:[EMAIL PROTECTED]  -   http://www.easter-eggs.com

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [GENERAL] Migrating from a DB2/400 to Postgres.

2001-03-28 Thread martin . chantler


It may be possible to dump each table to a file on the AS/400 and FTP it to
a PC
I am not certain how this could be done but it should be possible.

If the database is not too big I would be tempted to use an ODBC link to
extract the data
directly into postgres from a VB/Java program that has ODBC connection to
postgres and the 400

Don't forget the useful SYS tables on the 400 (SYSCOLUMNS,SYSTABLES,etc)
that define the database,
these can be very useful

As for how postgres compares with db2/400, postgres is 1000 times more
advanced. DB2/400 doesn't have
full SQL implementation, its basic but can run quickly

MC.






Adam Huuva [EMAIL PROTECTED] on 28/03/2001 10:56:30

To:   [EMAIL PROTECTED]
cc:(bcc: Martin Chantler/CIMG/CVG)
Subject:  [GENERAL] Migrating from a DB2/400 to Postgres.


Hello,

I have no experience of AS400 but I might be finding myself migrating a
database from db2/400 to postgres/linux shortly. I suppose it is a
question of making a dump on the db2 and then importing it to postgres.
(The fact that I get more search hits on db2 *core* dumps than data
dumps is not so incouraging...)

Does anybody know what the incompatibilities between these two
file-formats might be, i.e dump format of db2 and import/populate format
of postgres?

Is there some general file format incompatibilities between as400 and
linux/unix???

Might it be wiser to do an intermediary step to a linux db2?

On another note, anybody know how postgres competes with db2?

Questions, questions.. now ideas and answers, yes?

Cheers,
--
Adam Huuva / Easter-eggs Spcialiste GNU/Linux
44-46 rue de l'Ouest  -  75014 Paris  -  France -  Mtro Gait
Phone: +33 (0) 1 43 35 00 37-   Fax: +33 (0) 1 43 35 00 76
mailto:[EMAIL PROTECTED]  -   http://www.easter-eggs.com

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html




--

NOTICE:  The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential.  If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected.



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



[GENERAL] fastpath error?

2001-03-28 Thread chris markiewicz

Hello.

I am occasionally (seemingly randomly) seeing the following error when I try
to load a large object.

FastPath call returned ERROR:  lo_close: invalid large obj descriptor (0)

at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:141)
at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:191)
at org.postgresql.largeobject.LargeObject.close(LargeObject.java:105)
at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:371)
at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:580)
at
com.commnav.sbh.framework.persist.JDBCEngine2.loadResultSet(JDBCEngine2.java
:259)
at com.commnav.sbh.framework.persist.JDBCEngine2.load(JDBCEngine2.java:156)
at
com.commnav.sbh.framework.persist.PersistenceObject.load(PersistenceObject.j
ava:147)


Can someone give me some insight on this?  Can I call lo_close explicitly if
i get this error?  Can I ignore it or will that leave me with open
resources?

thanks
chris


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [GENERAL] how to load a sql-file????

2001-03-28 Thread Jason Earl

psql database_name -U postgres -f loadfile.sql

Should do what you want.  Or if you are already in
psql take a look at the \i command.

Jason

--- markus jais [EMAIL PROTECTED] wrote:
 hi,
 maybe this is somewhere in the docs but I couldn't
 find
 it.
 I am a beginner to postgresql and do not know much
 till now.
 I have bought a book on SQL and now I want to
 import the sample databases into postgresql
 they are provided as *.sql.
 
 in MySQL I can type something like in Bash on my
 linux box:
 
 $ mysql -u root -p  file.sql
 
 then the file file.sql is read.
 
 can you tell me how to do this with postgresql???
 thanks a lot.
 
 markus
 
 
 -- 
 Markus Jais
 http://www.mjais.de
 [EMAIL PROTECTED]
 The road goes ever on and on - Bilbo Baggins
 
 
 ---(end of
 broadcast)---
 TIP 2: you can get off all lists at once with the
 unregister command
 (send "unregister YourEmailAddressHere" to
[EMAIL PROTECTED])


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [GENERAL] undefined symbol in create new function

2001-03-28 Thread Tom Lane

Joel Dudley [EMAIL PROTECTED] writes:
 Is PG_GETARG_CHAR valid? I thought it was. maybe I should re-do it all with
 PG_GETARG_TEXT. Thanks for reading my post.

Nope, neither one.  See src/include/fmgr.h for the predefined GETARG
macros.  You would also do well to read src/backend/utils/fmgr/README.

regards, tom lane

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [GENERAL] undefined symbol in create new function

2001-03-28 Thread Tom Lane

Joel Dudley [EMAIL PROTECTED] writes:
 Thanks for your help. I had to clarify though, are you saying that it is
 impossible to do what I am trying to do?  Thank you for your time.

No, you just have to realize that Postgres string values are not
null-terminated and so you can't manipulate them with the usual C
library string functions that expect to work on null-terminated strings.
At least not unless you convert them to null-terminated form first.

Try studying some of the built-in text mashing functions.  textcat()
and nearby routines in src/backend/utils/adt/varlena.c would be good
starting points.

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[GENERAL] Tables grow in size when issuing UPDATEs! Why??

2001-03-28 Thread Daniel ?erud

Hi, 
I have noticed a strange thing when dealing with postgreSQL.

Foreword: this is all about postgres tables increasing in
size extremely fast when doing updates. My sainness is
decreasing in approximatly the same speed. Please look.

When I do this:

* create database foo
* create table test

CREATE TABLE test (
foo int4
);

and make, for example, 20 inserts into this. Arbitrary data.

Then, I make in another terminal: (user with permission)
cd /var/lib/postgres/data/base/foo

then,
watch -n 1 'ls -al test'

On my system it is now 8k big.

then (a couple of times),
update test set foo=5;

10 times is enough for it to get 16k big. I realised that it
increases in size EXTREMELY fast when only UDPATing. I find
this strange, as I update timestamp in my real database
often and in 5 minutes it is 2 megabytes big and containing
only 18 rows! (NO BULLSHIT!!)

Please help me with this I am quite desperate...

Daniel kerud




---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [GENERAL] how to load a sql-file????

2001-03-28 Thread Ron Peterson

Jason Earl wrote:
 
 psql database_name -U postgres -f loadfile.sql
 
 Should do what you want.  Or if you are already in
 psql take a look at the \i command.

Especially if you're just starting, you might like to start psql as
'psql -s'.  This puts you in single step mode, so when you use \i, the
SQL commands you are loading will be executed one at a time.

-- 
Ron Peterson
Network  Systems Manager
Mount Holyoke College
GPG and other info at http://www.mtholyoke.edu/~rpeterso

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



Re: [GENERAL] timestamp/function question

2001-03-28 Thread Soma Interesting

At 12:41 AM 3/29/2001 -0600, you wrote:
do. In the case of logfunc1(), the Postgres main parser knows
when preparing the plan for the INSERT, that the string 'now'
should be interpreted as datetime because the target field of
logtable is of that type. Thus, it will make a constant from it
at this time and this constant value is then used in all
invocations of logfunc1() during the lifetime of the backend.
Needless to say that this isn't what the programmer wanted.

In the case of logfunc2(), the Postgres main parser does not know
what type 'now' should become and therefor it returns a datatype
of text containing the string 'now'. During the assignment to the
local variable curtime, the PL/pgSQL interpreter casts this
string to the datetime type by calling the text_out() and
datetime_in() functions for the conversion.


blah blah blah snip

...and that all meant what? The postgres manual is open to much 
interpretation to anyone new trying to understand its contents. Combine 
that with documentation that's still not written, or broken across several 
different sections (programmer, user, admin, etc) and a search engine which 
returns absolute crap well I guess us new users can just go use MySQL.

as far as I can tell the above sounds like a complicated  work-around to a 
bug, but maybe you'll be kind enough to correct me on this...?


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



Fwd: Re: [GENERAL] timestamp/function question

2001-03-28 Thread Soma Interesting


blah blah blah snip

...and that all meant what? The postgres manual is open to much 
interpretation to anyone new trying to understand its contents. Combine 
that with documentation that's still not written, or broken across several 
different sections (programmer, user, admin, etc) and a search engine 
which returns absolute crap well I guess us new users can just go use 
MySQL.

as far as I can tell the above sounds like a complicated  work-around to a 
bug, but maybe you'll be kind enough to correct me on this...?

BETTER YET!

edit my example code so it works and post it to this list so everyone else 
can have a function that uses ''now'' as actually "this very moment in 
time", rather than "the moment the main parser made 'now' a constant".

Yeesh!


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



[GENERAL] Please Help Can not connect to any database

2001-03-28 Thread Natalya Pyalling

Hi, all!

I have a problem with connection to any database on my server.

$psql template1
psql: FATAL 1:  Database 'template1', OID 17216, has disappeared from
pg_database

Any ideas? What's going wrong?

Version of PostgreSQL is 7.0. The operation system is Red Hat 6.1.

Any help would be appreciated!
Thank you.

Natalya Pyalling.


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly