[GENERAL] Selective Auto-Timestamp [using triggers?]

2001-01-11 Thread Dan Lyke
Rajit Singh writes: > The thing is, I also want to be able to update the timestamp field > if I want to... Here's my solution: CREATE FUNCTION updated_stamp () RETURNS OPAQUE AS 'BEGIN IF NEW.updated ISNULL THEN NEW.updated := ''now''; END IF; RETURN N

Re: [GENERAL] PostgreSQL v7.1BETA3 Bundled and Available ...

2001-01-11 Thread Lamar Owen
Mike Cannon-Brookes wrote: > > Will there be RPMs for this beta? (Whoever makes the RPMs ;)) I do, and am working on them. There are a few changes I have to integrate from various sources, as well as stress-testing the build, etc. Look for RPM's Sunday, possibly sooner. -- Lamar Owen WGCR Inte

RE: [GENERAL] How to see a RULE definition?

2001-01-11 Thread Trewern, Ben
Title: RE: [GENERAL] How to see a RULE definition? You can use: pgdump -s > outfile which will dump all the schema for the database. It should be in there somewhere ;) Regards Ben > -Original Message- > From: Josh Goodman [mailto:[EMAIL PROTECTED]] > Sent: 11 January 2001 16:16

Re: [GENERAL] How to see a RULE definition?

2001-01-11 Thread Tom Lane
Josh Goodman <[EMAIL PROTECTED]> writes: > ... I was able to figure out that all the rules > for a particular DB are stored in the pg_rewrite table but that seems > almost unreadable for a human. What I would like is a command that spits > out the create syntax I used when the rule was first cre

Recall: [GENERAL] How to see a RULE definition?

2001-01-11 Thread Trewern, Ben
Title: Recall: [GENERAL] How to see a RULE definition? Trewern, Ben would like to recall the message, "[GENERAL] How to see a RULE definition?".

RE: [GENERAL] How to see a RULE definition?

2001-01-11 Thread Trewern, Ben
Title: RE: [GENERAL] How to see a RULE definition? You can use: pg_dump -s dbase > outfile which will dump all the schema for the database. It should be in there somewhere ;) Regards Ben > -Original Message- > From: Josh Goodman [mailto:[EMAIL PROTECTED]] > Sent: 11 January 200

RE: [GENERAL] How to see a RULE definition?

2001-01-11 Thread Tamsin
try this: select * from pg_rules where tablename = ... tamsin > On that > same line of thinking, is there a command to get a list of > all rules that > have been put on a table?

[GENERAL] RecordSets, getString and charSets

2001-01-11 Thread Rosa Maria Carro Salas
Hello, I have a problem with recordsets and charsets. I have inserted some data into a postgresql database including spanish characters. When I execute pgsql and I run some select queries, I get the data in the right way, with the spanish characters I inserted. But when I execute the same queri

RE: [GENERAL] How to see a RULE definition?

2001-01-11 Thread Joel Burton
On Thu, 11 Jan 2001, Trewern, Ben wrote: > You can use: > pgdump -s > outfile > > which will dump all the schema for the database. > It should be in there somewhere ;) Or, for 7.1, use the new features of pg_dump to dump to the non-text-file formats, which will allow you instantly and selective

Re: [GENERAL] Re: Loading optimization

2001-01-11 Thread Tom Lane
Ian Harding <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> The CLUSTER implementation is so shoddy at the moment that I'm hesitant >> to encourage people to use it anyway :-(. We've got to rewrite it so >> that it doesn't drop other indexes, lose constraints, break foreign >> key and inheritanc

[GENERAL] Modeling tool / ODBC

2001-01-11 Thread Nelio Alves Pereira Filho
Hi there. Has anyone ever developed a big system with postgres, so that a modeling tool to create and maintain the base was needed?? If so, what did you use?? I searched a lot for some tool like that, but I couldn't get nothing apropriated. Right now I'm using ERWin via ODBC, using the driv

Re: [GENERAL] Re: Loading optimization

2001-01-11 Thread Bruce Momjian
> Also, in our case, clustering by a single index is not really sufficient. > Within a single bill we would like to cluster the items by service. I was > thinking or writing a program that would do a pg_dump, order by columns as > requested and then dump it back in. I would've done it except that

[GENERAL] postmaster won't run

2001-01-11 Thread Mark Lane
bash$ /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data DEBUG: Data Base System is starting up at Thu Jan 11 14:11:04 2001 FATAL 2: Read("/usr/local/pgsql/data/pg_control") failed: 2 FATAL 2: Read("/usr/local/pgsql/data/pg_control") failed: 2 Startup failed - abort

Re: [GENERAL] What's it? "LockRelease:"

2001-01-11 Thread Tom Lane
"Vitaliy V. Romanets" <[EMAIL PROTECTED]> writes: > I use 6.5.2 and C interface. > When program has been run i've recieved the message: > NOTICE: LockRelease: locktable lookup failed, no lock > /*The part of code:*/ > PQexec(conn,"declare grh1 cursor for select x1 from test where x1='RRR'"); >

Re: [GENERAL] Modeling tool / ODBC

2001-01-11 Thread Ned Lilly
Hi Nelio, We've had good success using the current ODBC driver with ERWin (see our Users Guide at www.greatbridge.com/docs) . What kind of problems are you having? Regards, Ned Nelio Alves Pereira Filho wrote: > Hi there. > > Has anyone ever developed a big system with postgres, so that a

[GENERAL] SQL queries from within PL/PERL triggers?

2001-01-11 Thread Josh Goodman
I ran across a few questions about this in the mailing list archive but I did not find any answers. I would like to create a trigger in PL/PERL that parses out information and sends queries from within the trigger. The only examples in the manual that use the stored perl functions retu

Re: [GENERAL] access checking using sql in 7.1beta3

2001-01-11 Thread Tom Lane
Bruno Wolff III <[EMAIL PROTECTED]> writes: > Is this how aclcontains is really supposed to work? Hmm. It turns out that the way aclcontains is (and always has been) coded, what it is really looking for is to see whether there is any entry in the ACL list that matches the named user or group. I

Re: [GENERAL] Modeling tool / ODBC

2001-01-11 Thread Nelio Alves Pereira Filho
Well, I'm using 'target server' ODBC, and I'm not being able to generate foreign keys, for instance, with 'complete compare'. Are there any secrets of using ERWin with pgsql?? Tks again. Ned Lilly wrote: > > Hi Nelio, > > We've had good success using the current ODBC driver with ERWin (see o

Re: [GENERAL] Casting money to numeric(10,2)

2001-01-11 Thread Tom Lane
Ben Stringer <[EMAIL PROTECTED]> writes: > I'm trying to migrate several tables from a 6.5.2 DB to a > 7.0.2 DB, and having trouble casting money (in the old DB) > to numeric(10,2) prior to doing a pg_dump. Hm. It doesn't seem that there is a cast path from money to anything, even in latest sour

[GENERAL] exit status 26

2001-01-11 Thread Dan Moschuk
Can someone tell me what a postmaster process exiting with status = 26 means? FWIW, I'm doing a COPY table FROM stdin with about 14 million records to trigger this. Thanks, -Dan -- Man is a rational animal who always loses his temper when he is called upon to act in accordance with the dictate

Re: [GENERAL] How to tell if that UPDATE worked?

2001-01-11 Thread Jan Wieck
[EMAIL PROTECTED] wrote: > > I'm writing some stuff in PL/pgsql (actually, a lot of stuff). I have > a question: At various times, it does UPDATEs. Is there a way to tell > if the UPDATE actually affected any rows or not? I couldn't see how > to get UPDATE to return anything. Do a

Re: [GENERAL] How to see a RULE definition?

2001-01-11 Thread Jan Wieck
Tom Lane wrote: > Josh Goodman <[EMAIL PROTECTED]> writes: > > ... I was able to figure out that all the rules > > for a particular DB are stored in the pg_rewrite table but that seems > > almost unreadable for a human. What I would like is a command that spits > > out the create syntax I used w

Re: [GENERAL] How to see a RULE definition?

2001-01-11 Thread Jan Wieck
Joel Burton wrote: > On Thu, 11 Jan 2001, Trewern, Ben wrote: > > > You can use: > > pgdump -s > outfile > > > > which will dump all the schema for the database. > > It should be in there somewhere ;) > > Or, for 7.1, use the new features of pg_dump to dump to the non-text-file > formats, which wi

[GENERAL] How to set "auto commit" off in postgresql db?

2001-01-11 Thread Guang Mei
Hi:   It seems to me that postgresql db's default set for commit is "on". I would like to set it to "off". How could I do that?   TIA. -- Here is what I got when testing:   webstore=> create table t1 (col1 varchar(10)); CREATE webstore=> insert into t1 (col1) values ('test123'); INSERT 100

Re: [GENERAL] Re: Loading optimization

2001-01-11 Thread Bruce Momjian
Added to TODO (part of this is reorganization of cluster items): * CLUSTER * cluster all tables at once * prent lose of constraints, indexes, permissions, inheritance * Automatically keep clustering on a table * Keep statistics about clustering, perhaps during VAC

Re: [GENERAL] Re: Loading optimization

2001-01-11 Thread Alfred Perlstein
* Bruce Momjian <[EMAIL PROTECTED]> [010111 13:12] wrote: > Added to TODO (part of this is reorganization of cluster items): > > * CLUSTER > * cluster all tables at once > * prent lose of constraints, indexes, permissions, inheritance > * Automatically keep clustering on

Re: [GENERAL] Re: Loading optimization

2001-01-11 Thread Bruce Momjian
We have talked about this, but we have not seen enought corruption cases to warrant it. > * Bruce Momjian <[EMAIL PROTECTED]> [010111 13:12] wrote: > > Added to TODO (part of this is reorganization of cluster items): > > > > * CLUSTER > > * cluster all tables at once > > * pren

Re: [GENERAL] Re: COPY error: pqReadData() -- backend closed the channelunexpectedly

2001-01-11 Thread Bruce Momjian
> Tod McQuillin <[EMAIL PROTECTED]> writes: > > I was not aware the binary would behave differently depending on the name > > it was invoked as. > > Right. We used to have two separate binaries, and the postmaster would > actually exec() the backend (postgres) binary for every session launch. >

[GENERAL] Re: How to set "auto commit" off in postgresql db?

2001-01-11 Thread J.H.M. Dassen (Ray)
[Please don't mail in HTML] On Thu, Jan 11, 2001 at 21:02:56 -, Guang Mei wrote: >It seems to me that postgresql db's default set for commit is "on". Erm, it's not PostgreSQL itself, but rather the "psql" interface. > I would like to set it to "off". How could I do that? By explicitly

[GENERAL] Re: How to set "auto commit" off in postgresql db?

2001-01-11 Thread Gregory Wood
Someone will correct me if I'm wrong, but I'm pretty sure all you have to do is start a transaction. Example: begin; create table t1 (col1 varchar(10)); insert into t1 (col1) values ('test123'); rollback; Greg - Original Message - From: Guang Mei To: [EMAIL PROTECTED] Sent: Thurs

RE: [GENERAL] Re: Loading optimization

2001-01-11 Thread Mikheev, Vadim
> We have talked about this, but we have not seen enought > corruption cases to warrant it. Huh?! Just pg_ctl -m immediate stop in <= 7.0.X with high insert activity and ... pray. It's changed in 7.1 by WAL - btree doesn't lose tuples in split ops anymore and in after crash restart you'll never

[GENERAL] initdb on build machine and moving to production machine

2001-01-11 Thread Wade D. Oberpriller
Hello, I want to be able to do an initdb on a build machine and then copy this new database to a production machine and run with it. One thing I have noticed is that initdb needs an absolute path, so if I copy the database it needs to reside in an identical location as where it was initialized.

[GENERAL] help with interface PostGres to c++

2001-01-11 Thread jeremy ergisi
Hello, I am jeremy. I have a problem with PostGres which prevent me to go on. We developed a high-level of PostGres to interface it with c++. We had no problem to transfer and get back simples types like text, double, int... But we met a big problem with more complicated types like:date, array (f

Re: [GENERAL] How to tell if that UPDATE worked?

2001-01-11 Thread drevil
> Do a > > GET DIAGNOSTICS SELECT PROCESSED INTO ; > > directly after an INSERT, UPDATE or DELETE statement and > you'll know how many rows have been hit. > > Also you can get the OID of an inserted row with > > GET DIAGNOSTICS SELECT RESULT INTO ; Thanks

[GENERAL] PostgreSQL Client Program

2001-01-11 Thread Jreniz
Hi! I´ve a Linux RH6.2 machine with PostgreSQL 6.5.3, this works fine with PHP module, but, I need create a GTK client program that sends queries to database. I saw the manuals and documentation but, i don´t know how compile these programs, and the manuals don´t say it!! Please send me any piec

[GENERAL] JDBC org.postresql.Driver

2001-01-11 Thread Ian deSouza
Hi All, I'm wondering if there could be a problem in the JDBC driver. I'm calling: preparedStatement.setObject(i, value); where value is of type Boolean (with value false below)and created the column associated with that value as type BIT and I'm getting the following exception when the prepar

Re: [GENERAL] exit status 26

2001-01-11 Thread Dan Moschuk
| > Can someone tell me what a postmaster process exiting with status = 26 | > means? FWIW, I'm doing a COPY table FROM stdin with about 14 million | > records to trigger this. | | That means it got a signal 26. Since you didn't mention what platform | you are on, I'm not going to guess what s

Re: [GENERAL] How to tell if that UPDATE worked?

2001-01-11 Thread Bruce Momjian
> Jan Wieck <[EMAIL PROTECTED]> writes: > > Do a > > GET DIAGNOSTICS SELECT PROCESSED INTO ; > > directly after an INSERT, UPDATE or DELETE statement and > > you'll know how many rows have been hit. > > Also you can get the OID of an inserted row with > > GET D

Re: [GENERAL] exit status 26

2001-01-11 Thread Tom Lane
Dan Moschuk <[EMAIL PROTECTED]> writes: > | > Can someone tell me what a postmaster process exiting with status = 26 > | > means? FWIW, I'm doing a COPY table FROM stdin with about 14 million > | > records to trigger this. > | > | That means it got a signal 26. > Oh, sorry, for some reason I th

[GENERAL] julian day number input/output

2001-01-11 Thread Matt Beauregard
How do I turn a timestamp into a Julian day number with decimal part? How do I turn one of these back into a timestamp? tia, -- Matt Beauregard Information Technology Operations, DesignScape Ph: +61 2 9361 4233 Fx: +61 2 9361 4633

[GENERAL] I have a problem with postmaster ( Newbie question)

2001-01-11 Thread MUMCU, Burak
Hi, I'm using Postgres on Suse Linux 7.0 . After I reboot the server, I use the command psql database I have connectdb failed problem and after that I write pg_ctl start I have postmaster running question. How can I solve this problem? Thanks