Re: [GENERAL] COPY COMMAND

2003-10-07 Thread Richard Huxton
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 Thing" (TM) although it 
can be irritating.

You should get a line number to indicate where the problem rows are.

-- 
  Richard Huxton
  Archonet Ltd

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [GENERAL] Server recommendations

2003-10-07 Thread Shridhar Daithankar
Christopher Browne wrote:

[EMAIL PROTECTED] (Shridhar Daithankar) writes:

And I also configured a system on laclinux.com, just for curiosity. 2x
1.8GHz/4GB/36GBx2 10K RPM SCSI/Adaptec 29320 for $4800/- is damn cheap
a system. HP does not even start below $5K for 64 bit systems.


What is _most_ interesting about these systems is the fact that they
can support 12GB of RAM.  It seems disappointing to spec it out with
less than 8GB.  And I'd rather throw on a MegaRAID controller...
Nops. Check http://www.tyan.com/products/html/thunderk8w.html which is followed 
from http://www.laclinux.com/en/opt.

They support 16GB RAM..:-)

 Shridhar



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [GENERAL] PostgreSQL Beta4 Tag'd and Bundle'd ...

2003-10-07 Thread Shridhar Daithankar
Robert Treat wrote:

 Or sign up for -announce and read the weekly news, which gives a summary
of each weeks developments* and updates some other ancillary information
about the project.
That reminds me. There used to be postgresql weekly news on linuxtoday. Haven't 
noticed them for quite a long.

Are they been disabled?

 Shridhar



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly


[GENERAL] using copy to load odd characters

2003-10-07 Thread Johnson, Shaunn
Title: using copy to load odd characters





Howdy:


Running PostgreSQL 7.3.3 on RedHat Linux 7.2


I'm trying to load data from a text file that
has an odd character in it (^@).  From what I
could tell, it's a NULL character.  How can I
load that into the database via the command line?


I've done the following:


[snip]


bcn2=> \copy db2_cn1pmemb from '/raid/backups/science/cn1pmemb.out' with delimiter as '|' NULL as '\000'
\.
ERROR:  copy: line 151676, Missing data for column "c_state"
lost synchronization with server, resetting connection
bcn2=> \copy db2_cn1pmemb from '/raid/backups/science/cn1pmemb.out' with delimiter as '|' NULL as 'NULL'
\.
ERROR:  copy: line 151676, Missing data for column "c_state"
lost synchronization with server, resetting connection
bcn2=> \copy db2_cn1pmemb from '/raid/backups/science/cn1pmemb.out' with delimiter as '|' NULL as NULL
\.
ERROR:  copy: line 151676, Missing data for column "c_state"
lost synchronization with server, resetting connection
bcn2=> \q
[/snip]


As well as '^@' and '\^@', but I haven't found anything that
works.  Can someone tell me what I am doing wrong?


Thanks!


-X





[GENERAL] Data partitioning?

2003-10-07 Thread psql-mail
hi,

I am becoming more and more convinced that in order to achieve the 
required performance and scalability I need to split my data amoungst 
many backend machines.

Ideally I would start with about 10 machine and have 1/10th of the data 
on each. As the data set grows I would then buy additional machines to 
spread the data over.

I think this is called data partitioning in oracle?
What does postgresql have to offer in this area?

Does software already exist to query multiple identical schemas each 
with different data stored in them, and then correlate the results?

If not what suggestions does anyone have for writing my own?

Thanks,
Mat

-- 

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [GENERAL] using copy to load odd characters

2003-10-07 Thread Peter Eisentraut
Johnson, Shaunn writes:

> I'm trying to load data from a text file that
> has an odd character in it (^@).  From what I
> could tell, it's a NULL character.  How can I
> load that into the database via the command line?

Depends on what data type the column is supposed to have.  Character data
types cannot contain null bytes.  The type bytea can store arbitrary
binary data.  It requires you to escape null bytes so '\\000'.

-- 
Peter Eisentraut   [EMAIL PROTECTED]


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [GENERAL] concenation of strings and null values

2003-10-07 Thread Tom Lane
Tino Wildenhain <[EMAIL PROTECTED]> writes:
> Can someone enlighten me if this is
> in accordance to some not so transparent
> rules of SQL92 or '99 and if so, how
> to work around this?

It is per spec: in SQL92 6.13 :

 2) If  is specified, then let S1 and S2 be the re-
sult of the  and ,
respectively.

Case:

a) If either S1 or S2 is the null value, then the result of the
   is the null value.


regards, tom lane

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [GENERAL] "select count(*) from contacts" is too slow!

2003-10-07 Thread nolan
> MySQL can tell you from it's index because it doesn't care if it gives you the
> right number or not.

Under what circumstances would MySQL give the wrong number?  
--
Mike Nolan

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] Call for Speakers / Presenters

2003-10-07 Thread Joshua D. Drake
As your new PostgreSQL "Master of Ceremonies",

What?
 

Master of Ceremonies is a new position that was created by the core (at 
least Josh Berkus)
for dealing with speakers.

There are others, such as Editor-n-chief which is myself, and I am in 
charge of soliciting writers
and working with publishers.

Sincerely,

Joshua Drake





--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC - S/JDBC
Postgresql support, programming, shared hosting and dedicated hosting.
+1-503-222-2783 - [EMAIL PROTECTED] - http://www.commandprompt.com
PostgreSQL.Org - Editor-N-Chief - http://www.postgresql.org


---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


Re: [GENERAL] Assigning Values to Arrays

2003-10-07 Thread Oliver Elphick
On Wed, 2003-10-08 at 11:41, Zitan Broth wrote:
> Greetings All,
>  
> Running pg 7.3.4 and was reading:
> http://archives.postgresql.org/pgsql-interfaces/2003-09/msg00018.php .  Basically 
> want to assign values to an array and then a 2d array.
>  
> However I can't get this to run in properly I get a syntax error (at
> or near "[") with function listed below.
>  
> Any suggestions are greatly appreciated :-)
>  

Your function does not have a return statement.

-- 
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
 
 "Let no man say when he is tempted, I am tempted of 
  God; for God cannot be tempted with evil, neither 
  tempteth he any man; But every man is tempted, when he
  is drawn away of his own lust, and enticed."  
   James 1:13,14 


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])