Why is pg_dump using INSERTs instead of COPYs?

Lists: pgsql-hackers
From: reina_ga(at)hotmail(dot)com (Tony Reina)
To: pgsql-hackers(at)postgresql(dot)org
Subject: Why is pg_dump using INSERTs instead of COPYs?
Date: 2004-03-31 11:14:08
Message-ID: 272e4be7.0403310314.303f6900@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I've got a database running PostgreSQL 7.4.2 on Fedora Linux. In the
past, pg_dump would dump database backups using COPY to restore the
data. This time it appears that it has individual INSERTs for each
tuple. Perhaps I'm missing this in the latest documentation, but I
thought COPY was the default unless the --inserts switch is declared.
Can anyone think of why I'd be getting INSERTs?

Thanks.
-Tony


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: reina_ga(at)hotmail(dot)com (Tony Reina), pgsql-hackers(at)postgresql(dot)org
Subject: Re: Why is pg_dump using INSERTs instead of COPYs?
Date: 2004-03-31 12:35:15
Message-ID: 200403311435.15942.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Am Mittwoch, 31. März 2004 13:14 schrieb Tony Reina:
> I've got a database running PostgreSQL 7.4.2 on Fedora Linux. In the
> past, pg_dump would dump database backups using COPY to restore the
> data. This time it appears that it has individual INSERTs for each
> tuple. Perhaps I'm missing this in the latest documentation, but I
> thought COPY was the default unless the --inserts switch is declared.

This is still the case.

> Can anyone think of why I'd be getting INSERTs?

Shell aliases perhaps.


From: "Tony and Bryn Reina" <reina_ga(at)hotmail(dot)com>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why is pg_dump using INSERTs instead of COPYs?
Date: 2004-03-31 13:42:46
Message-ID: BAY8-DAV15RAcryMTvW0000fcd5@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> > I've got a database running PostgreSQL 7.4.2 on Fedora Linux. In the
> > past, pg_dump would dump database backups using COPY to restore the
> > data. This time it appears that it has individual INSERTs for each
> > tuple. Perhaps I'm missing this in the latest documentation, but I
> > thought COPY was the default unless the --inserts switch is declared.
>
> This is still the case.
>
> > Can anyone think of why I'd be getting INSERTs?
>
> Shell aliases perhaps.

No. I just re-checked my aliases in the shell. Nothing for pg_dump.

I'm sure the answer is no, but are there any postgres-specific preference
files that may be causing the behavior (perhaps something I'm missing in
postgresql.conf)?

For the actual command, I'm just saying 'pg_dump -d dbname > dboutput.sql'
Nothing fancy.

-Tony


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tony and Bryn Reina" <reina_ga(at)hotmail(dot)com>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Why is pg_dump using INSERTs instead of COPYs?
Date: 2004-03-31 15:23:10
Message-ID: 4897.1080746590@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Tony and Bryn Reina" <reina_ga(at)hotmail(dot)com> writes:
> For the actual command, I'm just saying 'pg_dump -d dbname > dboutput.sql'

"-d" is the --inserts switch.

regards, tom lane