Re: [GENERAL] database files are incompatible with server, after

2006-08-28 Thread Douglas McNaught
CSN <[EMAIL PROTECTED]> writes: > DETAIL: The database cluster was initialized without > HAVE_INT64_TIMESTAMP but the server was compiled with > HAVE_INT64_TIMESTAMP. > HINT: It looks like you need to recompile or initdb. Is it possible you have two PG installs on this machine, and you're tryin

Re: [GENERAL] Precision of data types and functions

2006-08-28 Thread Douglas McNaught
"Brandon Aiken" <[EMAIL PROTECTED]> writes: > I'm considering migrating our MySQL 4.1 database (barf!) to PostgreSQL 8 > or MySQL 5. > > The guy who originally designed the system made all the number data > FLOATs, even for currency items. Unsurprisingly, we've noticed math > errors resulting f

Re: [GENERAL] implementing a read lock

2006-08-26 Thread Douglas McNaught
snacktime <[EMAIL PROTECTED]> writes: > I have an application that processes credit card transactions,and > contains a table called authorizations. The authorizations table > contains information returned by the bank necessary to capture the > transaction. Nothing should block the application f

Re: [GENERAL] Performance/Issues with CMP and JBoss

2006-08-01 Thread Douglas McNaught
"Andy Dale" <[EMAIL PROTECTED]> writes: > The current problem we seem to have is that the data is persisted ok > (or at least it seems to be in there with pgadmin), but cannot be > read back out of the database all the time (in fact for about 90% of > the time), the current behaviour of the applic

Re: [GENERAL] troubleshooting 8.1.2

2006-07-11 Thread Douglas McNaught
"Ed L." <[EMAIL PROTECTED]> writes: > We are wondering if our swap space was too small, and when the > swap reservation failed, the OS was sending SIGINT?? I've never heard of an OS sending that particular signal for a memory shortage. 'strace' may be your friend here. -Doug --

Re: [GENERAL] Getting Primary Key Value After Insert

2006-07-09 Thread Douglas McNaught
Richard Broersma Jr <[EMAIL PROTECTED]> writes: > Just to clarify, currval() is isolated by the session on not > necessarily by a transaction? Yes, this is spelled out quite clearly in the docs if you care to read them. :) -Doug ---(end of broadcast)

Re: [GENERAL] Version Discrepancy

2006-07-09 Thread Douglas McNaught
rstp <[EMAIL PROTECTED]> writes: > pg_config is telling us that we are running version 7.3.6-RH, but when > we start psql it shows that we are running 8.1.4 (which is the correct > version). > [EMAIL PROTECTED] bin]$ pg_config --version > PostgreSQL 7.3.6-RH > [EMAIL PROTECTED] bin]$ which p

Re: [GENERAL] Is what I want possible and if so how?

2006-07-03 Thread Douglas McNaught
Joost Kraaijeveld <[EMAIL PROTECTED]> writes: > I have read the manual about "LOCK", "SET TRANSACTION" and "SELECT...FOR > UPDATE", but from what I understand, they cannot prevent a "SELECT" from > another client, based on the "SELECT". > > Is there a way to make this possible? Have all the clien

Re: [GENERAL] Interface Guidance and Opinions Needed

2006-06-22 Thread Douglas McNaught
"Chris Golden" <[EMAIL PROTECTED]> writes: > This is my first time posting to this forum and I am very new to > PostgreSQL. I am very excited about using it. I have set up a > database and just need a point in the right direction on > interfacing. I have an orders and messages database. One of

Re: [GENERAL] Missing domain socket after reboot.

2006-06-22 Thread Douglas McNaught
Bill Moseley <[EMAIL PROTECTED]> writes: > Hum. lsof knows about the file. > > $ lsof -p 1512 | grep /var/run > postmaste 1512 postgres4u unix 0xf78b5980 1631 > /var/run/postgresql/.s.PGSQL.5432 > > > Any ideas what happened to the socket? Maybe something in your bootup p

Re: [GENERAL] VACUUMing sometimes increasing database size /

2006-06-16 Thread Douglas McNaught
"Nitin Verma" <[EMAIL PROTECTED]> writes: > Will 7.3.2 Dump made up of copies using pg_dump import without any migration > to 8.0+? What I need isn't a once process and will go as a automated script, > in a way that user will not even get to know (if he isn't reading that logs) > Database version

Re: [GENERAL] Performance Question

2006-06-14 Thread Douglas McNaught
Terry Lee Tucker <[EMAIL PROTECTED]> writes: > Hello List: > > I've been told that an update to a record is equivalent to a delete > and insert operation. We have a utility written in Perl that brings > into sync certain elements of 50 thousand records on 8 structurally > identical databases. We t

Re: [GENERAL] UTF8 problem

2006-06-08 Thread Douglas McNaught
Tino Wildenhain <[EMAIL PROTECTED]> writes: > Alban Hertroys schrieb: >> Matthew T. O'Connor wrote: >> >>> Well, to answer my own question, I hacked the source code of DBMail >>> and had it set the client encoding to LATIN1 immediately after >>> database connect, this seems to have fixed the probl

Re: [GENERAL] Java Eclipse

2006-05-27 Thread Douglas McNaught
"Keith Hutchison" <[EMAIL PROTECTED]> writes: > Any views on the best way to access postgresql within java? Depends entirely on what you're looking for. You can go with raw JDBC for maximum control, or use an ORM layer lihe Hibernate to abstract away a lot of the work and give you (some) databas

Re: [GENERAL] Debugging SQL queries

2006-05-11 Thread Douglas McNaught
Anastasios Hatzis <[EMAIL PROTECTED]> writes: > My problem is that I don't know where the given character number is > inside the query/file. I can search in my code editors (e.g. those of > Eclipse IDE) for line number + character number in given line > number... but I can not search for an overal

Re: [PERFORM] [GENERAL] Arguments Pro/Contra Software Raid

2006-05-10 Thread Douglas McNaught
Scott Marlowe <[EMAIL PROTECTED]> writes: > On Tue, 2006-05-09 at 20:02, Bruce Momjian wrote: >> You do if the controller thinks the data is already on the drives and >> removes it from its cache. > > Bruce, re-read what I wrote. The escalades tell the drives to TURN OFF > THEIR OWN CACHE. Some

Re: [GENERAL] Arguments Pro/Contra Software Raid

2006-05-10 Thread Douglas McNaught
Greg Stark <[EMAIL PROTECTED]> writes: > Douglas McNaught <[EMAIL PROTECTED]> writes: >> Correct me if I'm wrong, but I've never heard of a 15kRPM SATA drive. > > Well, dollar for dollar you would get the best performance from slower drives > anyways since

Re: [GENERAL] Arguments Pro/Contra Software Raid

2006-05-09 Thread Douglas McNaught
Vivek Khera <[EMAIL PROTECTED]> writes: > On May 9, 2006, at 11:51 AM, Joshua D. Drake wrote: > >> And dollar for dollar, SCSI will NOT be faster nor have the hard >> drive capacity that you will get with SATA. > > Does this hold true still under heavy concurrent-write loads? I'm > preparing yet

Re: [GENERAL] Function query plan

2006-05-05 Thread Douglas McNaught
Dany De Bontridder <[EMAIL PROTECTED]> writes: > And after a vacuum analyze, the plan can change ?? I don't *think* that the pl/pgsql query plan cache is ever currently flushed in the lifetime of a given connection. If you disconnect and reconnect with a fresh backend it will be planned again th

Re: [GENERAL] Function query plan

2006-05-05 Thread Douglas McNaught
"Paul Mackay" <[EMAIL PROTECTED]> writes: > I understand that the query plan of a function is determined at > CREATION and remains the same whatever the parameter(s) value. I > suppose then that this plan is stored somewhere in a system table ? You are misinformed. It's determined the first time

Re: [GENERAL] out of memory for query result

2006-05-03 Thread Douglas McNaught
Sven Willenberger <[EMAIL PROTECTED]> writes: > On Sat, 2006-04-22 at 15:08 -0400, Tom Lane wrote: >> Francisco Reyes <[EMAIL PROTECTED]> writes: >> > What resource do I need to increase to avoid the error above? >> >> Process memory allowed to the client; this is not a server-side error. >> > >

Re: [GENERAL] Clustered table order is not preserved on insert

2006-04-26 Thread Douglas McNaught
"Andrus" <[EMAIL PROTECTED]> writes: > Why postgres 8.1.3 changes order ? > How to preserve order in newr without adding extra field to report table ? You are never guaranteed any order in a result set unless you use ORDER BY in the query. Because PG treats UPDATE as DELETE + INSERT, the table o

Re: [GENERAL] Install issue on Kubuntu

2006-04-24 Thread Douglas McNaught
P G <[EMAIL PROTECTED]> writes: > Hello, > > I am hoping this is the right place. > > I have recently switched to Kubuntu and I just installed Postgres on it. The > installation was successful. > > When I try psql, I get this error message, though: > > % psql postgres > Error: You must install at

Re: [GENERAL] Question about selecting rows

2006-04-15 Thread Douglas McNaught
"Hrishikesh Deshmukh" <[EMAIL PROTECTED]> writes: > Hi All, > > I have a question about selecting rows, my table has 20,000 rows, i want to > look at rows 5000 to 10,000. There is no defined row ordering in SQL unless you use ORDER BY, so you need to specify how you want to sort it first. > How

Re: [GENERAL] pl/perl error

2006-04-09 Thread Douglas McNaught
Frank <[EMAIL PROTECTED]> writes: > I have a perl script running as a daemon. It's using DBD::Pg (1.43) to > connect to my Postgres server (8.0.7) running on the same box and talking > over a socket. When I start the server, it runs fine for about a day, and > then at some point I start getting

Re: [GENERAL] Create database bug in 8.1.3 ? -> solved

2006-04-09 Thread Douglas McNaught
"Milen Kulev" <[EMAIL PROTECTED]> writes: > Hi Wiliam, > Than you very much for your prompt reply. > > I can not understand why pg_dump, pg_dumpall have hard-coded "template0" ? The reason is this: any extra stuff that your database inherited from template1 (or whatever template you used) will b

Re: [GENERAL] Debian package for freeradius_postgresql module

2006-04-07 Thread Douglas McNaught
Scott Marlowe <[EMAIL PROTECTED]> writes: >> I don't feel it's a questionable reading of the GPL at all. In fact, >> it's pretty clear and I'm about 99% sure the FSF has commented on this >> as well. It's true that it's unlikely anyone would actually sue Debian >> over it but that doesn't someho

Re: [GENERAL] Debian package for freeradius_postgresql module

2006-04-07 Thread Douglas McNaught
"Leif B. Kristensen" <[EMAIL PROTECTED]> writes: > On Saturday 08 April 2006 01:21, Tyler MacDonald wrote: >>Debian a niche distribution? I'd hardly call the defacto standard >>GNU Linux distribution a "niche"... > > Surely, Debian is "niche". Why else should there be a need for > distributions l

Re: [GENERAL] Debian package for freeradius_postgresql module

2006-04-07 Thread Douglas McNaught
Tom Lane <[EMAIL PROTECTED]> writes: > Tyler MacDonald <[EMAIL PROTECTED]> writes: >> OK, I'm kind of confused about how the legal red tape works here. >> Debian packages all sorts of GPL code, and both openssl and postgres are >> released under more liberal licenses. About the only legal iss

Re: [GENERAL] postmaster going down own its on

2006-04-07 Thread Douglas McNaught
Tom Lane <[EMAIL PROTECTED]> writes: > Martijn van Oosterhout writes: >> On Fri, Apr 07, 2006 at 03:03:09PM +0100, Richard Huxton wrote: >>> What would be sending SIGTERM to a backend? > >> The only other thing I've ever heard of is some systems do a sigterm >> when you pass a quota limit? > > Co

Re: RES: [GENERAL] FAQ 1.1

2006-04-07 Thread Douglas McNaught
Renato Cramer <[EMAIL PROTECTED]> writes: > How much bullshit! > > is there no more nothing to do? Take a close look at the message date. :) -Doug ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to

Re: [GENERAL] postmaster going down own its on

2006-04-07 Thread Douglas McNaught
Richard Huxton writes: > surabhi.ahuja wrote: >> hi, is it possible for postmaster to go doen on its own? >> all what the logs say is FATAL: terminating connection dur to >> administrator's command. > > Someone or something is issuing a kill command. It couldn't be the > infamous Linux out-of-mem

Re: [GENERAL] Backup method

2006-04-06 Thread Douglas McNaught
Guy Fraser <[EMAIL PROTECTED]> writes: > How do you suggest one does PITR ? > > It has been a while since I read the Docs, but do not recall > any tools that allow one to do such a thing. PITR went in to 8.0 (IIRC); the docs for that version will cover it. -Doug ---(end

Re: [GENERAL] Backup method

2006-04-05 Thread Douglas McNaught
"Bob Powell" <[EMAIL PROTECTED]> writes: > Hello everyone: > > I have a systems admin that is backing up our Linux computers > (postgres) by backing up the directory structure. This of course > includes all the files that pertain to my postgres databases. I > maintain that using pgdump and crea

Re: [GENERAL] Chasing "signal 11" issues

2006-03-30 Thread Douglas McNaught
"Tass Chapman" <[EMAIL PROTECTED]> writes: > Since Monday I have been seeing "terminated by signal 11" messages > in my 7.4.6 + Slon 1.0.5 system,. but only on the master This kind of thing is almost always a hardware problem. 'memtest86' is probably a good first step, and see if any of your coo

Re: [GENERAL] FAQ 1.1

2006-03-27 Thread Douglas McNaught
Michael Talbot-Wilson <[EMAIL PROTECTED]> writes: > How, really, do people pronounce PostgreSQL? "Postgres" -Doug ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joi

Re: [GENERAL] Some pgbench results

2006-03-24 Thread Douglas McNaught
"Magnus Naeslund(f)" <[EMAIL PROTECTED]> writes: > It might seem that I'm selling ext3 or something :) but it's the linux > filesystem I know best. > If you want ext3 to perform with large directories, there is an mkfs > option that enables directory hashing that you can try: -O dir_index. You ca

Re: [GENERAL] Case Sensitive problem

2006-03-15 Thread Douglas McNaught
"Erik Ferencz" <[EMAIL PROTECTED]> writes: > Hi, > I have got problems with case sensitive sort. > My Postgre DB is Case sensitive but I need case insensitive. > Could anyone help me,please. > I don't know where or how to set this option. It's not an option you can set. Just do "ORDER BY upper(m

Re: [GENERAL] Remote Sync

2006-03-15 Thread Douglas McNaught
"Daniel Blaisdell" <[EMAIL PROTECTED]> writes: > I am currently in a situation where I have a distributed application > between a few remote nodes all connecting to a central database. I > have been searching for a database replication or synchronization > system that will allow a disconnected nod

Re: [GENERAL] Linux cluster application

2006-03-03 Thread Douglas McNaught
Andrew Watkins <[EMAIL PROTECTED]> writes: > Thanks. I suppose my question is less about the mechanisms for > actually starting the servers and more about where to install the > servers, where they should be running, etc. For example, if I'm using > a shared file system across each node in the clu

Re: [GENERAL] Size comparison between a Composite type and an

2006-02-28 Thread Douglas McNaught
Denis Gasparin <[EMAIL PROTECTED]> writes: > If the composite data type has 4 bytes overhead, I save 4 bytes for > each number... that is important because I must store many many > numbers. Yes, if size is a big issue you might be better off with a specialized type. -Doug --

Re: [GENERAL] Size comparison between a Composite type and an

2006-02-28 Thread Douglas McNaught
[EMAIL PROTECTED] writes: > I need to store very large integers (more of 30 digits). Er, What's wrong with the NUMERIC type? That can go up to hundreds of digits. -Doug ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will igno

Re: Fw: [GENERAL] ecpg error --> DbPg_cre_sect_buf.pgc:1334: ERROR:

2006-02-22 Thread Douglas McNaught
[EMAIL PROTECTED] writes: >>I think you should omit the word "RELEASE" after the >> "ROLLBACK". > > Will this still result in the closed DB connection that the "ROLLBACK > RELEASE" used to give me? I don't know--you should check the current docs for ECPG (I don't use it). -Doug

Re: [GENERAL] ecpg error --> DbPg_cre_sect_buf.pgc:1334: ERROR:

2006-02-22 Thread Douglas McNaught
[EMAIL PROTECTED] writes: > I'm relatively new to database programming & I've inherited a system to > maintain that contains lots of embedded SQL. I'm attempting to port my C > source code from RH 7.2 (with ecpg 2.8.0) to Mandrake 10.0 (with ecpg > 4.1.1). ecpg 4.1.1 is generating an error whic

Re: [GENERAL] connecting to pgsql

2006-02-18 Thread Douglas McNaught
Douglas McNaught <[EMAIL PROTECTED]> writes: >> I also noticed that I needed to change the listening_addresses under >> the connection setting in the postgresql.config file. DO I have to do >> this? I didn't find the information really clear and there weren't an

Re: [GENERAL] connecting to pgsql

2006-02-18 Thread Douglas McNaught
"mmaclennan" <[EMAIL PROTECTED]> writes: > Hi yeah I was doing some reading today and realized that I had to > change the pg_hba.conf file from local host to something else but I > don't wuite understand what I am suppose to be entering for the > CIDR-Address setting. This database will only be ac

Re: [GENERAL] Ident authentication failed without su to user

2006-02-16 Thread Douglas McNaught
[EMAIL PROTECTED] writes: > I've created a database "bugs" and a user "bugs" (postgresql user as > well as unix) and even made user "bugs" not require a password but I > still get this: > [EMAIL PROTECTED] bugzilla-2.20]# psql bugs bugs > psql: FATAL: Ident authentication failed for user "bugs"

Re: [GENERAL] C trigger using system(3) to execute a php script

2006-02-16 Thread Douglas McNaught
David Rio Deiros <[EMAIL PROTECTED]> writes: > The code was already in php... plus I am including some other php > files so I would have to parse that files from C if I write all in C. I > basically didn't want to do extra work. There's a PL/PHP out there, but I don't know if it's sufficiently ad

Re: [GENERAL] C trigger using system(3) to execute a php script

2006-02-16 Thread Douglas McNaught
David Rio Deiros <[EMAIL PROTECTED]> writes: > Then, I wanted to run the full php script from the trigger. I tried > the script manually, form the shell, and it worked perfectly. Notice > that the script doesn't generate any stdin/stdout output. So I changed > the system(3) parameter to call my p

Re: [GENERAL] DBlink documentation

2005-12-17 Thread Douglas McNaught
"Russ Brown" <[EMAIL PROTECTED]> writes: > Is the documentation not available online somewhere? For the stuff in 'contrib', I don't think so. Might be a good project for someone. :) -Doug ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postm

Re: [GENERAL] DBlink documentation

2005-12-17 Thread Douglas McNaught
Andre Truter <[EMAIL PROTECTED]> writes: > On Sat, 2005-12-17 at 07:04 -0700, Leonel Nunez wrote: > >> download the source for your PostgreSQL version unpackit >> and check onthe contrib/dblink dir >> > > Yes, that is what I have been trying to do, but where do I download the > dblink

Re: [GENERAL] "incomplete startup packet" on SGI

2005-12-13 Thread Douglas McNaught
David Rysdam <[EMAIL PROTECTED]> writes: > Just finished building and installing on *Sun* (also > "--without-readline", not that I think that could be the issue): Works > fine. So it's something to do with the SGI build in particular. IRIX buggy, film at 11. :) -Doug -

Re: [SQL] [GENERAL] Looking for information on PostgreSQL Stored Procedures

2005-12-11 Thread Douglas McNaught
"Foster, Stephen" <[EMAIL PROTECTED]> writes: > WHILE (--Lost on variable name for end of query; EmptyQueryResponse <> > 0? --) > BEGIN > IF LastName = fname THEN > DELETE FROM MailingList WHERE id = id; > END IF; > LastName :=

Re: [GENERAL] postgresql jdbc connect via hostname instead of just ip

2005-12-04 Thread Douglas McNaught
Jonathan Schreiter <[EMAIL PROTECTED]> writes: > The only way I can connect to the database via JDBC > seems to be by IP address (both locally and on another > system allowed by the pg_hba.conf file). > > jdbc:postgresql://theipaddressofdatabaseserver/mydatabase > > I'd like to be able to connect

Re: [GENERAL] plperlu Question

2005-11-18 Thread Douglas McNaught
[EMAIL PROTECTED] writes: > However, when I run the function within psql, still as the postgres superuser, > I get a 'permission denied' response to the perl 'open(DATA, "my_csv_file") > within my 'import()' function. > > The csv file is world readable as I have moved it to /tmp and given the worl

Re: [GENERAL] PROBLEM: Function does not exist

2005-11-07 Thread Douglas McNaught
[EMAIL PROTECTED] writes: > Hello, > >I have problem that I can't to call function because postgres > can't to find this function with specified parameters and I receive > following error: > > Caused by: java.sql.SQLException: ERROR: function > update_bf_domain(integer, character varying, char

Re: [GENERAL] Image File System Question

2005-11-04 Thread Douglas McNaught
vishal saberwal <[EMAIL PROTECTED]> writes: > HFS is the filesystem richard was tlking about. I am not familiar with > this file system but i guessed it was HFS+ that he was talking about. > yes, i understand all modern filesystems are Hirearchical file systems. Oh, OK--reading your original mess

Re: [GENERAL] Image File System Question

2005-11-04 Thread Douglas McNaught
vishal saberwal <[EMAIL PROTECTED]> writes: > Did try finding something about HFS for ext3/xfs but in vain. The > information i found was the conversion between these file systems. What exactly do you mean by HFS? All modern filesystems are hierarchical. -Doug ---(end o

Re: [GENERAL] Postgresql connection on suse 10

2005-11-03 Thread Douglas McNaught
Michal Hlavac <[EMAIL PROTECTED]> writes: > but telnet ip_address 5432 result: > > x: # telnet 158.195.xx.xx 5432 > Trying 158.195.xx.xx... > telnet: connect to address 158.195.xx.xx: Connection refused > > Why I cannot connect to ip address?? > I tried to add line to pg_hba.conf, then res

Re: [GENERAL] Changing ids conflicting with serial values?

2005-11-02 Thread Douglas McNaught
Steven Brown <[EMAIL PROTECTED]> writes: > I'm granting access to insert/update/delete rows of a table to people, > but I don't want all future inserts to fail if they decided to change > an id (which they obviously shouldn't, but they /can/). It makes for > a fragile system. If it shouldn't hap

Re: [GENERAL] Disappearing Records

2005-11-02 Thread Douglas McNaught
Rory Browne <[EMAIL PROTECTED]> writes: > select u.username, g.groupname from users u, groups g where u.group_id=g.id > (assuming users are in exactly one group) > > If the group_id field in the users table was corrupted, and set to a > value that isn't in the groups table, then that view wouldn't

Re: [GENERAL] Cannot install -- "/lib/cpp" failed sanity check

2005-11-01 Thread Douglas McNaught
Erick Papadakis <[EMAIL PROTECTED]> writes: > checking how to run the C preprocessor... /lib/cpp > configure: error: C preprocessor "/lib/cpp" fails sanity check > See `config.log' for more details. And what are the relevant lines in 'config.log'? -Doug ---(end of broadc

Re: [GENERAL] rh7.3 binaries

2005-11-01 Thread Douglas McNaught
James Cloos <[EMAIL PROTECTED]> writes: > Does anyone provide binary rpms for rh-7.3 for recent version of pgsql? > > (My (aging) rh73 box is too small to compile it.) > > I need to change the setup on that box to mirror a db from another via > slony. The master is at 8.0.x. In case an rh73 comp

Re: [GENERAL] Generating an ANSI compliant schema recreation script

2005-10-29 Thread Douglas McNaught
J French <[EMAIL PROTECTED]> writes: > I did read the page. Been there done that, ran the script. My question > was if there was a canned script out there that I didn't have to clean up > on the fly. This will be an cron job for a convoluted development > process. Thanks though. Yeah, that wo

Re: [GENERAL] Generating an ANSI compliant schema recreation script

2005-10-29 Thread Douglas McNaught
J French <[EMAIL PROTECTED]> writes: > I need to capture the schema on a postgres database and recreate it on > another ansi compliant platform. Is it possible to generate a file > (perhaps from pg_dump?) as a sequence of ansi compliant SQL commands > which can be used to recreate the structure?

Re: [GENERAL] Installation trouble

2005-10-28 Thread Douglas McNaught
Steve Crawford <[EMAIL PROTECTED]> writes: > Note, the directories shown for libdir, bindir, includedir and such > are not where the files were actually installed. > > Now I could just start shuffling files around till things work but > since I've installed/upgraded many PG installations without

Re: [GENERAL] Function written in C, hangs on one machine and not another...

2005-10-28 Thread Douglas McNaught
CG <[EMAIL PROTECTED]> writes: > Thanks to the great suggestions I've at least gotten it to not hang... > > Martijn's hint about blocking led me to open up those filehandles in > a non-blocking mode. It appears that write() will write, at a > maximum, only 4096 bytes when it is called from within

Re: [GENERAL] Function written in C, hangs on one machine and not another...

2005-10-28 Thread Douglas McNaught
Martijn van Oosterhout writes: > The things that have screwed me up in the past with pulling tricks like > this are: > > 1. Program has registered atexit() handlers. _exit() avoids this. > 2. Pending stdio output that gets flushed. The backend doesn't use > stdio much so you might be fine here. >

Re: [GENERAL] Function written in C, hangs on one machine and not another...

2005-10-28 Thread Douglas McNaught
Dennis Jenkins <[EMAIL PROTECTED]> writes: > Is it safe for the postgres engine to fork()? Would > the child need to close down anything immediately in > its main() to avoid corrupting the parent? I *think* (Tom may correct me) that as long as you don't call into the backend code at all in the c

Re: [GENERAL] Function written in C, hangs on one machine and not another...

2005-10-28 Thread Douglas McNaught
CG <[EMAIL PROTECTED]> writes: > Does this give you any more insight into an alternate method of getting this > thing done? I would fork(), set up file descriptors appropriately, then have the child call the Adobe library and the parent feed the data to it. Once the document is loaded in the chil

Re: [GENERAL] Error Message

2005-10-26 Thread Douglas McNaught
Bob Pawley <[EMAIL PROTECTED]> writes: > I'm not sure what you mean. > > base(int4) is the name of the function that I want to call. It follows > the format of an example in a Postgresql book I use (or perhaps > misuse). > > Are you saying that I need to redo the function??? You need to make it a

Re: [GENERAL] Why database is corrupted after re-booting

2005-10-26 Thread Douglas McNaught
"Wes Williams" <[EMAIL PROTECTED]> writes: > Even with a primary UPS on the *entire PostgreSQL server* does one still > need, or even still recommend, a battery-backed cache on the RAID controller > card? [ref SCSI 320, of course] > > If so, I'd be interest in knowing briefly why. UPSs can fail

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

2005-10-24 Thread Douglas McNaught
[EMAIL PROTECTED] writes: > However, in the process of investigating this, my boss found something > which we do not understand. A table with a primary key 'id' takes 200 > seconds to SELECT MAX(id), but is as close to instantaneous as you'd > want for SELECT ID ORDER BY ID DESC LIMIT 1. I under

Re: [GENERAL] out of memory for query result

2005-10-23 Thread Douglas McNaught
Allen Fair <[EMAIL PROTECTED]> writes: > From my googling, it seems the Perl DBD driver for Postgres does > *not* support the cursor (see below). I hope someone can refute this! > > I am otherwise looking for code to implement Postgres cursors in > Perl. I can not find the "DECLARE CURSOR" defin

Re: [GENERAL] pg_dump with low priority?

2005-10-22 Thread Douglas McNaught
Bryan Field-Elliot <[EMAIL PROTECTED]> writes: > We have a huge database which must be backed up every day with pg_dump. > The problem is, it takes around half an hour to produce the dump file, and > all other processes on the same box are starved for cycles (presumably due > to I/O) during the du

Re: [GENERAL] Newbie Questions

2005-10-21 Thread Douglas McNaught
Redefined Horizons <[EMAIL PROTECTED]> writes: > I'm running the latest stable version of PostgreSQL on a Debian Linux box > running Gnome 2.0. I've just started setting up my first database with > PostgreSQL and I've got a few newbie questions: I'm going to assume you installed the Debian packag

Re: [GENERAL] How much slower are numerics?

2005-10-21 Thread Douglas McNaught
CSN <[EMAIL PROTECTED]> writes: > Another thing I've always wondered about ;), as I use > numerics far more than floats. From the docs: > > "However, arithmetic on numeric values is very slow > compared to the integer types, or to the > floating-point types" > > How much slower are numerics? And w

Re: [GENERAL] scheduled backup

2005-10-21 Thread Douglas McNaught
Apu Islam <[EMAIL PROTECTED]> writes: > I need suggestion to backup my postgresql server. The database is growing > 1/2 Gb a day and I am looking for a solution that would push the data off > to the backup server periodically with minimal amount of load to the > server (I am trying to avoid table

Re: [GENERAL] Select all invalid e-mail addresses

2005-10-20 Thread Douglas McNaught
Hannes Dorbath <[EMAIL PROTECTED]> writes: > On 19.10.2005 21:18, Michael Fuhr wrote: >> One possibility would be to write a plperlu function that uses the >> Email::Valid module. Here's a trivial example; see the Email::Valid >> documentation to learn about its full capabilities: > > ..and if yo

Re: [GENERAL] update trigger not working

2005-10-19 Thread Douglas McNaught
CSN <[EMAIL PROTECTED]> writes: > I'm trying to set up a trigger that simply updates a > field's corresponding timestamp to now() whenever the > field is updated. But it's not working. Trying to > debug, I commented out the inner IF and END and the > log seemed to indicate infinite recursion occur

Re: [GENERAL] PostgreSQL on Dual Processors, Dual-Core AMD Chips

2005-10-18 Thread Douglas McNaught
"Onyx" <[EMAIL PROTECTED]> writes: > Hello Everyone, > Does anyone know if PostgreSQL supports running on dual processors, and > will efficiently utilize the dual processors for performance? More > specifically, will PostgreSQL utilize the dual processor performance of > using dual-core AMD chips

Re: [GENERAL] Problem using start transaction in nested transactions.

2005-10-17 Thread Douglas McNaught
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > You can't do subtransactions in PostgreSQL, but you can use savepoints: > http://www.postgresql.org/docs/8.0/interactive/sql-savepoint.html. > > Previously, you couldn't do any transactional stuff from inside > functions. I'm not sure if you can do save

Re: [GENERAL] fine tuned database dump/reload?

2005-10-17 Thread Douglas McNaught
Dan Armbrust <[EMAIL PROTECTED]> writes: > Jim C. Nasby wrote: > > pg_dump handles table ordering properly. > > > > Maybe I missed something then, because it didn't last time I tried to > move some data. I had to drop my foreign keys before I could reload > it. What version was this? Older ve

Re: [GENERAL] could not connect to the server error

2005-10-17 Thread Douglas McNaught
"Stefano B." <[EMAIL PROTECTED]> writes: > I have several java jdbc client applications that connect to my Postgres > 8.0.4 server. > "After some days" the server rejects the connections. There are no message > in the log file. Only the local connections are permitted. > > I have tryed to make a

Re: [GENERAL] dynamic loading of .so

2005-10-16 Thread Douglas McNaught
<[EMAIL PROTECTED]> writes: > are there any way to make them global for all the instances? Put them in shared memory. This probably isn't trival, as all the shared memory is allocated up front and used for existing purposes (at least, as I understand it). I guess you could always allocate your

Re: [GENERAL] dynamic loading of .so

2005-10-14 Thread Douglas McNaught
TJ O'Donnell <[EMAIL PROTECTED]> writes: > I have begun to use some static variables in my c-language > functions to maintain state (3rd party licensing issues) during > the course of a session (postgres process, spawned by postmaster). > These are declared static outside the scope of any function

Re: [GENERAL] Using LISTEN/NOTIFY in C#.NET

2005-10-14 Thread Douglas McNaught
Josephine de Castro <[EMAIL PROTECTED]> writes: > To make the long story short...my question is this..is it possible to run > the listener command in C# or will it only work in psql? There's no theoretical reason why not. You probably need to read the docs on whatever C# Postgres driver you're

Re: [GENERAL] fine tuned database dump/reload?

2005-10-11 Thread Douglas McNaught
Dan Armbrust <[EMAIL PROTECTED]> writes: > Does postgresql have any facility to dump anything more fine grained > than a database to a text file? You can dump a single table with the -t option. Right now you can't specify an arbitrary set of tables to dump. > For example, to mention a bad word,

Re: [GENERAL] How to delete Large Object from Database?

2005-10-10 Thread Douglas McNaught
"Premsun Choltanwanich" <[EMAIL PROTECTED]> writes: > The lib I use is call lo_in and lo_out for manage BLOB. > I understand that lo_unlink be related with lo_import and lo_export so I > don't think that it work. It's exactly what you want--it removes a LO with the specified OID from the large ob

Re: [GENERAL] How to delete Large Object from Database?

2005-10-07 Thread Douglas McNaught
Moises Alberto Lindo Gutarra <[EMAIL PROTECTED]> writes: > try: delete from pg_catalog.pg_largeobject; > from your database. Umm, the standard way to do this is lo_unlink(). You can put an ON DELETE trigger on your referencing table that calls this function. -Doug ---

Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-07 Thread Douglas McNaught
"Andrus" <[EMAIL PROTECTED]> writes: > Apache runs well in Windows 98. Why this is so difficult in native Windows > Postgres? I *think* it's because we use certain features of NTFS, which Win98 will never support. -Doug ---(end of broadcast)--- TI

Re: [GENERAL] How to uninstall Postgres on Iinux.

2005-10-06 Thread Douglas McNaught
Ly Lam Ngoc Bich <[EMAIL PROTECTED]> writes: > I am using Linux Fedora 3 . I've installed Postgres with > postgresql-8.0.3.tar.gz package , so there is no rpm package when I > check with > rpm -qa|grep postgresql > > Please show me the way to uninstall PostgresSQL. You should be able to go in

Re: [GENERAL] Or selection on index versus union

2005-10-05 Thread Douglas McNaught
[EMAIL PROTECTED] writes: > PS We still have to be careful how to formulate conditions: > > where fase in ('1','2') > > is ok, and uses the index, but the logically identical: > > where position(fase in '12') >= 1 > > does a sequential scan. Right, you would need a functional index to fix that.

Re: [GENERAL] Isolated transactions?

2005-10-04 Thread Douglas McNaught
Lexington Luthor <[EMAIL PROTECTED]> writes: > Hi, > > I have a number of large tables in a schema all of which are related > by foreign keys. > > Now, what I would like to be able to do is run some long-running > queries (mostly selects, but also some updates and inserts into the > tables), to ge

Re: [GENERAL] mysql hash table equivalent?

2005-10-04 Thread Douglas McNaught
Tom Lane <[EMAIL PROTECTED]> writes: > "Chris St Denis" <[EMAIL PROTECTED]> writes: >> Does postgres support in-memory only tables like the mysql HASH table type? > > No, and it doesn't seem particularly necessary: a table that is being > hit heavily will stay in cache buffers anyhow. You don't n

Re: [GENERAL] Help with inventory control

2005-09-30 Thread Douglas McNaught
Fernando Grijalba <[EMAIL PROTECTED]> writes: > Thank you for your response. > > I want to avoid the following situation. > > User1 starts order and takes the last two units. User2 starts order 1 > minute after and checks inventory. He sees 2 units left and adds them to > the his order. User1 co

Re: [GENERAL] to drop a 30GB database. is it slow?

2005-09-30 Thread Douglas McNaught
Gábor Farkas <[EMAIL PROTECTED]> writes: > so, what if simply dropping the table does not recover the disk-space? It will. Each table is stored in its own set of disk files, and when the table is dropped those files are simply deleted. -Doug ---(end of broadcast)--

Re: [GENERAL] Setting up a fine-grained permission system

2005-09-29 Thread Douglas McNaught
David Garamond <[EMAIL PROTECTED]> writes: > Hi, > > Our current project requires a fine-grained permission system (row-level > and possibly column-level as well). We have a pretty large (tens of > thousands) of users in the 'party' table. I'm thinking of choosing > Unix-style security for now (ad

Re: [GENERAL] restore

2005-09-27 Thread Douglas McNaught
Uroš Gruber <[EMAIL PROTECTED]> writes: > Hi! > > I have an old pgsql dir backuped and I want to know if there's any way > to restore some data from this files. Any tool I can use. Re-install the version that created the files and use pg_dump to dump it out to SQL. That's by far the easiest way.

Re: [GENERAL] Function keys cause psql to segfault

2005-09-26 Thread Douglas McNaught
CSN <[EMAIL PROTECTED]> writes: > Hmm, in putty (Terminal->Keyboard) I changed "the > function keys and keypad" from "ESC[n~" to "Linux". > Hitting F1-5 in psql outputs "ABCDE" - no segfaults! > Setting it to "Xterm R6" also results in function keys > 1-4 causing segfaults (there are also options

<    1   2   3   >