Re: [SQL] Importing data from csv

2006-08-24 Thread Michael Fuhr
On Thu, Aug 24, 2006 at 08:19:58PM -0400, Scot P. Floess wrote: > Well, being that there isn't a RFC for CSV...other than "defacto" > definitions...I am pretty sure that is widely agreed upon ;) RFC 4180 Common Format and MIME Type for Comma-Separated Values (CSV) Files ftp://ftp.rfc-editor.org/i

Re: [SQL] double precision vs. numeric

2006-08-24 Thread Aarni Ruuhimäki
On Thursday 24 August 2006 20:29, Tom Lane wrote: > Aarni =?iso-8859-1?q?Ruuhim=E4ki?= <[EMAIL PROTECTED]> writes: > > I vaguely remember having seen a message > > ' ... type double precision ... will be depreciated / unsupported in > > future releases ... ' > > or something like that somewhere. (?

Re: RES: [SQL] Lock Problem

2006-08-24 Thread Tom Lane
Scott Marlowe <[EMAIL PROTECTED]> writes: > On Thu, 2006-08-24 at 16:12, André José Guergolet wrote: >> My system, checks if my script is running in each machine at this table, >> this table has 360 rows and has 50-100 updates per minute in columns STATE >> and STATEDATE. > Are you vacuuming t

Re: [SQL] RES: Lock Problem

2006-08-24 Thread Christopher Browne
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (André José Guergolet) would write: > Sorry, I have a table with 360 rows, in this table I control the state of > machines on network: > > > IpState StateDate > 172.20.0.39 Running 2006-08-23 00:00:0

Re: [SQL] Importing data from csv

2006-08-24 Thread Scot P. Floess
Well, being that there isn't a RFC for CSV...other than "defacto" definitions...I am pretty sure that is widely agreed upon ;) Phillip Smith wrote: There you go – it was the quotes that did it, not the back-slashes. I knew someone else would shed some better light! J   Cheer

Re: [SQL] Importing data from csv

2006-08-24 Thread Phillip Smith
There you go – it was the quotes that did it, not the back-slashes. I knew someone else would shed some better light! J   Cheers, -p   -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scot P. Floess Sent: Friday, 25 August 2006 10:00 To: [EMAIL

Re: [SQL] Importing data from csv

2006-08-24 Thread Scot P. Floess
And if its contained with quotes...its considered a field Scot P. Floess wrote: A newline in CSV parlance denotes the end of a recordunless that newline is contained with quotes... Phillip Smith wrote: I recently did this by parsing the data through a VB p

Re: [SQL] Importing data from csv

2006-08-24 Thread Scot P. Floess
A newline in CSV parlance denotes the end of a recordunless that newline is contained with quotes... Phillip Smith wrote: I recently did this by parsing the data through a VB program that appended a “\” in front of any Char(10) and/or Char(13) characters which tells Postgres

Re: [SQL] Importing data from csv

2006-08-24 Thread Phillip Smith
I recently did this by parsing the data through a VB program that appended a “\” in front of any Char(10) and/or Char(13) characters which tells Postgres to accept the next character as a literal part of the column value I believe – must do because it worked! I also quoted the whole column

Re: [SQL] Lock Problem

2006-08-24 Thread Andrew Sullivan
On Thu, Aug 24, 2006 at 05:27:58PM -0300, André José Guergolet wrote: > Hello all, I'm using the Postgres 8.0 and my product creates 7 > connections at the server. > > One of my connections do an update at a simple table with 360 rows > and I've got many table locks. How I can take more scabilit

Re: RES: [SQL] Lock Problem

2006-08-24 Thread Scott Marlowe
On Thu, 2006-08-24 at 16:12, André José Guergolet wrote: > Sorry, I have a table with 360 rows, in this table I control the state of > machines on network: > > > IpState StateDate > 172.20.0.39 Running 2006-08-23 00:00:00 > 172.20.0.59 Running 20

RES: [SQL] Lock Problem

2006-08-24 Thread André José Guergolet
Sorry, I have a table with 360 rows, in this table I control the state of machines on network: Ip State StateDate 172.20.0.39 Running 2006-08-23 00:00:00 172.20.0.59 Running 2006-08-23 00:00:00 172.20.0.72 Running 2006-08-23 00:0

[SQL] Lock Problem

2006-08-24 Thread André José Guergolet
Hello all,  I'm using the Postgres 8.0 and my product creates 7 connections at the server.   One of my connections do an update at a simple table with 360 rows and I've got many table locks. How I can take more scability?   Thanks, and sorry about my english.  

[SQL] Performance Problem with sub-select using array

2006-08-24 Thread Travis Whitton
Hello all, I'm running the following query on about 6,000 records worth of data, and it takes about 8 seconds to complete. Can anyone provide any suggestions to improve performance? I have an index on two columns in the transacts table (program_id, customer_id). If I specify a number for customer.i

Re: [SQL] Deleting Functions

2006-08-24 Thread Scott Petersen
Thanks for those who responded. It works fine and lasts a long time. The following script does NOT require any editing. It simply executes and works. \pset format unaligned \pset fieldsep '' \pset footer \t \o drops.sql select 'drop function ' || nspname || '.' || proname || '(' || pg_catal

Re: [SQL] Function to retrieve the Id column

2006-08-24 Thread Michael Fuhr
On Thu, Aug 24, 2006 at 02:07:14PM -0300, Ezequias Rodrigues da Rocha wrote: > I have Id field that is used in all my database but my more often used > parameter is a column called "number" that I have in more than 5000 magnetic > cards, my question is. > > How could I make a function to retrieve

Re: [SQL] double precision vs. numeric

2006-08-24 Thread Tom Lane
Aarni =?iso-8859-1?q?Ruuhim=E4ki?= <[EMAIL PROTECTED]> writes: > I vaguely remember having seen a message > ' ... type double precision ... will be depreciated / unsupported in future > releases ... ' > or something like that somewhere. (?) Perhaps you are thinking of type "money"? DOUBLE PRECI

Re: [SQL] double precision vs. numeric

2006-08-24 Thread Michael Fuhr
On Thu, Aug 24, 2006 at 06:51:33PM +0200, Peter Eisentraut wrote: > Aarni Ruuhimäki wrote: > > ' ... type double precision ... will be depreciated / unsupported in > > future releases ... ' > > That is completely false. Presumably because double precision is standard SQL and has been so for a lon

[SQL] Function to retrieve the Id column

2006-08-24 Thread Ezequias Rodrigues da Rocha
Hi list,   I have Id field that is used in all my database but my more often used parameter is a column called "number" that I have in more than 5000 magnetic cards, my question is.   How could I make a function to retrieve this Id just passing the number as parameter, just like:   getCardId(number

Re: [SQL] double precision vs. numeric

2006-08-24 Thread Peter Eisentraut
Aarni Ruuhimäki wrote: > ' ... type double precision ... will be depreciated / unsupported in > future releases ... ' That is completely false. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 5: don't forg

[SQL] double precision vs. numeric

2006-08-24 Thread Aarni Ruuhimäki
Hello, Not sure if this is the right list to ask ... I vaguely remember having seen a message ' ... type double precision ... will be depreciated / unsupported in future releases ... ' or something like that somewhere. (?) I have quite a few older dbs with tables that have one or more fields

[SQL] Importing data from csv

2006-08-24 Thread Sumeet
Hi Folks,sorry if this is a duplicate post, i've been tryin to find a solution of importing data into postgres from a csv file. The problem is, I have a database which consists of columns which contain newline characters (mac and unix). now when i export these files to a csv format, there are some

Re: [SQL] The length of the sql query

2006-08-24 Thread Tom Lane
Emi Lu <[EMAIL PROTECTED]> writes: > Could someone tell me where I can find PostgreSQL doc about the query > length please The theoretical limit is 1Gb (because palloc won't allow creation of a longer string than that). The practical limit is probably a great deal less, especially if you don't h

Re: [SQL] The length of the sql query

2006-08-24 Thread Emi Lu
Hello, It appears in MySql 3.23 the limit is 16 MB. In 4.0 and later, it is 1 GB http://dev.mysql.com/doc/refman/4.1/en/packet-too-large.html Could someone tell me where I can find PostgreSQL doc about the query length please Tks a lot! Hello, Just curious to know whether postgresql has