Re: [GENERAL] Problem with the 9.1 one-click installer Windows7 64bit

2011-09-15 Thread Thomas Kellerer
Brar Piening, 14.09.2011 21:49: Thomas Kellerer wrote: So I killed the iacls.exe and the script proceeded, just to hang at the next call to icacls.exe when it tried to set the privileges on the directory for the postgres user despite the fact that that user already was the owner and had full con

Re: [GENERAL] How to return an array of values from a function?

2011-09-15 Thread Sim Zacks
On 09/15/2011 09:13 AM, Siva Palanisamy wrote: Hi All,   I wish to return an array of values. Assume, I have a table called contacts. I want to display all the names available from a column in the UI. Hence I n

[GENERAL] Why is this query running slowly?

2011-09-15 Thread Yang Zhang
I have a simple query that's been running for a while, which is fine, but it seems to be running very slowly, which is a problem: mydb=# explain select user_id from den where user_id not in (select duid from user_mappings) and timestamp between '2009-04-01' and '2010-04-01'; QUERY PLAN

Re: [GENERAL] Why is this query running slowly?

2011-09-15 Thread Yang Zhang
If it matters, the client is a JDBC app doing: con = DriverManager.getConnection("jdbc:postgresql://localhost:5434/mydb", "yang", password) con.setAutoCommit(false) val st = con.prepareStatement(""" select user_id from den where user_id not in (select duid from user_mappings)

Re: [GENERAL] Why is this query running slowly?

2011-09-15 Thread Yang Zhang
Should also add that while the client is under no load (CPU<1%, load ~0.1, mem ~20%), the server looks pretty busy (CPU 90-100% of 1 core, load ~1.5, mem ~70-80%), but PG is the only thing using resources. On Thu, Sep 15, 2011 at 12:58 AM, Yang Zhang wrote: > If it matters, the client is a JDBC a

Re: [GENERAL] Why is this query running slowly?

2011-09-15 Thread John R Pierce
On 09/15/11 12:53 AM, Yang Zhang wrote: mydb=# explain select user_id from den where user_id not in (select duid from user_mappings) and timestamp between '2009-04-01' and '2010-04-01'; QUERY PLAN ---

Re: [GENERAL] Problem with the 9.1 one-click installer Windows7 64bit

2011-09-15 Thread Thomas Kellerer
Craig Ringer, 14.09.2011 06:20: As Dave noted, it's a non-recursive grant. It isn't changing the permissions for C:\ and everything under it. It's only changing the permissions for C:\ its self. It's then stepping down the path of parents down to the datadir and doing the same thing to make sure

Re: [GENERAL] Why is this query running slowly?

2011-09-15 Thread Tomas Vondra
On 15 Září 2011, 9:53, Yang Zhang wrote: > I have a simple query that's been running for a while, which is fine, > but it seems to be running very slowly, which is a problem: > > mydb=# explain select user_id from den where user_id not in (select > duid from user_mappings) and timestamp between '20

Re: [GENERAL] Why is this query running slowly?

2011-09-15 Thread Toby Corkindale
On 15/09/11 17:53, Yang Zhang wrote: I have a simple query that's been running for a while, which is fine, but it seems to be running very slowly, which is a problem: mydb=# explain select user_id from den where user_id not in (select duid from user_mappings) and timestamp between '2009-04-01' a

Re: [GENERAL] Why is this query running slowly?

2011-09-15 Thread Yang Zhang
On Thu, Sep 15, 2011 at 1:22 AM, Tomas Vondra wrote: > On 15 Září 2011, 9:53, Yang Zhang wrote: >> I have a simple query that's been running for a while, which is fine, >> but it seems to be running very slowly, which is a problem: >> >> mydb=# explain select user_id from den where user_id not in

Re: [GENERAL] Why is this query running slowly?

2011-09-15 Thread Tomas Vondra
On 15 Září 2011, 11:07, Yang Zhang wrote: > On Thu, Sep 15, 2011 at 1:22 AM, Tomas Vondra wrote: >> On 15 Září 2011, 9:53, Yang Zhang wrote: >>> I have a simple query that's been running for a while, which is fine, >>> but it seems to be running very slowly, which is a problem: >>> >>> mydb=# expl

Re: [GENERAL] Jenkins

2011-09-15 Thread Giorgio Valoti
Il giorno 13/set/2011, alle ore 13:28, salah jubeh ha scritto: > Hello. > > This might be the wrong place to post my question, but any help is > appreciated. > > Did any one used Jenkins for Postgresql unit testing, and what are the > available unit testing plug-ins?, is there is a tutorial

[GENERAL] What do you like to get ?

2011-09-15 Thread Marc Mamin
Hello, (as reaction on this thread: http://archives.postgresql.org/pgsql-hackers/2011-09/msg00585.php) I miss a discussion place for feature wishes. (Is there one ?) There are recurring posts in the different lists, but it is hard to get an overview on what is currently hot, or on features which

[GENERAL] Type of value has a mismatch with column typeCouldn't store in viewimages_yn Column. Expected type is BitString.

2011-09-15 Thread Reena
Type of value has a mismatch with column typeCouldn't store in viewimages_yn Column. Expected type is BitString. Iam getting this error when iam using bit field and assinging to datatable.. The code is below. Dim sql As String = "select * from Users where UserName = @param1" Dim

Re: [GENERAL] Cryptic Error Message Importing Table Dump

2011-09-15 Thread Rich Shepard
On Thu, 15 Sep 2011, Alban Hertroys wrote: The text in the error is a tab character, so maybe you have an extra tab somewhere? Alban, The column separators are tabs. I've checked a few rows above and below the cited one and find only a single tab between columns. If not, perhaps the error

[GENERAL] share nothing but reads cluster

2011-09-15 Thread Marc Mamin
Hello, in order to face our data growth we want to start evaluate cluster possibilities. our application is mainly an ETL and reporting Tool for logs content. all large tables are timely partitioned, whereas the partition logic is driven by the application to avoid trigger overhead. each custom

Re: [GENERAL] share nothing but reads cluster

2011-09-15 Thread Ondrej Ivanič
Hi, On 15 September 2011 23:40, Marc Mamin wrote: > Are there other way we should evaluate ? > Should we better wait foir POstgres 9.2+ ? You can try pgpool-II (Parallel Query mode) or MPP database like Greenplum (Community Edition). Another option is high IOPS (500k+) SSD card but they are not

Re: [GENERAL] Cryptic Error Message Importing Table Dump

2011-09-15 Thread Adrian Klaver
On Thursday, September 15, 2011 6:24:42 am Rich Shepard wrote: > On Thu, 15 Sep 2011, Alban Hertroys wrote: > >Each row terminates with a \n; when the cursor is at the row end and I > press ctrl-f (move one character forward), the cursor is at the beginning > of the next line. > >I'm con

Re: [GENERAL] pg_dump with select command

2011-09-15 Thread Adrian Klaver
On Wednesday, September 14, 2011 9:48:40 pm Adarsh Sharma wrote: > I am sorry Sir, but Still I am not able to solve the issue. > > I followed the below steps & they are :- > > 1. Create table from the main tables by *create table as select* command. > 2. Then I take the backup of that tables and

Re: [GENERAL] Bit datatype performance?

2011-09-15 Thread Harald Fuchs
In article , Antonio Vieiro writes: > Hi all, > One of my entities 'E' may be 'tagged' with an arbitrary set of 256 tags 'T'. > A first approach could be to add a M:N relationship between 'E' and 'T'. > A second way to do this could be to add a BIT(256) datatype to 'E', > setting bits to '1' if

Re: [GENERAL] Why is this query running slowly?

2011-09-15 Thread Tom Lane
Yang Zhang writes: > On Thu, Sep 15, 2011 at 1:22 AM, Tomas Vondra wrote: >> [ use a left join instead of NOT IN ] > This worked great, thank you. Too bad the planner isn't smart enough > to do this yet! It never will be, because they're not equivalent queries. NOT IN has different (and very

[GENERAL] PostgreSQL 9.1.0 bug?

2011-09-15 Thread Harald Fuchs
I think I've found a bug either in PostgreSQL 9.1.0 or in the ip4r package (version 1.05). Since the problematic behavior occurs on different tables and on different servers, it should be relatively easy to reproduce: CREATE TABLE foo ( id serial NOT NULL, range ip4r NOT NULL, PRIMARY KEY (

Re: [GENERAL] Why is this query running slowly?

2011-09-15 Thread Tomas Vondra
On 15 Září 2011, 16:26, Tom Lane wrote: > Yang Zhang writes: >> On Thu, Sep 15, 2011 at 1:22 AM, Tomas Vondra wrote: >>> [ use a left join instead of NOT IN ] > >> This worked great, thank you. Too bad the planner isn't smart enough >> to do this yet! > > It never will be, because they're not eq

Re: [GENERAL] Cryptic Error Message Importing Table Dump [RESOLVED]

2011-09-15 Thread Rich Shepard
On Thu, 15 Sep 2011, Adrian Klaver wrote: In your editing of the file did you happen to edit out the \. that is at the end of the COPY data? Adrian, Ah, shoot! I did ... based on an earlier message. That was the problem. Many thanks, once again, Rich -- Sent via pgsql-general mailing

Re: [GENERAL] What do you like to get ?

2011-09-15 Thread Adam Cornett
This sounds like something that should be in the Postgres wiki ( http://wiki.postgresql.org/wiki) not sure if there is a page (a quick search didn't turn one up). -Adam Cornett On Thu, Sep 15, 2011 at 7:29 AM, Marc Mamin wrote: > ** > > Hello, > > (as reaction on this thread: > > http://archive

[GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-15 Thread Rich Shepard
The .sql file produced by pg_dump is properly terminated with '\.' as the last line, yet I continue to encounter this error: ERROR: invalid input syntax for type real: " " CONTEXT: COPY chemistry, line 47363, column quant: " " when trying to re-create the table. It appears that th

[GENERAL] Remote connection shows localhost databases

2011-09-15 Thread Jeff Adams
I am trying to connect to a workstation running postgres from another computer on the network. I have postgres installed on both machines. When I go to connect to the workstation, everything appears to happen correctly, however, the server connection shows the databases on the localhost, not the wo

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump [UPDATE]

2011-09-15 Thread Rich Shepard
On Thu, 15 Sep 2011, Rich Shepard wrote: It appears that this error is generated when a row has a missing value in the 'quant' column and the column contains '\N' in the text file. For example, \N GW-22 2005-03-09 Depth to Water \N Feet\N \N \N \N So

Re: [GENERAL] Remote connection shows localhost databases

2011-09-15 Thread Richard Huxton
On 15/09/11 17:30, Jeff Adams wrote: I am trying to connect to a workstation running postgres from another computer on the network. How are you connecting? PgAdmin, psql, Perl script? What is the hostname you are using on the local machine and are you sure it is for the remote machine? --

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-15 Thread Andy Colson
On 9/15/2011 12:31 PM, Rich Shepard wrote: The .sql file produced by pg_dump is properly terminated with '\.' as the last line, yet I continue to encounter this error: ERROR: invalid input syntax for type real: " " CONTEXT: COPY chemistry, line 47363, column quant: " " when trying to re-create

Re: [GENERAL] how to use all the options of EXPLAIN?

2011-09-15 Thread Guillaume Lelarge
On Thu, 2011-09-15 at 12:17 +0600, AI Rumman wrote: > When I am using the following query, I got shared hit=8857. > > EXPLAIN (buffers true, analyze) select * from act; > QUERY > PLAN >

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-15 Thread Rich Shepard
On Thu, 15 Sep 2011, Andy Colson wrote: Can you pg_dump again, but use --inserts? Maybe it'll offer some hints. Andy, Only if I restore /usr/local/pgsql/data/* from the backup tape of a few days ago. I need to drop the table before trying to insert it. Also, do you have the right line en

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-15 Thread Andy Colson
On 9/15/2011 2:38 PM, Rich Shepard wrote: On Thu, 15 Sep 2011, Andy Colson wrote: Can you pg_dump again, but use --inserts? Maybe it'll offer some hints. Andy, Only if I restore /usr/local/pgsql/data/* from the backup tape of a few days ago. I need to drop the table before trying to insert i

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-15 Thread Alban Hertroys
On 15 Sep 2011, at 19:31, Rich Shepard wrote: > The .sql file produced by pg_dump is properly terminated with '\.' as the > last line, yet I continue to encounter this error: > > ERROR: invalid input syntax for type real: " " > CONTEXT: COPY chemistry, line 47363, column quant: " " >

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-15 Thread Rich Shepard
On Thu, 15 Sep 2011, Andy Colson wrote: To restore, you are using: psql dbname < filename correct? Andy, Same error. BTW, what prompted this was my discovery that about 1400 rows with site_id = GW-22 had a newline appended to that string. Using emac's search-and-replace I took those off

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-15 Thread Rich Shepard
On Thu, 15 Sep 2011, Andy Colson wrote: Ah, I see there was a prior thread about this problem. You said you'd missed the \. and said it was resolved. So is this a same file or a different one? Andy, Same file, unfortunately. Rich -- Sent via pgsql-general mailing list (pgsql-general@pos

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-15 Thread Rich Shepard
On Thu, 15 Sep 2011, Alban Hertroys wrote: You appear to have two tabs after "Depth to Water", which would be one too many. Alban, I thought that I had caught all the double tabs. Thanks for seeing this one. Now I'm back to the tabs-in-real-columns issue: ERROR: invalid input syntax f

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-15 Thread Andy Colson
On 9/15/2011 3:10 PM, Rich Shepard wrote: On Thu, 15 Sep 2011, Andy Colson wrote: To restore, you are using: psql dbname < filename correct? Andy, Same error. BTW, what prompted this was my discovery that about 1400 rows with site_id = GW-22 had a newline appended to that string. Using emac

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-15 Thread Andy Colson
On 9/15/2011 3:17 PM, Rich Shepard wrote: On Thu, 15 Sep 2011, Alban Hertroys wrote: You appear to have two tabs after "Depth to Water", which would be one too many. Alban, I thought that I had caught all the double tabs. Thanks for seeing this one. Now I'm back to the tabs-in-real-columns

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-15 Thread Rich Shepard
On Thu, 15 Sep 2011, Andy Colson wrote: It's simpler to use sql to do this. Can you restore the table? Andy, OK. I need to provide a new client with filled in paperwork so I can get paid. I'll return to this as soon as that's done. Yes, I'll restore from the backup drive (yea, dirvish!)

[GENERAL] forcing table ownership

2011-09-15 Thread Darin Perusich
Hello, I'm pretty much brand new to using postgres and the privilege structure is taking some getting used to, especially when coming from mysql. What I'm trying to accomplish is to have multiple users/roles connect to a database and have ALL privileges to do whatever they want. The problem I'm ru

Re: [GENERAL] forcing table ownership

2011-09-15 Thread Andy Colson
On 9/15/2011 3:59 PM, Darin Perusich wrote: Hello, I'm pretty much brand new to using postgres and the privilege structure is taking some getting used to, especially when coming from mysql. What I'm trying to accomplish is to have multiple users/roles connect to a database and have ALL privilege

Re: [GENERAL] Remote connection shows localhost databases

2011-09-15 Thread Jeff Adams
[sorry for the duplicate Richard] Thanks for the response Richard. I have tried to connect via pgAdminIII. When I try to connect to the remote machine, I enter \\\ into the host name field. What I found was it didn't matter what I entered into the hostname field (I put in random strings to test),

Re: [GENERAL] forcing table ownership

2011-09-15 Thread Darin Perusich
Hi Andy, > > Any way you can update to PG 9? > > http://www.postgresql.org/docs/9.0/static/sql- > alterdefaultprivileges.html That's not really an option I'd like to consider. I really don't want to deploy anything outside of what's distributed with the OS, since I have a TON of opensuse server

Re: [GENERAL] Remote connection shows localhost databases

2011-09-15 Thread Guillaume Lelarge
On Thu, 2011-09-15 at 15:30 -0400, Jeff Adams wrote: > [sorry for the duplicate Richard] > > Thanks for the response Richard. I have tried to connect via pgAdminIII. > When I try to connect to the remote machine, I enter \\\ > into the host name field. What I found was it didn't matter what I ente

Re: [GENERAL] forcing table ownership

2011-09-15 Thread Richard Broersma
On Thu, Sep 15, 2011 at 1:59 PM, Darin Perusich wrote: > I'm pretty much brand new to using postgres and the privilege structure > is taking some getting used to, especially when coming from mysql. What > I'm trying to accomplish is to have multiple users/roles connect to a > database and have AL

Re: [GENERAL] Why is this query running slowly?

2011-09-15 Thread Tom Lane
"Tomas Vondra" writes: > Could the planner do this reasoning, i.e. see if there's a NOT NULL > constraint on the column and change the plan accordingly? Possibly. I'm not sure how expensive it would be. Right now, a structural change of that sort would have to be done pretty early in planning,

Re: [GENERAL] forcing table ownership

2011-09-15 Thread Andy Colson
On 09/15/2011 04:31 PM, Darin Perusich wrote: Hi Andy, Any way you can update to PG 9? http://www.postgresql.org/docs/9.0/static/sql- alterdefaultprivileges.html That's not really an option I'd like to consider. I really don't want to deploy anything outside of what's distributed with the O

[GENERAL] multi-master replication (Was: Has Pg 9.1.0 been released today?)

2011-09-15 Thread Aleksey Tsalolikhin
On Tue, Sep 13, 2011 at 6:55 PM, Joshua D. Drake wrote: > >> On 09/13/2011 04:01 AM, Aleksey Tsalolikhin wrote: >>> >>> Now that you have streaming replication both async and sync, are you >>> working on multi-master replication? *excited* Or what's the >>> roadmap? > > I would take a look at post

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-15 Thread Adrian Klaver
On Thursday, September 15, 2011 1:17:06 pm Rich Shepard wrote: > On Thu, 15 Sep 2011, Alban Hertroys wrote: > > You appear to have two tabs after "Depth to Water", which would be one > > too many. > > Alban, > >I thought that I had caught all the double tabs. Thanks for seeing this > one. >

[GENERAL] Upgrading from 9.0->9.1 Ubuntu Best Practices

2011-09-15 Thread adebarros
Hi, all, first post on this list. I'm running Ubuntu 11.04 and have Postgres 9.0 and 8.4 both installed, although I'm only working with 9.0 at this time for some Django development. I have added this PPA to my Upgrade Manager: http://ppa.launchpad.net/pitti/postgresql/ubuntu The other day I noti

Re: [GENERAL] Jenkins

2011-09-15 Thread Craig Ringer
On 15/09/2011 6:13 PM, salah jubeh wrote: Hello Craig, I would like to test the software requirement specification . There are some tools such as pgTAP but I am not sure about it.. Please reply to the mailing list, not just to me directly. If you're testing against a spec, you probably wa

Re: [GENERAL] How to convert ByteA to Large Objects

2011-09-15 Thread Jayadevan
Thank you. We are working on an Oracle to PostgreSQL migration project. BLOB columns got converted to BYTEA in PostgreSQL and we ran into problems. We used this to convert the data type to OID. Thank you. -- View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-convert-By

Re: [GENERAL] How to convert ByteA to Large Objects

2011-09-15 Thread John R Pierce
On 09/15/11 11:23 PM, Jayadevan wrote: Thank you. We are working on an Oracle to PostgreSQL migration project. BLOB columns got converted to BYTEA in PostgreSQL and we ran into problems. We used this to convert the data type to OID. Thank you. you probably should detail the problems you ran int

Re: [GENERAL] Apparent Problem With NULL in Restoring pg_dump

2011-09-15 Thread Alban Hertroys
On 16 September 2011 03:31, Adrian Klaver wrote: > This is one of those things I find spreadsheets actually useful for. Do a > COPY or > /copy, in CSV format from the table and import it into a spreadsheet. I > find the > grid layout of a spreadsheet very useful in picking out misplaced fields. >

[GENERAL] Steps to use pl/pgtcl

2011-09-15 Thread Mamatha_Kagathi_Chan
Hi, If I am planning to use the procedures/packages present in an sql server in postgresql, can I do it by using pl/pgtcl feature of postgresql? If yes, What shall be my initial and major steps. I am new to postgresql , kindly help me. Thanks, Mamatha