Re: [GENERAL] Errors upgrading from 7.3 to 8.1

2005-11-28 Thread Markus Wollny
Title: AW: [GENERAL] Errors upgrading from 7.3 to 8.1 Hello! We experienced the exact same problems. You may solve the problem by feeding the dump through iconv. See my earlier message on this issue http://archives.postgresql.org/pgsql-general/2005-11/msg00799.php On top of that you'd be w

Re: [GENERAL] sub select as a data column

2005-11-28 Thread Jim Buttafuoco
you were close, try the following (untesting). You need the alias on the outer my_table for this to work select year report_year, sum(amount), sum(select amount from my_table where year <= a.year) from my_table a group by report_year; -- Original Message --

Re: [GENERAL] Installation trouble

2005-11-28 Thread Tom Lane
Steve Crawford <[EMAIL PROTECTED]> writes: >> creating template1 database in /var/lib/pgsql/data/base/1 ... FATAL: >> XX000: failed to initialize lc_messages to "" We've seen this reported occasionally before, but none of the PG developers have ever been able to reproduce it. Do you have any LC

Re: [GENERAL] Getting "cannot remove lock from HTAB" during VACUUM FULL

2005-11-28 Thread Tom Lane
"Stock, Stuart" <[EMAIL PROTECTED]> writes: > During our weekly VACUUM FULL we get a "ERROR: cannot remove lock from HTAB" > message and then the database appears to hang completely. Try updating --- I see a 7.4.8 fix that might be relevant. regards, tom lane

Re: [GENERAL] Default and PQexecParams

2005-11-28 Thread ljb
[EMAIL PROTECTED] wrote: > Hi, > > How could one differentiate between DEFAULT and 'DEFAULT' as parameters > to PQexecuteParams? I assume you mean the libpq function PQexecParams(), and you want to use a parameterized query for INSERT or UPDATE. I don't think it is possible to use DEFAULT because

Re: [GENERAL] Installation trouble

2005-11-28 Thread Steve Crawford
Steve Crawford wrote: On Monday 31 October 2005 13:00, Tom Lane wrote: Steve Crawford <[EMAIL PROTECTED]> writes: if I try to ensure the C locale I keep running up against: FATAL: XX000: failed to initialize lc_messages to "" We've seen a few reports of this before, but never been able to ide

[GENERAL] Getting "cannot remove lock from HTAB" during VACUUM FULL

2005-11-28 Thread Stock, Stuart
Title: Getting "cannot remove lock from HTAB" during VACUUM FULL All, During our weekly VACUUM FULL we get a "ERROR: cannot remove lock from HTAB" message and then the database appears to hang completely. Other processes can connect to the database, but all queries hang. We must stop the dat

Re: [GENERAL] Errors upgrading from 7.3 to 8.1

2005-11-28 Thread Stock, Stuart
FYI in case you still have the problem after using pg_dump from 8.1 (we did) you may have an encoding mismatch between your 7.3 and 8.1 databases. Our 7.x database was SQL_ASCII while 8.1 defaults to creating databases as UTF-8. I had similar "invalid UTF-8 byte sequence" errors. I fixed it by usin

Re: [GENERAL] Errors upgrading from 7.3 to 8.1

2005-11-28 Thread Jim Buttafuoco
you should use the 8.1 pg_dump not the 7.3 one. Give it a try -- Original Message --- From: Benjamin Smith <[EMAIL PROTECTED]> To: Postgres General Sent: Mon, 28 Nov 2005 16:22:18 -0800 Subject: [GENERAL] Errors upgrading from 7.3 to 8.1 > Currently running Postgres 7.3.9 32bit

[GENERAL] Errors upgrading from 7.3 to 8.1

2005-11-28 Thread Benjamin Smith
Currently running Postgres 7.3.9 32bit on Fedora Core 1, and upgrading to PG 8.1 64bit on Centos 4. When I load the file, psql -U dbname < dbname.sql I get this error: ERROR: invalid UTF-8 byte sequence detected near byte 0x96 when inserting fields that seem to contain HTML. What could be c

Re: [GENERAL] Group By?

2005-11-28 Thread Bob Pawley
Thank you I'll give it a try. Bob - Original Message - From: "Jim C. Nasby" <[EMAIL PROTECTED]> To: "Bob Pawley" <[EMAIL PROTECTED]> Cc: "Guy Rouillier" <[EMAIL PROTECTED]>; "PostgreSQL General" Sent: Monday, November 28, 2005 4:13 PM Subject: Re: [GENERAL] Group By? Try this (unt

Re: [GENERAL] problem with psql?

2005-11-28 Thread Michael Glaesemann
[Reordering top-posted reply] On Mon, Nov 28, 2005 at 01:24:37PM -0600, Timothy Perrigo wrote: We just ran an OS update on an Xserve which runs our PostgreSQL server, and now it seems that pg_ctl status doesn't report the correct status. We are able to connect to the instance (using psql),

Re: [GENERAL] Group By?

2005-11-28 Thread Jim C. Nasby
Try this (untested): INSERT INTO auto_control( monitor, valve ) SELECT m.device_id, v.device_id FROM control m JOIN control v ON (m.association = v.association) ; On Mon, Nov 28, 2005 at 03:41:53PM -0800, Bob Pawley wrote: > Yes I am trying to insert all valves into the sa

Re: [GENERAL] problem with psql?

2005-11-28 Thread Jim C. Nasby
I've heard from others that OS X's remote desktop equivalent uses an internal PosgreSQL database in an embedded install that uses the default PostgreSQL port. That could be the cause of your trouble... On Mon, Nov 28, 2005 at 01:24:37PM -0600, Timothy Perrigo wrote: > We just ran an OS update on a

Re: [GENERAL] Generic Q about max(id) vs ORDER BY ID DESC LIMIT 1

2005-11-28 Thread Jim C. Nasby
On Sun, Nov 27, 2005 at 11:38:57PM +1100, Brendan Jurd wrote: > > Already done in 8.1. Here's an excerpt from the Release Notes: > > > > Automatically use indexes for MIN() and MAX() (Tom) > > > > In previous releases, the only way to use an index for MIN() > > or MAX() was to rewrite the

Re: [GENERAL] Login limitation?

2005-11-28 Thread Jim C. Nasby
On Sun, Nov 27, 2005 at 12:32:06PM +0100, Egy?d Csaba wrote: > Hi All, > > I'd like to know if there is a method to let a user login into only > predefined databases? I know that I could edit pg_hba.conf to achive this, > but > - there will be many databases on the server with the same structure

Re: [GENERAL] Group By?

2005-11-28 Thread Bob Pawley
Yes I am trying to insert all valves into the same row as their associated mon. Bob - Original Message - From: "Jim C. Nasby" <[EMAIL PROTECTED]> To: "Bob Pawley" <[EMAIL PROTECTED]> Cc: "Guy Rouillier" <[EMAIL PROTECTED]>; "PostgreSQL General" Sent: Monday, November 28, 2005 2:18 P

Re: [GENERAL] Strange VACUUM behaviour

2005-11-28 Thread Jim C. Nasby
One issue is that pg_toast tables can't vacuum rows until their respective rows have been deleted by vacuuming the base table. But it's still odd that the count decreases by 4 each time you run it. As for the length of time, that could be due to heavily loaded hardware. You might do better if you

[GENERAL] BUG when migrating from 8.0 to 8.1 with create temp table

2005-11-28 Thread David Gagnon
Hi all, I just migrated from 8.0 to 8.1 and one of my stored procecure just hang when trying to create a temp table Here is my call: select * from usp_Comptabilite_AgeDeCompteClient('M', null, '2005-01-28', '1', '1', '0', null) If you look below in the log you will see that the function j

Re: [GENERAL] BUG when migrating from 8.0 to 8.1 with create temp table:SORRY MY

2005-11-28 Thread David Gagnon
The log was not written I think Sorry for the noise /David David Gagnon wrote: Hi all, I just migrated from 8.0 to 8.1 and one of my stored procecure just hang when trying to create a temp table Here is my call: select * from usp_Comptabilite_AgeDeCompteClient('M', null, '2005-01-28',

Re: [GENERAL] sub select as a data column

2005-11-28 Thread Phong & Ronni Bounmixay
You both are SO right!  I sent that off and tried a couple of things and realized I was close but not close enough.  I really appreciate the kind responses.  Sometimes it's so hard to ask a question without feeling so foolish and then feeling worse when the answers are sarcastic.  Thank you! Good

Re: [GENERAL] Set a blank password for a db user

2005-11-28 Thread Jim C. Nasby
Read up on pg_hba.conf: http://www.postgresql.org/docs/8.1/interactive/client-authentication.html You might not need to use password authentication. Short of that, have a look at http://www.postgresql.org/docs/current/static/libpq-pgpass.html On Thu, Nov 24, 2005 at 12:37:57AM -0800, Rembrandt wr

Re: [GENERAL] dumping data to version control using pg_dump?

2005-11-28 Thread Jim C. Nasby
Closest you'll come is using copy... psql -c "create temp table ...; copy from temp_table to file" There has been some discussion about allowing COPY to work from either a view or an arbitrary SELECT statement; check the -hackers archives. On Thu, Nov 24, 2005 at 06:21:30PM +1100, Klint Gore wro

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-28 Thread Jim C. Nasby
On Thu, Nov 24, 2005 at 02:59:28PM -0500, Qingqing Zhou wrote: > > "Tom Lane" <[EMAIL PROTECTED]> wrote > > > > At this point I think there's no question that your filesystem is > > dropping blocks :-(. > > It is very interesting to follow this thread. But at this point, can you > explain more w

Re: [GENERAL] Group By?

2005-11-28 Thread Jim C. Nasby
So are you trying to get a list of all 'mon's and 'valve's for each given association? On Wed, Nov 23, 2005 at 04:31:04PM -0800, Bob Pawley wrote: > Guy > > > > Sorry about the chart. It held together when I sent it to myself. > > > > I'll try to make it clear in the way you suggest, by a tr

Re: [GENERAL] sub select as a data column

2005-11-28 Thread Tom Lane
Phong & Ronni Bounmixay <[EMAIL PROTECTED]> writes: > I want to do in postgresql what I do in oracle: > select year report_year, > sum(amount), > sum(select amount from my_table where year <= report_year) > from my_table > group by report_year; That doesn't really work in Oracle

Re: [GENERAL] problem with psql?

2005-11-28 Thread Tom Lane
Timothy Perrigo <[EMAIL PROTECTED]> writes: > We are able to connect to the instance (using psql), but cannot shut > down or restart the instance using pg_ctl (it just reports that the > server is not running). We are running PostgreSQL version 8.0.0 and > Mac OS X 10.3.9. Can anyone tell u

Re: [GENERAL] intarray index

2005-11-28 Thread Oleg Bartunov
On Mon, 28 Nov 2005, Marek Lewczuk wrote: Hello, I have a question about IntArray contrib package. The docs says: "...current implementation provides index support for one-dimensional array of int4's - gist__int_ops, suitable for small and medium size of arrays (used on default), and gist__int

Re: [GENERAL] Slow pgdump

2005-11-28 Thread Jim C. Nasby
I'm making a bit of a guess here, but I suspect the issue is that a single large dump will hold a transaction open for the entire time. That will affect vacuums at a minimum; not sure what else could be affected. On Tue, Nov 22, 2005 at 05:13:44PM -0800, Patrick Hatcher wrote: > > OS - RH3 > Pg -

Re: [GENERAL] Why pgAdmin III guru suggests VACUUM in 8.1

2005-11-28 Thread Jim C. Nasby
On Wed, Nov 23, 2005 at 04:56:58PM +0200, Andrus wrote: > No. autovacuum is turned ON by default in 8.1 XP Hrm, interesting that it's different than on Unix. > I read from the docs you mentioned that Postgres has low maintenance needs > compared to other databases. So I'm expecting that there is

[GENERAL] sub select as a data column

2005-11-28 Thread Phong & Ronni Bounmixay
I am having trouble coming up with words to describe exactly what I need so searching for a solution is getting frustrating!  If this has been answered twelve hundred times - please forgive me! I want to do in postgresql what I do in oracle: select year report_year, sum(amount),  

[GENERAL] problem with psql?

2005-11-28 Thread Timothy Perrigo
We just ran an OS update on an Xserve which runs our PostgreSQL server, and now it seems that pg_ctl status doesn't report the correct status. ~ postgres$ pg_ctl status pg_ctl: neither postmaster nor postgres running ~ postgres$ ps auxw | grep postgres postgres 491 0.0 -0.133156 11

[GENERAL] intarray index

2005-11-28 Thread Marek Lewczuk
Hello, I have a question about IntArray contrib package. The docs says: "...current implementation provides index support for one-dimensional array of int4's - gist__int_ops, suitable for small and medium size of arrays (used on default), and gist__intbig_ops for indexing large arrays (we use s

Re: [GENERAL] Help with COPY Error: invalid UTF-8 byte ....

2005-11-28 Thread Richard Huxton
Alex wrote: Hi, I am having a problem with a copy command, saying ERROR: invalid UTF-8 byte sequence detected... The problem actually is that the entire copy job terminates instead of just ignoring the record in question. Is there a way to have faulty records ignored only without terminatin

[GENERAL] ANN: PgBrowse-1.3 is available.

2005-11-28 Thread Jerry LeVan
PgBrowse ver 1.3 is a generic Postgresql database browser that works on Windows, Macintosh and Linux platforms that is written in Tcl/Tk. A Starpack is available for Linux/x86 and an application bundle is available for MacOSX. A couple of features that help differentiate this (free) tool. 1) No

Re: [GENERAL] how to get size of array in function

2005-11-28 Thread Andreas Kretschmer
Amit Soni <[EMAIL PROTECTED]> schrieb: > Hi list, > i made one function and the argument of that function is string array, > > now how can i get the size of that array?? Please read http://www.postgresql.org/docs/8.1/interactive/functions-array.html You can use array_lower/array_upper or array

Re: [GENERAL] PostgreSQL and SAN/NAS technologies

2005-11-28 Thread Franz . Rasper
Hi, i have seen both mysql and postgresql running on Network Aplliance Filer via NFS (UNIX/BSD Server). NFS is slower than SAN or local Disks, with NFS it is easier to move Data from one server to another server. NFS tuning is tricky, "Netapp NFS" with snaphosts are great. But if you have a lot of

[GENERAL] how to get size of array in function

2005-11-28 Thread Amit Soni
Hi list, i made one function and the argument of that function is string array, now how can i get the size of that array?? Thanks, Amit Soni -- Netcore Solutions Pvt. Ltd. Website: http://www.netcore.co.in Spamtraps: http://cleanmail.net

Re: [GENERAL] Errors with temporary tables

2005-11-28 Thread Jens Wendelmuth
Hi Tom, Tom Lane wrote: The first of these looks like the same problem we've seen reported before of a table's rowtype not getting dropped when the table is dropped. I'm a newbie with PG and i do not understand the meaning of "a table's rowtype not getting dropped when the table is dropped."

Re: [GENERAL] need help in designing a database.

2005-11-28 Thread Haim Ashkenazi
On Mon, 28 Nov 2005 10:32:53 +, Richard Huxton wrote: > Haim Ashkenazi wrote: >> Hi >> >> I'm writing an application that calculates working hours for billing. >> there are three levels of billing. one for regular hours, one for >> evening/nights, and one for saturdays/holidays. >> >> My fi

Re: [GENERAL] Errors with temporary tables

2005-11-28 Thread Tom Lane
Jens Wendelmuth <[EMAIL PROTECTED]> writes: > I'm a newbie with PG and i do not understand the meaning of "a table's > rowtype not getting dropped when the table is > dropped." Every table has an associated composite type of the same name, which represents the type of each row of the table. This

[GENERAL] Help with COPY Error: invalid UTF-8 byte ....

2005-11-28 Thread Alex
Hi, I am having a problem with a copy command, saying ERROR: invalid UTF-8 byte sequence detected... The problem actually is that the entire copy job terminates instead of just ignoring the record in question. Is there a way to have faulty records ignored only without terminating the entire

[GENERAL] strange behaviour in plpgsql:null arguments

2005-11-28 Thread Peter Filipov
Hi, I think I found something that is strange. I can't detect whether i passed a NULL to stored procedure in plpgsql when it happens that I use composites I warn that I haven't read the sql standards though. Here is the code: CREATE TYPE ttype AS ( t1 int, t2 int ); CREATE OR REP

Re: [GENERAL] regarding the apostrophe character

2005-11-28 Thread Michael Glaesemann
On Nov 28, 2005, at 21:20 , surabhi.ahuja wrote: and what about the backslash character ... do we need to escape it as well? or it is treated as a normal character What have you tried? What do the docs say? Michael Glaesemann grzm myrealbox com ---(end of broa

Re: [GENERAL] regarding the apostrophe character

2005-11-28 Thread surabhi.ahuja
Title: Re: [GENERAL] regarding the apostrophe character and what about the backslash character ...   do we need to escape it as well? or it is treated as a normal character  From: Michael Glaesemann [mailto:[EMAIL PROTECTED]Sent: Fri 11/25/2005 4:17 PMTo: surabhi.ahujaCc: pgsql-general@

Re: [GENERAL] postmaster does not come up

2005-11-28 Thread surabhi.ahuja
  it just times out   and nothing was there in the logs ...   i just specified the log file name while starting postmsater but it had nothing From: hubert depesz lubaczewski [mailto:[EMAIL PROTECTED]Sent: Fri 11/25/2005 1:22 PMTo: surabhi.ahujaCc: pgsql-general@postgresql.orgSubject: Re:

Re: [GENERAL] need help in designing a database.

2005-11-28 Thread Richard Huxton
Haim Ashkenazi wrote: Hi I'm writing an application that calculates working hours for billing. there are three levels of billing. one for regular hours, one for evening/nights, and one for saturdays/holidays. My first decision is wether I make these calculations in a database view (If I under

Re: [GENERAL] Usability Question

2005-11-28 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Reading through the FAQ and Online docs I found the comment that in most cases virus protecting and/or firewall software causes this problem and the recommendation to stop using or even to uninstall this software. It is hard to believe that this is a serious advice. Is on

[GENERAL] PostgreSQL and SAN/NAS technologies

2005-11-28 Thread Mark Cave-Ayland
Hi everyone, We're looking at investing in a new storage system in order to run PostgreSQL and the advice we are getting is to move away from our current SAN solution to a NAS solution. Can anyone offer any advice/experience on using NAS devices to run a PostgreSQL database? I have seen posts on

Re: [GENERAL] "invalid page header in block 597621 of relation..."error

2005-11-28 Thread Adam Witney
On 26/11/05 4:48 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: > Adam Witney <[EMAIL PROTECTED]> writes: >> I deleted the two datasets in mba_data_base that were affected by the empty >> pages, I also deleted the relevant two rows in measured_bioassay_base... But >> maybe it didn't do the right thing

Re: [GENERAL] Can this pl/pgsql be simplified?

2005-11-28 Thread Oliver Elphick
On Fri, 2005-11-25 at 12:19 -0800, CSN wrote: > I have a trigger function that simply updates item counts when the items > table changes (member_id > or active changes). I'm curious if this bit of the code can be simplified? :) > > thanks > csn > > > > ELSIF TG_OP = 'UPDATE' THEN > > IF (OL