Re: [GENERAL] data type - import problem

2012-12-17 Thread Adrian Klaver
On 12/17/2012 05:30 PM, Kirk Wythers wrote: Thanks. Is there a way to use the float4 data type for a variable when empty records contain "NA", instead of nothing? As you can see below the variable "A_TC_AVG1" has the first record filled with "NA" signifying that the record is empty? Records that

Re: [GENERAL] trouble with pg_upgrade 9.0 -> 9.1

2012-12-17 Thread Bruce Momjian
On Mon, Dec 17, 2012 at 03:33:40PM +0400, Groshev Andrey wrote: > Hello! > I'm trying to update a database from version 9.0 to 9.1 by pg_upgrade. > The test is normal, but the actual conversion fails. > This is a bug from pg_upgrade? > I just saw this in the newsletter similar error with a note tha

Re: [GENERAL] data type - import problem

2012-12-17 Thread Kirk Wythers
Thanks. Is there a way to use the float4 data type for a variable when empty records contain "NA", instead of nothing? As you can see below the variable "A_TC_AVG1" has the first record filled with "NA" signifying that the record is empty? Records that contain values will have decimal values l

Re: [GENERAL] XML Schema for PostgreSQL database

2012-12-17 Thread Edson Richter
Em 17/12/2012 20:14, Thomas Kellerer escreveu: Edson Richter wrote on 14.12.2012 00:52: I was wondering to create a tool for diagramming and database forward engineering. There are already few tools around. If you know a good diagramming tool able to database diff and forward engineering (wi

Re: [GENERAL] XML Schema for PostgreSQL database

2012-12-17 Thread Thomas Kellerer
Edson Richter wrote on 14.12.2012 00:52: I was wondering to create a tool for diagramming and database forward engineering. There are already few tools around. If you know a good diagramming tool able to database diff and forward engineering (with "ALTER ...", not "DROP and CREATE"), I would

Re: [GENERAL] data type - import problem

2012-12-17 Thread Adrian Klaver
On 12/17/2012 01:53 PM, Kirk Wythers wrote: I seem to be dealing with a data type issue when I try and import data into a new and empty database. Error Message: ERROR: date/time field value out of range: "1332471600:00:00" LINE 1: ...tc_avg25") values ('2012-03-22 21:00:00_B4WARM_A','133247160

Re: [GENERAL] XML Schema for PostgreSQL database

2012-12-17 Thread Guillaume Lelarge
On Sun, 2012-12-16 at 22:25 -0200, Edson Richter wrote: > Em 16/12/2012 20:27, Guillaume Lelarge escreveu: > > On Fri, 2012-12-14 at 14:17 -0200, Edson Richter wrote: > >> Em 14/12/2012 12:21, Merlin Moncure escreveu: > >>> On Thu, Dec 13, 2012 at 5:52 PM, Edson Richter > >>> wrote: > Em 13/

[GENERAL] data type - import problem

2012-12-17 Thread Kirk Wythers
I seem to be dealing with a data type issue when I try and import data into a new and empty database. Error Message: ERROR: date/time field value out of range: "1332471600:00:00" LINE 1: ...tc_avg25") values ('2012-03-22 21:00:00_B4WARM_A','133247160… Here are the first two rows in the files

[GENERAL] mod_auth_pgsql and Apache 2.4

2012-12-17 Thread Glen Eustace
Just wondering if anyone has had a go at updating the mod_auth_pgsql authentication module to the new access/authentication provider framework ? I have had a quick look and can't seem to decide which standard module I should try to base the modifications on. I appreciate that this is really an

Re: [GENERAL] Corrupt indexes on slave when using pg_bulkload on master

2012-12-17 Thread James Cowell
I saw that 9.1.7 was out and it had another bugfix in for WAL playback.   I installed it and ran my reproduction case and it no longer corrupts the index.   I reindexed the database I load into and did a full data load and the indexes still corrupt on the slave.   It does not appear to be related

Re: [GENERAL] PG 8.4 to 9.2 upgrade issues with ownership of large objects

2012-12-17 Thread Tom Lane
David Wall writes: > Okay, I cannot find any information on how to view the permissions for a > large object. I know that psql's \dp can be used to see the permissions > on a table, but how do I see the permissions assigned to a large object? AFAICS psql doesn't have any support for this --- y

Re: [GENERAL] PG 8.4 to 9.2 upgrade issues with ownership of large objects

2012-12-17 Thread David Wall
On 12/16/2012 6:21 PM, Tom Lane wrote: David Wall writes: On 12/16/2012 11:22 AM, Tom Lane wrote: Large objects didn't have privileges, nor owners, in 8.4. If you don't feel like fixing your apps right now, you can return to the previous behavior by setting the obscurely-named lo_compat_priv

[GENERAL] Any experience with Drobo SAN and PG?

2012-12-17 Thread Michael Nolan
I'm looking to spec a new production server for a small client and have been looking at the Drobo SAN units. Has anybody run PG on one of these yet? It looks like only the B1200i supports Linux operating systems. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make cha

Re: [GENERAL] How to remove n-first elements from array?

2012-12-17 Thread aasat
I use it for page hits aggregations, It's very fast, my arrays contains no more than 1000 elements (array_upper-array_lower <=1000) and array bounds is mapped to time. -- View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-remove-n-first-elements-from-array-tp5736765p

Re: [GENERAL] PG 8.4 to 9.2 upgrade issues with ownership of large objects

2012-12-17 Thread David Wall
On 12/16/2012 6:21 PM, Tom Lane wrote: David Wall writes: On 12/16/2012 11:22 AM, Tom Lane wrote: Large objects didn't have privileges, nor owners, in 8.4. If you don't feel like fixing your apps right now, you can return to the previous behavior by setting the obscurely-named lo_compat_priv

Re: [GENERAL] [SOLVED] Problems with a custom LOCALE

2012-12-17 Thread Tom Lane
"James B. Byrne" writes: > PG::Error: ERROR: new encoding (UTF8) is incompatible with the > encoding of the template database (LATIN1) > HINT: Use the same encoding as in the template database, or use > template0 as template. > : CREATE DATABASE "hll_th_forex_development" ENCODING = 'UTF-8' > S

Re: [GENERAL] [SOLVED] Problems with a custom LOCALE

2012-12-17 Thread James B. Byrne
On Sun, December 16, 2012 15:13, Tom Lane wrote: > "James B. Byrne" writes: PG::Error: ERROR: encoding "UTF8" does not match locale "en...@-mmm-dd.utf-8" DETAIL: The chosen LC_CTYPE setting requires encoding "LATIN1". > >> This is what I see on the host running postgresql-9.2

Re: [GENERAL] How to remove n-first elements from array?

2012-12-17 Thread Merlin Moncure
On Mon, Dec 17, 2012 at 9:02 AM, aasat wrote: > Thank you! > > More general, but that lose bounds of array > > Result is > > NOTICE: {3,4,5} > > but I want > > NOTICE: [3:5]{3,4,5} why do you want that? IMNSHO custom lower bounds arrays is a misfeature. merlin -- Sent via pgsql-general mail

Re: [GENERAL] How to remove n-first elements from array?

2012-12-17 Thread aasat
Thank you! More general, but that lose bounds of array Result is NOTICE: {3,4,5} but I want NOTICE: [3:5]{3,4,5} -- View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-remove-n-first-elements-from-array-tp5736765p5736894.html Sent from the PostgreSQL - genera

Re: [GENERAL] problem with large inserts

2012-12-17 Thread Kevin Grittner
Chris Angelico wrote: >> I never heard of a raidle. What is that? > Google showed up this: > > http://www.techrepublic.com/article/non-standard-raid-levels-primer-raid-1e/6181460 > > Seems it's "raid 10 for odd numbers of disks". Ah, thanks! I missed it when I searched because I mis-scanned it

Re: [GENERAL] problem with large inserts

2012-12-17 Thread Chris Angelico
On Tue, Dec 18, 2012 at 12:22 AM, Kevin Grittner wrote: > Lutz Fischer wrote: > >> I am running postgresql 9.2 on a windows 2008 R2 server with 256 GB and >> the database is on something like a raid 1+0 (actually a raid1e) >> consisting of 3x4TB disks (limit of what could easily be fitted into the

[GENERAL] Re: [COMMITTERS] pgsql: Allow a streaming replication standby to follow a timeline switc

2012-12-17 Thread hubert depesz lubaczewski
On Mon, Dec 17, 2012 at 02:01:20PM +0200, Heikki Linnakangas wrote: > Hmm, is it possible that some WAL was generated in the old master, > and streamed to the standby, after the new master was already > promoted? It's important to kill the old master before promoting the > new master. Otherwise the

Re: [GENERAL] How to remove n-first elements from array?

2012-12-17 Thread Merlin Moncure
On Mon, Dec 17, 2012 at 3:27 AM, aasat wrote: > I found solution > > do $$ > declare > v_array integer[] := array[1,2,3,4,5]; > v_array2 integer[]; > v_delete_elements integer :=2; > v_new_index integer; > begin > v_new_index := array_lower(v_array, 1) + v_delete_elements; > > v_array2

Re: [GENERAL] problem with large inserts

2012-12-17 Thread Kevin Grittner
Lutz Fischer wrote: > I am running postgresql 9.2 on a windows 2008 R2 server with 256 GB and > the database is on something like a raid 1+0 (actually a raid1e) > consisting of 3x4TB disks (limit of what could easily be fitted into the > server). I never heard of a raidle. What is that? What sort

[GENERAL] Re: [COMMITTERS] pgsql: Allow a streaming replication standby to follow a timeline switc

2012-12-17 Thread Heikki Linnakangas
On 15.12.2012 17:06, hubert depesz lubaczewski wrote: I might be missing something, but what exactly does that commit give us? I mean - we were able, previously, to make slave switch to new master - as Phil Sorber described in here: http://philsorber.blogspot.com/2012/03/what-to-do-when-your-tim

[GENERAL] trouble with pg_upgrade 9.0 -> 9.1

2012-12-17 Thread Groshev Andrey
Hello! I'm trying to update a database from version 9.0 to 9.1 by pg_upgrade. The test is normal, but the actual conversion fails. This is a bug from pg_upgrade? I just saw this in the newsletter similar error with a note that it has been fixed in 9.1.2, but I already install 9.1.7. My environmen

Re: [GENERAL] problem with large inserts

2012-12-17 Thread aasat
First try put inserts to temporary table, a then insert from temporary to your table -- View this message in context: http://postgresql.1045698.n5.nabble.com/problem-with-large-inserts-tp5736844p5736867.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via p

Re: [GENERAL] How to remove n-first elements from array?

2012-12-17 Thread aasat
I found solution do $$ declare v_array integer[] := array[1,2,3,4,5]; v_array2 integer[]; v_delete_elements integer :=2; v_new_index integer; begin v_new_index := array_lower(v_array, 1) + v_delete_elements; v_array2 := array_fill(v_array[v_new_index], ARRAY[1], ARRAY[v_new_index])

Re: [GENERAL] problem with large inserts

2012-12-17 Thread Albe Laurenz
Lutz Fischer wrote: > I have currently some trouble with inserts into a table > > INSERT INTO LPP (PPID, LID) > SELECT DISTINCT PPid, LID FROM > (SELECT * FROM PP WHERE s_id = sid) pp > INNER JOIN > has_protein hp1 > ON pp.p1id = hp1.pid > INNER