RE: [GENERAL] CREATE USER

2000-06-01 Thread Hiroshi Inoue
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Thomas Lockhart I have to create users via an ODBC connection, but I get this error: CREATE USER: may not be called in a transaction block With psql I have no problems. Any body knows what is

Re: [GENERAL] Re: Speed of locating tables

2000-06-01 Thread Jurgen Defurne
carl garland wrote: Don't even think about 10 separate tables in a database :-(.It's not so much that PG's own datastructures wouldn't cope,as thatvery few Unix filesystems can cope with 10 filesin a directory.You'd be killed on directory search times. This

Re: [GENERAL] CREATE USER

2000-06-01 Thread Tom Lane
"Hiroshi Inoue" [EMAIL PROTECTED] writes: How about starting new transaction automatically after committing "create user ..." at backend side if "create user" is the first command of the transaction ? So then begin; create user ...; rollback; would do the wrong thing

[GENERAL] index problem

2000-06-01 Thread Marcin Inkielman
hi! I created an index using pgaccess rescently. the name of the index was long: "oceny_stud_numer_albumu_protokoloceny_stud" now i am unable to vacuum my database. i obtain something like this when i try: NOTICE: Pages 310: Changed 0, reaped 2, Empty 0, New 0; Tup 48611: Vac 3, Keep/VTL

Re: [GENERAL] Postmaster won't -HUP

2000-06-01 Thread Jerry Lynde
At 12:11 PM 6/1/00 -0500, Ed Loehr wrote: Jerry Lynde wrote: As for the query I'm running, it was simply select * from bigtable (about 2-300k lines) where firstname=obscure fname and

Re: [GENERAL] Postmaster won't -HUP

2000-06-01 Thread Jerry Lynde
At 01:21 PM 6/1/00 -0400, Tom Lane wrote: Ed Loehr [EMAIL PROTECTED] writes: Jerry Lynde wrote: As for the query I'm running, it was simply select * from bigtable (about 2-300k lines) where firstname=obscure fname and lastname=obscure lname and DOB=the exact DOB for the above named

Re: [GENERAL] shared memory

2000-06-01 Thread Bruce Momjian
OK, John, I think I have an answer for you. It is not pretty. You actually got pretty close. First, increase SHMMAXPGS by 1024 for every additional 4MB of shared memory: /sys/sys/shm.h:69:#define SHMMAXPGS 1024/* max hardware pages... The default setting of 1024 is for a

[GENERAL] Q: Truncated output

2000-06-01 Thread Elliot Finley
I've just started using Postgres 6.5.2 and I'm trying to figure out a way to be able to see the complete 'type' for the 'employee_id' field. I can't remember which sequence I used in the 'nextval', so I need to be able to see which one is being used there. shift= \d employee Table= employee

Re: [GENERAL] Q: Truncated output

2000-06-01 Thread leonbloy
A quick and dirty trick, is to make a dump of the schema of the database (or the table): postgres# pg_dump -s [-t employee] my-db-name db.dump.schema Regards Hernan Gonzalez Buenos Aires, Argentina I've just started using Postgres 6.5.2 and I'm trying to figure out a way to be able to

Re: [GENERAL] Postmaster won't -HUP

2000-06-01 Thread Joseph Shraibman
Jerry Lynde wrote: At 12:11 PM 6/1/00 -0500, Ed Loehr wrote: Jerry Lynde wrote: As for the query I'm running, it was simply select * from bigtable (about 2-300k lines) where firstname=obscure fname and

Re: [GENERAL] Postmaster won't -HUP

2000-06-01 Thread Jerry Lynde
At 05:19 PM 6/1/00 -0400, Joseph Shraibman wrote: Jerry Lynde wrote: At 12:11 PM 6/1/00 -0500, Ed Loehr wrote: Jerry Lynde wrote: As for the query I'm running, it was simply select * from bigtable (about 2-300k lines) where

Re: [GENERAL] btree index and max()

2000-06-01 Thread Tom Lane
[EMAIL PROTECTED] writes: I understand that the query planner cannot be so clever to grasp that this particular function (max or min) might be evaluated by just travelling the BTREE index. Am I correct? You are correct --- the system has no idea that there is any connection between the MIN

Re: [GENERAL] Postmaster won't -HUP

2000-06-01 Thread Tom Lane
Jerry Lynde [EMAIL PROTECTED] writes: They are all indexed, the DOB index is actually DOBYear DOBDay and DOBMonth and all 5 fields are indexed Do you have 5 indexes or do you have an index that spans more than one field? Sorry for being less than explicit. There are 5 separate indices,

Re: [GENERAL] Postmaster won't -HUP

2000-06-01 Thread Jerry Lynde
At 05:58 PM 6/1/00 -0400, you wrote: Jerry Lynde [EMAIL PROTECTED] writes: They are all indexed, the DOB index is actually DOBYear DOBDay and DOBMonth and all 5 fields are indexed Do you have 5 indexes or do you have an index that spans more than one field? Sorry for being less than

Re: [GENERAL] index problem

2000-06-01 Thread Tom Lane
Marcin Inkielman [EMAIL PROTECTED] writes: I created an index using pgaccess rescently. the name of the index was long: "oceny_stud_numer_albumu_protokoloceny_stud" now i am unable to vacuum my database. Oh dear :-( ... it seems that when you quote an identifier, the system forgets to make

Re: [GENERAL] PostgreSQL article in LinuxWorld

2000-06-01 Thread Michael Meskes
On Wed, May 31, 2000 at 04:27:24PM -0400, Bruce Momjian wrote: http://www.linuxworld.com/linuxworld/lw-2000-05/lw-05-database.html It mentions PostgreSQL. I was interviewed for the article. Nice article, but the author should get some facst straight. Postgres was never sold as Ingres.

Re: [GENERAL] btree index and max()

2000-06-01 Thread leonbloy
[EMAIL PROTECTED] writes: I understand that the query planner cannot be so clever to grasp that this particular function (max or min) might be evaluated by just travelling the BTREE index. Am I correct? You are correct --- the system has no idea that there is any connection

Re: [GENERAL] Q: Truncated output

2000-06-01 Thread Ross J. Reedstrom
On Thu, Jun 01, 2000 at 08:51:13PM +, Elliot Finley wrote: I've just started using Postgres 6.5.2 and I'm trying to figure out a way to be able to see the complete 'type' for the 'employee_id' field. I can't remember which sequence I used in the 'nextval', so I need to be able to see

Re: [GENERAL] Postmaster won't -HUP

2000-06-01 Thread Tom Lane
Jerry Lynde [EMAIL PROTECTED] writes: Thanks for the tip. I might indeed take that approach in the future, however that's not really the problem I'm trying to tackle right now. Indexing by Last Name is fine with me, currently. What's not working for me is the part where the dual

Re: [GENERAL] PostgreSQL article in LinuxWorld

2000-06-01 Thread Bruce Momjian
On Wed, May 31, 2000 at 04:27:24PM -0400, Bruce Momjian wrote: http://www.linuxworld.com/linuxworld/lw-2000-05/lw-05-database.html It mentions PostgreSQL. I was interviewed for the article. Nice article, but the author should get some facst straight. Postgres was never sold as

[GENERAL] make install for docs in 7.0.1 won't work.

2000-06-01 Thread Joseph Shraibman
I did a make install in doc in the 7.0 release, but now when I try it: make all make[1]: Entering directory `/tmp/postgresql-7.0.1/doc' make[1]: *** No rule to make target `admin', needed by `all'. Stop. make[1]: Leaving directory `/tmp/postgresql-7.0.1/doc' make: *** [install] Error 2

Re: [GENERAL] PostgreSQL article in LinuxWorld

2000-06-01 Thread Ron Chmara
Bruce Momjian wrote: On Wed, May 31, 2000 at 04:27:24PM -0400, Bruce Momjian wrote: http://www.linuxworld.com/linuxworld/lw-2000-05/lw-05-database.html It mentions PostgreSQL. I was interviewed for the article. Nice article, but the author should get some facst straight.

[GENERAL] interval questions

2000-06-01 Thread Michael Blakeley
I hope someone on the list can suggest a solution for me - given a table like CREATE TABLE EVENTS( stamp date, id varchar(16), event varchar(128) ); I'm trying to find the average age of the records. I've gotten as far as: SELECT DISTINCT ON(id) age(stamp) FROM EVENTS; Now, I need the

Re: [GENERAL] query optimiser changes 6.5-7.0

2000-06-01 Thread Tom Lane
"Simon Hardingham" [EMAIL PROTECTED] writes: I have run explain on the query and it shows that it is just performed a sequential scan on version 7.0 Seq Scan on gazet (cost.) On the old version (6.5.1) it reports Index Scan using gazet_index on gazet (cost= Any suggestions as

Re: [GENERAL] interval questions

2000-06-01 Thread Tom Lane
Michael Blakeley [EMAIL PROTECTED] writes: I'm trying to find the average age of the records. I've gotten as far as: SELECT DISTINCT ON(id) age(stamp) FROM EVENTS; Now, I need the DISTINCT ON(id), but that means I can't simply avg() the age: ERROR: Attribute events.id must be

Re: [GENERAL] interval questions

2000-06-01 Thread Alfred Perlstein
* Michael Blakeley [EMAIL PROTECTED] [000601 19:09] wrote: I hope someone on the list can suggest a solution for me - given a table like CREATE TABLE EVENTS( stamp date, id varchar(16), event varchar(128) ); I'm trying to find the average age of the records. I've gotten as far as:

Re: [GENERAL] ALTERING A TABLE

2000-06-01 Thread Richard Smith
--snip-- Or is that CAST it on the wasy. Richard

Re: [GENERAL] interval questions

2000-06-01 Thread Michael Blakeley
At 10:21 PM -0500 6/1/2000, Ed Loehr wrote: Michael Blakeley wrote: CREATE TABLE EVENTS( stamp date, id varchar(16), event varchar(128) ); I'm trying to find the average age of the records. I've gotten as far as: SELECT DISTINCT ON(id) age(stamp) FROM EVENTS; Now, I need the

Re: [GENERAL] btree index and max()

2000-06-01 Thread Elliot Finley
On Thu, 1 Jun 2000 19:10:48 -0300, [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] writes: I understand that the query planner cannot be so clever to grasp that this particular function (max or min) might be evaluated by just travelling the BTREE index. Am I correct? You are

Re: [GENERAL] query optimiser changes 6.5-7.0

2000-06-01 Thread Joseph Shraibman
Tom Lane wrote: Also, 7.0.1, propagating now to an archive near you, contains some fudge-factor twiddling to make it more willing to choose an indexscan. We shall soon find out whether that made things better or worse for typical uses... regards, tom lane OK this

Re: [GENERAL] Perl interfaces?

2000-06-01 Thread Thomas Good
On Tue, 30 May 2000, Philip Hallstrom wrote: Hi - I took a look around and was unable to find a Perl DBI driver for PostgreSQL... does one exist that I'm missing? If not, which of the three drivers at cpan.org is the best (please no wars :) -philip Phil, I use DBI and DBD-Pg. For