Re: [GENERAL] warm standby resume and take online problems

2009-11-04 Thread Greg Smith
On Wed, 4 Nov 2009, Michal Bicz wrote: Now it is saying constantly in log : 2009-11-04 04:57:39 PST : ERROR:  XX000: xlog flush request 2FB/28CE63A8 is not satisfied --- flushed only to 2FB/8FFEA60 2009-11-04 04:57:39 PST : CONTEXT:  writing block 874937 of relation 1663/20863/21548 2009-11-04

Re: [GENERAL] --//pgsql partitioning-///--------------------

2009-11-04 Thread Ow Mun Heng
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Vick Khera > Here are two (not necessarily mutually exclusive) options for you: >1) use triggers/rules on the master table and do all your inserts >directed to it and hav

[GENERAL] warm standby resume and take online problems

2009-11-04 Thread Michal Bicz
Hi, I have chain of warm stanby servers. One let's say db-01 is pushing updates to db-02 and then they are fetched to db-03. I decided to bring up online db-04 and stopped db-03 from warm standby with pg_ctl stop -m fast $PG_DATA And copied data over from db-03 to db-04. So now I have backup "d

[GENERAL] Manual

2009-11-04 Thread Freddy Valdebenito
Manual in spanish please -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] error caused by FOREIGN KEY on composite type

2009-11-04 Thread silly8888
I have the following definitions: -- create type mytype as (x integer, y integer); create table foo( a mytype primary key, b integer ); create table bar( a mytype references foo ); insert into foo values((0,0)::mytype,0); ---

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread marcin mank
On Thu, Nov 5, 2009 at 12:39 AM, marcin mank wrote: > On Thu, Nov 5, 2009 at 12:31 AM, Richard Broersma > wrote: >> I don't get the same results: > > This is due to my email client breaking the lines. > Try this: http://pastebin.com/f2a0884a1 doh. http://www.pastie.org/684163 Greetings Marcin M

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread marcin mank
On Thu, Nov 5, 2009 at 12:31 AM, Richard Broersma wrote: > I don't get the same results: This is due to my email client breaking the lines. Try this: http://pastebin.com/f2a0884a1 Greetings Marcin Mańk -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread Andrej
2009/11/5 Richard Broersma : > On Wed, Nov 4, 2009 at 3:18 PM, marcin mank wrote: >> --- >> >> 534678912672195348198342567859761423426853791713924856961537284287419635345286179 >> (1 row) > broersr=> with recursive

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread Richard Broersma
On Wed, Nov 4, 2009 at 3:18 PM, marcin mank wrote: >                                         s > --- >  534678912672195348198342567859761423426853791713924856961537284287419635345286179 > (1 row) I don't get the sam

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread Greg Stark
On Sun, Nov 1, 2009 at 3:19 PM, Tom Lane wrote: > I think the Oracle guy's version could easily be adapted to PG 8.4 --- > those little rownum subqueries seem to be just a substitute for not > having generate_series(1,9), and everything else is just string-pushing. > Don't have time to try it myse

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread Andrej
2009/11/5 marcin mank : > btw2: is SQL with 'with recursive' turing-complete ? Anyone care to > try a Brainf*ck interpreter ? :) Sick, sick puppy! :} Cheers, Andrej -- Please don't top post, and don't use HTML e-Mail :} Make your quotes concise. http://www.american.edu/econ/notes/htmlmail.ht

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread Scott Marlowe
This needs to be published... On Wed, Nov 4, 2009 at 4:18 PM, marcin mank wrote: >> I think the Oracle guy's version could easily be adapted to PG 8.4 --- >> those little rownum subqueries seem to be just a substitute for not >> having generate_series(1,9), and everything else is just string-push

Re: [GENERAL] sudoku in an sql statement

2009-11-04 Thread marcin mank
> I think the Oracle guy's version could easily be adapted to PG 8.4 --- > those little rownum subqueries seem to be just a substitute for not > having generate_series(1,9), and everything else is just string-pushing. indeed. marcin=# with recursive x( s, ind ) as ( select sud, position( ' ' in s

Re: [GENERAL] Where I can find "SSL specification"?

2009-11-04 Thread John R Pierce
Tom Lane wrote: Raimon Fernandez writes: I want to implement SSL in my Frontend implementation with TCP/IP. You should not be thinking about implementing SSL from scratch --- we don't. Use OpenSSL or another library. If you're just a glutton for punishment and creating your own secur

Re: [GENERAL] Where I can find "SSL specification"?

2009-11-04 Thread Tom Lane
Raimon Fernandez writes: > I want to implement SSL in my Frontend implementation with TCP/IP. You should not be thinking about implementing SSL from scratch --- we don't. Use OpenSSL or another library. If you're just a glutton for punishment and creating your own security holes, you could proba

Re: [GENERAL] auditing pg_hba.conf

2009-11-04 Thread Christophe
Hi Why don't use etckeeper ? Regards, http://joey.kitenet.net/code/etckeeper/ Le 03/11/09 23:41, JP Fletcher a écrit : Hi, We manage hundreds of clusters and a handful of distinct pg_hba.conf files across several sites. We are mostly satisfied with our automated method of management, but

[GENERAL] Where I can find "SSL specification"?

2009-11-04 Thread Raimon Fernandez
Hello, I want to implement SSL in my Frontend implementation with TCP/IP. The manual just says, after receiving an S: "To continue after S, perform an SSL startup handshake (not described here, part of the SSL specification) with the server." I can't find it in the manual or in the postgres

Re: [GENERAL] Search system catalog for mystery type

2009-11-04 Thread Alvaro Herrera
Carlo Stonebanks wrote: > When I try the following command: > ALTER TABLE mdx_core.audit_impt RENAME TO _audit_impt; > > I get the error message: > > ERROR: type "_audit_impt" already exists > SQL state: 42710 Probably the easiest way around this is to use two underscores instead of one: ALTER

Re: [GENERAL] Search system catalog for mystery type

2009-11-04 Thread Tom Lane
Sam Mason writes: > On Wed, Nov 04, 2009 at 11:31:55AM -0500, Carlo Stonebanks wrote: >> When I try the following command: >> ALTER TABLE mdx_core.audit_impt RENAME TO _audit_impt; >> >> ERROR: type "_audit_impt" already exists You aren't going to be able to do that, because of the conflict with

Re: [GENERAL] How can I pass an array to SPI_execute_with_args()?

2009-11-04 Thread Tom Lane
Boszormenyi Zoltan writes: > I would like to execute the code below. Since you're apparently deconstructing and reconstructing the array anyway, why don't you do the insertion at the C-array stage, and do just one construct_array() that yields the final result? > If the above marked line sets oi

Re: [GENERAL] Search system catalog for mystery type

2009-11-04 Thread Sam Mason
On Wed, Nov 04, 2009 at 11:31:55AM -0500, Carlo Stonebanks wrote: > When I try the following command: > ALTER TABLE mdx_core.audit_impt RENAME TO _audit_impt; > > ERROR: type "_audit_impt" already exists > > How do I search the system catalogs to find this particular "type"? select typname, ty

[GENERAL] How can I pass an array to SPI_execute_with_args()?

2009-11-04 Thread Boszormenyi Zoltan
Hi, I would like to execute the code below. I SELECTed a bigint[] from the database into "Datum ids", I need to insert a new bigint ID in the middle. Datum ids; int n_ids; int idx_min, idx_m

Re: [GENERAL] Postgres for mobile website?

2009-11-04 Thread Steve Crawford
Andre Lopes wrote: Hi, I have a website using Postgres database. Now I need to develop a mobile website, what should I do? Use the Postgres database or copy the information of the database to a SQLite database? Postgres isn't heavy to a mobile website? The website is update 2 times month.

[GENERAL] Search system catalog for mystery type

2009-11-04 Thread Carlo Stonebanks
When I try the following command: ALTER TABLE mdx_core.audit_impt RENAME TO _audit_impt; I get the error message: ERROR: type "_audit_impt" already exists SQL state: 42710 I have looked through tables, types, sequences etc. I even did a PLAIN schema (no data) backup on the DB and did a text se

Re: [GENERAL] createlang error(s)

2009-11-04 Thread Joshua Tolley
On Wed, Nov 04, 2009 at 12:12:50AM -0500, Tom Lane wrote: > John Burski writes: > > I got my postgresql build from the from a Novell SuSE Linux repository > > (mirror.susestudio.com). > > > Here's the result of a run of ldd against the plperl.so file: > > > linux-gate.so.1 => (0xe000)

Re: [GENERAL] --//pgsql partitioning-///--------------------

2009-11-04 Thread Vick Khera
On Wed, Nov 4, 2009 at 4:49 AM, shahrzad khorrami wrote: >  but problem here is how I can do something that when I insert data, the > master table remains empty > and just data inserted into inherited tables. > Here are two (not necessarily mutually exclusive) options for you: 1) use triggers/ru

Re: [GENERAL] Could not read directory "pg_xlog": Invalid argument (on SSD Raid)

2009-11-04 Thread Tom Lane
Data Growth Pty Ltd writes: > I'm frequently getting these errors in my console: > 4/11/09 2:25:04 PMorg.postgresql.postgres[192]ERROR: could not read > directory "pg_xlog": Invalid argument > Mac Pro Quad Nahelem 2.93GHz, 16GB RAM running Snow Leopard OS X 10.6.1 in > 64bit mode This is

Re: [GENERAL] How to automatically find the *right* libpq_fe.h?

2009-11-04 Thread Kynn Jones
On Tue, Nov 3, 2009 at 2:39 PM, Steve Atkins wrote: > Rather, use the pg_config you find in the path to get the include directory > (or the compiler flags) or use App::Info::RDBMS::PostgreSQL or as a last > resort $POSTGRES_HOME. > pg_config did the trick. Thanks! Kynn

Re: [GENERAL] Group by problem!

2009-11-04 Thread Sam Mason
On Wed, Nov 04, 2009 at 12:41:25PM +0330, shahrzad khorrami wrote: > Column | Type | > id | integer | not null default > f1 | character varying(32) | > f3 | character varying(32) | > f4 | character varying(32) | > f5 | character varying(32) |

Re: [GENERAL] Group by problem!

2009-11-04 Thread Grzegorz Jaśkiewicz
On Wed, Nov 4, 2009 at 9:11 AM, shahrzad khorrami < shahrzad.khorr...@gmail.com> wrote: > > hi all, > > > > > Column | Type | > Modifiers > > +---+--- > id | integer | not null default >

Re: [GENERAL] --//pgsql partitioning-///--------------------

2009-11-04 Thread Wojtek
shahrzad khorrami wrote: hi all, I have alot data that I have to isert them to db,... Now I decide to use of partitioning http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html but problem here is how I can do something that when I insert data, the master table remains empty and

Re: [GENERAL] createlang error(s)

2009-11-04 Thread John Burski
Thanks for your response, Tom! I got my postgresql build from the from a Novell SuSE Linux repository (mirror.susestudio.com). Here's the result of a run of ldd against the plperl.so file: linux-gate.so.1 => (0xe000) libperl.so => not found libnsl.so.1 => /lib/libn

[GENERAL] Could not read directory "pg_xlog": Invalid argument (on SSD Raid)

2009-11-04 Thread Data Growth Pty Ltd
I'm frequently getting these errors in my console: 4/11/09 2:25:04 PMorg.postgresql.postgres[192]ERROR: could not read directory "pg_xlog": Invalid argument 4/11/09 2:25:56 PMorg.postgresql.postgres[192]ERROR: could not read directory "pg_xlog": Invalid argument 4/11/09 2:36:03 P

[GENERAL] Group by problem!

2009-11-04 Thread shahrzad khorrami
hi all, Column | Type | Modifiers +---+--- id | integer | not null default nextval('test_id_seq'::regclass) f1 | character varying(32) | f3 | character varying(32) | f4

[GENERAL] --//pgsql partitioning-///--------------------

2009-11-04 Thread shahrzad khorrami
hi all, I have alot data that I have to isert them to db,... Now I decide to use of partitioning http://www.postgresql.org/docs/8.1/interactive/ddl-partitioning.html but problem here is how I can do something that when I insert data, the master table remains empty and just data inserted into inhe