Re: [GENERAL] OS X Tiger, and PostgreSQL 8.2 don't mix?

2006-12-28 Thread Chris Mair
I have OS X tiger with all the updates: uname -r 8.8.0 Here is what I get when I try to initdb on a freshly compiled 8.2: selecting default max_connections ... 10 selecting default shared_buffers/max_fsm_pages ... 400kB/2 creating configuration files ... ok creating template1

[GENERAL] Re: [GENERAL] 答复: [GENERAL] Need Help

2006-12-28 Thread Shoaib Mir
This should help you get the disk usage for a table: select pg_size_pretty(pg_relation_size('tablename')); --- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 12/28/06, 马庆 [EMAIL PROTECTED] wrote: Maybe U can't get the disk usage info, but you can try command explain

Re: [GENERAL] convert(... using windows_1251_to_utf8) - works on cli, but not in a c prog.

2006-12-28 Thread Alexander Farber
Hello Alvaro, On 12/24/06, Alvaro Herrera [EMAIL PROTECTED] wrote: Alexander Farber wrote: I started to prepare a test case and realized I had a bug. So convert() works for me, sorry for my previous message! In any case, it's probably saner if you SET client_encoding at the start of the

[GENERAL] Improve response time of a SQL command

2006-12-28 Thread Carlos H. Reimer
Hi, I would like to improve the response time of the following SQL command but I need some help to indentify where is it taking most of the processing time. It seams that it is in the Seq Scan on tt_gra gra, but not sure. Am I right? Can a new index help in this issue? Thank you in advance!

[GENERAL] unique constraint on more than one tables

2006-12-28 Thread Akbar
Hi, Imagine I have two tables, like this: create table bla_a ( id serial primary key, name varchar(31) not null, comment varchar(31) ); create table bla_b ( id serial primary key, name varchar(31) not null, blabla int ); I want to make sure that both tables could not have the same value

[GENERAL] select union with table name

2006-12-28 Thread Akbar
Hi, I have two tables. create table blue ( id serial primary key, name text not null, kill text not null ); create table red ( id serial primary key, name text not null, kiss text not null ); select blue.name from blue union select red.name from red; give me this: name 'blabla' 'bubu'

Re: [GENERAL] select union with table name

2006-12-28 Thread Joris Dobbelsteen
Try: select blue.name, 'blue' from blue union select red.name, 'red' from red; Not tested, but that should work. One thing to remember: If blabla is in both blue and red, it will appear twice, instead of only once as in your example. - Joris -Original Message- From: [EMAIL PROTECTED]

Re: [GENERAL] select union with table name

2006-12-28 Thread Richard Broersma Jr
I want this: nametable_name 'blabla' blue 'bubu'blue 'haha'red 'kkk' red Could I? Here is an example from the table inheritance chapter: SELECT p.relname, c.name, c.altitude FROM cities c, pg_class p WHERE c.altitude 500 and c.tableoid = p.oid; which returns:

Re: [GENERAL] Re: [GENERAL] ??: [GENERA

2006-12-28 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 What about empty space freed up by VACUUM? On 12/28/06 03:11, Shoaib Mir wrote: This should help you get the disk usage for a table: select pg_size_pretty(pg_relation_size('tablename')); - -- Ron Johnson, Jr. Jefferson LA USA Is common sense

FW: [GENERAL] select union with table name

2006-12-28 Thread antsumees
Try this Select name, 'blue' as table_name from blue Union all Select name, 'red' as table_name from red -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Akbar Sent: Thursday, December 28, 2006 2:10 PM To: pgsql-general@postgresql.org Subject: [GENERAL]

Re: [GENERAL] Improve response time of a SQL command

2006-12-28 Thread Tom Lane
Carlos H. Reimer [EMAIL PROTECTED] writes: I would like to improve the response time of the following SQL command Try getting rid of the silly concatenate-with-empty-string operations that appear to lurk within some view underlying this command. Those seem to be defeating the planner's ability

[GENERAL] LDAP configuration problem

2006-12-28 Thread Wenjian Yang
Hi, I've just installed 8.2.0 from rpms on FC6 i386 and wanted to try out the built-in LDAP support. The following LDAP authentication was added to pg_hba.conf host all all 0.0.0.0 0.0.0.0 ldap://dc.domain.com/dc=domain,dc=com/DOMAIN\ However when trying to connect from another machine,

Re: [GENERAL] OS X Tiger, and PostgreSQL 8.2 don't mix?

2006-12-28 Thread Tom Lane
Karen Hill [EMAIL PROTECTED] writes: I still get the error when I initdb. OS X and PostgreSQL has worked before for me, compiled from the source. Works for me. What do you get from sysctl -a | grep sysv ? regards, tom lane ---(end of

Re: [GENERAL] OS X Tiger, and PostgreSQL 8.2 don't mix?

2006-12-28 Thread Karen Hill
Chris Mair wrote: I have OS X tiger with all the updates: uname -r 8.8.0 Here is what I get when I try to initdb on a freshly compiled 8.2: selecting default max_connections ... 10 selecting default shared_buffers/max_fsm_pages ... 400kB/2 creating configuration files ...

Re: [GENERAL] OS X Tiger, and PostgreSQL 8.2 don't mix?

2006-12-28 Thread Shane Ambler
Karen Hill wrote: I have OS X tiger with all the updates: uname -r 8.8.0 Here is what I get when I try to initdb on a freshly compiled 8.2: selecting default max_connections ... 10 selecting default shared_buffers/max_fsm_pages ... 400kB/2 creating configuration files ... ok creating

Re: [GENERAL] OS X Tiger, and PostgreSQL 8.2 don't mix?

2006-12-28 Thread Karen Hill
Tom Lane wrote: Karen Hill [EMAIL PROTECTED] writes: I still get the error when I initdb. OS X and PostgreSQL has worked before for me, compiled from the source. Works for me. What do you get from sysctl -a | grep sysv ? sysctl -a | grep sysv kern.sysv.shmmax: 4194304 kern.sysv.shmmin:

Re: [GENERAL] OS X Tiger, and PostgreSQL 8.2 don't mix?

2006-12-28 Thread Scott Ribe
and added the appropriate items to /etc/sysctl.conf 1) The location may be out of date. Don't add to /etc/sysctl.conf; edit the values already in /etc/rc. Where you set these values has shifted around somewhat in OS X releases. I know that sysctl didn't work in 10.3. I know that rc works in

Re: [GENERAL] unique constraint on more than one tables

2006-12-28 Thread George Pavlov
First of all explicitly inserting IDs into your serial column sounds like a bad idea (in the general case). Unfortunately, I don't think inheritance can help you with this. Key quote from the docs: A serious limitation of the inheritance feature is that indexes (including unique constraints) and

[GENERAL] Backup Restore

2006-12-28 Thread Bob Pawley
PostgreSQL 8.1 running on Win XP. PGAdmin Version 1.6.2 When I backup my database on one computer using PG Admin 3 then attempt to open the file on a second computer - PG Admin does NOT recognize the file. The documentation isn't helpful, at least for a neophyte such as I. Can someone point me

Re: [GENERAL] OS X Tiger, and PostgreSQL 8.2 don't mix?

2006-12-28 Thread Tom Lane
Scott Ribe [EMAIL PROTECTED] writes: Finally, the error message you're getting doesn't indicate that postgres is actually requesting much memory. I suspect that you may have something else running on your system which is using SysV shared memory. Recent versions of OS X have ipcs, so you could

Re: [GENERAL] Backup Restore

2006-12-28 Thread Shoaib Mir
Well I haven't use much of PGAdmin but I will always be using pg_dump and pg_restore for that as they are really easy to use. You can find help on backup and restore at -- http://www.postgresql.org/docs/8.2/static/backup.html Shoaib Mir EnterpriseDB (www.enterprisedb.com)

[GENERAL] Seeking help on subscription problem

2006-12-28 Thread Péter Kovács
Hi, I have repeatedly tried subscribing to a number of postgresql mailing lists before Christmas on behalf of the following e-mail address: [EMAIL PROTECTED] . No confirmation e-mail has arrived to the above e-mail address yet. I also sent an e-mail (from the above e-mail address) to

Re: [GENERAL] Backup Restore

2006-12-28 Thread Dave Page
Shoaib Mir wrote: Well I haven't use much of PGAdmin but I will always be using pg_dump and pg_restore for that as they are really easy to use. You can find help on backup and restore at -- http://www.postgresql.org/docs/8.2/static/backup.html pgAdmin is just a frontend to

Re: [GENERAL] Backup Restore

2006-12-28 Thread Bob Pawley
I'm not getting an error message. The restore utility just doesn't see the backup file. It's looking for a file *.backup which is there but noot seen. I am running a version that identifies itself as 1.6.2. I downloaded it a few weeks ago from the official site. Should I be using an earlier

Re: [GENERAL] OS X Tiger, and PostgreSQL 8.2 don't mix?

2006-12-28 Thread Hunter Hillegas
I've seen this error on systems that don't realize they have Apple Remote Desktop installed which has its own copy of Postgres - you may be running a copy and not know it. On Dec 28, 2006, at 11:04 AM, Tom Lane wrote: Scott Ribe [EMAIL PROTECTED] writes: Finally, the error message you're

Re: [GENERAL] Backup Restore

2006-12-28 Thread Dave Page
Bob Pawley wrote: I'm not getting an error message. The restore utility just doesn't see the backup file. It's looking for a file *.backup which is there but noot seen. It's a standard file dialogue as provided by your operating system. I can't think of any reason it wouldn't see the file

[GENERAL] Optimising full outer join where for muti-row to multi-column view

2006-12-28 Thread Phil Endecott
Dear PostgreSQL experts, I have a database that records the EXIF data for a collection of photos. (EXIF is a method for embedding arbitary name-value data in a JPEG, and digital cameras typically use it to record things like exposure information.) My exif table looks something like this:

Re: [GENERAL] Optimising full outer join where for muti-row to multi-column view

2006-12-28 Thread Martijn van Oosterhout
On Thu, Dec 28, 2006 at 08:29:56PM +, Phil Endecott wrote: To try and avoid this, I tried using a full outer join in the view definition. In this case the row would always be present in the view, even if the data for the other columns were not present. I hoped that the query would

Re: [GENERAL] Backup Restore

2006-12-28 Thread Bob Pawley
When I change it to view all files it's there - but it won't do anything. Bob - Original Message - From: Dave Page [EMAIL PROTECTED] To: Bob Pawley [EMAIL PROTECTED] Cc: Shoaib Mir [EMAIL PROTECTED]; Postgresql pgsql-general@postgresql.org Sent: Thursday, December 28, 2006 12:06 PM

Re: [GENERAL] convert(... using windows_1251_to_utf8) - works on cli, but not in a c prog.

2006-12-28 Thread Alvaro Herrera
Alexander Farber wrote: Hello Alvaro, On 12/24/06, Alvaro Herrera [EMAIL PROTECTED] wrote: Alexander Farber wrote: I started to prepare a test case and realized I had a bug. So convert() works for me, sorry for my previous message! In any case, it's probably saner if you SET

Re: [GENERAL] out of memory woes

2006-12-28 Thread Angva
Just wanted to post an update. Not going too well. Each time the scripts were run over this holiday weekend, more statements failed with out of memory errors, including more and more create index statements (it had only been clusters previously). Eventually, psql could not even be called with a

Re: [GENERAL] NEED URGENT HELP....

2006-12-28 Thread Sandip G
Great !!! Its working Thanks to all for the great help. I am new to Postgre and like it's performance... I would like to learn it in depth, Please provide me any good resource to learn Postgre with lots of sample code/queries. Cheers !!!Best Regards,Sandip. - Original Message

[GENERAL] could not open relation:no such file or directory

2006-12-28 Thread karthik
hello, my name is karthik . i facing a problem when trying to select values from a table in postgresql. when i execute a query like select title from itemsbytitle; i get error as Error:Could not open relation itemsbytitle. no such file or directory. can anybody help me to

[GENERAL] Geographical redundancy

2006-12-28 Thread Dennis
Is there any feasible way to achieve geographical redundancy of postgresql database? Say you have a website which uses PG on the backend to read/write data and you want to have the website running on 2 separate servers distributed geographically and have the data synchronize somehow over the

[GENERAL] questions about migrating form postgres 7 to 8

2006-12-28 Thread Piotr Szałamacha
Hello I have question - is it som kind of guide for migrating from Postgres 7 to 8 database? I tried to simply dump 7 and inject it to 8 but operation failed. Regards PS -- - Piotr Szałamacha Horyzont

[GENERAL] Date

2006-12-28 Thread ice
Hello, I have a couple of tables. The client tables and the contacted tables. I am not sure how to start on this, what I need is a way to query all my clients then show any client that the last visit and or called day is greater than 30 days. Now it gets confusing, Suppose the client was

[GENERAL] Why ContinueUpdateOnError is not implemented in npgsql

2006-12-28 Thread Andrus
.NET data adapter must implement DataAdapter.ContinueUpdateOnError property in transaction. ContinueUpdateOnError requires that transaction continues after error. In this case .NET can mark all bad rows in DataGrid. User can see all errors together. Unfortunately inside transaction after error

Re: [GENERAL] ERROR: could not access status of transaction

2006-12-28 Thread Stuart Grimshaw
On 12/23/06, Stuart Grimshaw [EMAIL PROTECTED] wrote: berble=# select * from headlines ; ERROR: could not access status of transaction 1668180339 DETAIL: could not open file pg_clog/0636: No such file or directory Using Postgres 8.1.5 from Debian unstable, I got the above error, and I have no

[GENERAL] odbc and pgadmin.support newsgroup from news server are not functional

2006-12-28 Thread Andrus
News reader cannot read pgsql.interfaces.odbc pgsql.interfaces.pgadmin.support groups from news.postgresql.org news server last message in odbc group is from 14.12.6 and in pgadmin group is from 18.12.6 pgsql.general and pgsql.announce newsgroups works OK. Andrus.

Re: [GENERAL] DB problem

2006-12-28 Thread Filip Rembiałkowski
2006/12/26, [EMAIL PROTECTED] [EMAIL PROTECTED]: I think the logs are not enabled in my DB. So I set the following options in postgresql.con file you are using some options which came with later postgresql releases. log_timestamp= true ok log_directory=pg_log wrong (available from 8.0)

Re: [GENERAL] questions about migrating form postgres 7 to 8

2006-12-28 Thread Joshua D. Drake
On Thu, 2006-12-28 at 10:03 +0100, Piotr Szałamacha wrote: Hello I have question - is it som kind of guide for migrating from Postgres 7 to 8 database? I tried to simply dump 7 and inject it to 8 but operation failed. Use the version 8 pg_dump to connect to version 7 postgresql.

Re: [GENERAL] Why ContinueUpdateOnError is not implemented in npgsql

2006-12-28 Thread Tom Lane
Andrus [EMAIL PROTECTED] writes: ContinueUpdateOnError requires that transaction continues after error. In this case .NET can mark all bad rows in DataGrid. User can see all errors together. ... There are only two ways fix this issue. NpgsqlDataAdapter must invoke automatic ROLLBACK after

Re: [GENERAL] questions about migrating form postgres 7 to 8

2006-12-28 Thread Tom Lane
=?ISO-8859-2?Q?Piotr_Sza=B3amacha?= [EMAIL PROTECTED] writes: I have question - is it som kind of guide for migrating from Postgres 7 to 8 database? I tried to simply dump 7 and inject it to 8 but operation failed. Failed how? And which 7.x and 8.x versions are you talking about? You need

Re: [GENERAL] select union with table name

2006-12-28 Thread Reece Hart
On Thu, 2006-12-28 at 19:09 +0700, Akbar wrote: select blue.name from blue union select red.name from red give me this: name 'blabla' 'bubu' 'haha' 'kkk' I want this: nametable_name 'blabla' blue 'bubu'blue 'haha'red 'kkk' red Could I? select name,'blue' as

Re: [GENERAL] Geographical redundancy

2006-12-28 Thread Ben
Sure, there are lots of ways. Factors that start constraining things are: - do both sites have to be online (making changes to the data) at the same time? - how tightly do both sites have to stay in sync? - is data loss acceptable if one site suffers a disaster? - what platform are you

Re: [GENERAL] Date

2006-12-28 Thread A. Kretschmer
am Thu, dem 28.12.2006, um 7:24:30 -0800 mailte ice folgendes: Hello, I have a couple of tables. The client tables and the contacted tables. I am not sure how to start on this, what I need is a way to query all my clients then show any client that the last visit and or called day is

Re: [GENERAL] LDAP configuration problem

2006-12-28 Thread Magnus Hagander
Wenjian Yang wrote: Hi, I've just installed 8.2.0 from rpms on FC6 i386 and wanted to try out the built-in LDAP support. The following LDAP authentication was added to pg_hba.conf host all all 0.0.0.0 http://0.0.0.0 0.0.0.0 http://0.0.0.0

Re: [GENERAL] LDAP configuration problem

2006-12-28 Thread Wenjian Yang
Sorry, below are the lines in the log file: LOG: invalid entry in file /pub/pgsql/data/pg_hba.conf at line 78, token ldap://dc.domain.com/dc=domain^Adc=com;DOMAIN\; FATAL: missing or erroneous pg_hba.conf file HINT: See server log for details. And the pg_hba.conf line 78, is host all all