Re: [GENERAL] Saving score of 3 players into a table

2011-10-25 Thread Gavin Flower
On 26/10/11 08:32, Alexander Farber wrote: Hello, I'm trying to save results of card game with 3 players into a table. It is bad enough, that I had to introduce 3 columns for user ids: id0, id1, id2 and 3 columns for their scores: money0, money1, money2 - create table pref_results (

Re: [GENERAL] Saving score of 3 players into a table

2011-10-25 Thread Gavin Flower
On 26/10/11 08:32, Alexander Farber wrote: Hello, I'm trying to save results of card game with 3 players into a table. It is bad enough, that I had to introduce 3 columns for user ids: id0, id1, id2 and 3 columns for their scores: money0, money1, money2 - create table pref_results (

Re: [GENERAL] Large Rows

2011-10-25 Thread Royce Ausburn
On 26/10/2011, at 1:17 PM, Lee Hachadoorian wrote: > I need some advice on storing/retrieving data in large rows. Invariably > someone points out that very long rows are probably poorly normalized, but I > have to deal with how to store a dataset which cannot be changed, > specifically the ~23

Re: [GENERAL] Large Rows

2011-10-25 Thread David Johnston
On Oct 25, 2011, at 22:17, Lee Hachadoorian wrote: > I need some advice on storing/retrieving data in large rows. Invariably > someone points out that very long rows are probably poorly normalized, but I > have to deal with how to store a dataset which cannot be changed, > specifically the ~23

[GENERAL] Large Rows

2011-10-25 Thread Lee Hachadoorian
I need some advice on storing/retrieving data in large rows. Invariably someone points out that very long rows are probably poorly normalized, but I have to deal with how to store a dataset which cannot be changed, specifically the ~23,000 column US Census American Community Survey. The Census

Re: [GENERAL] missing chunk 0 for toast value ...

2011-10-25 Thread Andrew Hammond
On Tue, Oct 25, 2011 at 4:53 PM, Tom Lane wrote: > Andrew Hammond writes: > > On Tue, Oct 25, 2011 at 4:11 PM, Tom Lane wrote: > >> Hmm, that's pretty interesting ... are there any nearby autovacuums of > >> pg_toast_2619? > > > Several, both before and after the error message: > > Well, it see

Re: [GENERAL] missing chunk 0 for toast value ...

2011-10-25 Thread Tom Lane
Andrew Hammond writes: > On Tue, Oct 25, 2011 at 4:11 PM, Tom Lane wrote: >> Hmm, that's pretty interesting ... are there any nearby autovacuums of >> pg_toast_2619? > Several, both before and after the error message: Well, it seems clear that somehow the vacuum deleted a toast tuple that the o

Re: [GENERAL] missing chunk 0 for toast value ...

2011-10-25 Thread Andrew Hammond
On Tue, Oct 25, 2011 at 4:11 PM, Tom Lane wrote: > Andrew Hammond writes: > > The following occur in the log file immediately before the > > error message above. > > Hmm, that's pretty interesting ... are there any nearby autovacuums of > pg_toast_2619? > Several, both before and after the erro

Re: [GENERAL] missing chunk 0 for toast value ...

2011-10-25 Thread Tom Lane
Andrew Hammond writes: > The following occur in the log file immediately before the > error message above. Hmm, that's pretty interesting ... are there any nearby autovacuums of pg_toast_2619? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postg

Re: [GENERAL] missing chunk 0 for toast value ...

2011-10-25 Thread Andrew Hammond
On Tue, Oct 25, 2011 at 2:20 PM, Tom Lane wrote: > Andrew Hammond writes: > > Oct 24 04:05:57 db-app02 postgres[24640]: [2-1] > > user=nutricate,db=admin_production ERROR: missing chunk number 0 for > > toast value > > 2411466 in pg_toast_2619 > > Hmm ... pg_toast_2619 is pg_statistic's toast t

Re: [GENERAL] writing a foreign data wrapper for hdfs, but getting and undefined symbol error for hdfsConnect

2011-10-25 Thread Tom Lane
"Rob_pg" writes: > Thanks for the tip, I altered the gcc invocation as follows: > Here are the two gcc invocations originally creating the shared library: > gcc -Wall -fPIC -c mylibrary.c -o mylibrary.o \ > -I $(A) -I $(B) -I $(C) -I $(E) -lhdfs > gcc -I $(A) -I $(B) -I $(C) -I $(E) -sh

[GENERAL] explicit deadlock-victim-priority mechanism

2011-10-25 Thread david.sahagian
ref = [ e1qzdjc-xv...@gemulon.postgresql.org ] I note with interest that [deadlock_timeout] can be used as . . . "a poor-man's deadlock priority mechanism: a transaction with a high [deadlock_timeout] is less likely to be chosen as the victim than one with a low [deadlock_timeout]" I for on

Re: [GENERAL] writing a foreign data wrapper for hdfs, but getting and undefined symbol error for hdfsConnect

2011-10-25 Thread Rob_pg
Hi Tom, Thanks for the tip, I altered the gcc invocation as follows: Here are the two gcc invocations originally creating the shared library: gcc -Wall -fPIC -c mylibrary.c -o mylibrary.o \ -I $(A) -I $(B) -I $(C) -I $(E) -lhdfs gcc -I $(A) -I $(B) -I $(C) -I $(E) -shared\ -Wl,-soname,m

Re: [GENERAL] missing chunk 0 for toast value ...

2011-10-25 Thread Tom Lane
Andrew Hammond writes: > Oct 24 04:05:57 db-app02 postgres[24640]: [2-1] > user=nutricate,db=admin_production ERROR: missing chunk number 0 for > toast value > 2411466 in pg_toast_2619 Hmm ... pg_toast_2619 is pg_statistic's toast table. Is this 9.0.x, and are you by any chance in the habit of

Re: [GENERAL] missing chunk 0 for toast value ...

2011-10-25 Thread Merlin Moncure
On Tue, Oct 25, 2011 at 3:47 PM, Andrew Hammond wrote: > I found the following error message in my logfiles. > Oct 24 04:05:57 db-app02 postgres[24640]: [2-1] > user=nutricate,db=admin_production ERROR:  missing chunk number 0 > for toast value 2411466 in pg_toast_2619 > Oct 24 04:05:57 db-app02 p

[GENERAL] missing chunk 0 for toast value ...

2011-10-25 Thread Andrew Hammond
I found the following error message in my logfiles. Oct 24 04:05:57 db-app02 postgres[24640]: [2-1] user=nutricate,db=admin_production ERROR: missing chunk number 0 for toast value 2411466 in pg_toast_2619 Oct 24 04:05:57 db-app02 postgres[24640]: [2-2] user=nutricate,db=admin_production STATEMEN

Re: [GENERAL] writing a foreign data wrapper for hdfs, but getting and undefined symbol error for hdfsConnect

2011-10-25 Thread Tom Lane
"Rob_pg" writes: > I've been working on creating a foreign data wrapper for hdfs on using > version > 9.1.0. This is my first time creating C functions against postgres, so > hopefully this falls under the 'newbie' category and is easy to solve. > The source code code does compile resulting in

[GENERAL] writing a foreign data wrapper for hdfs, but getting and undefined symbol error for hdfsConnect

2011-10-25 Thread Rob_pg
I've been working on creating a foreign data wrapper for hdfs on using version 9.1.0. This is my first time creating C functions against postgres, so hopefully this falls under the 'newbie' category and is easy to solve. The source code code does compile resulting in a shared library: file myli

Re: [GENERAL] Saving score of 3 players into a table

2011-10-25 Thread Michael Glaesemann
On Oct 25, 2011, at 15:32, Alexander Farber wrote: > Hello, > > I'm trying to save results of card game with 3 players into a table. > > It is bad enough, that I had to introduce > 3 columns for user ids: id0, id1, id2 and > 3 columns for their scores: money0, money1, money2 - > >creat

Re: [GENERAL] Saving score of 3 players into a table

2011-10-25 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Alexander Farber Sent: Tuesday, October 25, 2011 3:33 PM To: pgsql-general Subject: [GENERAL] Saving score of 3 players into a table Hello, I'm trying to save results of ca

[GENERAL] Saving score of 3 players into a table

2011-10-25 Thread Alexander Farber
Hello, I'm trying to save results of card game with 3 players into a table. It is bad enough, that I had to introduce 3 columns for user ids: id0, id1, id2 and 3 columns for their scores: money0, money1, money2 - create table pref_results ( id0 varchar(32) references pref

Re: [GENERAL] Problem installing PostgreSQL 9.0 via Macports on OS X Server 10.6

2011-10-25 Thread Basil Bourque
> By default the postgres user's group is 'daemon' on my Mac. This is probably > true for you as well. Change occurrences of 'postgres:postgres' in your > chown commands to 'postgres:daemon'. For what it's worth, here's the user groups and permissions I see on my Mac. I used the installer fro

Re: [GENERAL] strange java query behaviour

2011-10-25 Thread Tom Lane
Marti Raudsepp writes: > The documentation says: The view schemata contains all schemas in the > current database that are owned by a currently enabled role. > In other words: this view only displays schemas that are *owned* by > your user, or roles that your current user inherits from (superuser

[GENERAL] GPU and pgcrypto

2011-10-25 Thread Wim Bertels
Gc, For passwords the use of http://www.postgresql.org/docs/8.4/interactive/pgcrypto.html is advised. But what about GPU cracking? Is crypt-bf/8 strong enough? cf bcrypt in php: http://stackoverflow.com/questions/6791126/how-is-bcrypt-more-future-proof-than-increasing-the-number-of-sha-iteratio

Re: [GENERAL] strange java query behaviour

2011-10-25 Thread Szymon Guz
On 25 October 2011 17:04, Marti Raudsepp wrote: > On Mon, Oct 24, 2011 at 23:23, Szymon Guz wrote: > > String query1 = "SELECT * FROM information_schema.schemata WHERE > schema_name = ?"; > > > When I query the database using psql, both queries return sensible data > > (even when I prepare state

Re: [GENERAL] strange java query behaviour

2011-10-25 Thread Marti Raudsepp
On Mon, Oct 24, 2011 at 23:23, Szymon Guz wrote: > String query1 = "SELECT * FROM information_schema.schemata WHERE schema_name > = ?"; > When I query the database using psql, both queries return sensible data > (even when I prepare statements in postgres). > I'd like to use information_schema r

Re: [GENERAL] unnest and string_to_array on two columns

2011-10-25 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Michael Graham Sent: Tuesday, October 25, 2011 4:36 AM To: pgsql-general@postgresql.org Subject: [GENERAL] unnest and string_to_array on two columns Hi all, I'm trying to

Re: [GENERAL] Primary key Index Error

2011-10-25 Thread Merlin Moncure
On Tue, Oct 25, 2011 at 2:41 AM, Raghavendra wrote: > On Tue, Oct 25, 2011 at 11:40 AM, Manoj K P wrote: >> >> Server log Oct 1 00:06:59 server_host_name postgres[1453]: [5-1] >> 2011-10-01 00:06:59.831 EDT 1453 4e869041.5ad postgres [local] postgres LOG: >> duration: 418583.238 ms statement: sel

Re: [GENERAL] List Permissions

2011-10-25 Thread Maton, Brett
Bingo! Thanks very much On 25 October 2011 13:47, Raghavendra wrote: > On Tue, Oct 25, 2011 at 6:04 PM, Maton, Brett wrote: > >> Thanks for the replies. >> Actually this was question posed by one of my colleagues, what he really >> wants to know is if there is the equivalent of MySQL's >> >>

Re: [GENERAL] List Permissions

2011-10-25 Thread Raghavendra
On Tue, Oct 25, 2011 at 6:04 PM, Maton, Brett wrote: > Thanks for the replies. > Actually this was question posed by one of my colleagues, what he really > wants to know is if there is the equivalent of MySQL's > > select * from all_tab_privs_recd where grantee = 'your user' > > Thanks again, >

Re: [GENERAL] List Permissions

2011-10-25 Thread Maton, Brett
Thanks for the replies. Actually this was question posed by one of my colleagues, what he really wants to know is if there is the equivalent of MySQL's select * from all_tab_privs_recd where grantee = 'your user' Thanks again, Brett On 25 October 2011 13:21, Venkat Balaji wrote: > My answers

Re: [GENERAL] List Permissions

2011-10-25 Thread Venkat Balaji
My answers are in line in RED - How can I list a users permissions table by table? > > i.e. User Joe > has read/write on table1 > has read on table2 > no access on table 3 > For a particular user you can use below function. You can write a SQL query or script which takes table names from

Re: [GENERAL] List Permissions

2011-10-25 Thread Raghavendra
Forgot to post the reference manual link. Here you go. http://www.postgresql.org/docs/9.0/static/sql-grant.html --- Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/ On Tue, Oct 25, 2011 at 5:21 PM, Raghavendra < raghavendra@enterprisedb.com> wrote: > You ca

Re: [GENERAL] hi, friends. are there any performance tuning materials for postgreSQL recommended?

2011-10-25 Thread Scott Marlowe
On Mon, Oct 24, 2011 at 9:38 PM, Craig Ringer wrote: > On 25/10/11 11:00, sunpeng wrote: > > Hi, friends. >  Are there any performance tuning resouces for postgreSQL recommended, such > as ppt, books or articles? > Thanks! > peng > > http://wiki.postgresql.org/wiki/Performance_Optimization > > htt

Re: [GENERAL] List Permissions

2011-10-25 Thread Raghavendra
You can get it from psql terminal. postgres=# \z table-name --- Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/ On Tue, Oct 25, 2011 at 4:50 PM, Maton, Brett wrote: > Hi, > > How can I list a users permissions table by table? > > i.e. User Joe > has rea

[GENERAL] List Permissions

2011-10-25 Thread Maton, Brett
Hi, How can I list a users permissions table by table? i.e. User Joe has read/write on table1 has read on table2 no access on table 3 Or something Thanks for any help!

Re: [GENERAL] PostGIS in a commercial project

2011-10-25 Thread Thomas Kellerer
Mark Cave-Ayland, 25.10.2011 12:51: As Robert has suggested, you have misunderstood the GPL license - if you make changes to the *PostGIS* source code AND you distribute the modified code to your customer (rather than offering a managed service), you would need to make the changes available to yo

Re: [GENERAL] PostGIS in a commercial project

2011-10-25 Thread John R Pierce
On 10/25/11 3:51 AM, Mark Cave-Ayland wrote: As Robert has suggested, you have misunderstood the GPL license - if you make changes to the *PostGIS* source code AND you distribute the modified code to your customer (rather than offering a managed service), you would need to make the changes avai

Re: [GENERAL] PostGIS in a commercial project

2011-10-25 Thread Mark Cave-Ayland
On -10/01/37 20:59, Thomas Kellerer wrote: Now PostGIS is licensed under the GPL and I wonder if we can use it in a commercial (customer specific) project then. The source code will not be made open source, but of course the customer will get the source code. Is it still OK to use the GPL licen

Re: [GENERAL] Help with copy (loading TSV file into table as text)

2011-10-25 Thread Albe Laurenz
Allan Kamau wrote: > #COPY a.t(raw_data)FROM '/data/tmp/t.txt' WITH FORMAT text; > > yields "ERROR: syntax error at or near "FORMAT" You'll have to use the syntax as documented: COPY ... FROM ... WITH (FORMAT 'text'); Yours, Laurenz Albe -- Sent via pgsql-general mailing list (pgsql-general@

[GENERAL] unnest and string_to_array on two columns

2011-10-25 Thread Michael Graham
Hi all, I'm trying to migrate an old (and sucky) schema to a new one and I'm having some difficulties coming up with a sane select. I have basically id, a, and b where a and b contain a list of flags like id | a| b | 1 | abc | abcdef | and what to convert this to

Re: [GENERAL] Primary key Index Error

2011-10-25 Thread Raghavendra
On Tue, Oct 25, 2011 at 11:40 AM, Manoj K P wrote: > *Server log* Oct 1 00:06:59 server_host_name postgres[1453]: [5-1] > 2011-10-01 00:06:59.831 EDT 1453 4e869041.5ad postgres [local] postgres LOG: > duration: 418583.238 ms statement: select pg_start_backup('fortnightly'); > Oct 2 03:03:18 serve

Re: [GENERAL] Can someone help explain what's going on from the attached logs?

2011-10-25 Thread Simon Riggs
On Tue, Oct 18, 2011 at 6:39 PM, Samuel Hwang wrote: > The log is getting from PostgreSQL 9.0.4 > Basically we set up streaming replication hot-standby slave while master is > under heavy load > The slave started but not accepting read-only queries, > every request will trigger the "FATAL:  the d