Re: [GENERAL] How to implement autostart of postgres?

2011-07-20 Thread Craig Ringer
On 20/07/11 19:02, Gavrina, Irina wrote: > Hello All, > > > > I’ve faced with the following problem: I’m trying to implement the auto start > of postgres. My way is to use inittab: > > pg:2345:respawn:/bin/su - postgres -c "/usr/local/pgsql/bin/postmaster Are you working on some kind o

Re: [GENERAL] custom system catalog table names

2011-07-20 Thread Craig Ringer
On 21/07/11 10:49, maxxe...@gmail.com wrote: > Hi, > > How can one create a postgres build with custom system table names? > For example, instead of "pg_class", I'd like to name the table as > "foobar_class". Or instead of "pg_catalog", "foobar_catalog". > > I don't care about compatiblity with p

Re: [GENERAL] Book

2011-07-20 Thread Craig Ringer
On 21/07/11 07:31, Gavin Flower wrote: > On 21/07/11 10:45, Andrej wrote: >> Thanks all - book ordered :} >> > I wonder how much Greg has spent in bribes??? :-) Lots of time helping people out on this mailing list (for free), contributing work to Pg, etc. That's enough bribe for me. My copy is i

Re: [GENERAL] COPY TO '|gzip > /my/cool/file.gz'

2011-07-20 Thread Craig Ringer
On 21/07/11 01:59, david.sahag...@emc.com wrote: > From May 31, 2006; 12:03pm . . . > > "It struck me that we are missing a feature that's fairly common in Unix > programs. > Perhaps COPY ought to have the ability to pipe its output to a shell command, > or read input from a shell command. " > Ma

Re: [GENERAL] compile postgres with visual studio 2010

2011-07-20 Thread Craig Ringer
On 20/07/11 18:56, Sofer, Yuval wrote: > I would like to build Postgres from source with the visual studio 2010 > compiler Unless you're willing to use the patch Tom linked to, you should compile with Visual Studio 2008 or with the Microsoft Platform SDK 7.0 (Windows Vista and .NET 3.5). More te

[GENERAL] custom system catalog table names

2011-07-20 Thread maxxe...@gmail.com
Hi, How can one create a postgres build with custom system table names? For example, instead of "pg_class", I'd like to name the table as "foobar_class". Or instead of "pg_catalog", "foobar_catalog". I don't care about compatiblity with pgadmin, jdbc drivers, etc. I'd be happy just as long as I h

Re: [GENERAL] Book

2011-07-20 Thread Scott Marlowe
On Wed, Jul 20, 2011 at 4:11 PM, Andrej wrote: > Can anyone recommend "PostgreSQL 9.0 High Performance" by G. Smith? Highly recommended. I was one of Greg's reviewers and therefore read most of it ahead of time and I was still excited to get a hard copy of it. :) -- Sent via pgsql-general mail

Re: [GENERAL] How to implement autostart of postgres?

2011-07-20 Thread John R Pierce
On 07/20/11 4:02 AM, Gavrina, Irina wrote: I’ve faced with the following problem: I’m trying to implement the auto start of postgres. My way is to use inittab: pg:2345:respawn:/bin/su - postgres -c "/usr/local/pgsql/bin/postmaster -D/usr/local/pgsql/data>> /usr/local/pgsql/server.log 2>&1" /dev

Re: [GENERAL] Book

2011-07-20 Thread Steve Crawford
On 07/20/2011 04:31 PM, Gavin Flower wrote: On 21/07/11 10:45, Andrej wrote: Thanks all - book ordered :} I wonder how much Greg has spent in bribes??? :-) More seriously: I intend going through my copy in depth to get a better unbderstanding of pg. The funny thing is that at full list p

Re: [GENERAL] Book

2011-07-20 Thread Stephen Frost
* Gavin Flower (gavinflo...@archidevsys.co.nz) wrote: > On 21/07/11 10:45, Andrej wrote: > >Thanks all - book ordered :} +1 > I wonder how much Greg has spent in bribes??? :-) He's bought me a beer. :D Or maybe I him.. ;) > More seriously: I intend going through my copy in depth to get a > be

Re: [GENERAL] Programmer ( Postgres), Milwaukee - offsite-Remote - onsite

2011-07-20 Thread MS Rao
Greg, Thank you for the information. We are not aware about this. Please remove my email. We will follow the process in future. Regards, MS M.S. Rao | Director 0: 608.661.7604 I ms@symphonycorp.com Symphony Corporation A SEI

[GENERAL] How to implement autostart of postgres?

2011-07-20 Thread Gavrina, Irina
Hello All, I've faced with the following problem: I'm trying to implement the auto start of postgres. My way is to use inittab: pg:2345:respawn:/bin/su - postgres -c "/usr/local/pgsql/bin/postmaster -D/usr/local/pgsql/data >> /usr/local/pgsql/server.log 2>&1" /dev/null But this approach does

Re: [GENERAL] Another unexpected behaviour

2011-07-20 Thread Shianmiin
Thanks. That's the best reason I can think of too. "Less expensive" feels like taking shortcuts to speed up things and not a good reason to make decision on. Although maintain backward compatibility makes sense (to some extend), if old PG doesn't behave properly, it should be fixed, shouldn't i

Re: [GENERAL] Another unexpected behaviour

2011-07-20 Thread Shianmiin
Simon Riggs wrote: > > The real question is why anyone would actually perform that kind of > UPDATE. It doesn't really make much sense to increment a PK value. > > PostgreSQL is good at supporting things people want and need, so > differences do exist in places that are fairly low priority. >

Re: [GENERAL] Book

2011-07-20 Thread Gavin Flower
On 21/07/11 10:45, Andrej wrote: Thanks all - book ordered :} I wonder how much Greg has spent in bribes??? :-) More seriously: I intend going through my copy in depth to get a better unbderstanding of pg. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chang

Re: [GENERAL] Book

2011-07-20 Thread Andrej
Thanks all - book ordered :} -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Book

2011-07-20 Thread Steve Crawford
On 07/20/2011 03:29 PM, Tatsuo Ishii wrote: On Jul 20, 2011, at 18:11, Andrej wrote: Can anyone recommend "PostgreSQL 9.0 High Performance" by G. Smith? Yes. +1. -- + (another) 1 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: ht

Re: [GENERAL] Book

2011-07-20 Thread Vibhor Kumar
On Jul 21, 2011, at 3:59 AM, Tatsuo Ishii wrote: >> On Jul 20, 2011, at 18:11, Andrej wrote: >> >>> Can anyone recommend "PostgreSQL 9.0 High Performance" by G. Smith? >> >> Yes. > > +1. +1. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company Blog: http

Re: [GENERAL] Book

2011-07-20 Thread Tatsuo Ishii
> On Jul 20, 2011, at 18:11, Andrej wrote: > >> Can anyone recommend "PostgreSQL 9.0 High Performance" by G. Smith? > > Yes. +1. -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese: http://www.sraoss.co.jp -- Sent via pgsql-general mailing list (pgsql-ge

Re: [GENERAL] Book

2011-07-20 Thread Michael Glaesemann
On Jul 20, 2011, at 18:11, Andrej wrote: > Can anyone recommend "PostgreSQL 9.0 High Performance" by G. Smith? Yes. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Book

2011-07-20 Thread Andrej
Can anyone recommend "PostgreSQL 9.0 High Performance" by G. Smith? Cheers, Andrej -- Please don't top post, and don't use HTML e-Mail :}  Make your quotes concise. http://www.georgedillon.com/web/html_email_is_evil.shtml -- Sent via pgsql-general mailing list (pgsql-general@postgresql.or

Re: [GENERAL] announcements regarding tools

2011-07-20 Thread Chris Travers
On Wed, Jul 20, 2011 at 12:17 PM, John R Pierce wrote: > On 07/20/11 12:04 PM, Vick Khera wrote: >> >> And describe*what*  the product does.  Not everyone knows what a >> product is by its name, especially when the name is some marketing >> term and not descriptive. > > I love seeing literature an

Re: [GENERAL] announcements regarding tools

2011-07-20 Thread John R Pierce
On 07/20/11 12:04 PM, Vick Khera wrote: And describe*what* the product does. Not everyone knows what a product is by its name, especially when the name is some marketing term and not descriptive. I love seeing literature and websites for product XYZ that make it sound like it mills the wheat

Re: [GENERAL] announcements regarding tools

2011-07-20 Thread Vick Khera
On Tue, Jul 19, 2011 at 12:44 PM, Scott Ribe wrote: > My suggestion: all such announcements should include information about > supported platforms. Any announcement submitted without that info should be > rejected, and the vendor instructed to add it before re-submission. > And describe *what*

Re: [GENERAL] COPY TO '|gzip > /my/cool/file.gz'

2011-07-20 Thread Vibhor Kumar
On Jul 20, 2011, at 11:29 PM, wrote: > From May 31, 2006; 12:03pm . . . > > "It struck me that we are missing a feature that's fairly common in Unix > programs. > Perhaps COPY ought to have the ability to pipe its output to a shell command, > or read input from a shell command. " > Maybe som

[GENERAL] COPY TO '|gzip > /my/cool/file.gz'

2011-07-20 Thread david.sahagian
From May 31, 2006; 12:03pm . . . "It struck me that we are missing a feature that's fairly common in Unix programs. Perhaps COPY ought to have the ability to pipe its output to a shell command, or read input from a shell command. " Maybe something like: COPY mytable TO '| gzip >/home/tgl/

Re: [GENERAL] Another unexpected behaviour

2011-07-20 Thread Rick Genter
On Wed, Jul 20, 2011 at 9:58 AM, Rob Richardson wrote: > It seems to me that it is inherently wrong to perform any operation on a > database that depends on the order in which records are retrieved, > without specifying that order in an ORDER BY clause. The "update t1 set > f1 = f1 + 1" assumes t

Re: [GENERAL] Another unexpected behaviour

2011-07-20 Thread Rob Richardson
It seems to me that it is inherently wrong to perform any operation on a database that depends on the order in which records are retrieved, without specifying that order in an ORDER BY clause. The "update t1 set f1 = f1 + 1" assumes that the operation will be performed in an order that guarantees

Re: [GENERAL] Another unexpected behaviour

2011-07-20 Thread Simon Riggs
On Wed, Jul 20, 2011 at 4:18 PM, Samuel Hwang wrote: > The real question is that why PostgreSQL behaves differently than > other major DBMS. IMHO, doing checking at set operation boundary is > more appropriate than at row boundary. The real question is why anyone would actually perform that kind

Re: [GENERAL] Another unexpected behaviour

2011-07-20 Thread Tom Lane
Samuel Hwang writes: > Thanks. But I am not looking for how to avoid the problem at this > moment, > I am more interested in why PostgreSQL is designed to work this way. Performance --- it's significantly more expensive to do a deferred uniqueness check, since you have to visit the index a second

Re: [GENERAL] Another unexpected behaviour

2011-07-20 Thread Samuel Hwang
Thanks for the reply. You are right, the result is all or nothing, so it's still atomic. I found my mistake and posted a clarification for my question. I know in PostgreSQL 9.0 unique constraint can be set to deferrable. However still no luck for unique indexes. The real question is that why Pos

Re: [GENERAL] Another unexpected behaviour

2011-07-20 Thread Samuel Hwang
Thanks. But I am not looking for how to avoid the problem at this moment, I am more interested in why PostgreSQL is designed to work this way. To make the problem more obvious, drop table if exists t1; create table t1 (f1 int); create unique index uix_t1 on t1(f1) ; insert into t1(f1) values (1),

Re: [GENERAL] Error creating function

2011-07-20 Thread Tom Lane
Rebecca Clarke writes: > I'm doing a restore into Postgresql 8.4, postgis 1.5.1 and I'm getting the > following error when it creates the below function: > pg_restore: creating FUNCTION _get_buffer(geometry, double precision, > integer) > pg_restore: [archiver (db)] Error from TOC entry 966; 1255

Re: [GENERAL] compile postgres with visual studio 2010

2011-07-20 Thread Tom Lane
"Sofer, Yuval" writes: > I would like to build Postgres from source with the visual studio 2010 > compiler > Is it supported? Not yet. You could test the pending patch for that: https://commitfest.postgresql.org/action/patch_view?id=523 regards, tom lane -- Sent via

Re: [GENERAL] [ODBC] pgsql ODBC text escaping issue

2011-07-20 Thread Raiford
Have you tried one of the newer ODBC drivers? Also, you may want to look into enabling standard_conforming_strings or disabling the warning messages with escape_string_warning. Jon From: Zhidong She To: pgsql-o...@postgresql.org, pgsql-general@postgresql.org, Zhidong She Date: 07/

Re: [GENERAL] Worse performance on partitioned table than in non partitioned table

2011-07-20 Thread Simon Riggs
On Wed, Jul 20, 2011 at 12:09 PM, Ruben Blanco wrote: > After partitioning a big table, I am getting slower performance on queries > run on the non-partitioned table (llamadas) than the partitioned table > (llamadas_maestra). > > > Not partitioned table: > >     heos_prod=# explain analyze select

Re: [GENERAL] compile postgres with visual studio 2010

2011-07-20 Thread Raymond O'Donnell
On 20/07/2011 11:56, Sofer, Yuval wrote: > Hi > > > > I would like to build Postgres from source with the visual studio 2010 > compiler > > Is it supported? Is there any document which describes the process of > the implementation? Yes, it's in the Fine Manual: http://www.postgresql.org/do

[GENERAL] compile postgres with visual studio 2010

2011-07-20 Thread Sofer, Yuval
Hi I would like to build Postgres from source with the visual studio 2010 compiler Is it supported? Is there any document which describes the process of the implementation? Thanks, Yuval Sofer BMC Software CTM&D Business Unit DBA Team 972-52-4286-282 yuval_so...@bmc.com

[GENERAL] Worse performance on partitioned table than in non partitioned table

2011-07-20 Thread Ruben Blanco
Hi: After partitioning a big table, I am getting slower performance on queries run on the non-partitioned table (llamadas) than the partitioned table (llamadas_maestra). Not partitioned table: heos_prod=# explain analyze select * from llamadas where cod_empresa=1 and fecha_llamada='2011062

[GENERAL] Error creating function

2011-07-20 Thread Rebecca Clarke
Hi I'm doing a restore into Postgresql 8.4, postgis 1.5.1 and I'm getting the following error when it creates the below function: pg_restore: creating FUNCTION _get_buffer(geometry, double precision, integer) pg_restore: [archiver (db)] Error from TOC entry 966; 1255 49162661 FUNCTION _get_buffer

Re: [GENERAL] Two indexes on same column

2011-07-20 Thread Raghavendra
On Wed, Jul 20, 2011 at 2:39 PM, Vlastimil Krejcir wrote: > Hi, > > what index is used (and according to what rules) when there are two (or > more) different indexes defined on one column? Assume: > > CREATE TABLE example ( > id SERIAL PRIMARY KEY, > ...); > CREATE INDEX example_id_idx ON exampl

[GENERAL] Two indexes on same column

2011-07-20 Thread Vlastimil Krejcir
Hi, what index is used (and according to what rules) when there are two (or more) different indexes defined on one column? Assume: CREATE TABLE example ( id SERIAL PRIMARY KEY, ...); CREATE INDEX example_id_idx ON example USING hash (id); By default there are btree index created and the h

Re: [GENERAL] Building an home computer for best Poker Tracker performance

2011-07-20 Thread Greg Smith
On 07/20/2011 02:14 AM, Stuart Cooper wrote: Nice to see some poker being discussed on this list. Much more reputable than Stock Trading. If the casinos did something like what traders call "front-running", they'd all be put in jail the next day for cheating their customers. Just a day i

[GENERAL] pgsql ODBC text escaping issue

2011-07-20 Thread Zhidong She
Hi all, I have a problem on text escaping. In my application, I have a table offlinemsg, which has one column id with long, and has another column msg with text. pgsql ODBC and dynamic SQL binding was used when I tried to insert data into offlinemsg. the sql is : insert into offlinemsg values(?, ?