int2,
freq varchar(2),
geog varchar(6)
)
Thanks
Jaime
-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 26, 2006 5:05 PM
To: Alvaro Herrera
Cc: Silvela, Jaime (Exchange); pgsql-general@postgresql.org
Subject: Re: [GENERAL] copy losing information
Silvela, Jaime \(Exchange\) [EMAIL PROTECTED] writes:
Tom, how and why would INSERTs be dropped on the client side?
[ shrug... ] I don't know your code; I was thinking about garden variety
bugs in your ruby script. However, if you can make it happen just
through psql \copy then that theory
Silvela, Jaime \(Exchange\) [EMAIL PROTECTED] writes:
I've started to notice missing info sometimes. I'll truncate the table,
read from the file, and notice that sometimes there are less rows in the
table than in the file.
Have you made any attempt to determine *which* rows are missing?
I'm
To: Silvela, Jaime (Exchange)
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] copy losing information
Silvela, Jaime \(Exchange\) [EMAIL PROTECTED] writes:
I've started to notice missing info sometimes. I'll truncate the
table,
read from the file, and notice that sometimes there are less rows
Silvela, Jaime (Exchange) wrote:
No lines contain quotes. And the same file will sometimes be fully
imported, and sometimes lose data. I'm thinking that under heavy loads,
the database is discarding INSERTS.
I don't think that's very likely.
How are you checking that the data is there? Do
On Wed, 2006-07-26 at 12:48 -0400, Silvela, Jaime (Exchange) wrote:
This is the first time I post to the list. Ive done a brief search and didnt find my issue treated already, so here it goes. Apologies if this has been reported before.
What PG version and environment? How about sending
Alvaro Herrera [EMAIL PROTECTED] writes:
Silvela, Jaime (Exchange) wrote:
No lines contain quotes. And the same file will sometimes be fully
imported, and sometimes lose data. I'm thinking that under heavy loads,
the database is discarding INSERTS.
I don't think that's very likely.
Ricardo Vaz wrote:
Hi,
It is possible to copy data from text file (CSV) ignoring some columns
of this text file?
(How come this was posted 3 times?)
I don't think so but you could load it into a temporary table and then:
insert into new_table select col1, col2 from temp_table;
--
Chris wrote:
Ricardo Vaz wrote:
Hi,
It is possible to copy data from text file (CSV) ignoring some columns
of this text file?
Assuming you're on a Unix box, you could easily use awk or perl to parse
your csv and create one that contains only the columns you want.
--
Until later,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Geoffrey wrote:
Chris wrote:
Ricardo Vaz wrote:
Hi,
It is possible to copy data from text file (CSV) ignoring
some columns of this text file?
Assuming you're on a Unix box, you could easily use awk or perl
to parse your csv and create one
On Thu, 22 Jun 2006, Ron Johnson wrote:
Assuming you're on a Unix box, you could easily use awk or perl to parse
your csv and create one that contains only the columns you want.
And probably pipe the results directly into the copy command, bypassing any
intermediary steps.
Well, why not
On 14.06.2006 13:56 Guido Neitzer wrote:
Hi.
Is there an easy way to copy the content including the table structure,
indexes and so on from one db to another?
Let's say I have a production db called db_production and want to create
a development db called db_dev with exactly the same
On 14.06.2006, at 14:02 Uhr, Thomas Kellerer wrote:
pg_dump: http://www.postgresql.org/docs/8.1/static/app-pgdump.html
Found it. Thanks. I was just blind and thought, pg_dump can only re-
create the db with the same name.
Thanks,
Guido
---(end of
am 14.06.2006, um 13:56:06 +0200 mailte Guido Neitzer folgendes:
Hi.
Is there an easy way to copy the content including the table structure,
indexes and so on from one db to another?
Create the new db with the old db as template.
Andreas
--
Andreas Kretschmer(Kontakt: siehe Header)
On 14.06.2006, at 14:12 Uhr, A. Kretschmer wrote:
Is there an easy way to copy the content including the table
structure,
indexes and so on from one db to another?
Create the new db with the old db as template.
Thanks, but as far as I can see, I have to disconnect all clients
from the
I have added the following patch for 8.2 that suggests using E'' strings
and doubling backslashes used as path separators, and backpatched the
later suggestion to 8.1. Thanks.
---
Oisin Glynn wrote:
I have driven myself
On 23/3/06 20:12, David Fetter [EMAIL PROTECTED] wrote:
On Thu, Mar 23, 2006 at 07:00:13PM +0100, Jim Nasby wrote:
On Mar 23, 2006, at 4:08 PM, Oisin Glynn wrote:
I just discovered that the comments from 8.0 had the answer I was
looking for but these comments are not in the 8.1 docs.
On Fri, Mar 24, 2006 at 08:58:55AM +, Dave Page wrote:
On 23/3/06 20:12, David Fetter [EMAIL PROTECTED] wrote:
On Thu, Mar 23, 2006 at 07:00:13PM +0100, Jim Nasby wrote:
On Mar 23, 2006, at 4:08 PM, Oisin Glynn wrote:
I just discovered that the comments from 8.0 had the answer I
-Original Message-
From: Jim C. Nasby [mailto:[EMAIL PROTECTED]
Sent: 24 March 2006 12:28
To: Dave Page
Cc: David Fetter; Oisin Glynn; pgsql general; PostgreSQL Docs
Subject: Re: [GENERAL] COPY command documentation
But now that stuff gets 'lost' with ever new major version
On Mar 23, 2006, at 4:08 PM, Oisin Glynn wrote:
I just discovered that the comments from 8.0 had the answer I was
looking for but these comments are not in the 8.1 docs. Should the
comments be rolled forward as new versions are created? Or if valid
comments added to the docs themselves?
On Thu, Mar 23, 2006 at 07:00:13PM +0100, Jim Nasby wrote:
On Mar 23, 2006, at 4:08 PM, Oisin Glynn wrote:
I just discovered that the comments from 8.0 had the answer I was
looking for but these comments are not in the 8.1 docs. Should the
comments be rolled forward as new versions are
Thanks Martijn.
\d test
Table public.test
Column | Type | Modifiers
id | integer |
score| integer |
I tried \copy test (score) to test.txt. It works well.
But, suppose I want to select rows with score 20 (just an example).
Then,\copy table [ ( column_list ) ] { from |
On Fri, Mar 17, 2006 at 10:45:16AM +1100, Chris wrote:
Doesn't look like \copy lets you specify which fields to include though.
Ofcourse it does, you just need to use parenthesis. From the manpage:
\copy table [ ( column_list ) ] { from | to } filename | stdin | stdout
[ with ] [ oids ] [
yes, of couse COPYbut,= copy test to 'test.txt';ERROR: must be superuser to COPY to or from a fileHINT: Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.
On 3/16/06, Chris [EMAIL PROTECTED] wrote:
jia ding wrote: Hi all, I tried: select id, nameinto table2 from
jia ding wrote:
yes, of couse COPY
but,
= copy test to 'test.txt';
ERROR: must be superuser to COPY to or from a file
HINT: Anyone can COPY to stdout or from stdin. psql's \copy command
also works for anyone.
Straight from the documentation:
Do not confuse COPY with the psql instruction
jia ding wrote:
Hi all,
I tried:
select id, name into table2 from table1;
\copy table2 to filename.txt
in order to export 2 columns from table1 to a file.
But, I am thinking, if there is a command can combine these two command
together?
Maybe, something like: \copy select id,name from
jia ding [EMAIL PROTECTED] wrote
I tried:
select id, name into table2 from table1;
\copy table2 to filename.txt
in order to export 2 columns from table1 to a file.
But, I am thinking, if there is a command can combine these two
command together?
Notice that COPY command can be used
Thanks, Mike! Your solution seems to have solved it.
--- mike [EMAIL PROTECTED] wrote:
XP is denying access to your desktop to the postgres
account which the
database service is running on. If you go to the
folder C:\Document and
Settings\your_login_id, right click on it, select
Jonathan Roby [EMAIL PROTECTED] writes:
For a project here at work I look after a web app that communicates with =
a postgresql database. We need to clone/copy the existing database to =
run app upgrades on the clone database and then use the upgraded =
database in place of the original.
Are
Angshu Kar schrieb:
Thanks Andreas. But how can I run this from the pgAdmin III Query tool
in a WinXP m/c?
You dont. There is the function for saving query data to file
already built in. Just press the button (documentation or tooltips
tell you) and select the format of your csv in the
Got it. Thanks a ton Tino...
On 1/8/06, Tino Wildenhain [EMAIL PROTECTED] wrote:
Angshu Kar schrieb: Thanks Andreas. But how can I run this from the pgAdmin III Query tool in a WinXP m/c?
You dont. There is the function for saving query data to filealready built in. Just press the button
am 07.01.2006, um 14:13:28 -0600 mailte Angshu Kar folgendes:
Hi Pgsql,
I want to copy the output of a SELECT query onto a text file. I'm trying to
use the COPY command for that as :
COPY (SELECT ) to 'outfile'
Wrong.
\o output.txt
select ...
\o
And now you have the result in
Thanks Andreas. But how can I run this from the pgAdmin III Query tool in a WinXP m/c?On 1/7/06, A. Kretschmer
[EMAIL PROTECTED] wrote:am07.01.2006, um 14:13:28 -0600 mailte Angshu Kar folgendes:
Hi Pgsql, I want to copy the output of a SELECT query onto a text file. I'm trying to use the COPY
Angshu Kar [EMAIL PROTECTED] schrieb:
Thanks Andreas. But how can I run this from the pgAdmin III Query tool in a
WinXP m/c?
Sorry, i don't using pgAdmin nor windows...
I mean, use the CLI-Interface psql.
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
Ok thanks AndreasOn 1/7/06, Andreas Kretschmer [EMAIL PROTECTED] wrote:
Angshu Kar [EMAIL PROTECTED] schrieb: Thanks Andreas. But how can I run this from the pgAdmin III Query tool in a WinXP m/c?Sorry, i don't using pgAdmin nor windows...
I mean, use the CLI-Interface psql.Andreas--Really, I'm
Tom , Michael
Thanks for your responses,
there any procedure for fix fts installation?
any advice will be appreciated
Tia.
best regards.
MDC
--- Tom Lane [EMAIL PROTECTED] escribió:
marcelo Cortez [EMAIL PROTECTED] writes:
the follow error:
Warning: pg_query(): Query failed:
On Thu, Jan 05, 2006 at 02:34:14PM +, marcelo Cortez wrote:
there any procedure for fix fts installation?
As Tom asked, what steps did you follow to install tsearch2? The
standard installation script creates its tables with oids, at least
in current releases, so you appear to have
On Wed, Jan 04, 2006 at 06:30:50PM +, marcelo Cortez wrote:
Warning: pg_query(): Query failed: ERROR: no existe
la columna oid
the column oid don't exists in english.
CONTEXT: sentencia SQL: select oid from
public.pg_ts_cfg where locale = $1
I'd guess that you're using tsearch2 but
marcelo Cortez [EMAIL PROTECTED] writes:
the follow error:
Warning: pg_query(): Query failed: ERROR: no existe
la columna oid
the column oid don't exists in english.
CONTEXT: sentencia SQL: select oid from
public.pg_ts_cfg where locale = $1
You seem to have managed to create the
use this:
$ psql -Uyer_user -dyer_database -fyer_copy_script.sql
yer_data_file.csv
where yer-copy-script.sql is:
-- -
drop table foo;
create table foo (
c01 varchar,
c02 varchar,
c03 varchar,
c04 varchar,
c05 varchar,
c06 varchar,
c07 varchar,
c08 varchar,
How about something like:
BEGIN TRAN
SELECT INTO TEMP TABLE foobar WHERE cond_list
COPY foobar TO data.txt
COMMIT
-Original Message-
From: [EMAIL PROTECTED] [mailto:pgsql-general-
[EMAIL PROTECTED] On Behalf Of CSN
Sent: Thursday, December 08, 2005 5:29 PM
To:
On Thu, Oct 27, 2005 at 03:30:43PM -0700, Shane wrote:
Can anyone suggest how I can either get these into PG directly
or massage the file so as to be compatable?
To my knowledge the only Unicode encoding used by Postgres is
utf-8.
Try 'recode' or 'iconv' on unix-like systems. A better text
am 27.10.2005, um 11:13:43 +0200 mailte Frederic Massot folgendes:
Hi,
I wonder whether it is possible to copy a schema with a postgreSQL command
like copy_schema schema_src schema_dest ?
You can rename a schema. And, you can make a dump, then rename it, and
then restore from backup. Or,
On Fri, 2005-10-07 at 21:34, Qingqing Zhou wrote:
[EMAIL PROTECTED] wrote
Hi, I have a table A in both database d1 and d2. I would like to copy
data in A in d1 to A in d2. How can I do it? I do not want to copy all
data, just some part of A,
Here is a way if you feel want to try. The
Scott Marlowe [EMAIL PROTECTED] wrote
Under no circumstances should you do this with a database that has any
data in it that you value. pg_dump / pg_restore / psql are the
preferred way of doing this.
Oh yeah, sorry for the miss leading information. My method is dangerous and
can not
On Mon, 2005-10-10 at 13:53, Qingqing Zhou wrote:
Scott Marlowe [EMAIL PROTECTED] wrote
Under no circumstances should you do this with a database that has any
data in it that you value. pg_dump / pg_restore / psql are the
preferred way of doing this.
Oh yeah, sorry for the miss
Never used it, but look at contrib/dblink and better use different
schemas instead of different databases in future -- if you want to
exchange data.
On 07.10.2005 03:55, [EMAIL PROTECTED] wrote:
Hi, I have a table A in both database d1 and d2. I would like to copy
data in A in d1 to A in d2.
[EMAIL PROTECTED] wrote
Hi, I have a table A in both database d1 and d2. I would like to copy
data in A in d1 to A in d2. How can I do it? I do not want to copy all
data, just some part of A,
Here is a way if you feel want to try. The basic idea is that create a table
(say OS file name of
On 9/23/05, John Seberg [EMAIL PROTECTED] wrote:
I have used the COPY command dozens of times! I thinkI *get* it. But, I'm getting permission deniederrors.This is a fresh install of Fedora Core 4 (x86). I havePostgresql running under the user postgres. I am
logged into to psql as postgres. The
On Fri, Sep 23, 2005 at 07:03:44AM -0700, John Seberg wrote:
I have used the COPY command dozens of times! I think
I *get* it. But, I'm getting permission denied
errors.
This is a fresh install of Fedora Core 4 (x86). I have
Postgresql running under the user postgres. I am
logged into to
John Seberg [EMAIL PROTECTED] writes:
I have bounced the db, made sure the processes and
files are owned by postgres. What else is there?
COPY consult FROM
'/var/lib/pgsql/migrate/consult.txt';
This is probably a dumb question, but is 'migrate' owned and readable
by 'postgres' as well?
If
John Seberg [EMAIL PROTECTED] writes:
I have used the COPY command dozens of times! I think
I *get* it. But, I'm getting permission denied
errors.
This is a fresh install of Fedora Core 4 (x86). I have
Postgresql running under the user postgres. I am
logged into to psql as postgres. The
--- Tom Lane [EMAIL PROTECTED] wrote:
John Seberg [EMAIL PROTECTED] writes:
I have used the COPY command dozens of times! I
think
I *get* it. But, I'm getting permission denied
errors.
This is a fresh install of Fedora Core 4 (x86). I
have
Postgresql running under the user
On 9/23/05, John Seberg [EMAIL PROTECTED] wrote:
--- Tom Lane [EMAIL PROTECTED] wrote: John Seberg [EMAIL PROTECTED] writes: I have used the COPY command dozens of times! I
think I *get* it. But, I'm getting permission denied errors. This is a fresh install of Fedora Core 4 (x86). I have
Cristian Prieto [EMAIL PROTECTED] writes:
Hello, I need to import some amount of data using the COPY command, the main
trouble I found is that the Database is in UNICODE format and the data in
ASCII Latin-1 codepage, when I try to import it, COPY respond with:
ERROR: invalid byte sequence
Cristian Prieto [EMAIL PROTECTED] writes:
Hello, I need to import some amount of data using the COPY command, the main
trouble I found is that the Database is in UNICODE format and the data in
ASCII Latin-1 codepage, when I try to import it, COPY respond with:
ERROR: invalid byte sequence
Thanks a lot! Your help was very handy!
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Douglas McNaught
Sent: Miércoles, 21 de Septiembre de 2005 02:39 p.m.
To: Cristian Prieto
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] COPY and Unicode
nicolas.hafner schrieb:
Hi everyone,
I've a problem that i'am not able to solve alone (i'm kinda newbie on
postgresql).
we were running PostgreSQL 7.4 under Linux (Mandriva) but our HDD crashs
and we lost the system but were able to backup the database files to an
other HDD.
now we want to
Read the COPY manual page --- backslashes are special and have to be
doubled to be treated as literal.
---
Bauhofer Mario wrote:
Hi,
i tried to copy a german text file into a table imp using copy from.
David Gagnon [EMAIL PROTECTED] writes:
So am I right ? Is Postgresql using UTF-8 and don`t really understand
UNICODE file (UCS-2)? Is there a way I can make the COPY command with a
UNICODE UCS-2 encoding
Postgres only supports UTF-8, not any other encoding of Unicode. Sorry.
Am Mittwoch, den 06.04.2005, 18:12 -0400 schrieb David Gagnon:
Hi all,
I ran into this problem and want to share and have a confirmation.
I tried to use COPY function to load bulk data. I craft myself a
UNICODE file from a MSSQL db. I can't load it into the postgresql. I
always get
On Apr 6, 2005 10:22 PM, Tom Lane [EMAIL PROTECTED] wrote:
David Gagnon [EMAIL PROTECTED] writes:
So am I right ? Is Postgresql using UTF-8 and don`t really understand
UNICODE file (UCS-2)? Is there a way I can make the COPY command with a
UNICODE UCS-2 encoding
Postgres only supports
On Tue, Dec 14, 2004 at 11:48:21AM -0600, Kall, Bruce A. wrote:
What is the easiest way to copy a particular row from one table to
another (assuming all the columns are exactly the same). I want to
maintain a table ('backup_table') that has rows I have (or will be)
deleting from my
Michael Fuhr [EMAIL PROTECTED] 12/14/04 1:45 PM
On Tue, Dec 14, 2004 at 11:48:21AM -0600, Kall, Bruce A. wrote:
What is the easiest way to copy a particular row from one table to
another (assuming all the columns are exactly the same). I want to
maintain a table ('backup_table') that has
I know this doesn't answer your question, but have
you considered doing it with DTS instead of BCP?
I used it recently to migrate an Access database to
PostGreSQL and it worked great. One of the big advantages is the ability to
transform the data as it is being converted.
It is also built
On Fri, 5 Nov 2004 16:31:21 -0500, Goutam Paruchuri
[EMAIL PROTECTED] wrote:
Iam trying to import data from ms-sql server to postgres. I export the data
which has datetime columns in sql server using BCP. I use the following to
import back into postgres.
copy tablename from
On Fri, 2004-11-05 at 16:48, Allen Landsidel wrote:
On Fri, 5 Nov 2004 16:31:21 -0500, Goutam Paruchuri
[EMAIL PROTECTED] wrote:
Iam trying to import data from ms-sql server to postgres. I export the data
which has datetime columns in sql server using BCP. I use the following to
import
Title: Re: [GENERAL] Copy command and import - MS SQL Server to Postgres
I tried by taking the .000
still the same issue.
WITH NULL AS '' works fine.
WITH NULL AS NULL gives an error as well.
- Goutam
From: Robert Fitzpatrick
[mailto:[EMAIL PROTECTED]Sent: Fri 11/5/2004 5:33 PMTo
Robert Fitzpatrick [EMAIL PROTECTED] writes:
My input file has the timestamp value like
2004-09-30 11:31:00.000
What about the .000 on the end? I am not able to enter that format in
a timestamp field in 7.4.5, it is invalid.
Nonsense.
regression=# select '2004-09-30
Ah, looks like enclosed by will be in PG 8 :). Is
QUOTE [ AS ] 'quote' for the enclosed by
character?
Ignore x lines would be nice, but not as big of a
deal.
http://developer.postgresql.org/docs/postgres/sql-copy.html
--- CSN [EMAIL PROTECTED] wrote:
Any chance of changing \copy and COPY
Use python's (or another language) CSV reader module which will parse the
quotes for you and write the values in a tab-delimited file. Don't forget
to escape the tabs in the strings... it should be less than 10 lines of
code.
On Mon, 25 Oct 2004 14:45:57 -0700 (PDT), CSN
[EMAIL
James Robinson [EMAIL PROTECTED] writes:
Just a sanity check -- data fed into pg using the
COPY tablename (col1, col2) FROM stdin;
... data
\.
Does not cause referential triggers to fire (i.e. foreign keys), right?
Sure it does.
regression=# create table t1 (f1 int
On Wed, 29 Sep 2004 14:40:34 -0500, Josh Close [EMAIL PROTECTED] wrote:
Is there a way to do COPY FROM STDIN from sql? So, remotely I could
run the copy command and somehow push the info over instead of having
it on the server.
For those who are curious, I found a php implementation of this.
You have to use psql's \copy.
---
Josh Close wrote:
Is there a way to do COPY FROM STDIN from sql? So, remotely I could
run the copy command and somehow push the info over instead of having
it on the server.
-Josh
El mié, 25-08-2004 a las 20:54, Tom Lane escribió:
David Suela =?ISO-8859-1?Q?Fern=E1ndez?= [EMAIL PROTECTED] writes:
The problem is that pg_dump always give me the next error:
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: relation pg_user does not exist
Have
David Suela =?ISO-8859-1?Q?Fern=E1ndez?= [EMAIL PROTECTED] writes:
It return:
ERROR: permission denied to create pg_catalog.pg_user
DETAIL: System catalog modifications are currently disallowed.
How can i change this permissions?
IIRC, you need to run a standalone backend, with either the
Have you tried to use copy to export the data from each table?
As a last resort you could try this, since you said you can still
select data from the tables.
Make a list of tables then :
sed -e /^.*/copy TO '.sql';/ table.list | psql database
This should create a file for each table ending with
On Wed, 2004-08-25 at 15:08, David Suela Fernández wrote:
The problem is that pg_dump always give me the next error:
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: relation pg_user does not exist
pg_dump: The command was: SELECT (SELECT usename FROM pg_user WHERE
On Wed, Aug 25, 2004 at 04:25:02PM +0100, Oliver Elphick wrote:
On Wed, 2004-08-25 at 15:08, David Suela Fernández wrote:
The problem is that pg_dump always give me the next error:
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: relation pg_user does not exist
On Wed, Aug 25, 2004 at 12:09:58PM -0400, Alvaro Herrera wrote:
No, pg_user is a view on pg_shadow ...
SELECT pg_shadow.usename, pg_shadow.usesysid, pg_shadow.usecreatedb,
pg_shadow.usesuper, pg_shadow.usecatupd, ''::text AS passwd,
pg_shadow.valuntil, pg_shadow.useconfig FROM
On Wed, 2004-08-25 at 17:09, Alvaro Herrera wrote:
On Wed, Aug 25, 2004 at 04:25:02PM +0100, Oliver Elphick wrote:
Maybe recreating pg_user in the database will help. It is a global
table, so if you have other databases where pg_user exists, copy the row
from pg_class in that database to
Jan Wieck [EMAIL PROTECTED] writes:
On 8/4/2004 1:58 PM, David Rysdam wrote:
bytea will only go up to several thousand bytes according to the
docs. I assume it's not very precise because the maximum is 8196 -
$other_fields_in_row. My binary data could be a couple times that
or even much
CSN [EMAIL PROTECTED] writes:
I guess this is a feature request since I can't figure
out a way to do it directly in postgresql (plus
COPY/\copy isn't in SQL specs).
You do know that COPY uses the column defaults for all columns not
listed in the input list?
regards,
--- Tom Lane [EMAIL PROTECTED] wrote:
CSN [EMAIL PROTECTED] writes:
I guess this is a feature request since I can't
figure
out a way to do it directly in postgresql (plus
COPY/\copy isn't in SQL specs).
You do know that COPY uses the column defaults for
all columns not
listed in the
On 8/4/2004 1:58 PM, David Rysdam wrote:
Doug McNaught wrote:
David Rysdam [EMAIL PROTECTED] writes:
Right now I'm having to write a program to create all the large
objects up front and record the OIDs in a file which I will then COPY
in with the rest of my data.
You might consider using
Bruno Wolff III wrote:
On Fri, Jun 04, 2004 at 14:11:19 +,
Bricklen [EMAIL PROTECTED] wrote:
Hi, I'm not sure if this is the correct group for this question, but
I'll post it hoping that it is.
I'm loading several ~15 million row files into a table using the COPY
command. Apparently one of
Christopher Browne wrote:
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (Clodoaldo Pinto Neto) would write:
How to make sure COPY TO writes the table lines to the file in the same order
they were inserted?
You probably want to rewrite PostgreSQL then.
I'm producing html
--- Guy Fraser [EMAIL PROTECTED]
If you have a 'serial' or 'bigserial' field like this :
create table test_table (
test_id bigserial,
data integer,
comment text
);
and you use :
copy test_table (data,comment)
from '/wherever/the/file/is'
using delimiters ',';
to insert
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (Clodoaldo Pinto Neto) would
write:
How to make sure COPY TO writes the table lines to the file in the same order
they were inserted?
You probably want to rewrite PostgreSQL then.
I'm producing html pages in pl/pgsql and using COPY TO
COPY works for whole tables, and can't append rows. You're going to have to
escape your linebreaks and tabs to use COPY ... As I recall, you can specify
your own custom column and row delimiters... You might consider creating some
type of primary key for the table. A serial column would work
How about this:
Let's call your current table tab.
Insert into a table with the same shape as your table tab called 'lfd'.
Create an index on table lfd on fields lname, fname, workdate.
Delete from lfd where lfd.lname = tab.lname and lfd.fname = tab.fname
and lfd.workdata = tab.workdate
Insert
Bernd Helmle wrote:
Don Isgitt wrote:
Hi,
gds2=# copy survey_match from '/home/djisgitt/perl/fixsvy.dat' with
delimiter as '';
ERROR: could not open file /home/djisgitt/perl/fixsvy.dat for
reading: Permission denied
File sysem permissions are
[EMAIL PROTECTED] perl]$ ls -l
On Tuesday 07 October 2003 07:29, Deepa K wrote:
Hi All,
Is it possible to insert n rows with 1 or 2 invalid rows
using copy command. I used it, it rollbacks everything even if 1 row
gets an error. Is their any other way to do it.
You need to remove the bad rows. This is IMHO a Good
James Moe [EMAIL PROTECTED] writes:
this bizarre error message is produced in psql:
: can't parse ne 1, pg_atoi: error in 1
That's unrelated to your NULL issue. It looks like you have
Windows-style newlines (\r\n) in your data. COPY only likes
Unix-style newlines (\n). It thinks the \r is a
On Sun, 2003-08-03 at 06:08, Jason Godden wrote:
Hi Ron,
I have the same issue - best thing is to run the data through sed but pipe it
straight to the psql import table - that way you never have to worry about
creating misc. files. I also always use an intermediate temporary import
On Friday 01 August 2003 08:45, Tambet Matiisen wrote:
I noticed that COPY is getting very slow, when importing to table, which
makes use of domains as column datatypes. It seems like foreign key
validation is especially slow. It takes ages to import table with 25000
rows, which has foreign
--- Ron [EMAIL PROTECTED] wrote:
I am creating a new database on a brand new server
(P4, 1GB RAM,
postgres 7.3.3, debian 3.0) and trying to populate
one of the tables
with the COPY command. I split a large file with 20
million records into
20 files, but when I run COPY I usually get the
COPY expects NULL to be represented by \N by default.
Probably easiest to explicitly specify on the command line what you want
COPY to recognize as a NULL: copy table from wherever with null as
'something';
- Original Message -
From: Dwayne Miller [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Oliver Elphick writes:
When using the COPY command to load data into a Great Bridge PostgreSQL
database, the triggers and constraints on tables are disabled.
Perhaps that's a feature of Great Bridge PostgreSQL, but it's not a
feature of Plain Old PostgreSQL. ;-)
(It would be correct to say
Oliver Elphick [EMAIL PROTECTED] writes:
I've been reading Great Bridge's document on Administration and Tuning
(PDF document under http://www.greatbridge.com/product/software.php)
and came across this statement on page 27:
When using the COPY command to load data into a Great Bridge
501 - 600 of 636 matches
Mail list logo