Re: [GENERAL] URGENT: temporary table not recognized?

2012-02-13 Thread Jasen Betts
On 2012-01-06, Phoenix Kiula wrote: > On Fri, Jan 6, 2012 at 6:53 PM, Steve Crawford > wrote: > Thanks Steve. > > The file has 350 million lines. Sed, Awk etc are a little painful when > the file is 18GB witht hat many lines. On files of that size they're a lot nicer than an interactive editor

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-07 Thread Phoenix Kiula
On Fri, Jan 6, 2012 at 10:38 PM, John R Pierce wrote: > you should check your attitude at the door.  this isn't Microsoft Pay per > Incident Tech Support. I saw the door. Found some other attitudes that were allowed to be let in. Like asking me to write my own patch. You see, attitudes come in

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread John R Pierce
On 01/06/12 5:33 PM, Phoenix Kiula wrote: > http://pgloader.projects.postgresql.org/ Sorry. That I already did. But where's the config file? How to configure the config file? Where's the simple doc (not on that ugly PGFoundry website, I mean in English that people can understand what to do, wi

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
On Fri, Jan 6, 2012 at 8:19 PM, Adrian Klaver wrote: > On Friday, January 06, 2012 4:16:09 pm Phoenix Kiula wrote: >> On Fri, Jan 6, 2012 at 6:54 PM, Adrian Klaver >> wrote: >> > Try: >> > copy vl from 'data.txt' WITH CSV DELIMITER '|'; >> >> Doesn't work. Can't see what the different in CSV is

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Adrian Klaver
On Friday, January 06, 2012 4:16:09 pm Phoenix Kiula wrote: > On Fri, Jan 6, 2012 at 6:54 PM, Adrian Klaver wrote: > > Try: > > copy vl from 'data.txt' WITH CSV DELIMITER '|'; > > Doesn't work. Can't see what the different in CSV is from a text file. > Same errors are thrown. > > > If that doesn

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Steve Crawford
On 01/06/2012 03:55 PM, Phoenix Kiula wrote: ... In general, when you have data scrubbing issues like this, grep/sed/awk/... are your friends. Clean it up then import it. Thanks Steve. The file has 350 million lines. Sed, Awk etc are a little painful when the file is 18GB witht hat many lines.

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
On Fri, Jan 6, 2012 at 6:54 PM, Adrian Klaver wrote: > > Try: > copy vl from 'data.txt' WITH CSV DELIMITER '|'; Doesn't work. Can't see what the different in CSV is from a text file. Same errors are thrown. > If that doesn't work take a look at pgloader: > http://pgfoundry.org/projects/pgloade

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Steve Crawford
On 01/06/2012 03:12 PM, Phoenix Kiula wrote: ... Sounds like you are using statement pooling - every statement can be assigned to a different server connection. You may need transaction pooling or session pooling: http://pgbouncer.projects.postgresql.org/doc/usage.html Thanks Steve. YES! I c

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
On Fri, Jan 6, 2012 at 6:53 PM, Steve Crawford wrote: > On 01/06/2012 03:42 PM, Phoenix Kiula wrote: >> >> On Fri, Jan 6, 2012 at 6:20 PM, Adrian Klaver >>  wrote: >> >>> http://www.postgresql.org/docs/9.0/interactive/sql-copy.html >>> >>> Search for >>> NULL >> >> >> >> Thanks Adrian. >> >> Witho

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Adrian Klaver
On 01/06/2012 03:42 PM, Phoenix Kiula wrote: On Fri, Jan 6, 2012 at 6:20 PM, Adrian Klaver wrote: http://www.postgresql.org/docs/9.0/interactive/sql-copy.html Search for NULL Thanks Adrian. Without examples, it's hard to predict syntax. If the value after a pipe is missing altogether, I

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Steve Crawford
On 01/06/2012 03:42 PM, Phoenix Kiula wrote: On Fri, Jan 6, 2012 at 6:20 PM, Adrian Klaver wrote: http://www.postgresql.org/docs/9.0/interactive/sql-copy.html Search for NULL Thanks Adrian. Without examples, it's hard to predict syntax. If the value after a pipe is missing altogether, I s

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
On Fri, Jan 6, 2012 at 6:20 PM, Adrian Klaver wrote: > http://www.postgresql.org/docs/9.0/interactive/sql-copy.html > > Search for > NULL Thanks Adrian. Without examples, it's hard to predict syntax. If the value after a pipe is missing altogether, I suppose the missing value is "\n" (newline

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Adrian Klaver
On 01/06/2012 03:12 PM, Phoenix Kiula wrote: On Fri, Jan 6, 2012 at 4:24 PM, Steve Crawford wrote: On 01/06/2012 01:11 PM, Phoenix Kiula wrote: Thanks Steve. YES! I changed it to transaction pooling and now it works. Another problem through. I need to COPY a huge text file into a table,

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
On Fri, Jan 6, 2012 at 4:24 PM, Steve Crawford wrote: > On 01/06/2012 01:11 PM, Phoenix Kiula wrote: >> >> On Fri, Jan 6, 2012 at 11:46 AM, Tom Lane  wrote: >>> >>> Phoenix Kiula  writes: Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. >>> >>> Perhaps pgbou

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Tom Lane
Marko Kreen writes: > On Fri, Jan 6, 2012 at 11:24 PM, Steve Crawford > wrote: >> On 01/06/2012 01:11 PM, Phoenix Kiula wrote: >>> How can I make sure pgbouncer takes it all in the same session? I also >>> tried the two commands within a transaction. >> Sounds like you are using statement poolin

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Marko Kreen
On Fri, Jan 6, 2012 at 11:24 PM, Steve Crawford wrote: > On 01/06/2012 01:11 PM, Phoenix Kiula wrote: >> >> On Fri, Jan 6, 2012 at 11:46 AM, Tom Lane  wrote: >>> >>> Phoenix Kiula  writes: Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. >>> >>> Perhaps pgbo

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Steve Crawford
On 01/06/2012 01:11 PM, Phoenix Kiula wrote: On Fri, Jan 6, 2012 at 11:46 AM, Tom Lane wrote: Phoenix Kiula writes: Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. Perhaps pgbouncer is redirecting the second command to a different session? Thanks Tom. I'm in the

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
On Fri, Jan 6, 2012 at 11:46 AM, Tom Lane wrote: > Phoenix Kiula writes: >> Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. > > Perhaps pgbouncer is redirecting the second command to a different > session? > Thanks Tom. I'm in the exact same session in my terminal, an

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Bosco Rama
Tom Lane wrote: > Phoenix Kiula writes: >> Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. > > Perhaps pgbouncer is redirecting the second command to a different > session? This may be OT, but are temp tables also removed when setting a new session authorization? Bosco

Re: [GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Tom Lane
Phoenix Kiula writes: > Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. Perhaps pgbouncer is redirecting the second command to a different session? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

[GENERAL] URGENT: temporary table not recognized?

2012-01-06 Thread Phoenix Kiula
Hi. I'm using Postgresql 9.0.5, and the connection is made via pgbouncer. I create a temporary table, and then want to import data into this table via a COPY command. Yet, this just created table is not being recognized. What's up? >From my terminal: mydb=# mydb=# create temporary table vl (