Re: [GENERAL] How to avoid TimeLine increase / Change on recovery?

2011-10-04 Thread Fujii Masao
On Mon, Oct 3, 2011 at 11:39 PM, senthilnathan senthilnatha...@gmail.com wrote: Is there any way to avoid time line increase /change on recovery No, there is no way to prevent the timeline ID from being incremented at the end of archive recovery. Regards, -- Fujii Masao NIPPON TELEGRAPH AND

[GENERAL] PostgreSQL Conference Europe: Are you ready?

2011-10-04 Thread Dave Page
PostgreSQL Conference Europe 2011 (http://2011.pgconf.eu/) starts 2 weeks from today in the beautiful city of Amsterdam in the Netherlands. This is the fourth annual conference hosted by PostgreSQL Europe, following on from extremely successful events in Prato (Italy), Paris and Stuttgart, and is

[GENERAL] auto-increment column

2011-10-04 Thread Robert Buckley
Hi, I have a column in a table called hist_id with the datatype integer. When I created the table I assigned this column the primary key constraint but didn´t make it an auto-increment column. How could I do this to an the already existing column? I have created the sequence with the

Re: [GENERAL] auto-increment column

2011-10-04 Thread hubert depesz lubaczewski
On Tue, Oct 04, 2011 at 12:30:48PM +0100, Robert Buckley wrote: Hi, I have a column in a table called hist_id with the datatype integer. When I created the table I assigned this column the primary key constraint but didn´t make it an auto-increment column. How could I do this to an the

Re: [GENERAL] auto-increment column

2011-10-04 Thread Boszormenyi Zoltan
2011-10-04 13:30 keltezéssel, Robert Buckley írta: Hi, I have a column in a table called hist_id with the datatype integer. When I created the table I assigned this column the primary key constraint but didn´t make it an auto-increment column. How could I do this to an the already

Re: [GENERAL] auto-increment column

2011-10-04 Thread Robert Buckley
Thanks for the replies, I have one question regarding this comment... You also need to add a DEFAULT expression and optionallymake the sequence owned by the column: What difference does it make if a table owns a sequence of not?...does this contraint the use of the sequence to ONLY that one

Re: [GENERAL] auto-increment column

2011-10-04 Thread Boszormenyi Zoltan
Hi, 2011-10-04 14:05 keltezéssel, Robert Buckley írta: Thanks for the replies, I have one question regarding this comment... You also need to add a DEFAULT expression and optionally make the sequence owned by the column: What difference does it make if a table owns a sequence of

[GENERAL] PG Source Compilation (Optional Features / Optional Packages)

2011-10-04 Thread senthilnathan
Can you please provide us the details of Optional Features / Optional Package to be used for postgres source compilation for a standard setup(recommended...) We also look for the add on packages(available under contrib.,) to be included for compilation in the standard setup(like pgcrypto) Note :

[GENERAL] Add quto increment to existing column

2011-10-04 Thread Robert Buckley
Hi, I have a column in a table called hist_id with the datatype integer. When I created the table I assigned this column the primary key constraint but didn´t make it an auto-increment column. How could I do this to an the already existing column? I have created the sequence with the

Re: [GENERAL] Problem with pg_upgrade from 9.0 to 9.1 under Ubuntu x64

2011-10-04 Thread DUPREZ Cédric
Hi, I have partially solved the problem. Now, I get the following error message: Performing Consistency Checks - Checking current, bin, and data directories ok Checking cluster versions ok Checking database user is a

Re: [GENERAL] PG Source Compilation (Optional Features / Optional Packages)

2011-10-04 Thread hubert depesz lubaczewski
On Tue, Oct 04, 2011 at 03:04:29AM -0700, senthilnathan wrote: Can you please provide us the details of Optional Features / Optional Package to be used for postgres source compilation for a standard setup(recommended...) We also look for the add on packages(available under contrib.,) to be

Re: [GENERAL] auto-increment column

2011-10-04 Thread Joe Abbate
On 10/04/2011 08:05 AM, Robert Buckley wrote: Thanks for the replies, I have one question regarding this comment... You also need to add a DEFAULT expression and optionally make the sequence owned by the column: What difference does it make if a table owns a sequence of not?...does

Re: [GENERAL] How can i get record by data block not by sql?

2011-10-04 Thread Craig Ringer
Joining several reply threads. Replies inline below. On 10/04/2011 05:07 PM, 姜头 wrote: I found the Gist is difficult to understand. :) I will try my best to read it. I find GiST hard to understand too. It's probably the easiest way to add a custom index type, though. I strongly recommend

Re: [GENERAL] How can i get record by data block not by sql?

2011-10-04 Thread Craig Ringer
On 10/03/2011 05:03 PM, 姜头 wrote: How can i get record by data block not by sql? I want to read and write lots of data by data blocks, so i can form a disk-resident tree by recording the block address. But i don't know how to implement in postgresql. Is there system function can do this? Now

Re: [GENERAL] Add quto increment to existing column

2011-10-04 Thread marc_firth
If you use the SERIAL (this is the auto-incrementing function that creates sequences in the bankground for you) datatype you can accomplish it in one go. So: DROP sequence hist_id_seq; -- Get rid of your old sequence ALTER TABLE my_table DROP COLUMN hist_id; -- Remove id column ALTER TABLE

Re: [GENERAL] Add quto increment to existing column

2011-10-04 Thread Phil Couling
Hi Dropping the column is a bit drastic if you already have data in there. You could just set the default on the column: alter table my_table alter hist_id set default nextval('hist_id_seq') Also considder setting the sequence owner: alter sequence hist_id_seq owned by my_table.hist_id; This

Re: [GENERAL] Add quto increment to existing column

2011-10-04 Thread Mark Watson
Also remember to set the next value of the sequence: Select setval('hist_id_seq,my_value); Where my_value is probably: Select max(hist_id) from my_table; Mark Watson -Message d'origine- De : pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] De la part de Phil

[GENERAL] LAPP server moving from 4 GB RAM to 16 GB - increase shared_buffers?

2011-10-04 Thread Alexander Farber
Hello, I run a LAPP server (PostgreSQL 8.4 @ CentOS 5.7 / 64 bit; only 4 GB RAM) with the following config: postgresql.conf (unix socket only and - ): max_connections = 50 shared_buffers = 1024MB # min 128kB pgbouncer.ini: [databases] pref = host=/tmp user=XXX

Re: [GENERAL] Problem with pg_upgrade from 9.0 to 9.1 under Ubuntu x64

2011-10-04 Thread DUPREZ Cédric
I have solved the problem... I had to rebuild postgis with postgresql 9.1.0 started (which was not the case). Everything works fine, now. Pg_upgrade completed successfully. Sorry for the disturbance. Cedric Duprez -Message d'origine- De : pgsql-general-ow...@postgresql.org

Re: [GENERAL] Streaming Replication and Firewall

2011-10-04 Thread Ian Harding
On Thu, Sep 29, 2011 at 5:32 PM, Fujii Masao masao.fu...@gmail.com wrote: On Fri, Sep 30, 2011 at 1:35 AM, Ian Harding harding@gmail.com wrote: I updated the firewall rules on a streaming replication standby server and thought nothing of it.  I later happened to notice on the primary that

Re: [GENERAL] LAPP server moving from 4 GB RAM to 16 GB - increase shared_buffers?

2011-10-04 Thread Andreas Kretschmer
Alexander Farber alexander.far...@gmail.com wrote: It works ok, but now users have collected some money and I've purchased a better server with 16 GB and CentOS 6 /64 bit. I understand, that my question is naive, but on the other side even if I provide more information, will that really

Re: [GENERAL] LAPP server moving from 4 GB RAM to 16 GB - increase shared_buffers?

2011-10-04 Thread Adam Cornett
On Tue, Oct 4, 2011 at 11:11 AM, Alexander Farber alexander.far...@gmail.com wrote: Hello, I run a LAPP server (PostgreSQL 8.4 @ CentOS 5.7 / 64 bit; only 4 GB RAM) with the following config: postgresql.conf (unix socket only and - ): max_connections = 50 shared_buffers = 1024MB

[GENERAL] table sequence, renumbering

2011-10-04 Thread J.V.
What is the absolute fastest way to populate a primary key / id column from a named db sequence (disabled constraints and want to renumber the primary key / id column from sequence. cannot use auto inc or serial column because need to use generic hibernate mapping files for multiple DB's in

Re: [GENERAL] LAPP server moving from 4 GB RAM to 16 GB - increase shared_buffers?

2011-10-04 Thread Scott Marlowe
On Tue, Oct 4, 2011 at 9:11 AM, Alexander Farber alexander.far...@gmail.com wrote: Hello, I run a LAPP server (PostgreSQL 8.4 @ CentOS 5.7 / 64 bit; only 4 GB RAM) with the following config: postgresql.conf (unix socket only and - ):    max_connections = 50    shared_buffers = 1024MB      

Re: [GENERAL] table sequence, renumbering

2011-10-04 Thread Scott Marlowe
On Tue, Oct 4, 2011 at 9:51 AM, J.V. jvsr...@gmail.com wrote: What is the absolute fastest way to populate a primary key / id column from a named db sequence (disabled constraints and want to renumber the primary key / id column from sequence. cannot use auto inc or serial column because need

Re: [GENERAL] table sequence, renumbering

2011-10-04 Thread Raymond O'Donnell
On 04/10/2011 16:51, J.V. wrote: What is the absolute fastest way to populate a primary key / id column from a named db sequence (disabled constraints and want to renumber the primary key / id column from sequence. cannot use auto inc or serial column because need to use generic hibernate

Re: [GENERAL] stored function (possible to access file system or call java program)?

2011-10-04 Thread Merlin Moncure
On Mon, Oct 3, 2011 at 8:00 PM, Rodrigo Gonzalez rjgonz...@estrads.com.ar wrote: On 10/03/2011 09:50 PM, John R Pierce wrote: On 10/03/11 3:09 PM, Merlin Moncure wrote:         libjvm.so =  /usr/lib/libjvm.so (0x00cfc000) I've never heard of a Sun JRE in /usr/lib are you using (eeew) GCJ

Re: [GENERAL] stored function (possible to access file system or call java program)?

2011-10-04 Thread John R Pierce
On 10/04/11 9:14 AM, Merlin Moncure wrote: merlin@mmoncure-ubuntu:~$ java -version java version 1.6.0_20 OpenJDK Runtime Environment (IcedTea6 1.9.9) (6b20-1.9.9-0ubuntu1~10.10.2) OpenJDK Client VM (build 19.0-b09, mixed mode, sharing) I was told pljava flat doesn't work with jdk 1.6 yet.

Re: [GENERAL] How to find freak UTF-8 character?

2011-10-04 Thread Daniele Varrazzo
On Sat, Oct 1, 2011 at 10:16 PM, Leif Biberg Kristensen l...@solumslekt.org wrote: Yes I know that this is a perfectly legal UTF-8 character. It crept into my database as a result of a copy-and-paste job from a web site. The point is that it doesn't have a counterpart in ISO-8859-1 to which I

[GENERAL] Replication/WAL shipping. db errors on slave after stop/start master

2011-10-04 Thread Bob Hatfield
Reindex of triggered (slave) database showing errors. We have replication working in 8.3.12 on two identical Windows 2008 R2 servers. Anytime I trigger the slave, it comes up fine and doing a reindex of the slave database results in no errors. However, when I do this *after* our nightly backup

Re: [GENERAL] : PostgreSQL Online Backup

2011-10-04 Thread Alan Hodgson
rsync works fine. Why exactly can't the recovery find the backed up copy of 000105390076? Please post your archive_command settings, the contents of any script(s) called by that, and the recovery.conf file you're using that's having problems, as well as the complete process you

[GENERAL] how to disable all pkey/fkey constraints globally

2011-10-04 Thread J.V.
Is there a generic way to drop just all primary key and foreign key constraints on a given table? I know how to do given the specific name of the constraint. same question but one statement that would just disable all primary key and foreign key constraints on a given database? and am

Re: [GENERAL] Why PGSQL has no developments in the .NET area?

2011-10-04 Thread Rohit Coder
Hi, Sorry for the delay. I used Npgsql 2.0 last and it was slow when querying database to populate DataGridView or DropDownLists in Windows Forms application. To verify, I removed Npgsql and installed pgsql's ODBC driver. It worked very fast. In another case, when the user brings focus

Re: [GENERAL] how to disable all pkey/fkey constraints globally

2011-10-04 Thread John R Pierce
On 10/04/11 10:59 AM, J.V. wrote: Maybe I do not want to drop, so is there a way to simply disable all globally (not drop) then enable all globally? IF there was such a method (I don't think there is), to reenable the constraints would require going through every single row of every single

[GENERAL] fail: alter table table_name NOCHECK CONSTRAINT ALL;

2011-10-04 Thread J.V.
I have tried: alter table table_name NOCHECK CONSTRAINT ALL; and it highlights (squiggles) NOCHECK saying : ERROR: syntax error at or near NOCHECK SQL state: 42601 character 20 but everything I lookup says this this is the way to disable all constraints on a table. Also is there a way to

[GENERAL] how to select one column into another in same table?

2011-10-04 Thread J.V.
Currently I can select one column into another with two statements: alter table table_name add column id_old int; update table_name set id_old = id; Is there a way to do this in one statement with a select into? I have tried various select statements but want the new column (with the

Re: [GENERAL] how to select one column into another in same table?

2011-10-04 Thread Scott Marlowe
On Tue, Oct 4, 2011 at 12:24 PM, J.V. jvsr...@gmail.com wrote: Currently I can select one column into another with two statements:    alter table table_name add column id_old int;    update table_name set id_old = id; Is there a way to do this in one statement with a select into?  I have

Re: [GENERAL] fail: alter table table_name NOCHECK CONSTRAINT ALL;

2011-10-04 Thread Guillaume Lelarge
On Tue, 2011-10-04 at 12:21 -0600, J.V. wrote: I have tried: alter table table_name NOCHECK CONSTRAINT ALL; and it highlights (squiggles) NOCHECK saying : ERROR: syntax error at or near NOCHECK SQL state: 42601 character 20 but everything I lookup says this this is the way to disable

Re: [GENERAL] fail: alter table table_name NOCHECK CONSTRAINT ALL;

2011-10-04 Thread J.V.
Is there a way to disable all trigger user' in one statement? (and then re-enable?) One docs says primary keys and foreign keys are user triggers thanks J.V. On 10/4/2011 1:12 PM, Guillaume Lelarge wrote: Not sure where you look up, but there's no way to disable constraints in

Re: [GENERAL] how to select one column into another in same table?

2011-10-04 Thread J.V.
What I need to do is to save the id column for future use and then modify the id column resetting all values from another sequence. So I need to select the id column or somehow get the data into another column in the same table. And then I can update the id column (after dropping the

Re: [GENERAL] fail: alter table table_name NOCHECK CONSTRAINT ALL;

2011-10-04 Thread Guillaume Lelarge
On Tue, 2011-10-04 at 13:20 -0600, J.V. wrote: Is there a way to disable all trigger user' in one statement? (and then re-enable?) I guess that if you took the time to read the man page at the URL I gave you, you would have seen this: ALTER TABLE [ ONLY ] name [ * ] action [, ... ] ...

Re: [BUGS] [GENERAL] One-click installer, Windows 7 32-bit, and icacls.exe

2011-10-04 Thread Dave Page
On Mon, Oct 3, 2011 at 2:15 PM, Dave Page dp...@pgadmin.org wrote: On Mon, Oct 3, 2011 at 9:42 AM, Thomas Kellerer spam_ea...@gmx.net wrote: Dave Page wrote on 03.10.2011 10:11: Karl; can you please provide precise details of your Windows version, and anything unusual about your disk

[GENERAL] Can I integrate PostgreSQL into MS Visual Studio EXPRESS ?

2011-10-04 Thread Andreas
Hi, can I integrate PostgreSQL into MS Visual Studio EXPRESS ? AFAIK odbc or similar ways to access non-ms-dbms are no standard options of the Express version, is it? Mind you, I dont want to build PG with MSVS. I'd be interested to use PG instead of ms-sql. -- Sent via pgsql-general mailing

Re: [BUGS] [GENERAL] One-click installer, Windows 7 32-bit, and icacls.exe

2011-10-04 Thread Craig Ringer
On 10/05/2011 03:46 AM, Dave Page wrote: Oh, the joys of supporting Windows :-) It's funny: for an OS with so relatively few flavours and versions, the number of quirks and bizarre behaviors is quite remarkable. I guess the text matrix isn't small, though: Windows XP / Vista / 7 / [8]

Re: [GENERAL] Can I integrate PostgreSQL into MS Visual Studio EXPRESS ?

2011-10-04 Thread Craig Ringer
On 10/05/2011 04:54 AM, Andreas wrote: Hi, can I integrate PostgreSQL into MS Visual Studio EXPRESS ? AFAIK odbc or similar ways to access non-ms-dbms are no standard options of the Express version, is it? No, there's no IDE integration. What would you want? I don't use MS SQL, so I don't

Re: [BUGS] [GENERAL] One-click installer, Windows 7 32-bit, and icacls.exe

2011-10-04 Thread Dave Page
On Wednesday, October 5, 2011, Craig Ringer ring...@ringerc.id.au wrote: On 10/05/2011 03:46 AM, Dave Page wrote: Oh, the joys of supporting Windows :-) It's funny: for an OS with so relatively few flavours and versions, the number of quirks and bizarre behaviors is quite remarkable. I guess

[GENERAL] Hash index not being updated

2011-10-04 Thread Justin Naifeh
In Postgres 8.4, I have a table called java_types with two columns, package_name and class_name. There is another table called java_objects that defines a column called type whose value matches the concatenation of package_name and class_name. A typical join and result looks like this: SELECT