Note: "DELEMITER" should be "DELIMITER".
On Thu, Apr 18, 2013 at 1:34 AM, basti wrote:
> I have fixed it with dollar-quoting.
>
> Original-Nachricht Betreff: [SQL] copy from csv,
> variable filename within a function Datum: Thu, 18 Apr 2
I have fixed it with dollar-quoting.
Original-Nachricht
Betreff:[SQL] copy from csv, variable filename within a function
Datum: Thu, 18 Apr 2013 09:26:09 +0200
Von:basti
An: pgsql-sql@postgresql.org
Hello,
i have try the following:
-- Function
n NOT NULL,
CONSTRAINT tmp_raw_data_pkey PRIMARY KEY ("timestamp")
)
ON COMMIT DROP;
--copy tmp_raw_data(
-- "timestamp", temp_in, pressure, temp_out, humidity, wdir,
wspeed)
--FROM '/home/wetter/csv/data/raw/2013/2013-04/2013-04-16.txt'
--WITH DEL
On 01/08/2013 07:08 AM, Edward W. Rouse wrote:
We have a database that was updated from 7.4.1 to 9.1.3. I've gotten
everything working, but now it seems that the users and groups weren't
restored. Probably because they weren't backed up. Is there a way to dump
just the users and groups, plus the
We have a database that was updated from 7.4.1 to 9.1.3. I've gotten
everything working, but now it seems that the users and groups weren't
restored. Probably because they weren't backed up. Is there a way to dump
just the users and groups, plus the passwords and permissions, and restore
them witho
On Thu, 29 Nov 2012 10:33:37 +0100,
Guillaume Lelarge wrote:
> On Wed, 2012-11-28 at 21:21 -0600, Seb wrote:
>> Hi,
>> I use \copy to output tables into CSV files:
>> \copy (SELECT ...) TO 'a.csv' CSV
>> but for long and complex SELECT statements, it is cumbersome and
>> confusing to write eve
On Thu, 29 Nov 2012 08:01:31 +,
Ben Morrow wrote:
> Quoth splu...@gmail.com (Seb):
>> I use \copy to output tables into CSV files:
>> \copy (SELECT ...) TO 'a.csv' CSV
>> but for long and complex SELECT statements, it is cumbersome and
>> confusing to write everything in a single line, and
On 11/29/2012 02:33 AM, Guillaume Lelarge wrote:
On Wed, 2012-11-28 at 21:21 -0600, Seb wrote:
Hi,
I use \copy to output tables into CSV files:
\copy (SELECT ...) TO 'a.csv' CSV
but for long and complex SELECT statements, it is cumbersome and
confusing to write everything in a single line, an
On Wed, 2012-11-28 at 21:21 -0600, Seb wrote:
> Hi,
>
> I use \copy to output tables into CSV files:
>
> \copy (SELECT ...) TO 'a.csv' CSV
>
> but for long and complex SELECT statements, it is cumbersome and
> confusing to write everything in a single line, and multiline statements
> don't seem
Hi,
I use \copy to output tables into CSV files:
\copy (SELECT ...) TO 'a.csv' CSV
but for long and complex SELECT statements, it is cumbersome and
confusing to write everything in a single line, and multiline statements
don't seem to be accepted. Is there an alternative, or am I missing an
con
On 03/15/2012 12:23 PM, Tom Lane wrote:
Lee Hachadoorian writes:
COPY ... TO ... WITH CSV defaults to quoting string fields with embedded
delimiters, quotes, and newlines. In pgAdmin I can execute to file and
specify "no quoting" for the output, in which case I get (what I want) a
file with no
Lee Hachadoorian writes:
> COPY ... TO ... WITH CSV defaults to quoting string fields with embedded
> delimiters, quotes, and newlines. In pgAdmin I can execute to file and
> specify "no quoting" for the output, in which case I get (what I want) a
> file with no quotes, even though there are em
COPY ... TO ... WITH CSV defaults to quoting string fields with embedded
delimiters, quotes, and newlines. In pgAdmin I can execute to file and
specify "no quoting" for the output, in which case I get (what I want) a
file with no quotes, even though there are embedded commas in the
strings. But
I'm connecting to a DB with
psql -h host DB
once in psql I'd like to
\e
create temp table t1 ...;
\copy t1 from 'filename' ...
select * from t1;
[ESC]:x
what I get is:
CREATE TABLE
ERROR: syntax error at or near "select"
LINE 3: select * from t1;
^
\copy: ERROR: syntax error at or n
Humair Mohammed writes:
> Postgres 9.x provies the COPY command with new syntax with a new option
> called FORMAT
> http://www.postgresql.org/docs/current/static/sql-copy.html
> However when I run the following command:
> COPY dQstn FROM 'c:/bcp/postgres/dQstn.csv' WITH FORMAT csv;
> I get the fo
Postgres 9.x provies the COPY command with new syntax with a new option called
FORMAT
http://www.postgresql.org/docs/current/static/sql-copy.html
However when I run the following command:
COPY dQstn FROM 'c:/bcp/postgres/dQstn.csv' WITH FORMAT csv;
I get the following error message:
ERROR: synt
On Friday 25 June 2010 6:07:35 pm Bruno Scovoli Santos wrote:
> * Are you connecting to the database as a superuser to run the COPY
> command? *
>
> Yes. This \copy command is in the database build script (create table
> blablabla). So it almost (I think) must have to be a superuser.
>
> But he
On 06/23/2010 02:01 PM, bruno.scovoli wrote:
I have an script with many "\copy" commands. For example:
\copy privilegios from '/work/eclipse-workspace/Canoan
Server/database/load/privilegios.dat'
\copy privilegios_de_usuarios from '/work/eclipse-workspace/Canoan
Server/database/load/privilegios
I have an script with many "\copy" commands. For example:
\copy privilegios from '/work/eclipse-workspace/Canoan
Server/database/load/privilegios.dat'
\copy privilegios_de_usuarios from '/work/eclipse-workspace/Canoan
Server/database/load/privilegios_de_usuarios.dat'
\copy classificacoes from '/w
Judith Altamirano a écrit :
> Hello every body I'm trying to extract a query as follows:
>
> copy (select * from clientes where id_cliente = 7895) to
> '/home/paso/sel.copy';
>
> But it returns the next error:
>
> ERROR: error de sintaxis en o cerca de «(» at character 6
> LINE 1: copy (select
Hello every body I'm trying to extract a query as follows:
copy (select * from clientes where id_cliente = 7895) to
'/home/paso/sel.copy';
But it returns the next error:
ERROR: error de sintaxis en o cerca de «(» at character 6
LINE 1: copy (select * from clientes where id_cliente = 7895) to
I would like to be able to force quotes on all columns in the COPY TO
command without having to name all columns explicitly. E.g.:
COPY a TO '/tmp/a.csv' WITH CSV FORCE QUOTE *;
Reading the documentation, there doesn't seem to be a way to do this.
Am I missing something? If not, could I submit th
On Jul 15, 2008, at 1:10 AM, Ivan Sergio Borgonovo wrote:
I'd like to
UPDATE t1 (col1, col2, col3) from file with @1 as primary key;
or
UPDATE t1 (col1, col2, col3) from file where @1=id;
sort of...
Sorry, there's nothing like COPY for UPDATE.
Otherwise what is the fastest approach?
I can
Is there a COPY equivalent for updates?
eg I've
create table t1 (
id int primary key,
col1 int,
col2 int,
col3 varchar(32)
);
and a CSV file
10,4,5,"abc"
13,7,3,"def"
18,12,77,"ghi"
I'd like to
UPDATE t1 (col1, col2, col3) from file with @1 as primary key;
or
UPDATE t1 (col1, col2, col
Thanks for the info. SELinux was the guilty party...
On Thu, Jun 12, 2008 at 10:48 AM, Tom Lane <[EMAIL PROTECTED]> wrote:
> "=?ISO-8859-1?Q?Harold_A._Gim=E9nez_Ch.?=" <[EMAIL PROTECTED]>
> writes:
> > In migrating an application from sql server to Postgres, I created a ruby
> > script that extra
"=?ISO-8859-1?Q?Harold_A._Gim=E9nez_Ch.?=" <[EMAIL PROTECTED]> writes:
> In migrating an application from sql server to Postgres, I created a ruby
> script that extracts csv files from sql server (from a windows box), then
> SCPs them into a directory (/home/ruby_process) on the server running
> Po
2008/6/12 Harold A. Giménez Ch. <[EMAIL PROTECTED]>:
> Hi all,
> In migrating an application from sql server to Postgres, I created a ruby
> script that extracts csv files from sql server (from a windows box), then
> SCPs them into a directory (/home/ruby_process) on the server running
> Postgres (
Hi all,
In migrating an application from sql server to Postgres, I created a ruby
script that extracts csv files from sql server (from a windows box), then
SCPs them into a directory (/home/ruby_process) on the server running
Postgres (a Fedora core 8) and finally runs the Postgres COPY command for
Try to export some data from the table using "copy from ..." to see
what it looks like.
On 2008-Mar-25, at 12:19, Jon Norman wrote:
I'm using PostgreSQL 8.3.1.
I've created the following composite type:
CREATE TYPE expression_event_type AS (
event_id varchar(10),
expr_indices smallint[]
)
I'm using PostgreSQL 8.3.1.
I've created the following composite type:
CREATE TYPE expression_event_type AS (
event_id varchar(10),
expr_indices smallint[]
);
which is used with the following table definition:
CREATE TABLE boolean_expr_table(
expr_id smallint PRIMARY KEY,
expr_name varchar(100)
Hi,
For what it's worth, WindowsXP (at least) seems to currently support
forward slashes at the OS level, so this Postgres behavior isn't as odd
as it might seem. If you enclose your paths with double quote (")
marks, Windows will even accept Unix style paths for some instructions
on the comm
Paul Lambert wrote:
Phillip Smith wrote:
"Having said that, if I switch it to a forward slash it works without
error... odd, given that weenblows standard is backslash."
Yes, but PostgreSQL uses a back-slash as an escape character, which
needs to
be used to escape itself at an application lev
Phillip Smith wrote:
"Having said that, if I switch it to a forward slash it works without
error... odd, given that weenblows standard is backslash."
Yes, but PostgreSQL uses a back-slash as an escape character, which needs to
be used to escape itself at an application level before the O/S gets
al
with it :)
-p
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Paul Lambert
Sent: Monday, 12 February 2007 11:09
To: Joe
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] COPY FROM query.
Joe wrote:
> Hi Paul,
>
> On Mon, 2007-02-12 at 08:19 +0900,
Joe wrote:
Hi Paul,
On Mon, 2007-02-12 at 08:19 +0900, Paul Lambert wrote:
I'm attempting to copy from a table into a file using a select query
inside the copy.
The following is my command:
COPY (SELECT DISTINCT ON (dealer_id,appraisal_id) * FROM
appraisals_temp) TO 'c:\autodrs_appraisal_ne
Hi Paul,
On Mon, 2007-02-12 at 08:19 +0900, Paul Lambert wrote:
> I'm attempting to copy from a table into a file using a select query
> inside the copy.
>
> The following is my command:
>
> COPY (SELECT DISTINCT ON (dealer_id,appraisal_id) * FROM
> appraisals_temp) TO 'c:\autodrs_appraisal_ne
An INSERT INTO will fix my problem with needing the extra copy from and
copy to.
I'm still curious as to why i was being told I couldn't specify a
relative path though.
P.
--
Paul Lambert
Database Administrator
AutoLedgers
---(end of broadcast)--
I'm attempting to copy from a table into a file using a select query
inside the copy.
The following is my command:
COPY (SELECT DISTINCT ON (dealer_id,appraisal_id) * FROM
appraisals_temp) TO 'c:\autodrs_appraisal_new.txt' WITH DELIMITER AS '^'
CSV HEADER;
I get the following returned:
WAR
That works like a charm. Thanks, Alvaro!
-Jeff
-Original Message-
From: Alvaro Herrera [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 08, 2007 1:22 PM
To: Demel, Jeff
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] COPY FROM - force a value
Demel, Jeff wrote:
> Is there a way
Demel, Jeff wrote:
> Is there a way to force a value when you're doing a COPY FROM, importing
> a file into a table?
>
> Here's my query as it is now:
>
> COPY filetable (value1, value2, value3, value4, forcevalue1,
> forcevalue2)
> FROM 'C:\\InsertFiles\\thisfile.txt'
> WITH DELIMITER AS ' '
Is there a way to force a value when you're doing a COPY FROM, importing
a file into a table?
Here's my query as it is now:
COPY filetable (value1, value2, value3, value4, forcevalue1,
forcevalue2)
FROM 'C:\\InsertFiles\\thisfile.txt'
WITH DELIMITER AS ' '
;
The file only contains data for
On 11/21/06, Steve Midgley <[EMAIL PROTECTED]> wrote:
Hello,
(I already fear the answer to my question is "no..") :)
I am using the 'COPY FROM' SQL command (not psql \copy) to move data
into a table from a CSV file. The source data are suitable for import
EXCEPT there are extraneous columns of
No, it was me that didn't understand!! But I do now - quite simple really!
Cheers,
-p
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Aaron Bono
Sent: Wednesday, 14 June 2006 10:41 AM
To: [EMAIL PROTECTED]
Cc: pgsql-sql@postgresql.org
Subject: Re:
I guess I still don't understand...
If you take the approach operationsengineer1 and I suggested, you
should only need 3 or 4 tables regardless of the number of SYS file
records.
Good luck with your implementation.
-Aaron
On 6/13/06, Phillip Smith <[EMAIL PROTECTED]> wrote:
Thanks Aaron - The
hanks again,
-p
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Aaron Bono
Sent: Wednesday, 14 June 2006 1:05 AM
To: [EMAIL PROTECTED]
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] COPY to table with array columns (Longish)
So how about creating a sys
text |
> > a6 | text |
> > a7 | text |
> > a8 | text |
> > a9 | text |
> > Indexes:
> > "id" PRIMARY KEY, btree (a0)
> >
> > a0 = primary key - eg, ZPRECMPL or ZKCOST
> >
> >
|
>a4 | text |
>a5 | text |
>a6 | text |
>a7 | text |
>a8 | text |
>a9 | text |
> Indexes:
> "id" PRIMARY KEY, btree (a0)
>
> a0 = primary key - eg, ZPRECMPL or ZKCOST
&
So how about creating a sys table too:
SYS
sys_id
ZKCOST
sys_id,
zkcost_id,
zkcost_value
and
ZPRECMPL
sys_id,
zprecmpl_id,
zprecmpl_value
This gives you the flexibility to expand to as many "columns" for
ZPRECMPL as you want. The bottom line is, I think it would be much
more ef
RIMARY KEY, btree (a0)
a0 = primary key - eg, ZPRECMPL or ZKCOST
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Aaron Bono
Sent: Tuesday, 13 June 2006 2:12 PM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] COPY to table with array columns (Longish)
I think two tables should suffice: ZKCOST and ZPRECMPL.
So you would have
ZKCOST
zkcost_id,
zkcost_value
and
ZPRECMPL
zkcost_id,
zprecmpl_id,
zprecmpl_value
where zkcost_id is the primary key for ZKCOST and zkcost_id,
zprecmpl_id together are the primary key for ZPRECMPL and zk
> On Mon, 2006-06-12 at 21:58 -0500, Aaron Bono wrote:
> > I agree with Tom. Personally I cannot think of a time I would use an
> > array column over a child table. Maybe someone can enlighten me on
> > when an array column would be a good choice.
>
> Arrays are a good choice when the data comes
On Mon, 2006-06-12 at 21:58 -0500, Aaron Bono wrote:
> I agree with Tom. Personally I cannot think of a time I would use an
> array column over a child table. Maybe someone can enlighten me on
> when an array column would be a good choice.
Arrays are a good choice when the data comes naturally s
om: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron
Bono
Sent: Tuesday,
13 June 2006 12:58
PM
To: Tom
Lane
Cc: [EMAIL PROTECTED];
pgsql-sql@postgresql.org
Subject: Re: [SQL] COPY to table
with array columns (Longish)
I
agree with Tom. Personally I cannot think of a time I woul
I agree with Tom. Personally I cannot think of a time I would use an array column over a child table. Maybe someone can enlighten me on when an array column would be a good choice.What language are you using to do the export if I may ask?
-AaronOn 6/12/06, Tom Lane <[EMAIL PROTECTED]> wrote:
"Phi
"Phillip Smith" <[EMAIL PROTECTED]> writes:
> The whole sys file is variable length records like this - they range =
> from 1
> to over 17,000 fields per record.
17000? I think you really need to rethink your schema. While you could
theoretically drop 17000 elements into a PG array column, you w
12:36 AM
To: [EMAIL PROTECTED]
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] COPY to table
with array columns (Longish)
Can
you provide an example?
Thanks,
Aaron
On 6/11/06, Phillip Smith <[EMAIL PROTECTED] >
wrote:
Hi All,
Hope someone can help me – our main company
system ru
Can you provide an example?Thanks,AaronOn 6/11/06,
Phillip Smith <[EMAIL PROTECTED]
> wrote:
Hi All,
Hope someone can help me – our main company system
runs on Raining Data PICK/D3 (if anyone familiar with it) which stores records
in it's "tables" as variable length items. Every
Hi All,
Hope someone can help me – our main company system
runs on Raining Data PICK/D3 (if anyone familiar with it) which stores records
in it’s “tables” as variable length items. Every item has a
unique Primary Key (per table) then each item can have a variable number of
fields. These
ivan marchesini <[EMAIL PROTECTED]> writes:
> I have a .txt file, containing some tabular data, where data are
> delimited by TABs.
> there are 3 columns:
> column1 int4, column2 float8, column3 float8
> the problem is that column3 contains also null values (i.e. sometimes is
> empty)
This should
yup... Replace the empty spaces in the file with some other value...
replace null values with \N
then try COPYing againOn 3/22/06, Luckys <[EMAIL PROTECTED]> wrote:
On 3/22/06, Achilleus Mantzios <
[EMAIL PROTECTED]> wrote:
O ivan marchesini έγραψε στις Mar 22, 2006 :> Dear users,> I'm working
On 3/22/06, Achilleus Mantzios <[EMAIL PROTECTED]> wrote:
O ivan marchesini έγραψε στις Mar 22, 2006 :> Dear users,> I'm working on a Postgres 7.4
server>> I have a .txt file, containing some tabular data, where data are> delimited by TABs.> there are 3 columns:>> column1 int4, column2 float8, co
O ivan marchesini έγραψε στις Mar 22, 2006 :
> Dear users,
> I'm working on a Postgres 7.4 server
>
> I have a .txt file, containing some tabular data, where data are
> delimited by TABs.
> there are 3 columns:
>
> column1 int4, column2 float8, column3 float8
>
> the problem is that column3 con
Dear users,
I'm working on a Postgres 7.4 server
I have a .txt file, containing some tabular data, where data are
delimited by TABs.
there are 3 columns:
column1 int4, column2 float8, column3 float8
the problem is that column3 contains also null values (i.e. sometimes is
empty)
so when I try to
Title: FW: sql copy does not work
Hi
I have a problem with the copy command. I need to write a Perl script where I copy the log files into the database.
If I use the copy following syntax in shell script it works, but I need to use it in Perl.
In shell script look like this and it
vendredi 14 octobre
2005 13:55To: pgsql-sql@postgresql.orgSubject: [SQL]
copy tables
HelloI have 2
postgreSQL databases called "DATA1" and "DATA2" with several tables inside
them (table A, B, C). I modify the details in table "A" in database
"DATA1&qu
INSERT INTO MYSCHEMA2.TABLENAME
SELECT * FROM MYSCHEMA1.TABLENAME WHERE < CONDITION >Shavonne Marietta Wijesinghe <[EMAIL PROTECTED]> wrote:
Hello
How can i copy a table from one schema to another..
Example..
* I have a database "mydatabase"
* then i have 2 schemas "myschema1" and "
am 14.10.2005, um 10:44:13 +0200 mailte Shavonne Marietta Wijesinghe folgendes:
> Hello
>
> How can i copy a table from one schema to another..
create table as select * from table
>
> Example..
Yeah!
test=# create schema foo;
CREATE SCHEMA
test=# create schema bar;
CREATE SCHEMA
test=# creat
Hello
How can i copy a table from one schema to
another..
Example..
* I have a database "mydatabase"
* then i have 2 schemas "myschema1" and
"myschema2"
* in "myschema1" i have inserted a new line and i
want to copy that to "myschema2" so they both will be same..
How can i do it with
am 14.10.2005, um 8:54:39 +0200 mailte Shavonne Marietta Wijesinghe folgendes:
> Hello
>
> I have 2 postgreSQL databases called "DATA1" and "DATA2" with several tables
> inside them (table A, B, C).
>
> I modify the details in table "A" in database "DATA1"
>
> How can I copy table "A" from
HelloI have 2
postgreSQL databases called "DATA1" and "DATA2" with several tables inside them
(table A, B, C). I modify the details in table "A" in database "DATA1"
How can I copy table "A" from database "DATA1" and paste it in database
"DATA2" using the same table name ??Thank you.
On 22.09.2005 11:47, [EMAIL PROTECTED] wrote:
How would you use it to only dump / restore the views? I don't want any
database tables.
Please RTFM. But because I'm such a nice guy:
Create a binary dump of the schema:
pg_dump -v -s -i -F c -Z 9 -U -f /tmp/dump.bin
Use the -l option of pg_re
On 22.09.2005 10:37, [EMAIL PROTECTED] wrote:
Is there a maybe a tool that I can use to copy views as-is from one database
into another?
pg_dump and pg_restore :)
---(end of broadcast)---
TIP 4: Have you searched our list archives?
use pg_dump and pg_restore :)
On 22.09.2005 10:37, [EMAIL PROTECTED] wrote:
Hi Guys,
I'm using PostGreSQL with a Java project since I'm a proffesional Java
developer.
I've a database that have about 120 views in PostGreSQL 7.0 that I need to
copy into PostGreSQL 8.0. I can copy them one-by-one
Hi Guys,
I'm using PostGreSQL with a Java project since I'm a proffesional Java
developer.
I've a database that have about 120 views in PostGreSQL 7.0 that I need to
copy into PostGreSQL 8.0. I can copy them one-by-one in pgAdmin but I don't
have the time! Is there a maybe a tool that I can use t
about the internals to attempt it.
Thanks again,
Graham
-Original Message-
From: Michael Fuhr [mailto:[EMAIL PROTECTED]
Sent: 12 July 2005 20:29
To: Tom Lane
Cc: Graham Vickrage; pgsql-sql@postgresql.org
Subject: Re: [SQL] Copy user privileges
On Tue, Jul 12, 2005 at 03:12:50PM -0400, Tom
On Tue, Jul 12, 2005 at 03:12:50PM -0400, Tom Lane wrote:
> "Graham Vickrage" <[EMAIL PROTECTED]> writes:
> > I want to keep all the privileges but assign them to a new user.
>
> > What is the best way of doing this?
>
> How about just renaming the old user to a new name?
>
> I don't think we h
"Graham Vickrage" <[EMAIL PROTECTED]> writes:
> I want to keep all the privileges but assign them to a new user.
> What is the best way of doing this?
How about just renaming the old user to a new name?
I don't think we have an ALTER command for that, but an UPDATE on
pg_shadow would get the jo
Hi All,
I have dumped a database with no data and restored it with a new db
name.
I want to keep all the privileges but assign them to a new user.
What is the best way of doing this? Is it to alter the system tables
directly in which case which ones.
TIA,
Graham
---(
I have not been too deep into 8.0, but AFAIK from
the 7.x releases, the only way to do things like
you describe, is do it the hard way:
use SELECT INTO to get the field values you want
into variables
modify the necessary field values
do the INSERT via Executing A Dynamic Command
Inserting a re
Hi,
What is the simplest solution in plpgsql to copy some rows in a table?
I would like to do something like:
select some rows
do for each row
skip serial field \
modify one field |-- what is the simplest way for this?
insert as new row /
Is it possible to insert a record t
On 10/20/2004 6:03 PM, Gifford Hesketh wrote:
Am I forgetting some limitation ? I get "ERROR: syntax error at or
near "$1" at character 22" with this:
CREATE FUNCTION public.fn_b_import( text ) RETURNS void AS
'
COPY b_import FROM $1 ;
'
LANGUAGE 'sql' STABLE;
Utility statements don't accept par
Am I forgetting some limitation ? I get "ERROR: syntax error at or
near "$1" at character 22" with this:
CREATE FUNCTION public.fn_b_import( text ) RETURNS void AS
'
COPY b_import FROM $1 ;
'
LANGUAGE 'sql' STABLE;
---(end of broadcast)---
TIP 4:
On Thu, Sep 02, 2004 at 06:16:47 -0700,
[EMAIL PROTECTED] wrote:
> Hello,
>
> I need some basic SQL help. I added a new column to an existing table,
> and now I need to copy values from one of the old columns to this new
> columns.
>
> I need something like this:
>
> FOR pvId IN SELECT id FRO
Hello,
I need some basic SQL help. I added a new column to an existing table,
and now I need to copy values from one of the old columns to this new
columns.
I need something like this:
FOR pvId IN SELECT id FROM preference_value LOOP
update preference_value SET display_value = (select v
Copy from .. works fine for 1000 records to load. For data set of 6 records I
could never get
it finish. And I'm planing to reload 1000,000 records.
So there is a limit somewhere between 1,000 & 60,000 since it starts working slower.
The only
question for me left is. What config parameter(s)
Igor [mailto:[EMAIL PROTECTED]
Sent: Fri 8/27/2004 1:16 PM
To: [EMAIL PROTECTED]
Cc:
Subject:[SQL] Copy command freezes but INSERT works fine with trigger
oninsert.
I tried to add up records 2 different ways:
1. using command [copy messageinfo (user_id, receivedtime,
I tried to add up records 2 different ways:
1. using command [copy messageinfo (user_id, receivedtime, filename,
sendersstring, subject,
hasattachments, groupmsg, msgsize, version ) FROM '/meridtemp/messageinfo.dat';]
from psql
2. using simple INSERT INTO messageinfo ( user_id ) V
On Jan 9, 2004, at 1:11 PM, [EMAIL PROTECTED] wrote:
how do we run the COPY command from file which has several null
columns in each field.
thanks.
example :
dwnc=# copy biosadm.custinv_temp
dwnc-# from '/home/bios/customer_data/CustomerInvoice_5Dec03_tab.txt' ;
ERROR: copy: line 1, Missing
ST Yesterday
To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
cc:
Subject: RE: [SQL] COPY command
This sounds as if the last character in each line might be a delimiter (a ",") which is standard for data unloaded from some sources; if
he line in question ?
HTH,
Greg Williamson
DBA
GlobeXplorer LLC
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tue 1/6/2004 10:19 PM
To: [EMAIL PROTECTED]
Cc:
Subject: [SQL] COPY command
Hi,
i try to load a file into temporary table but i
Hi,
i try to load a file into temporary table but it gives me an error . do u
have any idea/solutions ?? the command that i've running as below :
dwnc=# copy biosadm.custdo_temp
dwnc-# from '/home/bios/customer_data/CustomerDO_new.CSV'
dwnc-# WITH DELIMITER ',' ;
ERROR: copy: line 14
Hi,
i try to load a file into temporary table but it gives me an error . do u have any idea/solutions ?? the command that i've running as below :
dwnc=# copy biosadm.custdo_temp
dwnc-# from '/home/bios/customer_data/CustomerDO_new.CSV'
dwnc-# WITH DELIMITER ',' ;
ERROR: copy: line 1
Hi all
I'm trying to optimise some sql inserts I have by using the COPY command
instead. I'm connecting from Java using 7.4 beta 3. It works at the command
line, but I can't get it to work from Java.
Here's the pg log output.
LOG: query: COPY bingo_cards (account_id, game_id, win_ball, card,
On Monday 15 September 2003 09:57, Richard Sydney-Smith wrote:
> I am outputting the following rows from a SYBASE database on W2000
> The problem is that each string is imported with the inverted commas.
>
> eg field ID = ''RK'' instead of 'RK'
>
> Can someone please help?
A short bit of perl. So
I am outputting the following rows from a SYBASE
database on W2000
3 '2' 'IBISFinancials' 'A.C.N. 072
378 815'8 'RK' 'Personal Accounts'
Using the command:
select cast(seq as integer) , id , cmpy, tr_n from
fcont; output to d:\fcont.dat format 'ascii' delimited by '\x09'
This output
copy that table out .
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Christoph Haller
Sent: 27 February 2003 12:45
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [SQL] Copy from a SELECT
>
> I know that the COPY command requires that you work with pl
I know that the COPY command requires that you work with plain
tables.
Is there any other way at all of export only part of a table
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
On Wed, 2003-01-29 at 08:05, Sondaar Roelof wrote:
> Hello,
>
> I can't figure out how to make this work, or is not possible?
>
> In a function i would like to read a file.
> The file name is determined by a value from a table.
> However the COPY statement does not to accept this?
> I tried vario
Hello,
I can't figure out how to make this work, or is not possible?
In a function i would like to read a file.
The file name is determined by a value from a table.
However the COPY statement does not to accept this?
I tried various forms of adding (single)-quotes but no luck.
Anyone any ideas?
On Saturday 28 December 2002 3:48 pm, Stephan Szabo wrote:
> On Sat, 28 Dec 2002, Gary Stainburn wrote:
> > When I create the database, I use the COPY command. The ranks and
> > jobtypes are populated okay but the abilities table is empty. However,
> > if I then INSERT the data the inserts work f
1 - 100 of 134 matches
Mail list logo