[GENERAL] Corrupted index

2005-06-22 Thread Akash Garg
During a vacuum, I ran into this error: vacuumdb: vacuuming of database "friend" failed: ERROR: invalid page header in block 41661 of relation "friend_pkey" I've read the posts on this newsgroup and it's clear that I have to REINDEX to fix this. The bigger question is -- why did this happen in t

Re: [GENERAL] setting up PostgreSQL on Linux RHL9 to allow ODBC connections

2005-06-22 Thread William Yu
There's nothing on the server side that needs to be configured for Windows clients to access Postgres via ODBC. As long as TCP/IP is turned on. Just add a data source and configure the server ip/name/port/database/etc. [EMAIL PROTECTED] wrote: Hi, I have seen a bunch of different documenta

Re: [GENERAL] Vacuum advice

2005-06-22 Thread Karl O. Pinc
On 06/22/2005 04:39:00 PM, Tom Lane wrote: David Mitchell <[EMAIL PROTECTED]> writes: > However, occasionally we need to import data, and this involves > inserting several million rows into a table, but this just *cripples* > postgres. After the import has been running for a while, simple select

Re: [GENERAL] Vacuum advice

2005-06-22 Thread David Mitchell
We're thinking we might set up vacuum_cost_limit to around 100 and put vacuum_cost_delay at 100 and then just run vacuumdb in a cron job every 15 minutes or so, does this sound silly? It doesn't sound completely silly, but if you are doing inserts and not updates/deletes then there's not any

Re: [GENERAL] PROBLEM: Function does not exist

2005-06-22 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > On Thu, Jun 23, 2005 at 12:36:50AM +0200, Julian Legeny wrote: >> CREATE OR REPLACE FUNCTION insert_bf_filter(int4, int4, "varchar", >> "varchar", int4, int2, int2, int4, int2, int4) > Follow the hint: use explicit type casts for the int2 arguments. Or

Re: [GENERAL] multiple action rules

2005-06-22 Thread Tom Lane
Scott Marlowe <[EMAIL PROTECTED]> writes: > Well, what really gets me is that basically, the syntax diagram in > the psql environment has a syntax diagram that makes sense to me. > So I guess if there was a "patch" it would basically reference the syntax > rules given by psql \h create rule in th

Re: [GENERAL] PROBLEM: Function does not exist

2005-06-22 Thread Julian Legeny
Hello Michael, yes, you have right. Solution is cast it to smallint. Thank you for your advice, with best regards, Julian Legeny Thursday, June 23, 2005, 2:48:17 AM, you wrote: MF> On Thu, Jun 23, 2005 at 12:36:50AM +0200, Julian Legeny wrote: >> >> CREATE OR REPLACE FUNCTION inser

Re: [GENERAL] multiple action rules

2005-06-22 Thread Scott Marlowe
On Wed, 2005-06-22 at 19:49, Tom Lane wrote: > Scott Marlowe <[EMAIL PROTECTED]> writes: > >> So, what's the magic pixie dust I need to sprinkle on this to make it > >> work? > > > Never mind, I finally figured it out... About three minutes after > > posting this. sheesh. > > If you think the d

Re: [GENERAL] multiple action rules

2005-06-22 Thread Tom Lane
Scott Marlowe <[EMAIL PROTECTED]> writes: >> So, what's the magic pixie dust I need to sprinkle on this to make it >> work? > Never mind, I finally figured it out... About three minutes after > posting this. sheesh. If you think the docs are insufficiently clear, feel free to send in a document

Re: [GENERAL] PROBLEM: Function does not exist

2005-06-22 Thread Michael Fuhr
On Thu, Jun 23, 2005 at 12:36:50AM +0200, Julian Legeny wrote: > > CREATE OR REPLACE FUNCTION insert_bf_filter(int4, int4, "varchar", "varchar", > int4, int2, int2, int4, int2, int4) [-snip-] > select INTGR, TMSTP from INSERT_BF_FILTER (53, 1354, 'test_filter_name', > 'test_filter_description',

Re: [GENERAL] Vacuum advice

2005-06-22 Thread Tom Lane
David Mitchell <[EMAIL PROTECTED]> writes: >> If you *are* using 8.0 then we need to look closer. > Sorry, I should have mentioned, I am using PG 8.0. Also, although this > is a 'mass insert', it's only kind of mass. While there are millions of > rows, they are inserted in blocks of 500 (with a

Re: [GENERAL] Setting global vars for use with triggers

2005-06-22 Thread Michael Fuhr
On Wed, Jun 22, 2005 at 01:36:20PM -0700, CSN wrote: > > I'd like to create a trigger which deletes associated > files whenever their corresponding row is deleted. I looked at the thread you posted and saw that you were considering using LISTEN/NOTIFY. That's probably a good idea because if you d

Re: [GENERAL] multiple action rules

2005-06-22 Thread Scott Marlowe
On Wed, 2005-06-22 at 18:31, Scott Marlowe wrote: > OK, so I'm trying to make a rule with >1 action. > > The docs, not so helpfully, only seem to show a single action rule (at > least in the rules section, not sure about elsewhere) The syntax > diagram: > > CREATE RULE rule_name AS ON event >

[GENERAL] multiple action rules

2005-06-22 Thread Scott Marlowe
OK, so I'm trying to make a rule with >1 action. The docs, not so helpfully, only seem to show a single action rule (at least in the rules section, not sure about elsewhere) The syntax diagram: CREATE RULE rule_name AS ON event TO object [WHERE rule_qualification] DO [INSTEAD] [action |

Re: [GENERAL] Vacuum advice

2005-06-22 Thread David Mitchell
Thanks Tom, If you *are* using 8.0 then we need to look closer. Sorry, I should have mentioned, I am using PG 8.0. Also, although this is a 'mass insert', it's only kind of mass. While there are millions of rows, they are inserted in blocks of 500 (with a commit in between). We're thinkin

[GENERAL] PROBLEM: Function does not exist

2005-06-22 Thread Julian Legeny
Hello, I'm using postgres 8.0.3 under win xp. I have problem to call psql function. I have tables: 1. BF_DOMAIN 2. BF_USER 3. BF_FILTER (this table uses FK from the previous two tables) and function INSERT_BF_FILTER that inserts data to the table BF_FILTER. But when I call

Re: [GENERAL] Setting global vars for use with triggers

2005-06-22 Thread Douglas McNaught
CSN <[EMAIL PROTECTED]> writes: > I'd like to create a trigger which deletes associated > files whenever their corresponding row is deleted. > Problem is, I don't want to hard-code directory > locations in the trigger function. Is there a way to > set a DOCUMENT_ROOT-like variable in Postgresql wh

Re: [GENERAL] Vacuum advice

2005-06-22 Thread Tom Lane
David Mitchell <[EMAIL PROTECTED]> writes: > However, occasionally we need to import data, and this involves > inserting several million rows into a table, but this just *cripples* > postgres. After the import has been running for a while, simple selects > take a long time, and strangely, the qu

Re: [GENERAL] dump/restore bytea fields

2005-06-22 Thread David Parker
Never mind. Appears to have been local to a particular machine. I was able to pg_restore the same dump file on another box (which I should have tried before posting!) Sorry for the noise.   - DAP From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David ParkerSent

Re: [GENERAL] [HACKERS] [PATCHES] Removing Kerberos 4

2005-06-22 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > Yeah. But it has been declared dead by the Kerberos folks > (http://www.faqs.org/faqs/kerberos-faq/general/section-7.html. And this > document is from 2000, an dit was declared already then)... Right. The real question here is who's going to be usin

[GENERAL] Setting global vars for use with triggers

2005-06-22 Thread CSN
I'd like to create a trigger which deletes associated files whenever their corresponding row is deleted. Problem is, I don't want to hard-code directory locations in the trigger function. Is there a way to set a DOCUMENT_ROOT-like variable in Postgresql which triggers could access and use? I'm usin

[GENERAL] Vacuum advice

2005-06-22 Thread David Mitchell
Hi, I have a system that has a moderate amount of activity on it, nothing strenuous. The activity is a real mixture of operations: selects, updates, inserts and deletes. One thing strange about our database is that we have a log of stored procedures that use temporary tables. Most of the time

Re: [GENERAL] [HACKERS] [PATCHES] Removing Kerberos 4

2005-06-22 Thread Magnus Hagander
> > Last chance for any Kerberos 4 users to speak up --- otherwise I'll > > apply this soon. > > If you just want someone to test it I can do that. I don't > actually use it normally though. I don't think "just testing" is enough - somebody needs to actually maintain it... > As far as securi

[GENERAL] dump/restore bytea fields

2005-06-22 Thread David Parker
In 7.4.5 I'm trying to dump and selectively load a database that contains bytea fields. I dumped it with the command:   pg_dump -p 24000 -Fc -f /home/dparker/temp/tazz.dmp tazz   When I try to restore it, after having generated/modified a list-file, I get the following error:    % pg_restor

Re: [GENERAL] [HACKERS] [PATCHES] Removing Kerberos 4

2005-06-22 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Last chance for any Kerberos 4 users to speak up --- otherwise I'll > apply this soon. If you just want someone to test it I can do that. I don't actually use it normally though. As far as security issues the only issues I'm aware of is a) it uses plain DES

[GENERAL] Perl DBI issue

2005-06-22 Thread Peter Darley
Folks, I just installed a new machine with Fedora Core 4 with PostgreSQL 8.0.3. I also installed DBI::Pg 1.41. When I try to use a query with a placeholder in it I get the error: "DBD::Pg::st execute failed: ERROR: syntax error at or near "$1" at character 1". The same query with a va

Re: [GENERAL] Clustering and replication options

2005-06-22 Thread Ed L.
On Wednesday June 22 2005 2:16 am, Gregory Youngblood wrote: > I am looking for some information about clustering and > replication options for postgresql. Gregory, FWIW, I've used Slony 1.0.5 for 10-15 db cluster migrations, usually from 7.3.4 clusters on one box to 7.4.6 clusters on another (

Re: [GENERAL] table and column information from cursor?

2005-06-22 Thread Tom Lane
John DeSoi <[EMAIL PROTECTED]> writes: > I was wondering if there is some way I'm missing to get the table and > column information from a cursor. If I fetch from a cursor, the table > OID and column number values are 0 in the row description. If I execute > the same query directly without a cur

Re: [GENERAL] Problem on function returning setof custom type

2005-06-22 Thread Pablo Baena
You are amazing! It solved it! Thanks!!On 6/22/05, Stephan Szabo <[EMAIL PROTECTED]> wrote: On Wed, 22 Jun 2005, Pablo Baena wrote:> FOR rec IN SELECT test.id , test.blow, test1.bla2> FROM test> LEFT JOIN test1 ON test.id = test1.id WHERE> test1.b

Re: [GENERAL] Problem on function returning setof custom type

2005-06-22 Thread Stephan Szabo
On Wed, 22 Jun 2005, Pablo Baena wrote: > FOR rec IN SELECT test.id , test.blow, test1.bla2 > FROM test > LEFT JOIN test1 ON test.id = test1.id WHERE > test1.bla2=\'$1\' LOOP This is going to compare to the exact string '$1' not to the value of th

[GENERAL] setting up PostgreSQL on Linux RHL9 to allow ODBC connections from Windows

2005-06-22 Thread SCassidy
Hi, I have seen a bunch of different documentation on how to set up to allow ODBC, but I am a little confused about how much/what has to be set up to allow an ODBC connection from Windows (mostly 2003, some XP) to an existing PostgreSQL (7.4.6) database on Linux (RedHat 9 version 2.4.20-6smp). M

Re: [GENERAL] Problems upgrading to 7.4.8 from 7.2.4

2005-06-22 Thread Sean Cardus
Tom Lane <> wrote the following on 22 June 2005 15:20: > "Sean Cardus" <[EMAIL PROTECTED]> writes: >> For example, one of the CREATE VIEW statements contains: >>WHERE (u.username = "varchar"(u.customer_id)) > > If you can change "varchar" to "text" it should still work. Thanks for the advice

[GENERAL] Problem on function returning setof custom type

2005-06-22 Thread Pablo Baena
This happens when using left join on the select. This is a sample of what is happening to me. -- The tables CREATE TABLE test (   id numeric,   blow varchar ) WITHOUT OIDS; CREATE TABLE test1 (   id numeric,   bla2 varchar ) WITHOUT OIDS; COPY test (id, blow) FROM stdin;1 sdasd2 sdaddxxsd4 s55

[GENERAL] how to xml on debian?

2005-06-22 Thread marcelo Cortez
hi any pointer's to install xml on debian be appreciated. best regards mdc ___ A tu celular ¿no le falta algo? Usá Yahoo! Messenger y Correo Yahoo! en tu teléfono celular. Más información en http://movil.yahoo.com.ar -

Re: [GENERAL] 8.03 postgres install error

2005-06-22 Thread Prasad Duggineni
Yep I have used the rpms while upgrading the postgres 8.0. - Original Message - From: "Devrim GUNDUZ" <[EMAIL PROTECTED]> To: "Prasad Duggineni" <[EMAIL PROTECTED]> Cc: "Tom Lane" <[EMAIL PROTECTED]>; ; "Devrim GUNDUZ" <[EMAIL PROTECTED]> Sent: Wednesday, June 22, 2005 11:06 AM Subje

Re: [GENERAL] 8.03 postgres install error

2005-06-22 Thread Devrim GUNDUZ
Hi, On Wed, 22 Jun 2005, Prasad Duggineni wrote: I have updated the software still it is occurring whenever I reboot my computer. I don't have any references to old config file.Please advice me to fix this problem. Hrrm... Did you use rpm -Uvh while upgrading? I hope you did not... -- Dev

Re: [GENERAL] 8.03 postgres install error

2005-06-22 Thread Prasad Duggineni
I have updated the software still it is occurring whenever I reboot my computer. I don't have any references to old config file.Please advice me to fix this problem. Here is the syslog. Jun 22 10:16:30 lab5md9181 gpm: gpm startup succeeded Jun 22 10:16:31 lab5md9181 postgres[887]: [2-1] 2005-

Re: [GENERAL] Problems upgrading to 7.4.8 from 7.2.4

2005-06-22 Thread Tom Lane
"Sean Cardus" <[EMAIL PROTECTED]> writes: > For example, one of the CREATE VIEW statements contains: >WHERE (u.username = "varchar"(u.customer_id)) If you can change "varchar" to "text" it should still work. regards, tom lane ---(end of broadca

[GENERAL] Problems upgrading to 7.4.8 from 7.2.4

2005-06-22 Thread Sean Cardus
Hi Everyone, I've inherited an ancient Redhat 7.3 machine hosting the data for one of our applications in a Postgres 7.2.4 database. I must confess, I come from a MySQL/MS-SQL background so I'm a bit of a Postgres newbie :) I've setup a brand-new server running RHEL4 which is supplied with Postg

Re: [GENERAL] Postfix/Maildrop and too many connections issues

2005-06-22 Thread Sven Willenberger
On Wed, 2005-06-22 at 01:30 +0200, Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2005-06-21 15:00:12 -0400: > > We have a system set up whereby postfix and maildrop gather user info > > from a pg database (7.4.2 on FreeBSD 5.2.1) to do local mail acceptance > > and delivery. I have configured max

Re: [GENERAL] is this a bug ?

2005-06-22 Thread Sim Zacks
This is a normal error. If you want to remove the sequence first you have to remove the default value from the sequenced field. remember serial means int4 with a default of get next serial number. ALTER TABLE test ALTER COLUMN test_id_key DROP DEFAULT; After that you could probably drop the se

Re: [GENERAL] enebling regular user to create new users ?

2005-06-22 Thread Zlatko Matić
Berend,   Thank you for the function code. It helped me a lot! Regards,   Zlatko    ---Original Message---   From: Berend Tober Date: 06/15/05 18:08:22 To: Zlatko Matić Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] enebling regular user to create new users ?   Zlatko Matić

Re: [GENERAL] Making the DB secure

2005-06-22 Thread Freemail
Hi All, I am really sorry for upsetting the list. You are absolutelly right, I do have applied a network specialist, who stated that the VPN is a must, and we started to configure and test the server together (using OpenVPN). Actually this application is going to operate in a test phase for month

[GENERAL] Clustering and replication options

2005-06-22 Thread Gregory Youngblood
I am looking for some information about clustering and replication options for postgresql. I am aware of pgcluster, but have been unable to find anyone willing to share details about actually using it in a production environment. That's a little disconcerting. Is pgcluster not really ready

Re: [GENERAL] scroll cursor bug or me?

2005-06-22 Thread Sim Zacks
It seems to me that scroll cursors are not valid in plpgsql. The following query in PGAdmin works. run one line at a time. begin work; declare bob scroll cursor for select * from testtbl; fetch forward 5 from bob; fetch prior from bob; rollback work; "Larry Morroni" <[EMAIL PROTECTED]> wrote