[GENERAL] How to determine failed connection attempt due to invalid authorization (libpq)?

2010-10-13 Thread Dmitriy Igrishin
Hey all, We using libpq. There is only CONNECTION_BAD status which is signaled about failed connection. Nevertheless, is there way to check validity of username / password ? -- // Dmitriy.

Re: [GENERAL] Copying data files to new hardware?

2010-10-13 Thread Evan D. Hoffman
Thanks, Brian & Jaime. Regarding Slony, would that allow for migration to a new version as well - i.e. moving from 8.2 on the old machine to 8.4 on the new machine via Slony with minimal downtime? The Slony method is one I hadn't considered. Since our database is so large, even a direct file cop

Re: [GENERAL] Adding a New Column Specifically In a Table

2010-10-13 Thread Carlos Mennens
On Wed, Oct 13, 2010 at 2:04 PM, Carlos Mennens wrote: > OK so I have read the docs and Google to try and find a way to add a > new column to an existing table. My problem is I need this new column > to be created 3rd  rather than just dumping this new column to the end > of my table. I can't find

[GENERAL] Adding a New Column Specifically In a Table

2010-10-13 Thread Carlos Mennens
OK so I have read the docs and Google to try and find a way to add a new column to an existing table. My problem is I need this new column to be created 3rd rather than just dumping this new column to the end of my table. I can't find anywhere how I can insert my new column as the 3rd table column

[GENERAL] error_question

2010-10-13 Thread Gergely Fábián
Hi! I would like to ask you to help me a bit. I have two computers connected with each other. One of them runs under Linux, the other one has Windows Vista 32-bit. I've tried to do the following: One application (on the Linux computer) creates a database in the Linux machine and manipulates the da

[GENERAL] How to search ignoring spaces and minus signs

2010-10-13 Thread Andrus
CHAR(20) columns in 8.4 database may contains spaces and - signs like 13-333-333 12 3-44 33 33 333 12345 User enters code to search without spaces and - signs, like 12344 How to search for product code ignoring spaces and - signs? For example searching for code 12344 should return 12 3-44 as m

Re: [GENERAL] Copying data files to new hardware?

2010-10-13 Thread Brian Hirt
Yes, we've used Slony for migrating 8.2 -> 8.3 -> 8.4 and plan an using it to migrate to 9.0 in the near future. You should be able to skip releases as well like you say 8.2 -> 8.4. You'll probably want to test out both slony and 8.4 on your development machines first and make sure everything

Re: [ADMIN] [GENERAL] Copying data files to new hardware?

2010-10-13 Thread Tom Lane
Jaime Casanova writes: > On Wed, Oct 13, 2010 at 11:03 AM, EDH wrote: >> What I'd like to know is: if I install the latest 8.2.x release - I >> see 8.2.18 RPMs are available - can I do a straight copy of the >> contents of /var/lib/pgsql/data/ to the new server and start it up? >> Or is dump & re

Re: [GENERAL] Copying data files to new hardware?

2010-10-13 Thread Brian Hirt
Evan, Others can probably answer your question better about copying, but in general we never do that but I think if you use the same arch and major release of postgresql you will be okay. We have used Slony successfully for all of our database upgrades, server maintenance and database moves ov

Re: [GENERAL] Copying data files to new hardware?

2010-10-13 Thread Jaime Casanova
On Wed, Oct 13, 2010 at 11:03 AM, EDH wrote: [...] > > What I'd like to know is: if I install the latest 8.2.x release - I > see 8.2.18 RPMs are available - can I do a straight copy of the > contents of /var/lib/pgsql/data/ to the new server and start it up? > Or is dump & restore the only real wa

[GENERAL] Copying data files to new hardware?

2010-10-13 Thread EDH
I have a large Postgres DB (1100 GB) that I'd like to move to a new physical machine. In the past I've done this via pg_dump & restore, but the DB was much smaller then, and I'm concerned about how long that would take. The version of pg currently in use is: PostgreSQL 8.2.5 on x86_64-redhat-lin

Re: [GENERAL] pitr question

2010-10-13 Thread Joshua D. Drake
On Wed, 2010-10-13 at 11:40 -0400, Geoffrey Myers wrote: > On 10/13/2010 11:30 AM, zhong ming wu wrote: > > On Wed, Oct 13, 2010 at 11:17 AM, Geoffrey Myers > > mailto:li...@serioustechnology.com>> wrote: > > > Excuse the ignorance, but I see the following in the docs: > > > > > > 'In any case t

Re: [GENERAL] pitr question

2010-10-13 Thread Tom Lane
Vick Khera writes: > On Wed, Oct 13, 2010 at 11:17 AM, Geoffrey Myers > wrote: >>> 'In any case the hardware architecture must be the same — shipping from, >>> say, a 32-bit to a 64-bit system will not work.' >> Is this specific to the hardware?  That is to say, can I use pitr wal >> shipping fr

Re: [GENERAL] pitr question

2010-10-13 Thread Geoffrey Myers
On 10/13/2010 11:30 AM, zhong ming wu wrote: On Wed, Oct 13, 2010 at 11:17 AM, Geoffrey Myers mailto:li...@serioustechnology.com>> wrote: > Excuse the ignorance, but I see the following in the docs: > > 'In any case the hardware architecture must be the same — shipping from, > say, a 32-bit t

Re: [GENERAL] pitr question

2010-10-13 Thread Vick Khera
On Wed, Oct 13, 2010 at 11:17 AM, Geoffrey Myers wrote: > 'In any case the hardware architecture must be the same — shipping from, > say, a 32-bit to a 64-bit system will not work.' > > Is this specific to the hardware?  That is to say, can I use pitr wal > shipping from 64 bit hardware to 64 bit

Re: [GENERAL] are there any method that "Update" command not affect other unrelated indices?

2010-10-13 Thread Vick Khera
On Wed, Oct 13, 2010 at 10:31 AM, Igor Neyman wrote: > All indices need to be updated, because Postgres does not do "upgrade in > place", like some other databases do. > When any column is updated, new version of the row created and the old > one marked as deleted. > If you qualify for a HOT upda

[GENERAL] pitr question

2010-10-13 Thread Geoffrey Myers
Excuse the ignorance, but I see the following in the docs: 'In any case the hardware architecture must be the same — shipping from, say, a 32-bit to a 64-bit system will not work.' Is this specific to the hardware? That is to say, can I use pitr wal shipping from 64 bit hardware to 64 bit ha

Re: [GENERAL] Seg fault on PQconnectdb

2010-10-13 Thread Tom Lane
Joe La Frite writes: > Tough after some testing, I'm fairly sure the problem isn't caused by > libpq at all. I think the heap gets corrupted at some point before the > call to PQconnectdb is made, as replacing the call by a simple void* > test = malloc(10) causes it to crash as well. Yeah, a cras

Re: [GENERAL] about RPM build options

2010-10-13 Thread Ray Stell
On Wed, Oct 13, 2010 at 09:44:44AM +0200, Derk Jan Horstman wrote: > > I downloaded rpms from below site. > > http://www.postgresql.org/ftp/binary/v9.0.1/linux/rpms/redhat/rhel-5-x86_64/ > > > > > > 1. enable thread safety? > > "--disable-thread-safety" is given. Where is the flag "given?"

Re: [GENERAL] Understanding PostgreSQL Storage Engines

2010-10-13 Thread Tom Lane
Ron Mayer writes: >> PostgreSQL supports and uses just only one storage engine - PostgreSQL. > That said, ISTM one of Postgres's bigger strengths commercially seems > to be that vendors can reasonably easily plug in different storage engines. > Isn't the biggest SQL database in the world basical

Re: [GENERAL] are there any method that "Update" command not affect other unrelated indices?

2010-10-13 Thread Igor Neyman
> -Original Message- > From: Alban Hertroys [mailto:dal...@solfertje.student.utwente.nl] > Sent: Wednesday, October 13, 2010 2:38 AM > To: sunpeng > Cc: pgsql-general@postgresql.org > Subject: Re: are there any method that "Update" command not > affect other unrelated indices? > > On

Re: [GENERAL] Seg fault on PQconnectdb

2010-10-13 Thread Joe La Frite
On Wed, Oct 13, 2010 at 16:06, Merlin Moncure wrote: > > On Wed, Oct 13, 2010 at 5:24 AM, Joe La Frite wrote: > > Hi everyone, > > I'm trying to use libpq in my application, but it crashes with a seg fault > > when trying to connect. The call stack is as follows : malloc_consolidate < > > _int_ma

Re: [GENERAL] Seg fault on PQconnectdb

2010-10-13 Thread Merlin Moncure
On Wed, Oct 13, 2010 at 5:24 AM, Joe La Frite wrote: > Hi everyone, > I'm trying to use libpq in my application, but it crashes with a seg fault > when trying to connect. The call stack is as follows : malloc_consolidate < > _int_malloc < malloc < makeEmptyPGconn < PQconnectStart < PQconnectdb < m

[GENERAL] Seg fault on PQconnectdb

2010-10-13 Thread Joe La Frite
Hi everyone, I'm trying to use libpq in my application, but it crashes with a seg fault when trying to connect. The call stack is as follows : malloc_consolidate < _int_malloc < malloc < makeEmptyPGconn < PQconnectStart < PQconnectdb < my own application. I have no clue as to what causes this. Sa

Re: [GENERAL] Understanding PostgreSQL Storage Engines

2010-10-13 Thread Merlin Moncure
On Fri, Oct 8, 2010 at 5:30 PM, Carlos Mennens wrote: > I know that MySQL uses MyISAM storage engine by default and was just > trying to look on Google to try and see if I could understand what > storage engine does PostgreSQL use by default when I generate a > database / table. Is there some way

Re: [GENERAL] problem with PG install script on Windows

2010-10-13 Thread Igor Neyman
From: Ashesh Vashi [mailto:ashesh.va...@enterprisedb.com] Sent: Wednesday, October 13, 2010 1:32 AM To: Igor Neyman Cc: pgsql-general@postgresql.org; Dave Page Subject: Re: [GENERAL] problem with PG install script on Win

Re: [GENERAL] Gripe: bytea_output default => data corruption

2010-10-13 Thread Dmitriy Igrishin
Hey all, And it is 9.0, i.e another major version. IMO the higher major versions not necessarily must be 100% backward compatible. So, think twice next time you update the major version. 2010/10/13 Raymond O'Donnell > On 13/10/2010 01:37, ljb wrote: > >> Defaulting bytea output from the backend

Re: [GENERAL] Passing refcursors between pl/pgsql functions

2010-10-13 Thread Merlin Moncure
On Wed, Oct 13, 2010 at 5:35 AM, Pavel Stehule wrote: >> >> What I would like is something like the following, assuming it's possible: >> >> CREATE OR REPLACE FUNCTION fetch_from_refcursor(ref refcursor) RETURNS >> SETOF test_table AS $$ >> BEGIN >>  RETURN FETCH 1 FROM ref; -- Does not work, but

Re: [GENERAL] Understanding PostgreSQL Storage Engines

2010-10-13 Thread Dave Page
On Wed, Oct 13, 2010 at 1:11 PM, Thom Brown wrote: > On 13 October 2010 12:35, Dave Page wrote: >> On Wed, Oct 13, 2010 at 12:29 PM, Ron Mayer >> wrote: >>> Pavel Stehule wrote: 2010/10/8 Carlos Mennens : > I know that MySQL uses MyISAM storage engine by default... what > storage en

Re: [GENERAL] Understanding PostgreSQL Storage Engines

2010-10-13 Thread Thom Brown
On 13 October 2010 12:35, Dave Page wrote: > On Wed, Oct 13, 2010 at 12:29 PM, Ron Mayer > wrote: >> Pavel Stehule wrote: >>> 2010/10/8 Carlos Mennens : I know that MySQL uses MyISAM storage engine by default... what storage engine does PostgreSQL use by default ... >>> >>> PostgreSQL s

Re: [GENERAL] Understanding PostgreSQL Storage Engines

2010-10-13 Thread Dave Page
On Wed, Oct 13, 2010 at 12:29 PM, Ron Mayer wrote: > Pavel Stehule wrote: >> 2010/10/8 Carlos Mennens : >>> I know that MySQL uses MyISAM storage engine by default... what >>> storage engine does PostgreSQL use by default ... >> >> PostgreSQL supports and uses just only one storage engine - Postgr

Re: [GENERAL] Understanding PostgreSQL Storage Engines

2010-10-13 Thread Ron Mayer
Pavel Stehule wrote: > 2010/10/8 Carlos Mennens : >> I know that MySQL uses MyISAM storage engine by default... what >> storage engine does PostgreSQL use by default ... > > PostgreSQL supports and uses just only one storage engine - PostgreSQL. That said, ISTM one of Postgres's bigger strengths

Re: [GENERAL] NoSQL -vs- SQL

2010-10-13 Thread ghatpande
Hi, I liked the article. A few years ago, I heard that Michael Stonebraker said "There is no new (theoretical) invention around the database technology.The key is integration of existing technologies". Everyone feels that RDBMS has reached saturation level and no further developemnt is possib

Re: [GENERAL] Passing refcursors between pl/pgsql functions

2010-10-13 Thread Pavel Stehule
> > What I would like is something like the following, assuming it's possible: > > CREATE OR REPLACE FUNCTION fetch_from_refcursor(ref refcursor) RETURNS > SETOF test_table AS $$ > BEGIN >  RETURN FETCH 1 FROM ref; -- Does not work, but can it? > END $$ language plpgsql; > > Is it possible to do su

[GENERAL] Passing refcursors between pl/pgsql functions

2010-10-13 Thread Reuven M. Lerner
Hi, everyone. I'm working with a client using PostgreSQL 8.3 on a Windows system, trying to improve performance of their database. They have a PL/PgSQL function which takes three parameters -- a filter (a custom type describing a user's query), an offset, and a limit. The query that runs the fil

Re: [GENERAL] Gripe: bytea_output default => data corruption

2010-10-13 Thread Raymond O'Donnell
On 13/10/2010 01:37, ljb wrote: Defaulting bytea output from the backend to use hex mode encoding, which is incompatible with pre-9.0 interfaces, wasn't a friendly thing to do. The default should have been escape mode. Or else you needed a big warning in HISTORY that we must either change bytea_o

Re: [GENERAL] about RPM build options

2010-10-13 Thread Derk Jan Horstman
> I've checked the build options for PostgreSQL 9.0.1, > I had some questions. > > I downloaded rpms from below site. > http://www.postgresql.org/ftp/binary/v9.0.1/linux/rpms/redhat/rhel-5-x86_64/ > > > 1. enable thread safety? > "--disable-thread-safety" is given. > Before version 8.4, "-

Re: [GENERAL] about RPM build options

2010-10-13 Thread Devrim GÜNDÜZ
On Wed, 2010-10-13 at 15:57 +0900, 勝俣 智成 wrote: > > 1. enable thread safety? > "--disable-thread-safety" is given. > Before version 8.4, "--enable-thread-safety" is given for thread > safe client library. > I think it is not compatible before release. Is this intention > thing? It is a pack

[GENERAL] about RPM build options

2010-10-13 Thread 勝俣 智成
Hi, I've checked the build options for PostgreSQL 9.0.1, I had some questions. I downloaded rpms from below site. http://www.postgresql.org/ftp/binary/v9.0.1/linux/rpms/redhat/rhel-5-x86_64/ 1. enable thread safety? "--disable-thread-safety" is given. Before version 8.4, "--enable-threa