Re: [SQL] Problem with pg_dumpall

2000-06-27 Thread Tom Lane
Ryan Bradetich <[EMAIL PROTECTED]> writes: > That was the problem. Good job at spotting that Tom. I just successfully > completed a backup without using the -o > option to pg_dumpall. OK, if you need it with -o try the following patch against 7.0.2. regards, tom lane

[SQL] Hash Join not using hashed index?

2000-06-27 Thread Ang Chin Han
I'm using Postgresql 7.02. == # explain select city.name, country.name from country, city where city.country_id = country.country_id; NOTICE: QUERY PLAN: Hash Join (cost=8.85..16.76 rows=75 width=18) -> Seq Scan on city (

[SQL] HI! Problems with cursors into triggers

2000-06-27 Thread Andrés Mauricio Marín Restrepo
HELLO! I'm making one trigger (plpgsql) and in the function i use CURSOR for to bring an elements and to take them to a variable but no me it does not work, WHY? The script is: DROP TRIGGER miTrig on otro; DROP FUNCTION miFunc(); DROP TABLE otro; DROP TABLE cual; CREATE TABLE otro

[SQL] Problem with pg_dumpall in reverse

2000-06-27 Thread Kenn Thompson
Ok- this may be a simple answer, but- Once the database has been dumped, how do you restore while keeping the original OIDs? I've used the OID as a unique key that ties records together, and somehow they don't go back together nicely... doing a dump with "pg_dumpall -o -c > db.out" restoring w

Re: [SQL] Problem with pg_dumpall

2000-06-27 Thread Ryan Bradetich
Tom Lane wrote: > Ryan Bradetich <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> Ryan Bradetich <[EMAIL PROTECTED]> writes: > -- dumping out the contents of Table 'medusa' > FATAL 1: Memory exhausted in AllocSetAlloc() > PQendcopy: resetting connection > SQL query to du

Re: [SQL] Problem with pg_dumpall

2000-06-27 Thread Tom Lane
Ryan Bradetich <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Ryan Bradetich <[EMAIL PROTECTED]> writes: -- dumping out the contents of Table 'medusa' FATAL 1: Memory exhausted in AllocSetAlloc() PQendcopy: resetting connection SQL query to dump the contents of Table 'medus

Re: [SQL] Problem with pg_dumpall

2000-06-27 Thread Ryan Bradetich
Tom Lane wrote: > Ryan Bradetich <[EMAIL PROTECTED]> writes: > > -- dumping out the contents of Table 'medusa' > > FATAL 1: Memory exhausted in AllocSetAlloc() > > PQendcopy: resetting connection > > SQL query to dump the contents of Table 'medusa' did not execute > > correctly. After we read

Re: [SQL] Problem with pg_dumpall

2000-06-27 Thread Tom Lane
Ryan Bradetich <[EMAIL PROTECTED]> writes: > -- dumping out the contents of Table 'medusa' > FATAL 1: Memory exhausted in AllocSetAlloc() > PQendcopy: resetting connection > SQL query to dump the contents of Table 'medusa' did not execute > correctly. After we read all the table contents from t

[SQL] Problem with pg_dumpall

2000-06-27 Thread Ryan Bradetich
Hello all, I am having a new problem with pg_dumpall that I have not seen before. I've been browsing the documentation and could not find anything related to this problem. Any ideas or pointers would greatly be appreciated. boi260 sanity $ /opt/pgsql/bin/pg_dumpall -v -o | /usr/contrib/bin/gzip

Re: [SQL] Backup?

2000-06-27 Thread Bryan White
> Hello, > > I had a look for 'backup' on the mailing list archives and strangely > enough didn't find a message containing the word in admin, general > and sql mailing lists... I am sure this must have been asked before, > but still: > > Would it be possible to backup a db by just copying the dir

[SQL] Creating tables from within functions

2000-06-27 Thread Saltsgaver, Scott
Is it possible to issue a CREATE TABLE statement from inside of a PostgreSQL function? If not, then how about from within a PL/pgSQL function? I have tried a lot of different permutations but can't seem to get it to compile and/or run cleanly. For example, consider: CREATE FUNCTION _te

Re: [SQL] Backup?

2000-06-27 Thread Tom Lane
"Emils Klotins" <[EMAIL PROTECTED]> writes: > Would it be possible to backup a db by just copying the dir struct > under the PG_DATA or must I absolutely use pg_dump? If you ensure nothing at all is happening (as in "shut down the postmaster" --- I would not trust any half measures) then a dump

[SQL] Backup?

2000-06-27 Thread Emils Klotins
Hello, I had a look for 'backup' on the mailing list archives and strangely enough didn't find a message containing the word in admin, general and sql mailing lists... I am sure this must have been asked before, but still: Would it be possible to backup a db by just copying the dir struct un

Re: [SQL] Re: unique sequences

2000-06-27 Thread DalTech - Continuing Technical Education
I imagine it should if you create a unique index on the field. Cheers, Christopher Currie - Original Message - From: K Parker <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 27, 2000 1:52 AM Subject: [SQL] Re: unique sequences > > Rather, each time you wish to do an in

Re: [SQL] pg_dump problem

2000-06-27 Thread drfrog
Ed Loehr wrote: > > Graham Vickrage wrote: > > > > I am trying to backup a production database running on v6.5 and restore it > > on our test machine running v6.5. > > > > The largest table has about 750,000 rows, the other 5 tables are very small > > approx 100 rows. > > > > When I try to restor