Betr: Re: [GENERAL] Question insert data

2005-03-20 Thread perico
That's what I tought the problem was, but I created  a table afterwards without
inheritence. Could it have something to do with the max size of the schema
or oid's?


-- Oorspronkelijk bericht --
Date: Sat, 19 Mar 2005 14:55:50 -0800 (PST)
From: Stephan Szabo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Question insert data


On Sat, 19 Mar 2005 [EMAIL PROTECTED] wrote:

 Hi There,

 I've a problem with inserting data and I can't figure out what the problem
 is:


 what did I do:


 1. I've a master table containing about 4 records. A count(*) provides
 me the exact number.

 2. I've create a table based on from the master. I copied a fraction from
 the master into the new table using a where clause (insert into ... select
 * from ... where a = b . The number of records copied is about 2553.

Define based on. Do you mean CREATE TABLE AS or perhaps that the new
table inherits from the old one?  If the latter, you will see the rows in
the parent as well as the child if you do a select from the parent.

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


_

12move ADSL vanaf 18,95 euro! GRATIS modem, GEEN aansluitkosten en GEEN 
datalimiet!
Ga nu naar http://adsl.12move.nl




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


Betr: Re: Betr: Re: [GENERAL] Question insert data

2005-03-20 Thread perico
Hi Stephan,

I figured out what happened:

The master table contained duplicates, but the insert statement seems to
be very smart by selecting just the unique ones.

Peter
-- Oorspronkelijk bericht --
Date: Sun, 20 Mar 2005 01:46:19 -0800 (PST)
From: Stephan Szabo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: pgsql-general@postgresql.org
Subject: Re: Betr: Re: [GENERAL] Question insert data


On Sun, 20 Mar 2005 [EMAIL PROTECTED] wrote:

 That's what I tought the problem was, but I created  a table afterwards
without
 inheritence. Could it have something to do with the max size of the schema
 or oid's?

I can't think of a reason it would, so can you send a self-contained
full example?

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


_

12move ADSL vanaf 18,95 euro! GRATIS modem, GEEN aansluitkosten en GEEN 
datalimiet!
Ga nu naar http://adsl.12move.nl




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


[GENERAL] Question insert data

2005-03-19 Thread perico
Hi There,

I've a problem with inserting data and I can't figure out what the problem
is:


what did I do:


1. I've a master table containing about 4 records. A count(*) provides
me the exact number.

2. I've create a table based on from the master. I copied a fraction from
the master into the new table using a where clause (insert into ... select
* from ... where a = b . The number of records copied is about 2553.

Issueing the same select statement on the master table gives me a list of
5106 which is twice the number of copied records.

Did someone have this problem before?

I'm using 8.0 Windows XP en the pgAdmin III , r1.2.0

I even tried the same on the command line!

thanks,
Peter




_

12move ADSL vanaf 18,95 euro! GRATIS modem, GEEN aansluitkosten en GEEN 
datalimiet!
Ga nu naar http://adsl.12move.nl




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


Betr: Re: [GENERAL] Question insert data

2005-03-19 Thread perico

insert into master_nl
select * from master where substr(loc,1,2) = 'NL'

-- Oorspronkelijk bericht --
Subject: Re: [GENERAL] Question insert data
From: Ragnar HafstaĆ° [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: pgsql-general@postgresql.org
Date: Sat, 19 Mar 2005 17:56:52 +


On Sat, 2005-03-19 at 18:36 +0100, [EMAIL PROTECTED] wrote:

 2. I've create a table based on from the master. I copied a fraction from
 the master into the new table using a where clause (insert into ... select
 * from ... where a = b . The number of records copied is about 2553.

 Issueing the same select statement on the master table gives me a list
of
 5106 which is twice the number of copied records.

sounds like you inserted into the master table instead of the new table.
can you show us the exact SQL you used?

or even better, can you make this happen in a simple test case?

gnari




_

12move ADSL vanaf 18,95 euro! GRATIS modem, GEEN aansluitkosten en GEEN 
datalimiet!
Ga nu naar http://adsl.12move.nl




---(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


Betr: Re: [GENERAL] Question insert data

2005-03-19 Thread perico
Some more info

select count(*) from master_bart where substr(locode_c5,1,2) =  'NL'

gives me the result: 5106


delete from masterplts_nl;

insert into masterplts_nl
select * from master_bart where substr(locode_c5,1,2) =  'NL';

Query returned successfully: 2553 rows affected, 5127 ms execution time.


-- Oorspronkelijk bericht --
Subject: Re: [GENERAL] Question insert data
From: Ragnar HafstaĆ° [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: pgsql-general@postgresql.org
Date: Sat, 19 Mar 2005 17:56:52 +


On Sat, 2005-03-19 at 18:36 +0100, [EMAIL PROTECTED] wrote:

 2. I've create a table based on from the master. I copied a fraction from
 the master into the new table using a where clause (insert into ... select
 * from ... where a = b . The number of records copied is about 2553.

 Issueing the same select statement on the master table gives me a list
of
 5106 which is twice the number of copied records.

sounds like you inserted into the master table instead of the new table.
can you show us the exact SQL you used?

or even better, can you make this happen in a simple test case?

gnari




_

12move ADSL vanaf 18,95 euro! GRATIS modem, GEEN aansluitkosten en GEEN 
datalimiet!
Ga nu naar http://adsl.12move.nl




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


[GENERAL] codepage setting, \encoding

2005-02-01 Thread perico
Hi,

 I'm using postgres 8.0 and I'm collecting data from many countries. So I've
some slovakian data and i can't get properly into my table (COPY command).
I've tried many codepage settings but none of those seem to support the special
characters. Does someone know which codepage I shoud use?


cheers,

Peter

_

12move ADSL vanaf 18,95 euro! GRATIS modem, GEEN aansluitkosten en GEEN 
datalimiet!
Ga nu naar http://adsl.12move.nl




---(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


Betr: Re: [GENERAL] codepage setting, \encoding

2005-02-01 Thread perico
I'm using ISO-8859-5 so should I change this to unicode?


-- Oorspronkelijk bericht --
Date: Tue, 1 Feb 2005 22:35:11 +0100
From: Martijn van Oosterhout kleptog@svana.org
To: [EMAIL PROTECTED]
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] codepage setting,  \encoding
Reply-To: Martijn van Oosterhout kleptog@svana.org


On Tue, Feb 01, 2005 at 10:20:55PM +0100, [EMAIL PROTECTED] wrote:
 Hi,

  I'm using postgres 8.0 and I'm collecting data from many countries. So
I've
 some slovakian data and i can't get properly into my table (COPY command).
 I've tried many codepage settings but none of those seem to support the
special
 characters. Does someone know which codepage I shoud use?

Does your database encoding support slovakian characters? (ie, is it
unicode). If so, set client_encoding=xxx should work for you.

Can you past an example that's failung?
--
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is
a
 tool for doing 5% of the work and then sitting around waiting for someone
 else to do the other 95% so you can sue them.

Bijlage: Bijlage



_

12move ADSL vanaf 18,95 euro! GRATIS modem, GEEN aansluitkosten en GEEN 
datalimiet!
Ga nu naar http://adsl.12move.nl




---(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