[GENERAL] Standard Deviation/Variance function development

2001-03-06 Thread GH
Has anybodys grabbed development of a standard deviation/variance calculation function? If not, I am interested in tacking it on my todo list. What would be involved? That is, should it be written in C or in PL/PgSQL, or what? (I imagine that C would be fastest, no?) Cheers, dan ---

Re: [GENERAL] INSERT ... RETURNING as Oracle

2001-03-06 Thread Jean-Christophe Boggio
Just wanted to add that PHP has a GETLASTOID function that will work (after an insert) even if you don't use sequences/serials. -- Jean-Christophe Boggio [EMAIL PROTECTED] Independant Consultant and Developer Delphi, Linux, Perl, PostgreSQL ---(end of broadcast)---

Re: [GENERAL] Request regarding logs

2001-03-06 Thread adb
I think there's an option to log the pid in postgresql.conf in 7.1 log_pid = true Alex. On Wed, 7 Mar 2001, Jean-Christophe Boggio wrote: > > When you log pg's activity with statistics enabled you can get this > kind of report : > > StartTransactionCommand > query: select * from identity wher

[GENERAL] Request regarding logs

2001-03-06 Thread Jean-Christophe Boggio
When you log pg's activity with statistics enabled you can get this kind of report : StartTransactionCommand query: select * from identity where login='cat'; ProcessQuery ! system usage stats: ! 0.012632 elapsed 0.01 user 0.00 system sec ! [0.03 user 0.01 sys total] !

[GENERAL] vacuum analyze returns "OID IS INVALID. TUPGONE 1" on pg_language

2001-03-06 Thread Warren Vanichuk
*sigh* I will learn to use my mail client soon to change subjects. My apologies. :( Original Message : -- Greetings. I just received the following error attempting to do a vacuum on my database: freehost=# vacuum analyze; NOTICE: Rel pg_language: TID 0/1: OID IS INVALID. TU

Re: [GENERAL] Inserting values into a SERIAL field

2001-03-06 Thread Warren Vanichuk
Greetings. I just received the following error attempting to do a vacuum on my database: freehost=# vacuum analyze; NOTICE: Rel pg_language: TID 0/1: OID IS INVALID. TUPGONE 1. ERROR: Index pg_language_oid_index is not a btree And I see several errors in the logs regarding invalid function c

Re: [GENERAL] Inserting values into a SERIAL field

2001-03-06 Thread GH
On Sun, Mar 04, 2001 at 05:22:46PM +, some SMTP stream spewed forth: > Hi all, > > Is there any SQL statement to PostgreSQL that will allow me to insert rows > with a specified value for the SERIAL value. I know this is not what you > want to do normally, but I'm trying to provide a kind of

Re: [GENERAL] how to find DB names in Postgres 7.1?

2001-03-06 Thread Randy Hall
Look in the contrib directory for oid2name. This program will do what you are looking for. Limin Liu wrote: > > In Postgres 7.1, ${PGDATA}/base contains directories named by > numbers!! They used to be database names. If a user created a db, > can the db admin know what is that db name (wit

Re: [GENERAL] DELETE and efficiency

2001-03-06 Thread Michelle Murrain
On Tuesday 06 March 2001 05:05 pm, Neil Conway wrote: > > But as I understand it, a DELETE just marks the row as deleted -- the > data is not actually removed from disk. This means they should be > fast, but it also means that doing a VACUUM [ANALYZE] fairly regularly > is probably a good idea. I

Re: [GENERAL] DELETE and efficiency

2001-03-06 Thread Neil Conway
On Tue, Mar 06, 2001 at 03:21:19PM -0600, [EMAIL PROTECTED] wrote: > I am working on an application with > very dynamic data: it gets added and > deleted often. How effecient are the > searches in this situation? [...] > Is using DELETE going to kill my performance? In short, no. I don't think s

Re: [GENERAL] max(field) vs select field .. order by desc limit 1

2001-03-06 Thread Tom Lane
Lincoln Yeoh <[EMAIL PROTECTED]> writes: > Which would be better to do, max() or select .. order by limit 1? If there's an index that the ORDER BY can key on, the second will be much better. If there's not, I'd go with the max(); you don't really want a complete sort operation. > Is 7.1 much be

Re: [GENERAL] PHP and PostgresSQL beta

2001-03-06 Thread Tom Lane
[EMAIL PROTECTED] writes: > I know this issue has been discussed, currently I can't find the > resolution. What needs to be done to the latest php release to get it > to successfully compile with the latest beta version of pgsql? Remove the #include "postgres.h" in php_pgsql.h.

[GENERAL] DELETE and efficiency

2001-03-06 Thread gateley
I am working on an application with very dynamic data: it gets added and deleted often. How effecient are the searches in this situation? In other words: most DB situations I've seen don't use DELETE, and so the underlying algorithms are probably optimized for this. Is using DELETE going to kill

[GENERAL] Re: epoch <-> timestamp

2001-03-06 Thread Bruno Wolff III
On Tue, Mar 06, 2001 at 12:00:53AM +, Patrick Welche <[EMAIL PROTECTED]> wrote: > How can you get back to a timestamp from a number of seconds? I use this sequence in a perl program where $time is the current time in seconds since the epoch. timestamp 'epoch' + '$time second'

Re: [GENERAL] How robust is PostgreSQL

2001-03-06 Thread adb
As of version 7.1 postgres uses write ahead logging which is what you are looking for. As for backups, currently your only option is full dumps of the entire db or full dumps of individual tables. Some folks are working around this by using replication to a secondary server with rserv (in contr

[GENERAL] How robust is PostgreSQL

2001-03-06 Thread Simon Crute
Hi all, We're writing an app in Perl and currently using Oracle as the backend database (via the perl DBI) but due to the costs when we put this live we're thinking of useing Postgresql. However we need to know how crash resistant Posgresql is. Oracle has the "Archive log mode" which writes a l

[GENERAL] how to find DB names in Postgres 7.1?

2001-03-06 Thread Limin Liu
In Postgres 7.1, ${PGDATA}/base contains directories named by numbers!! They used to be database names. If a user created a db, can the db admin know what is that db name (without sending any query to db server)? I believe there must have some kind of mapping table exist. Can anyone tell me

Re: [GENERAL] SQL article

2001-03-06 Thread Ned Lilly
Correct. Check the date on the article Bruce mentioned. The author told me he had written a bunch of them and had them in the can for O'Reilly. His article on functions (don't have the URL handy) really set me off, since I think we shine there compared to the other guys. But he's very inter

Re: [GENERAL] PHP and PostgresSQL beta

2001-03-06 Thread Brett W. McCoy
On Mon, 5 Mar 2001 [EMAIL PROTECTED] wrote: > I know this issue has been discussed, currently I can't find the > resolution. What needs to be done to the latest php release to get it > to successfully compile with the latest beta version of pgsql? It can't find the postgresql headers. Did you

Re: [GENERAL] time to integer

2001-03-06 Thread Soma Interesting
At 02:27 PM 3/6/2001 -0500, you wrote: >date_part('epoch', timestamp) produces a Unix-style seconds count. > > regards, tom lane Ok, thanks I misunderstood the directions and thought I had to use epoch with the timestamp function somehow :) this is my trigger and functi

Fwd: Re: [GENERAL] time to integer

2001-03-06 Thread Soma Interesting
I should have mentioned that NEW.id is set to default to nextval('id_seq'). >this is my trigger and function: > >CREATE FUNCTION oned_member_num() RETURNS OPAQUE AS ' > BEGIN > NEW.member_num := NEW.id + date_part('epoch', timestamp > 'now'); > RETURN ne

[GENERAL] PHP and PostgresSQL beta

2001-03-06 Thread ryan
I know this issue has been discussed, currently I can't find the resolution. What needs to be done to the latest php release to get it to successfully compile with the latest beta version of pgsql? Below is the error I get when compiling php - make[2]: Entering directory `/usr/local/etc/php-4.

[GENERAL] RPMs for PHP accessing PostgreSQL via ODBC over RedHat

2001-03-06 Thread Paulo Parola
Hi, We are currently running the following configuration on our server: Linux Red Hat 7.0 PostgreSQL 7.1beta4-1 PHP 4.0.1pl2 I need to add some RPM package (or perhaps an apache module) to enable PHP to access PostgreSQL via ODBC. In order to have PostgreSQL native access support we installed

[GENERAL] RE: [SQL] Date question

2001-03-06 Thread Francis Solomon
Hi Boulat, stasis=# select (now() + '1 year')::date; ?column? 2002-03-06 (1 row) Hope this helps Francis > Hi, > > Im a little bit stuck here. > > Does anyone know how to get date in format '-MM-DD' of a date one > year from now. > So for example today is '2001-03-06' I

Re: [GENERAL] interval question

2001-03-06 Thread dev
On 3/6/01, 12:59:40 AM, Fernando "P." Schapachnik <[EMAIL PROTECTED]> wrote regarding [GENERAL] interval question: > Hello: > Maybe somebody on the list can give me a hand with this. I > have: > id serial, > start time, > duration time Surely "duration" should be of type interval. Also -

Re: [GENERAL] remote dumping of databases

2001-03-06 Thread dev
On 3/6/01, 8:55:05 AM, Frank Nijenhuis <[EMAIL PROTECTED]> wrote regarding [GENERAL] remote dumping of databases: [snip] > Now I want them to be able to dump their own database. And when I use the > command without piping the result to a file everything works. > (pg_dump -h . > You get the user

Re: [GENERAL] List of all system tables.

2001-03-06 Thread dev
On 3/6/01, 12:44:07 AM, Boulat Khakimov <[EMAIL PROTECTED]> wrote regarding [GENERAL] List of all system tables.: > Hi, > How do I get the list of all system tables starting with "pg_" > Regards, > Boulat Khakimov Try \dS from the psql prompt. If you want to see how it does it try starting p

[GENERAL] Re: interval question

2001-03-06 Thread Stefan Waidele jun.
At 21:59 05.03.2001 -0300, Fernando P. Schapachnik wrote: >[...] > I want to know which ids are current, ie, which satisfy >start<=now<=start+duration. > > The problem is that start+duration is an interval, and I >can't find the way to cast now to interval or interval to time or >t

Re: [GENERAL] libpq++ : Disconnect a DB

2001-03-06 Thread Renaud Tthonnart
Jose Manuel Lorenzo Lopez wrote: > Renaud Tthonnart schrieb: > > > > Good morning everyone, > > > > By declaring a PgDatabase variable like this, I know that I make a > > connection to the DB 'test' > > > > PgDatabase data("dbname = test"); > > > > How to end connection? > > By making this? > > >

[GENERAL] remote dumping of databases

2001-03-06 Thread Frank Nijenhuis
hi, got a question, i tried to find my answer in the documentation and mailing list archives, till now with no luck. I've got multiple virtuale webservers with customers using a remote pgsql server where they don't have access to. All access is done with clients and scripting languages from the

[GENERAL] max(field) vs select field .. order by desc limit 1

2001-03-06 Thread Lincoln Yeoh
Hi, Which would be better to do, max() or select .. order by limit 1? Is 7.1 much better than 7.0.3 in doing the "limit 1"? I see that their EXPLAINs are different - 7.1 has a limit cost. (pid is a serial in the ep_posts table) *** For Version 7.0.3 lylyeoh=# explain select max(pid) from ep_pos

[GENERAL] libpq++ : Disconnect a DB

2001-03-06 Thread Renaud Tthonnart
Good morning everyone, By declaring a PgDatabase variable like this, I know that I make a connection to the DB 'test' PgDatabase data("dbname = test"); How to end connection? By making this? delete data; regards, Renaud THONNART ---(end of broadcast)