Re: [GENERAL] 7.4.1 & invalid page header in block

2004-04-06 Thread Tom Lane
=?ISO-8859-1?Q?Pailloncy_Jean-G=E9rard?= <[EMAIL PROTECTED]> writes: > ERROR: invalid page header in block 4602 of relation "url" > url is a index for web. I do not care if I loose few data. > How can I correct table url ? If it's an index then you can just REINDEX. However, you would be extreme

Re: [GENERAL] PERFORM statement inside procedure

2004-04-06 Thread Tom Lane
"Rajat Katyal" <[EMAIL PROTECTED]> writes: > checkPKSql := ''select * from "transform_customer_billing" ''; > checkPKSql := checkPKSql || '' where "inv_no" = '' || quote_literal(new= > ."inv_no"); > PERFORM checkPKSql; You seem to be confusing PERFORM with EXECUTE. They are very different. The a

Re: [GENERAL] Cursors and Transactions, why?

2004-04-06 Thread Joe Conway
Eric Ridge wrote: On Apr 6, 2004, at 11:54 AM, Jan Wieck wrote: And now you know why they are so good if you don't use all rows. This benefit I think goes away if you use Joe Conway's suggestion of WITH HOLD. Okay, so WITH HOLD is actually materializing the entire resultset (sequential scan or o

Re: [GENERAL] thread_test.c problems

2004-04-06 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > My plan is to have 'configure' run this program as part of its > > operation, > > Peter's not going to be happy with you ;-) Runtime configure tests are > not part of the Grand Plan --- ideally configure should only have to do > comp

Re: [GENERAL] thread_test.c problems

2004-04-06 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > My plan is to have 'configure' run this program as part of its > operation, Peter's not going to be happy with you ;-) Runtime configure tests are not part of the Grand Plan --- ideally configure should only have to do compile and link tests.

Re: [GENERAL] thread_test.c problems

2004-04-06 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: > On 4/5/04 8:31 AM, "Bruce Momjian" <[EMAIL PROTECTED]> wrote: > > >>> OK, new patch applied that causes all threads to wait until the parent > >>> checks their thread-specific pointers. I ran 1000 tests and all passed. > >>> Hopefully it will good for you too. > >> > >>

Re: [GENERAL] Error on deleting

2004-04-06 Thread Richard Huxton
On Tuesday 30 March 2004 18:20, Indibil wrote: > Hi: I'm not sure if you are still interested, but you probably need to subscribe to the address above ([EMAIL PROTECTED]) - the address you were using looked very strange indeed. You can see the mailing lists at http://www.postgresql.org/lists.ht

Re: [GENERAL] concat strings but spaces

2004-04-06 Thread Ron St-Pierre
Matthias Teege wrote: Moin, I try to concat values from three fields in a function like this: create or replace function fconcat_name(varchar, varchar, varchar) returns varchar as ' declare ttl alias for $1; vnm alias for $2; nme alias for $3; begin return ttl || '' '' || vnm || ''

Re: [GENERAL] Crash in postgres/linux on verly large database

2004-04-06 Thread scott.marlowe
On Tue, 6 Apr 2004, Bernhard Ankenbrand wrote: > Hi, > > we have a table width about 60.000.000 entrys and about 4GB storage size. > When creating an index on this table the whole linux box freezes and the > reiser-fs file system is corrupted on not recoverable. > > Does anybody have experience

Re: [GENERAL] Create Type Problem

2004-04-06 Thread Stephan Szabo
On Thu, 1 Apr 2004, Vinay Jain wrote: >I am newbie so this problem may be too simple to be asked.please help me if > any new thing to be added in following: > > I want to use user defined data type in User_Type(n) way AFAIK, you cannot currently make user defined types that take (n) fash

Re: [GENERAL] Cursors and Transactions, why?

2004-04-06 Thread wespvp
On 4/6/04 10:54 AM, "Jan Wieck" <[EMAIL PROTECTED]> wrote: >> Cursors seem as if they have some nice performance benefits (esp. if >> you're not using all rows found), but their usefulness drops >> considerably since you must leave a transaction open. > > And now you know why they are so good if

Re: [GENERAL] SQL trees and other nonsense...

2004-04-06 Thread William White
Trilobite Trilobite wrote: Anyway, there are a few things in our database that are more hierarchal then they are relational. The problem I'm working with is accounting, as in, "accounts > owners equity > expense accounts > rent > shop rent" etc... I have no idea how many accounts the end user

Re: [GENERAL] concat strings but spaces

2004-04-06 Thread Joe Conway
Matthias Teege wrote: I try to concat values from three fields in a function like this: create or replace function fconcat_name(varchar, varchar, varchar) returns varchar as ' declare ttl alias for $1; vnm alias for $2; nme alias for $3; begin return ttl || '' '' || vnm || '' ''

Re: [GENERAL] Crash in postgres/linux on verly large database

2004-04-06 Thread Richard Huxton
On Tuesday 06 April 2004 12:22, Bernhard Ankenbrand wrote: > Hi, > > we have a table width about 60.000.000 entrys and about 4GB storage size. > When creating an index on this table the whole linux box freezes and the > reiser-fs file system is corrupted on not recoverable. > > Does anybody have ex

Re: [GENERAL] PERFORM statement inside procedure

2004-04-06 Thread Bill Moran
Rajat Katyal wrote: Hi: In postgres documentation its written that if we execute query as PERFORM /query /inside our stored procedure/;/ *then the special variable FOUND is set to true if the query produced at least one row, or false if it produced no rows.* ** But FOUND variable is always re

Re: [GENERAL] Crash in postgres/linux on verly large database

2004-04-06 Thread Tom Lane
Bernhard Ankenbrand <[EMAIL PROTECTED]> writes: > we have a table width about 60.000.000 entrys and about 4GB storage size. > When creating an index on this table the whole linux box freezes and the > reiser-fs file system is corrupted on not recoverable. > Does anybody have experience with this

Re: [GENERAL] Storing jpgs

2004-04-06 Thread Joe Lester
Would anyone have some example code they could share using libpq to encode an image into a text field? Right now, I'm converting my image into a hexadecimal string representation in my SQL statement. I'm sure there must be a better (faster) way. The hex encodeing/decoding slows things down for

Re: [GENERAL] Large DB

2004-04-06 Thread Ericson Smith
I've been following this thread with interest since it started, and it really seems that there is just too much data in that single table. When it comes down to it, making smaller separate tables seems to be the way to go. Querying will be a little harder, but much faster. Warmest regards, Eri

Re: [GENERAL] pg_autovacuum won't make on FreeBSD

2004-04-06 Thread Bill Moran
Have you tried installing gmake and using it instead of FreeBSD's make? (not 100% sure, but it seems like that's the problem) David Wheeler wrote: 4.8-STABLE FreeBSD 4.8-STABLE i386 sahlins# cd postgresql-7.4.2/contrib/pg_autovacuum sahlins# make "../../src/Makefile.global", line 38: Missing dep

Re: [GENERAL] Compound keys and foreign constraints

2004-04-06 Thread Manfred Koizar
On Mon, 05 Apr 2004 11:55:17 -0500, Wes Palmer <[EMAIL PROTECTED]> wrote: >> match, there's no need to fetch the heap tuple. Unfortunately the >> planner doesn't believe that this is possible: >> /* Don't believe estimates less than 1... */ >> if (tuples_fetched < 1.0) >> tuples_fetched = 1.0; > >

[GENERAL] Creating a trigger function

2004-04-06 Thread Peter Erickson
I am running postgresql 7.4.2 and having problems creating a trigger function properly. I keep getting the following error: ERROR: OLD used in query that is not in rule I have a table called journal_entries with a foreign key to a table called journals. When a entry is added to journal_entries,

Re: [GENERAL] pg_autovacuum won't make on FreeBSD

2004-04-06 Thread Fernando Schapachnik
Try gmake. Regards. En un mensaje anterior, David Wheeler escribió: > 4.8-STABLE FreeBSD 4.8-STABLE i386 > > sahlins# cd postgresql-7.4.2/contrib/pg_autovacuum > sahlins# make > "../../src/Makefile.global", line 38: Missing dependency operator ---(end of broadcast)-

[GENERAL] tcl and pgrd problem

2004-04-06 Thread tatyana . krasnokutsky
We are trying to install Postgres replication using pgReplicator. We are following the installation instruction according to http://pgreplicator.sourceforge.net/installation.html The problem is with running pgrd daemon. There is no errors when we compile TCL-DP but when we run pgrd we have the fo

[GENERAL] thread_test.c problems

2004-04-06 Thread Wes Palmer
When I try to run thread_test.c from the CVS tip, it hangs in an infinite CPU loop on both linux (RedHat AS 3.0, gcc 3.2.3) and Mac OS X 10.3.3 (gcc 3.3). I've also tried down to gcc 2.96 on Mac OS X. If I compile it with -g instead of -O2 on linux, it runs to completion and gives me: Add this t

[GENERAL] Best Practices for Storing Set Combinations

2004-04-06 Thread Louis Aslett
I hope this is the correct newsgroup for this query (if not please give me a pointer to where is best): I understand the theory of normalisation etc and am trying to follow best practices in the design of the database for a new project, but I am unsure as to the best practice when one wants to sto

[GENERAL]

2004-04-06 Thread jeff . greco
I came across an interesting feature regarding namespace name changes. To illustrate suppose you have two connections open whose commands occur in the following sequence: Time | Session A| Session B -+--+

Re: [GENERAL] execute function after user connect

2004-04-06 Thread btober
> On Fri, Apr 02, 2004 at 11:58:42 -0500, > John DeSoi <[EMAIL PROTECTED]> wrote: >> Is there a mechanism to execute a function after the user connects to >> the database? Something like an "AFTER CONNECT" trigger (might as well as for a "BEFORE DISCONNECT" trigger, too!). I've inquired about

Re: [GENERAL] Compound keys and foreign constraints

2004-04-06 Thread Wes Palmer
> Is there an index on message_recipients(Message_Key)? Yes. > How many rows satisfy > > SELECT * FROM messages WHERE Message_Date BETWEEN ... AND ... ? db=> select count(*) from messages where message_date between '29-Mar-04' and '31-Mar-04 23:59:59'; count 737873 (1 row) Other c

[GENERAL] Create Type Problem

2004-04-06 Thread Vinay Jain
Hi I am newbie so this problem may be too simple to be asked.please help me if any new thing to be added in following: I want to use user defined data type in User_Type(n) way I created data type IndChar The c functions are: /* Definaton of Data Type) */ typedef struct IndChar { int32

Re: [GENERAL] Loading text files into a text attribute

2004-04-06 Thread CoL
hi, BARTKO, Zoltan wrote: Hello folks, I have the following problem: I have a bunch of text files, I want to load them into a table where each file will be stored in one row. Question 1: Is there any way how to do this in psql? AFAIK the \copy command interprets \n as a new line and so I can't

Re: [GENERAL] row-level security model

2004-04-06 Thread Bricklen
Bruno Wolff III wrote: On Wed, Mar 31, 2004 at 12:30:58 -0500, John DeSoi <[EMAIL PROTECTED]> wrote: I want to have multiple groups A, B, C where each group could only see a subset of a table (any number of groups would be possible). If a user is a member of groups A and B then the rows they c

[GENERAL] PERFORM statement inside procedure

2004-04-06 Thread Rajat Katyal
Hi:   In postgres documentation its written that if we execute query as PERFORM query inside our stored procedure; then the special variable FOUND is set to true if the query produced at least one row, or false if it produced no rows.   But FOUND variable is always returning true even my qu

Re: [GENERAL] select distinct w/order by

2004-04-06 Thread John Liu
Sorry, the query you provided works in Pg, my mistake :! select atcode from table group by atcode order by max(torder); johnl -Original Message- From: scott.marlowe [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 4:35 PM To: Tom Lane Cc: John Liu; [EMAIL PROTECTED] Subject: Re:

[GENERAL] SQL trees and other nonsense...

2004-04-06 Thread Trilobite Trilobite
First, If there are any developers listening... Thank you so much for your work. I love everything about PG. It makes the life of a db enthusiast so sweet (otherwise, it would be an expensive habit). Also, I'm helping companies move to a better db and cut their costs. It's truly one of the

Re: [GENERAL] select distinct w/order by

2004-04-06 Thread John Liu
Tom provided the same logic arguments. I also like the way 'simple is better' as long as it sticks with SQL requirement. But in practice, you have to face such issue even it's 'catch 22' which depends on the application design - For the your case - code codeid AAA

Re: [GENERAL] select distinct w/order by

2004-04-06 Thread John Liu
I don't think PG allows your query - select distinct atcode from tmp group by atcode order by max(torder); ERROR: For SELECT DISTINCT, ORDER BY expressions must appear in target list I can't make Tom's query work either - select atcode from (select distinct on (atcode) atcode, torder from tmp ord

Re: [GENERAL] [pgsql-advocacy] Best open source db poll currently

2004-04-06 Thread Bruno LEVEQUE
Hi, Be careful, It seems that only 12 click needs to add a percent !! So It is not significative ! On Wed, 31 Mar 2004, Marc G. Fournier wrote: > > Done :) > > Guys ... poll now shows 53% for MaxDB (ie. MySQL) and 15% for PostgreSQL > ... think we can improve on that? :) > > http://www.casestu

Re: [GENERAL] [pgsql-advocacy] Best open source db poll currently

2004-04-06 Thread Neil Conway
On 31-Mar-04, at 2:09 PM, Marc G. Fournier wrote: Done :) Guys ... poll now shows 53% for MaxDB (ie. MySQL) and 15% for PostgreSQL ... think we can improve on that? :) Can we please stop wasting time on things like this? I think most people agree these polls are a complete waste of time. (Not t

[GENERAL] Whats missing from postgresql

2004-04-06 Thread Anthony_Barker
Aberdeen has a review of open source rdbms. The overall review was quite positive but mentioned a few things missing. Features desired according to users: Gui control centre Improved Replication Two-phase commit They list what they think is missing from postgresql compared with Oracle/db2/MSSQL

[GENERAL] Error on deleting

2004-04-06 Thread Indibil
Hi: I have a PostgreSQL 7.2.2 database since 2 years working right until now. When I try to delete a row from pgAdmin II , I get the message " cannot uniquely identify, 2 rows match." If I go on deleting the row, the 2 ones are deleted. Of Course the 2 rows don't match. They have different