[GENERAL] ODBC and configure

2010-07-26 Thread Ravi Katkar
Hi List, I have installed ODBC and configure the same in RHEL 4.4. Configured the ODBC in the following way: [ODBC Data Sources] testPSQL = PostgreSQL Test [testPSQL] Driver=/usr/lib/psqlodbc.so Description=Sample PostgreSQL DSN DSN=testPSQL SERVER=xhost+localhost Username=postgres Database=rtd

Re: [GENERAL] What to do if space for database decrease and no additional hard drive is possible?

2010-07-26 Thread John R Pierce
On 07/26/10 3:43 AM, AlannY wrote: Hi there. I have a huge database with several tables. Some tables have statistics information. And it's very huge. I don't want to loose any of this data. But hard drives on my single server are not eternal. Very soon, there will be no left space. And the most

Re: [GENERAL] What to do if space for database decrease and no additional hard drive is possible?

2010-07-26 Thread Scott Marlowe
On Mon, Jul 26, 2010 at 4:43 AM, AlannY wrote: > Hi there. > > I have a huge database with several tables. Some tables have statistics > information. And it's very huge. I don't want to loose any of this data. > But hard drives on my single server are not eternal. Very soon, there will > be no lef

Re: [GENERAL] Re: What to do if space for database decrease and no additional hard drive is possible?

2010-07-26 Thread Greg Smith
A. Kretschmer wrote: buy external USB-Drive, and create a new tablespace, and move some large table into this new tablespace and/or use the new tablespace for new tables. You can also use table-partitioning with different tablespaces. There are zero USB drives on the market I'd trust to put

Re: [GENERAL] sql dump

2010-07-26 Thread Scott Frankel
Thanks for all the suggestions. COPY may work for my purposes. The SSH tunnel option for using pg_dump is very interesting. Thanks! Scott On Jul 26, 2010, at 9:18 AM, David Fetter wrote: On Mon, Jul 26, 2010 at 08:58:59AM -0700, Scott Frankel wrote: Hi all, Is it possible to perfor

Re: [GENERAL] Converting BYTEA from/to BIGINT

2010-07-26 Thread Vincenzo Romano
2010/7/26 Vincenzo Romano : > 2010/7/26 Pavel Stehule : >> Hello >> >> you can try >> >> postgres=# select int8send(256); >>      int8send >> >>  \x0100 >> (1 row) >> >> for converting from bytea to int8 you need a custom function - probably in C >> :( > > int8send

Re: [GENERAL] Integral PG DB replication

2010-07-26 Thread Ben Chobot
On Jul 26, 2010, at 9:09 AM, Gauthier, Dave wrote: > Hi: > > Will DB replication be integral in v9? If so, when (approx) will that be out? > > I have a need for this functionality to replicate a read-only copy of a DB > where the master and slave are 2 time zones away. Estimating DML traffi

Re: [GENERAL] sql dump

2010-07-26 Thread Gauthier, Dave
Maybe with a stored procedure that reads metadata plus data and spits everything out in sql-form to stdout somehow. plperl might be a good language choice. -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Scott Fran

[GENERAL] Integral PG DB replication

2010-07-26 Thread Gauthier, Dave
Hi: Will DB replication be integral in v9? If so, when (approx) will that be out? I have a need for this functionality to replicate a read-only copy of a DB where the master and slave are 2 time zones away. Estimating DML traffic, I'd say maybe a few dozen writes per hour, but busty, plus nea

Re: [GENERAL] sql dump

2010-07-26 Thread David Fetter
On Mon, Jul 26, 2010 at 08:58:59AM -0700, Scott Frankel wrote: > > Hi all, > > Is it possible to perform an SQL Dump without using pg_dump? No, but there may be more options for using pg_dump than you have looked at. One example would be to use pg_dump on one with an SSH tunnel to the other one

Re: [GENERAL] sql dump

2010-07-26 Thread Ian Barwick
2010/7/27 Scott Frankel : > > Hi all, > > Is it possible to perform an SQL Dump without using pg_dump? > > I have a special case situation wherein my application has access to a > remotely-hosted PG (8.3) database, but does not have access to its admin > tools.  (There's a longer backstory here tha

Re: [GENERAL] sql dump

2010-07-26 Thread Vincenzo Romano
2010/7/26 Scott Frankel : > > Hi all, > > Is it possible to perform an SQL Dump without using pg_dump? > > I have a special case situation wherein my application has access to a > remotely-hosted PG (8.3) database, but does not have access to its admin > tools.  (There's a longer backstory here tha

Re: [GENERAL] sql dump

2010-07-26 Thread Raymond O'Donnell
On 26/07/2010 16:58, Scott Frankel wrote: Hi all, Is it possible to perform an SQL Dump without using pg_dump? I have a special case situation wherein my application has access to a remotely-hosted PG (8.3) database, but does not have access to its admin tools. (There's a longer backstory here

[GENERAL] sql dump

2010-07-26 Thread Scott Frankel
Hi all, Is it possible to perform an SQL Dump without using pg_dump? I have a special case situation wherein my application has access to a remotely-hosted PG (8.3) database, but does not have access to its admin tools. (There's a longer backstory here that I'm happy to explain if necess

Re: [GENERAL] Blocked inserts on tables with FK to tables for which UPDATE has been revoked

2010-07-26 Thread Samuel Gilbert
Hello Alban, You are right on both count of me not using the "test" user. At first, it was set-up to use the "test" user, but later on, I wondered if owner of a database got treated differently. The behaviour is the same regardless of if it's the owner or any other role. In the end, I go

Re: [GENERAL] Data dumps to files - best methods?

2010-07-26 Thread Michael A. Peters
> Hi All > >From what I can see in the specs and current output files, the client > needs the data output in .xml format in order to use this on their side, > still trying to understand why though... I don't know what they are doing but XML is an excellent data storage format. I use it for s

Re: [GENERAL] Re: What to do if space for database decrease and no additional hard drive is possible?

2010-07-26 Thread A. Kretschmer
In response to Bill Thoen : > > > A. Kretschmer wrote: > >In response to Ivan Voras : > > > >>* buy external storage (NAS, or even an external USB drive), move the > >>database to it > >> > > > >buy external USB-Drive, and create a new tablespace, and move some large > >table into this new

[GENERAL] Re: What to do if space for database decrease and no additional hard drive is possible?

2010-07-26 Thread Vincenzo Romano
2010/7/26 A. Kretschmer : > In response to Vincenzo Romano : >> 2010/7/26 A. Kretschmer : >> > In response to Ivan Voras : >> >> * buy external storage (NAS, or even an external USB drive), move the >> >> database to it >> > >> > buy external USB-Drive, and create a new tablespace, and move some la

Re: [GENERAL] What to do if space for database decrease and no additional hard drive is possible?

2010-07-26 Thread A. Kretschmer
In response to Vincenzo Romano : > 2010/7/26 A. Kretschmer : > > In response to Ivan Voras : > >> * buy external storage (NAS, or even an external USB drive), move the > >> database to it > > > > buy external USB-Drive, and create a new tablespace, and move some large > > table into this new tables

Re: [GENERAL] Re: What to do if space for database decrease and no additional hard drive is possible?

2010-07-26 Thread Bill Thoen
A. Kretschmer wrote: In response to Ivan Voras : * buy external storage (NAS, or even an external USB drive), move the database to it buy external USB-Drive, and create a new tablespace, and move some large table into this new tablespace and/or use the new tablespace for new tables.

[GENERAL] Re: What to do if space for database decrease and no additional hard drive is possible?

2010-07-26 Thread Vincenzo Romano
2010/7/26 A. Kretschmer : > In response to Ivan Voras : >> * buy external storage (NAS, or even an external USB drive), move the >> database to it > > buy external USB-Drive, and create a new tablespace, and move some large > table into this new tablespace and/or use the new tablespace for new > ta

Re: [GENERAL] Re: What to do if space for database decrease and no additional hard drive is possible?

2010-07-26 Thread A. Kretschmer
In response to Ivan Voras : > * buy external storage (NAS, or even an external USB drive), move the > database to it buy external USB-Drive, and create a new tablespace, and move some large table into this new tablespace and/or use the new tablespace for new tables. You can also use table-partitio

Re: [GENERAL] Data dumps to files - best methods?

2010-07-26 Thread Ralf Schuchardt
Hi, Am 26.07.2010 um 11:46 schrieb Machiel Richards: >Is there a method of outputting / dumping the data into .xml format as > part of the scripts / crons/ db processes? It depends on your requirements of the xml file format. psql can output data in html/xhtml format (--html switch), wh

[GENERAL] Re: What to do if space for database decrease and no additional hard drive is possible?

2010-07-26 Thread Ivan Voras
On 26.7.2010 12:43, AlannY wrote: > Hi there. > > I have a huge database with several tables. Some tables have statistics > information. And it's very huge. I don't want to loose any of this data. > But hard drives on my single server are not eternal. Very soon, there will > be no left space. And

[GENERAL] What to do if space for database decrease and no additional hard drive is possible?

2010-07-26 Thread AlannY
Hi there. I have a huge database with several tables. Some tables have statistics information. And it's very huge. I don't want to loose any of this data. But hard drives on my single server are not eternal. Very soon, there will be no left space. And the most awful this, that it's a 1U server, an

Re: [GENERAL] Server load statistics

2010-07-26 Thread Sam Mason
On Sun, Jul 25, 2010 at 12:15:06PM +0200, Torsten Bronger wrote: > I need statistics about the PG server load. At the moment, I use > for this > > SELECT tup_returned + tup_fetched + tup_inserted + tup_updated + > tup_deleted FROM pg_stat_database WHERE datname='mydb'; > > However, the figu

Re: [GENERAL] Incorrect FTS result with GIN index

2010-07-26 Thread Artur Dabrowski
Hello Oleg, I totally agree, that the problem should be fixed. Saying this, I need to add that: - I have no knowledge of postgres development, - I cannot dedicate any significant time to this problem, - I am no longer working for the project where the problem occurred, - In the mentioned project

Re: [GENERAL] Converting BYTEA from/to BIGINT

2010-07-26 Thread Vincenzo Romano
2010/7/26 Pavel Stehule : > Hello > > you can try > > postgres=# select int8send(256); >      int8send > >  \x0100 > (1 row) > > for converting from bytea to int8 you need a custom function - probably in C > :( int8send? -- Vincenzo Romano NotOrAnd Information T

Re: [GENERAL] Converting BYTEA from/to BIGINT

2010-07-26 Thread Vincenzo Romano
2010/7/26 Vincenzo Romano : > Hi all. > > I'd like to convert an 8-bytes BYTEA into a BIGINT and possibly vice versa. > Is there any way to do it? Something like: CREATE OR REPLACE FUNCTION bytea_to_int8( ba BYTEA, OUT res INT8 ) LANGUAGE plpgsql STRICT AS $BODY$ DECLARE i INT; BEGIN res := 0

Re: [GENERAL] Data dumps to files - best methods?

2010-07-26 Thread Machiel Richards
Hi All Thank you for the responses so far... I do however have a more specific question regarding this data dump that I need to create for them. From what I can see in the specs and current output files, the client needs the data output in .xml format in order to use this

Re: [GENERAL] Converting BYTEA from/to BIGINT

2010-07-26 Thread Pavel Stehule
Hello you can try postgres=# select int8send(256); int8send \x0100 (1 row) for converting from bytea to int8 you need a custom function - probably in C :( Pavel 2010/7/26 Vincenzo Romano : > Hi all. > > I'd like to convert an 8-bytes BYTEA into a BIGINT

[GENERAL] Converting BYTEA from/to BIGINT

2010-07-26 Thread Vincenzo Romano
Hi all. I'd like to convert an 8-bytes BYTEA into a BIGINT and possibly vice versa. Is there any way to do it? -- Vincenzo Romano NotOrAnd Information Technologies NON QVIETIS MARIBVS NAVTA PERITVS -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your su

Re: [GENERAL] Redirect sequence access to different schema

2010-07-26 Thread Magnus Reftel
On Jul 25, 2010, at 23:13 , Joe Conway wrote: > On 07/25/2010 12:01 PM, Magnus Reftel wrote: >> create view myseq as select * from other_schema.foo_id_seq; >> >> but when I run "select nextval('myseq');" I get an error saying that >> myseq "is not a sequence". What other options are there? > > It