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

2011-09-16 Thread Andy Colson
On 09/16/2011 04:42 PM, Rich Shepard wrote: On Thu, 15 Sep 2011, Andy Colson wrote: First you need to trim the \n and spaces: andy=# insert into junk values (E'GW-22'); INSERT 0 1 andy=# insert into junk values (E'GW-22 \n'); INSERT 0 1 andy=# insert into junk values (E'GW-22 \n'); Andy, He

Re: [GENERAL] Arrays

2011-09-16 Thread Marti Raudsepp
On Wed, Sep 14, 2011 at 21:05, Fabrízio de Royes Mello wrote: > postgres@bdteste=# SELECT array_upper(ARRAY['foo', 'bar'], 1); On Wed, Sep 14, 2011 at 21:09, Merlin Moncure wrote: > select count(*) from unnest(_array_); On Wed, Sep 14, 2011 at 21:15, Steve Crawford wrote: > Look at array_dims,

Re: RES: [GENERAL] Foreign PostgreSQL server

2011-09-16 Thread Adrian Klaver
On Friday, September 16, 2011 4:03:03 pm Edson Carlos Ericksson Richter wrote: > Ok, managed to get the first part working: > > --- > create extension dblink; > CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_v

Re: [GENERAL] How to get Transaction Timestamp ?

2011-09-16 Thread Marti Raudsepp
On Fri, Sep 16, 2011 at 21:39, Raghavendra wrote: > We can get a Transaction ID, but not the transaction timestamp when it > performed. Short answer: You can't. Instead, add a new "timestamptz default now()" column, that will get you the time of the insert. If you want the update time, create a

[GENERAL]

2011-09-16 Thread Tareq Tajkeh
http://drpersoff.com/invitation.html";>http://drpersoff.com/invitation.html

Re: [GENERAL] Indexes not allowed on (read-only) views: Why?

2011-09-16 Thread Craig Ringer
On 09/17/2011 05:47 AM, Stefan Keller wrote: A (read-only) view should behave like a table, right? CREATE INDEX t1_idx ON t1 (rem); ERROR: »v1« not a table SQL state: 42809 => Why should'nt it be possible to create indexes on views in PG? It's not so much that it's not allowed, as that it'

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

2011-09-16 Thread Rich Shepard
On Fri, 16 Sep 2011, Rich Shepard wrote: Scrolling through the table with rows ordered by date and chemical I find no duplicates ... so far. However, what I do find is that the above did not work: Turns out there was 1 duplicate. Reading the psql man page and making an error in the \copy co

RES: [GENERAL] Foreign PostgreSQL server

2011-09-16 Thread Edson Carlos Ericksson Richter
Ok, managed to get the first part working: --- create extension dblink; CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_validator; CREATE SERVER simfrete02 FOREIGN DATA WRAPPER postgresql OPTIONS (host '127.0.0

[GENERAL] Foreign PostgreSQL server

2011-09-16 Thread Edson Carlos Ericksson Richter
Hi! Sorry if this was already asked. My platform: Win7, PostgreSQL 9.1 64bit installed using EnterpriseDB package. I’m trying to setup a bunch of foreign PostgreSQL servers, but whenever I execute the script below, I get errors: --

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

2011-09-16 Thread Rich Shepard
On Thu, 15 Sep 2011, Andy Colson wrote: Trim it up: andy=# select '['|| rtrim(trim(trailing E'\n' from a)) || ']' from junk; Andy, Scrolling through the table with rows ordered by date and chemical I find no duplicates ... so far. However, what I do find is that the above did not work: GW

Re: [GENERAL] Indexes not allowed on (read-only) views: Why?

2011-09-16 Thread Merlin Moncure
On Fri, Sep 16, 2011 at 4:47 PM, Stefan Keller wrote: > A (read-only) view should behave like a table, right? > >> CREATE INDEX t1_idx ON t1 (rem); > ERROR: »v1« not a table > SQL state: 42809 > > => Why should'nt it be possible to create indexes on views in PG? > > An index on a view can speed up

[GENERAL] Indexes not allowed on (read-only) views: Why?

2011-09-16 Thread Stefan Keller
A (read-only) view should behave like a table, right? > CREATE INDEX t1_idx ON t1 (rem); ERROR: »v1« not a table SQL state: 42809 => Why should'nt it be possible to create indexes on views in PG? An index on a view can speed up access to the tuples underlying. And "indexed views" could be a meth

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

2011-09-16 Thread Rich Shepard
On Thu, 15 Sep 2011, Andy Colson wrote: First you need to trim the \n and spaces: andy=# insert into junk values (E'GW-22'); INSERT 0 1 andy=# insert into junk values (E'GW-22 \n'); INSERT 0 1 andy=# insert into junk values (E'GW-22 \n'); Andy, Here's what worked for me: nevada=# \

Re: [GENERAL] Log message " last_statrequest ... is later than collector's time" - what does it mean?

2011-09-16 Thread Tom Lane
Stephan Vollmer writes: >>> 2011-09-16 13:48:54 CEST: LOG:  last_statrequest 2011-09-16 >>> 13:48:55.890743+02 is later than collector's time 2011-09-16 >>> 13:48:54.614476+02 > is there a way to filter these log messages other than setting > "log_min_messages" to "fatal" which is not really desi

Re: [GENERAL] Log message " last_statrequest ... is later than collector's time" - what does it mean?

2011-09-16 Thread Stephan Vollmer
On Fri, Sep 16, 2011 at 19:16, Tom Lane wrote: > > Stephan Vollmer writes: > > I upgraded our test database from PostgreSQL 8.4.8 to 9.0.4 via pg_dumpall. > > The database seems to work fine, but now the logfile of the new database is > > flooded with log messages like these: > > > 2011-09-16 13:

[GENERAL] CUDA Sorting

2011-09-16 Thread Vitor Reus
Hello everyone, I'm implementing a CUDA based sorting on PostgreSQL, and I believe it can improve the ORDER BY statement performance in 4 to 10 times. I already have a generic CUDA sort that performs around 10 times faster than std qsort. I also managed to load CUDA into pgsql. Since I'm new to p

[GENERAL] How to get Transaction Timestamp ?

2011-09-16 Thread Raghavendra
Respected All, Can we get the transaction timestamp for INSERT/UPDATE/DELETE ran against table in the database ? postgres=# create table trx_test(id int, name char(30)); CREATE TABLE postgres=# insert into trx_test VALUES (1,'AAA'); INSERT 0 1 postgres=# insert into trx_test VALUES (2,'BBB'); INS

Re: [GENERAL] Log duration and statement for slow queries + limiting the number of log files generated

2011-09-16 Thread Alec Swan
Thanks, I got duration logging to work the way I wanted. I will look into logrotate next. On Fri, Sep 16, 2011 at 11:22 AM, Thom Brown wrote: > On 16 September 2011 18:16, Alec Swan wrote: >> Hello, >> >> I am trying to get postgres 8.4.4 to log the duration and statement of >> queries that take

Re: [GENERAL] Log duration and statement for slow queries + limiting the number of log files generated

2011-09-16 Thread Thom Brown
On 16 September 2011 18:16, Alec Swan wrote: > Hello, > > I am trying to get postgres 8.4.4 to log the duration and statement of > queries that take longer than 200 ms. I played with the log settings > in postgresql.conf but I still see logs of durations of very fast > statements. Here is my curre

Re: [GENERAL] Log duration and statement for slow queries + limiting the number of log files generated

2011-09-16 Thread Guillaume Lelarge
On Fri, 2011-09-16 at 11:16 -0600, Alec Swan wrote: > Hello, > > I am trying to get postgres 8.4.4 to log the duration and statement of > queries that take longer than 200 ms. I played with the log settings > in postgresql.conf but I still see logs of durations of very fast > statements. Here is m

Re: [GENERAL] Log message " last_statrequest ... is later than collector's time" - what does it mean?

2011-09-16 Thread Tom Lane
Stephan Vollmer writes: > I upgraded our test database from PostgreSQL 8.4.8 to 9.0.4 via pg_dumpall. > The database seems to work fine, but now the logfile of the new database is > flooded with log messages like these: > 2011-09-16 13:48:54 CEST: LOG: last_statrequest 2011-09-16 > 13:48:55.8907

[GENERAL] Log duration and statement for slow queries + limiting the number of log files generated

2011-09-16 Thread Alec Swan
Hello, I am trying to get postgres 8.4.4 to log the duration and statement of queries that take longer than 200 ms. I played with the log settings in postgresql.conf but I still see logs of durations of very fast statements. Here is my current configuration: log_min_duration_statement = 200 log_d

Re: [GENERAL] Log Apply Delay

2011-09-16 Thread Merlin Moncure
On Fri, Sep 16, 2011 at 10:53 AM, Thom Brown wrote: > On 16 September 2011 16:41, Ian Harding wrote: >> On Fri, Sep 16, 2011 at 8:35 AM, hubert depesz lubaczewski >> wrote: >>> On Fri, Sep 16, 2011 at 08:02:31AM -0700, Ian Harding wrote: Oracle has a configuration option for its version of

Re: [GENERAL] forcing table ownership

2011-09-16 Thread Darin Perusich
Hi Richard, > -Original Message- > From: Richard Huxton [mailto:d...@archonet.com] > Sent: Friday, September 16, 2011 9:54 AM > To: Darin Perusich > Cc: Richard Broersma; pgsql-general@postgresql.org > Subject: Re: [GENERAL] forcing table ownership > > On 16/09/11 14:13, Darin Perusich wr

Re: [GENERAL] different unnest function

2011-09-16 Thread Merlin Moncure
2011/9/16 David Johnston : > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Ondrej Ivanic > Sent: Friday, September 16, 2011 12:54 AM > To: pgsql-general@postgresql.org general > Subject: [GENERAL] different unnest f

Re: [GENERAL] Log Apply Delay

2011-09-16 Thread Thom Brown
On 16 September 2011 16:41, Ian Harding wrote: > On Fri, Sep 16, 2011 at 8:35 AM, hubert depesz lubaczewski > wrote: >> On Fri, Sep 16, 2011 at 08:02:31AM -0700, Ian Harding wrote: >>> Oracle has a configuration option for its version of hot standby >>> (DataGuard) that lets you specify a time ba

Re: [GENERAL] Steps to use pl/pgtcl

2011-09-16 Thread Ian Harding
If you install using a package manager, you might only have to install the postgresql-pltcl (or similarly named) package, then do createlang pltcl mydatabase from the command line and you are ready to go. If you build from source, you have to worry about prerequisites yourself. On Thu, Sep 15,

Re: [GENERAL] Log Apply Delay

2011-09-16 Thread Ian Harding
On Fri, Sep 16, 2011 at 8:35 AM, hubert depesz lubaczewski wrote: > On Fri, Sep 16, 2011 at 08:02:31AM -0700, Ian Harding wrote: >> Oracle has a configuration option for its version of hot standby >> (DataGuard) that lets you specify a time based delay in applying logs. >>  They get transferred ri

Re: [GENERAL] Log Apply Delay

2011-09-16 Thread hubert depesz lubaczewski
On Fri, Sep 16, 2011 at 08:02:31AM -0700, Ian Harding wrote: > Oracle has a configuration option for its version of hot standby > (DataGuard) that lets you specify a time based delay in applying logs. > They get transferred right away, but changes in them are only applied > as they reach a certain

Re: [GENERAL] Log Apply Delay

2011-09-16 Thread Guillaume Lelarge
On Fri, 2011-09-16 at 08:02 -0700, Ian Harding wrote: > Oracle has a configuration option for its version of hot standby > (DataGuard) that lets you specify a time based delay in applying logs. > They get transferred right away, but changes in them are only applied > as they reach a certain age.

[GENERAL] Log Apply Delay

2011-09-16 Thread Ian Harding
Oracle has a configuration option for its version of hot standby (DataGuard) that lets you specify a time based delay in applying logs. They get transferred right away, but changes in them are only applied as they reach a certain age. The idea is that if something horrible happens on the master,

Re: [GENERAL] PostgreSQL benchmarked on XFS vs ZFS vs btrfs vs ext4

2011-09-16 Thread Vick Khera
On Wed, Sep 14, 2011 at 11:18 PM, Toby Corkindale wrote: > The zpool was created against an LVM logical volume (which was the same one > used for all the filesystems measured in the tests). That LV was itself part > of a volume group that was striped over three disks (Western Digital > WD1003FBYX)

Re: [GENERAL] different unnest function

2011-09-16 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Ondrej Ivanic Sent: Friday, September 16, 2011 12:54 AM To: pgsql-general@postgresql.org general Subject: [GENERAL] different unnest function Hi, I need function which unn

Re: [GENERAL] PostgreSQL benchmarked on XFS vs ZFS vs btrfs vs ext4

2011-09-16 Thread Vick Khera
On Tue, Sep 13, 2011 at 9:15 PM, Toby Corkindale wrote: > However we have a new contender - ZFS performed *extremely* well on the > latest Ubuntu setup - achieving triple the performance of regular ext4! Did you do any tuning to ZFS? There are many tweaks to it, like putting a cache disk in fron

Re: [GENERAL] Noob help for charting on web site, need assistance

2011-09-16 Thread Vick Khera
On Wed, Sep 14, 2011 at 5:56 PM, Greg Howard wrote: > Flot, Open Flash Chart, AmCharts, Emprise JavaScript Charts, PlotKit, Flotr, > PHP/SWF Charts, Visifire, FusionCharts, and JFreeChart. > We've used AmCharts with great success. Flaw is that it is flash, and doesn't show up on the ipad. We a

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

2011-09-16 Thread Marc Mamin
>>> On Thu, Sep 15, 2011 at 7:29 AM, Marc Mamin wrote: >>> I miss a discussion place for feature wishes. (Is there one ?) > From: Josh Kupershmidt > Maybe it could look like this: > http://wiki.audacityteam.org/wiki/Feature_Requests Yes this fit very well my conception of such a place. regar

Re: [GENERAL] forcing table ownership

2011-09-16 Thread Richard Huxton
On 16/09/11 14:13, Darin Perusich wrote: Altering the table owner by setting it to the group role effectively denies permission to all users of the group. Unless they explicitly "SET role grp1" that is. I've already got a user "richardh" As a superuser: CREATE GROUP mygroup INHERIT; GRANT

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

2011-09-16 Thread Josh Kupershmidt
On Thu, Sep 15, 2011 at 12:16 PM, Adam Cornett wrote: > 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). > On Thu, Sep 15, 2011 at 7:29 AM, Marc Mamin wrote: >> I miss a discussio

Re: [GENERAL] Alternative JDBC driver

2011-09-16 Thread Radosław Smogura
On Tue, 13 Sep 2011 10:18:46 +0200, Jimmy K. wrote: Hello, I asked this question on JDBC list, but it seems "dead". I found alternative JDBC driver marked as Beta 2 (actually last time bumped to Beta 2.1) http://softperience.eu/pages/cmn/ngpgjdbc.xhtml. We still test it. Those features are, mai

Re: [GENERAL] CUBE, ROLLUP, GROUPING SETS?

2011-09-16 Thread marc_firth
Apologies for raising this thread back from the dead - Zombie thread if you like! Very interested in the Rollup and Cube OLAP fuinctions :) Does anyone know where this todo is in current plans. I've searched the archives but the last patch I could find was from 2008... Marc -- View this mes

Re: [GENERAL] Remote connection shows localhost databases

2011-09-16 Thread Jeff Adams
Thanks Guillaume and Richard. I removed the server from the host name field and entered only the IP address. I then edited my pg_hba.conf, adding the IP address and it worked! I appreciate all of your help. Jeff > > Thanks for the response Richard. I have tried to connect via pgAdminIII. > Wh

Re: [GENERAL] forcing table ownership

2011-09-16 Thread Darin Perusich
Hi Richard, > > 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 running into is that is user1 creates table1 nobody else has > > permissions to it since they are not the table owner. How can

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

2011-09-16 Thread Merlin Moncure
2011/9/16 Grzegorz Jaśkiewicz : > Is anyone actually working on Postgres-R ? Last git commit was in January > 2011. > What are the chances of it getting integrated with the core, which it > is probably targeted for ? > > If I picked it up, and tried to make usable for my own needs - instead > of i

Re: [GENERAL] forcing table ownership

2011-09-16 Thread Darin Perusich
> -Original Message- > From: Andy Colson [mailto:a...@squeakycode.net] > Sent: Thursday, September 15, 2011 7:51 PM > To: Darin Perusich > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] forcing table ownership > > On 09/15/2011 04:31 PM, Darin Perusich wrote: > > Hi Andy, > > >

[GENERAL] Log message " last_statrequest ... is later than collector's time" - what does it mean?

2011-09-16 Thread Stephan Vollmer
Hi, I upgraded our test database from PostgreSQL 8.4.8 to 9.0.4 via pg_dumpall. The database seems to work fine, but now the logfile of the new database is flooded with log messages like these: 2011-09-16 13:48:32 CEST: LOG: database system was shut down at 2011-09-16 13:48:29 CEST 2011-09-16 13

Re: [GENERAL] Remote connection shows localhost databases

2011-09-16 Thread Richard Huxton
On 15/09/11 22:40, Guillaume Lelarge wrote: On Thu, 2011-09-15 at 15:30 -0400, Jeff Adams wrote: When I try to connect to the remote machine, I enter \\\ into the host name field. The host field should contain the socket complete path, or the host name, or the ip address. As Guillaume says

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

2011-09-16 Thread Toby Corkindale
On 16/09/11 12:43, adebarros wrote: 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/p

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

2011-09-16 Thread Thomas Kellerer
Craig Ringer, 16.09.2011 05:02: On 15/09/2011 4:18 PM, Thomas Kellerer wrote: I ran another install and monitored what the process was doing and it *is* recursively touching all files on my harddisk when icacls C:\ /grant "tkellerer":RX is called. Even without the /t switch. That's a worry.

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

2011-09-16 Thread Alban Hertroys
> > Caused by: org.postgresql.util.PSQLException: ERROR: column "docdta" is of > type bytea but expression is of type oid > Hint: You will need to rewrite or cast the expression." > Looks like that table has a column of type BYTEA, while the code expects it to be a LOB. Perhaps the easiest fix i

Re: [GENERAL] PostgreSQL 9.1.0 bug?

2011-09-16 Thread Harald Fuchs
In article <21641.1316159...@sss.pgh.pa.us>, Tom Lane writes: > Harald Fuchs writes: >> I think I've found a bug either in PostgreSQL 9.1.0 or in the ip4r >> package (version 1.05). > Good catch --- gistendscan is forgetting to free so->giststate. Confirmed - adding a "pfree(so->giststate)" so

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

2011-09-16 Thread Craig Ringer
On 15/09/2011 4:18 PM, Thomas Kellerer wrote: I ran another install and monitored what the process was doing and it *is* recursively touching all files on my harddisk when icacls C:\ /grant "tkellerer":RX is called. Even without the /t switch. That's a worry. I verified this using Proces

[GENERAL] different unnest function

2011-09-16 Thread Ondrej Ivanič
Hi, I need function which unnest array in a different way. Input table has ineger[][] column: col1 -- {{1,2,3,4}, {5,6,7,8}, {9, 10, 11, 12}} {{11,12,13,14}, {15,16,17,18}, {19, 110, 111, 112}} ... and output should be: select unnest2(col1) from T unnest2 - {1,2,3,4} {5,6

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

2011-09-16 Thread Jayadevan M
> > 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 into. large objects > no

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

2011-09-16 Thread Grzegorz Jaśkiewicz
Is anyone actually working on Postgres-R ? Last git commit was in January 2011. What are the chances of it getting integrated with the core, which it is probably targeted for ? If I picked it up, and tried to make usable for my own needs - instead of implementing trigger/log (slony like) multi mas

Re: [GENERAL] Remote connection shows localhost databases

2011-09-16 Thread Richard Huxton
On 16/09/11 09:01, Guillaume Lelarge wrote: On Fri, 2011-09-16 at 08:14 +0100, Richard Huxton wrote: Odd that pgAdmin doesn't give an error though. Probably because the OP entered the Windows networking path in the Name field, and didn't change the Host field. In which case, pgAdmin most like

Re: [GENERAL] Remote connection shows localhost databases

2011-09-16 Thread Guillaume Lelarge
On Fri, 2011-09-16 at 08:14 +0100, Richard Huxton wrote: > On 15/09/11 22:40, Guillaume Lelarge wrote: > > On Thu, 2011-09-15 at 15:30 -0400, Jeff Adams wrote: > >> > >> When I try to connect to the remote machine, I enter > >> \\\ > >> into the host name field. > > > >The host field should contai

Re: [GENERAL] PostgreSQL 9.1.0 bug?

2011-09-16 Thread Tom Lane
Harald Fuchs writes: > I think I've found a bug either in PostgreSQL 9.1.0 or in the ip4r > package (version 1.05). Good catch --- gistendscan is forgetting to free so->giststate. But it seems just as broken in 9.0 and probably before ... regards, tom lane -- Sent via p