[GENERAL] psql from Linux script

2005-08-30 Thread Bernard
Dear Postgresql Specialists I am failing to update the password of the postgresql user from within a Linux installation script run by root: # su - postgres -c echo "ALTER USER postgres WITH PASSWORD 'newpassword';" | psql -U postgres template1 psql: FATAL: Ident authentication failed for user "p

[GENERAL] temp_buffers

2005-08-30 Thread Hannes Dorbath
Can someone give me a little info on what this setting does in 8.1 beta? Thanks ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] psql from Linux script

2005-08-30 Thread Marko Kreen
On Tue, Aug 30, 2005 at 07:04:52PM +1200, Bernard wrote: > Dear Postgresql Specialists > > I am failing to update the password of the postgresql user from within > a Linux installation script run by root: > > # su - postgres -c echo "ALTER USER postgres WITH PASSWORD > 'newpassword';" | psql -U p

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Ben-Nes Yonatan
Tom Lane wrote: Ben-Nes Yonatan <[EMAIL PROTECTED]> writes: Indexes: "items_items_id_key" UNIQUE, btree (items_id) "items_left" btree (left) "items_left_right" btree (left, right) You could get rid of the items_left index --- it's redundant with the first column of the combined i

Re: [GENERAL] psql from Linux script

2005-08-30 Thread Marko Kreen
[This guy has prove-you-arent-bot filtering] On Tue, Aug 30, 2005 at 07:04:52PM +1200, Bernard wrote: > I would appreciate your help very much. Unless you turn off your braindead spam-filtering, you are not worth it. Sorry, but you are asking help on a public list, think about it a bit... -- m

Re: [GENERAL] psql from Linux script

2005-08-30 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Tue, 30 Aug 2005, Marko Kreen wrote: I am failing to update the password of the postgresql user from within a Linux installation script run by root: # su - postgres -c echo "ALTER USER postgres WITH PASSWORD 'newpassword';" | psql -U postg

Re: [GENERAL] psql from Linux script

2005-08-30 Thread Patrick . FICHE
Hi Bernard, I just ran a test on Solaris... The following syntax is working for me : su - postgres -c "psql template1 -U postgres -c \"ALTER USER postgres WITH PASSWORD 'newpassword';\"" If it can help you... -

Re: [GENERAL] psql from Linux script

2005-08-30 Thread Marko Kreen
On Tue, Aug 30, 2005 at 09:25:07PM +1200, Bernard wrote: > The postgresql.org server is the only braindead list server I have > seen so far. http://www.unicom.com/pw/reply-to-harmful.html It is the rule on technical mailing lists. -- marko ---(end of broadcast)

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Martijn van Oosterhout
On Tue, Aug 30, 2005 at 11:25:26AM +0200, Ben-Nes Yonatan wrote: > Tom Lane wrote: > >However ... this query is basically going to suck with any btree index, > >because btree can't usefully do range checks on two separate variables. > >There's an exactly similar problem being discussed over in pgsq

Re: [GENERAL] psql from Linux script

2005-08-30 Thread Peter Eisentraut
Bernard wrote: > So when we hit the reply button of our email client then we get the > individual sender where in fact we would prefer to get the list > address [EMAIL PROTECTED] No, we would not prefer that. If you write to me, then my reply goes to you, no matter by what means your message was

Re: [GENERAL] psql from Linux script

2005-08-30 Thread Martijn van Oosterhout
On Tue, Aug 30, 2005 at 09:25:07PM +1200, Bernard wrote: > Dear Marko on the Postgresql Mailing List > > A whitelist based spam filtering system is simple to understand. > postgresql.org emails get through. Individual member emails may not > get through. > > In contrast to what you write, it is a

Re: [GENERAL] Select gives the wrong results

2005-08-30 Thread Alban Hertroys
Crystle Numan wrote: Dear all: I am fairly knowledgeable about PostgreSQL but this behaviour is stumping me. Any help would be wonderful. If you think it is a bug, let me now and I'll file one. (select values in DB (date stamps) between Jan 1, 2000 and Jan 1, 2005, no results) db_name=# SELECT

Re: [GENERAL] update functions locking tables

2005-08-30 Thread Clodoaldo Pinto
2005/8/29, Michael Fuhr <[EMAIL PROTECTED]>: > > In general, writers shouldn't block readers. Have you examined > pg_locks? Do you know exactly what the blocked queries are, or can > you find out from pg_stat_activity (stats_command_string must be > enabled)? Are you doing any explicit locking

Re: [GENERAL] Select gives the wrong results

2005-08-30 Thread Crystle Numan
On Mon, 2005-08-29 at 23:42 +0200, Martijn van Oosterhout wrote: > On Mon, Aug 29, 2005 at 04:48:49PM -0400, Crystle Numan wrote: > > Dear all: > > > > I am fairly knowledgeable about PostgreSQL but this behaviour is > > stumping me. Any help would be wonderful. If you think it is a bug, let > > m

[GENERAL] Cursor declaration

2005-08-30 Thread Nigel Horne
How do I declare a cursor in a stored procedure if that cursor contains a WHERE which depends on the argument given to that stored procedure? I can't get passed this message: 'Cannot mix placeholder styles "$1" and ":foo"' The message doesn't give a useful line number, so I don't even know which

Re: [GENERAL] update functions locking tables

2005-08-30 Thread Clodoaldo Pinto
2005/8/29, Tom Lane <[EMAIL PROTECTED]>: > > What is the function doing to the table, exactly? DDL changes generally > take exclusive locks ... This is the transaction: begin; select update_last_date(); truncate times_producao; select kstime(), insert_times_producao(), kstime(); select kstime()

Re: [GENERAL] temp_buffers

2005-08-30 Thread Michael Fuhr
On Tue, Aug 30, 2005 at 10:14:04AM +0200, Hannes Dorbath wrote: > Can someone give me a little info on what this setting does in 8.1 beta? To learn more about any configuration setting, see "Run-time Configuration" in the "Server Run-time Environment" chapter of the documentation. Here's a link t

Re: [GENERAL] psql from Linux script

2005-08-30 Thread Bernard
Dear Marko on the Postgresql Mailing List A whitelist based spam filtering system is simple to understand. postgresql.org emails get through. Individual member emails may not get through. In contrast to what you write, it is actually the list server that is braindead because it creates messages t

Re: [GENERAL] revoke on database not working as expected

2005-08-30 Thread Stijn Hoop
On Mon, Aug 29, 2005 at 03:07:59PM -0400, Tom Lane wrote: > Stijn Hoop <[EMAIL PROTECTED]> writes: > > template1=# revoke all on database privtest from testpriv; > > That doesn't do what you evidently think it does --- it revokes the > right to create temp tables, and the right to create new schem

Re: [GENERAL] Resore PG-Data from Files after crash

2005-08-30 Thread tomtailor
THX for Help, but it seems that there is no way get it fixed ... So long ... Christian ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your

Re: [GENERAL] Select gives the wrong results

2005-08-30 Thread Reid Thompson
> Crystle Numan wrote: >> Dear all: >> >> I am fairly knowledgeable about PostgreSQL but this behaviour is >> stumping me. Any help would be wonderful. If you think it is a bug, >> let me now and I'll file one. >> >> (select values in DB (date stamps) between Jan 1, 2000 and Jan 1, >> 2005, no

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Bruno Wolff III
On Tue, Aug 30, 2005 at 11:25:26 +0200, Ben-Nes Yonatan <[EMAIL PROTECTED]> wrote: > > If btree index is not suitable for this query then which index is? as > far as I understand the rtree index doesnt support range checks and the > hash index is not recommended by almost everyone (including t

Re: [GENERAL] update functions locking tables

2005-08-30 Thread Michael Fuhr
On Tue, Aug 30, 2005 at 08:39:52AM -0300, Clodoaldo Pinto wrote: > > begin; > select update_last_date(); > truncate times_producao; TRUNCATE acquires an AccessExclusiveLock, which conflicts with all other lock types. Locks are held until the transaction completes, so once this lock is acquired n

Re: [GENERAL] update functions locking tables

2005-08-30 Thread Clodoaldo Pinto
2005/8/30, Michael Fuhr <[EMAIL PROTECTED]>: > > TRUNCATE acquires an AccessExclusiveLock, which conflicts with all > other lock types. Locks are held until the transaction completes, > so once this lock is acquired no other transactions will be able > to access the table until this transaction c

Re: [GENERAL] About dropped notifications

2005-08-30 Thread Greg Stark
CSN <[EMAIL PROTECTED]> writes: > I'm considering setting up a script that listens for > notifications for a table and if a row is deleted the > script will delete that row's corresponding files. One way to deal with this would be to have a boolean flag in the table like "deleted". Update that

[GENERAL] 8.1beta1 RPMs

2005-08-30 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, PostgreSQL RPM Building Project (http://pgfoundry.org/projects/pgsqlrpms) has built RPMs for Red Hat Linux 9, Red Hat Enterprise Linux 3.0 and 4. More may come later: http://developer.postgresql.org/~devrim/rpms/8.1/beta1/rpms/ We hope thes

Re: [GENERAL] update functions locking tables

2005-08-30 Thread Greg Stark
Clodoaldo Pinto <[EMAIL PROTECTED]> writes: > 2005/8/29, Tom Lane <[EMAIL PROTECTED]>: > > > > What is the function doing to the table, exactly? DDL changes generally > > take exclusive locks ... > > This is the transaction: > > begin; > select update_last_date(); > truncate times_producao; I

Re: [GENERAL] psql from Linux script

2005-08-30 Thread Greg Stark
Bernard <[EMAIL PROTECTED]> writes: > The postgresql.org server is the only braindead list server I have > seen so far. Well, welcome to the real Internet. -- greg ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] update functions locking tables

2005-08-30 Thread Clodoaldo Pinto
30 Aug 2005 09:10:51 -0400, Greg Stark <[EMAIL PROTECTED]>: > > I think truncate takes a table lock. > Just change it to "delete from times_producao". Thanks, i will try it. > > Also, if consider doing a "vacuum full" or "cluster" after the batch job to > clear up the free space (not in a large

[GENERAL] or kills performance

2005-08-30 Thread Sim Zacks
Does it make sense for a simple or in a where clause to kill performance? The statement with the OR takes 2500 ms and the statement without the OR takes 190 ms: select c.partid,c.pnid,c.leadstateid,e.stock from assembliesbatch a join partsassembly b on a.assemblyid=b.assemblyid join manufacturerpa

Re: [GENERAL] update functions locking tables

2005-08-30 Thread Alvaro Herrera
On Tue, Aug 30, 2005 at 10:18:20AM -0300, Clodoaldo Pinto wrote: > 30 Aug 2005 09:10:51 -0400, Greg Stark <[EMAIL PROTECTED]>: > > Also, if consider doing a "vacuum full" or "cluster" after the batch job to > > clear up the free space (not in a large transaction). That will still take a > > table

Re: [GENERAL] Cursor declaration

2005-08-30 Thread Richard Huxton
Nigel Horne wrote: How do I declare a cursor in a stored procedure if that cursor contains a WHERE which depends on the argument given to that stored procedure? I can't get passed this message: 'Cannot mix placeholder styles "$1" and ":foo"' The message doesn't give a useful line number, so I

Re: [GENERAL] Php abstraction layers

2005-08-30 Thread Hannes Dorbath
In this situation, what would be the advantage of using an abstraction layer? NONE. PEAR::DB is one of the worst classes in PEAR and has lots of ugly code in it. AdoDB is IMHO a bit better, but as you said yourself, there is not a single reason why you should go through all the trouble of usi

Re: [GENERAL] update functions locking tables

2005-08-30 Thread Greg Stark
Clodoaldo Pinto <[EMAIL PROTECTED]> writes: > I'm already doing a vacuum (not full) once a day. > > A vacuum full or a cluster is totally out of reach since each take > about one hour. The biggest table is 170 million rows long. Well a regular vacuum will mark the free space for reuse. If you i

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Tom Lane
Martijn van Oosterhout writes: > rtree works on multidimesional (geometric) data. It can do range tests > (is object A to the left of object B) but it's only applicable if your > conditions can be interpreted that way. > GiST is for creating custom index types, hardly likely to be useful > in you

Re: [GENERAL] Cursor declaration

2005-08-30 Thread Tom Lane
Nigel Horne <[EMAIL PROTECTED]> writes: > I can't get passed this message: > 'Cannot mix placeholder styles "$1" and ":foo"' There's no such message anywhere in the Postgres sources. I suppose it must be coming from whatever client-side library you are using (which you didn't say).

[GENERAL] detection of VACUUM in progress

2005-08-30 Thread Bohdan Linda
Hello, Is there any way how to detect running command VACUUM by reading pg_* tables? The idea is to detectect when table is not accessible due maintainance. The approach of explicitely setting a flag into status table is not very convenient, while I want to cover also non-systematic launching

Re: [GENERAL] 8.1beta1 RPMs

2005-08-30 Thread Oliver Elphick
On Tue, 2005-08-30 at 16:10 +0300, Devrim GUNDUZ wrote: > PostgreSQL RPM Building Project (http://pgfoundry.org/projects/pgsqlrpms) > has built RPMs for Red Hat Linux 9, Red Hat Enterprise Linux 3.0 and 4. > More may come later: > > http://developer.postgresql.org/~devrim/rpms/8.1/beta1/rpms/ >

Re: [GENERAL] Php abstraction layers

2005-08-30 Thread Hannes Dorbath
Would it be a good decision to use PDO instead of pg_ functions? I don't see much benefits in using it, it just provides a common API naming scheme. It's maybe easier in case you work with a gazillion different DBMS and have trouble remembering function names, but that's it. On the other hand

Re: [GENERAL] or kills performance

2005-08-30 Thread Tom Lane
"Sim Zacks" <[EMAIL PROTECTED]> writes: > Does it make sense for a simple or in a where clause to kill performance? Did you get the parenthesization correct? Remember that AND binds more tightly than OR. regards, tom lane ---(end of broadcast)

Re: [GENERAL] postgres optimizer

2005-08-30 Thread Hossein S. Attar
Like I said it's a research project. There is a feature that I'm trying to add to optimizer, but this feature should only be used when a join is a foreign key join. Hossein Joshua D. Drake wrote: I would be interested in knowing "why" you want to do such a thing? What is it you expect to g

Re: [GENERAL] detection of VACUUM in progress

2005-08-30 Thread Tom Lane
Bohdan Linda <[EMAIL PROTECTED]> writes: > Is there any way how to detect running command VACUUM by reading pg_* tables? > The idea is to detectect when table is not accessible due maintainance. Um, ordinary VACUUM doesn't render the table "not accessible". If you're using VACUUM FULL, maybe the

Re: [GENERAL] update functions locking tables

2005-08-30 Thread Clodoaldo Pinto
2005/8/30, Alvaro Herrera <[EMAIL PROTECTED]>: > On Tue, Aug 30, 2005 at 10:18:20AM -0300, Clodoaldo Pinto wrote: > > A vacuum full or a cluster is totally out of reach since each take > > about one hour. > > Even if you cluster/vacuum only the just-loaded table? > No, that would be much faster

Re: [GENERAL] detection of VACUUM in progress

2005-08-30 Thread Michael Fuhr
On Tue, Aug 30, 2005 at 05:35:13PM +0200, Bohdan Linda wrote: > > Is there any way how to detect running command VACUUM by reading pg_* tables? If you have stats_command_string enabled then you could query pg_stat_activity, but be aware that the results will be stale by the time you see them (the

Re: [GENERAL] update functions locking tables

2005-08-30 Thread Clodoaldo Pinto
30 Aug 2005 10:35:31 -0400, Greg Stark <[EMAIL PROTECTED]>: > > Well a regular vacuum will mark the free space for reuse. If you insert or > update any records the new ones will go into those spots. Make sure you set > the fsm_* parameters high enough to cover all the updates and inserts for the >

[GENERAL] PostgreSQL 8.1 changes...

2005-08-30 Thread Cristian Prieto
Is around there any place where I could get the changes in PostgreSQL 8.1?   Thanks a lot

Re: [GENERAL] PostgreSQL 8.1 changes...

2005-08-30 Thread Bruce Momjian
Cristian Prieto wrote: > Is around there any place where I could get the changes in PostgreSQL 8.1? Sure, it is in the developer's version of the manual, under Release Changes: http://www.postgresql.org/developer/beta -- Bruce Momjian| http://candle.pha.pa.us

[GENERAL] optimum settings for dedicated box

2005-08-30 Thread Matt A.
Wondering what the optimum settings are for an dedicated postgresql database box? The box is an 2.8ghz processor, 1gig ram (soon will be 4) and raid 1 (mirroring) across two 10k rpm SCSI disks. I only have a single database on it running linux of course. Thanks. ___

Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-30 Thread vishal saberwal
Thanks michael for your response ... I had read the links (you suggested) before, but yes i missed some important points ... hmmm i believe it was me who was wrong again ... I was trying to connect to the server from the same machine server is running on ... well, in this case it has to serve as c

Re: [GENERAL] Invalid page header in pg_class

2005-08-30 Thread Tom Lane
gokulnathbabu manoharan <[EMAIL PROTECTED]> writes: > In my sample databases the relfilenode for pg_class > was 1259. So I checked the block number 190805 of the > 1259 file. Since the block size is 8K, 1259 was in > two files 1259 & 1259.1. The block number 190805 > falls in the second file who

Re: [GENERAL] Postgresql replication

2005-08-30 Thread Andrew Sullivan
On Thu, Aug 25, 2005 at 01:44:15PM +0200, Bohdan Linda wrote: > there are some other db solutions which have good performance when doing > this kind of replication across the world. Bluntly, "No." -- Andrew Sullivan | [EMAIL PROTECTED] Information security isn't a technological problem. It's

Re: [GENERAL] Postgresql replication

2005-08-30 Thread Andrew Sullivan
On Wed, Aug 24, 2005 at 11:54:42AM -0400, Chris Browne wrote: > There is a Slony-II project ongoing that is trying to construct a > more-or-less synchronous multimaster replication system (where part of > the cleverness involves trying to get as much taking place in an > asynchronous fashion as pos

Re: [GENERAL] GROUP BY requirement

2005-08-30 Thread Scott Marlowe
On Fri, 2005-08-26 at 14:39, Bill Moseley wrote: > I'm wondering if adding a GROUP BY (as required by Postgres) will > change the results of a select on a view. > > I have the following view which joins a "class" with a teacher. A > teacher is a "person" and I have an "instructors" link table. >

Re: [GENERAL] POSS. FEATURE REQ: "Dynamic" Views

2005-08-30 Thread Scott Marlowe
On Sat, 2005-08-27 at 09:48, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > >> How is this different from materialized views, which is already on the > >> TODO list? > > > The idea behind the DYNAMIC VIEW is that if you made a DDL change in the > > table it could be reflected in th

[GENERAL] 8.1 observation

2005-08-30 Thread Tony Caduto
Hi, I just noticed that pronargs in pg_proc does not show the full arg count, seems only to show count of IN args. shouldn't this show the full arg count including in/out/inout? Also is it ok to talk about the 8.1 beta in this list? Thanks, Tony ---(end of broadcast)-

[GENERAL] Help with SPI...

2005-08-30 Thread Cristian Prieto
Hi, I will try to explain the most possible my question:   I'm writing a Store Procedure as a C Language Function in the Database, I need to handle a bytea (binary objetc) and store it in a modified mode in the database, I've done it in the following way:   PG_FUNCTION_INFO_V1(myspi);   Datu

Re: [GENERAL] 8.1 observation

2005-08-30 Thread Tom Lane
Tony Caduto <[EMAIL PROTECTED]> writes: > I just noticed that pronargs in pg_proc does not show the full arg > count, seems only to show count of IN args. > shouldn't this show the full arg count including in/out/inout? There was some discussion of that just a day or so ago; so far no one's come

Re: [GENERAL] About "ERROR: must be *superuser* to COPY to or from

2005-08-30 Thread Scott Marlowe
On Mon, 2005-08-29 at 18:59, Tom Lane wrote: > Greg Stark <[EMAIL PROTECTED]> writes: > > I was only suggesting using this from a local unix user where you can > > actually authoritatively say something about the uid of the connecting > > user. I suggested that if the owner of the file matches the

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Ben-Nes Yonatan
Tom Lane wrote: Martijn van Oosterhout writes: rtree works on multidimesional (geometric) data. It can do range tests (is object A to the left of object B) but it's only applicable if your conditions can be interpreted that way. GiST is for creating custom index types, hardly likely to be

[GENERAL] Is this still valid for current Postgresql versions?

2005-08-30 Thread Tony Caduto
"The current implementation of RETURN NEXT for PL/pgSQL stores the entire result set before returning from the function" I thought I read somewhere that 8.x did not do this. Thanks, Tony ---(end of broadcast)--- TIP 4: Have you searched our list

Re: [GENERAL] Is this still valid for current Postgresql versions?

2005-08-30 Thread Tom Lane
Tony Caduto <[EMAIL PROTECTED]> writes: > "The current implementation of RETURN NEXT for PL/pgSQL stores the > entire result set before returning from the function" > I thought I read somewhere that 8.x did not do this. Sorry. regards, tom lane -

[GENERAL] Php abstraction layers

2005-08-30 Thread Antimon
Hi, I'm working on a new web project based on php and i decided to use PostgreSQL 8.x as dbms. For triggers, views, stored procedures etc. I was going to write a simple wrapper class and use pg_* functions. But some friends adviced me to use an abstraction layer. I checked PEAR:DB and AdoDB. They l

Re: [GENERAL] Php abstraction layers

2005-08-30 Thread Antimon
Thanks for the reply. I checked new 5.1 pg_ functions and i wanna ask something else. What do you think about PDO? It is not an abstraction layer, just something like wrapper. I thought as it supports both widely used dbmss, php developers would focus on it more than pg or mysqli functions and that

[GENERAL] Get postgresql workin in french...

2005-08-30 Thread Guy Doune
Hi, I would know how to set the encoding (unicode, ASCII, etc.) for getting postgresql accepting my entry with accent an all the what the french poeple put over there caracter while they write... Well thanks in advance. Just leave me a links our try to explain it. I gonna continu to search why

Re: [GENERAL] update functions locking tables

2005-08-30 Thread Jim C. Nasby
On Tue, Aug 30, 2005 at 08:13:15AM -0300, Clodoaldo Pinto wrote: > 2005/8/29, Michael Fuhr <[EMAIL PROTECTED]>: > > > > In general, writers shouldn't block readers. Have you examined > > pg_locks? Do you know exactly what the blocked queries are, or can > > you find out from pg_stat_activity (st

Re: [GENERAL] update functions locking tables

2005-08-30 Thread Clodoaldo Pinto
2005/8/30, Jim C. Nasby <[EMAIL PROTECTED]>: > > FWIW, that where clause might be more efficient as > WHERE pontos_0 > pontos_7. Some databases would be able to use indexes > to answer that (not sure if PostgreSQL could), plus it removes an > operator. It also seems to be cleaner code to me. :) >

Re: [GENERAL] PQConnectdb SSL (sslmode): Is this a bug

2005-08-30 Thread Michael Fuhr
On Tue, Aug 30, 2005 at 10:40:26AM -0700, vishal saberwal wrote: > Root user: > /root/.postgressql: Is this the actual directory name? It's misspelled: it should be ".postgresql", not ".postgressql". -- Michael Fuhr ---(end of broadcast)--- TIP 2

Re: [GENERAL] Php abstraction layers

2005-08-30 Thread Greg Stark
"Antimon" <[EMAIL PROTECTED]> writes: > Thanks for the reply. > I checked new 5.1 pg_ functions and i wanna ask something else. What do > you think about PDO? It is not an abstraction layer, just something > like wrapper. I thought as it supports both widely used dbmss, php > developers would focu

Re: [GENERAL] About "ERROR: must be *superuser* to COPY to or from a file"

2005-08-30 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > Alternatively and actually even better and more secure would be > passing the fd directly from the client to the server over the socket. Sure ... on the platforms that support that, for the connection types for which they support it. But I think that in th

Re: [GENERAL] Php abstraction layers

2005-08-30 Thread Gavin M. Roy
IMO I think it really depends on what you want to do. The pg_functions are the *most* robust and full featured. There are problems with PDO (mostly function related at this point). That being said, PDO is great to work with when you get into it, and learn your way around it. If your pr

Re: [GENERAL] About "ERROR: must be *superuser* to COPY to or from a file"

2005-08-30 Thread Greg Stark
Scott Marlowe <[EMAIL PROTECTED]> writes: > Plus, how is the server supposed to KNOW that you have access to the > file? psql may know who you are, but the server only knows who you are > in the "postgresql" sense, not the OS sense. My original suggestion was that clients connected via unix doma

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Alvaro Herrera
On Wed, Aug 31, 2005 at 01:27:30AM +0200, Ben-Nes Yonatan wrote: > Now again im probably just paranoid but when I'm starting a transaction > and in it im making more then 4 billions diffrent queries > (select,insert,update,truncate...) and then im closing it, its counted > as only one transacti

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Bruno Wolff III
On Wed, Aug 31, 2005 at 01:27:30 +0200, Ben-Nes Yonatan <[EMAIL PROTECTED]> wrote: > > Now again im probably just paranoid but when I'm starting a transaction > and in it im making more then 4 billions diffrent queries > (select,insert,update,truncate...) and then im closing it, its counted >

Re: [GENERAL] About "ERROR: must be *superuser* to COPY to or from a file"

2005-08-30 Thread Jim C. Nasby
On Tue, Aug 30, 2005 at 11:20:49PM -0400, Greg Stark wrote: > Scott Marlowe <[EMAIL PROTECTED]> writes: > > > Plus, how is the server supposed to KNOW that you have access to the > > file? psql may know who you are, but the server only knows who you are > > in the "postgresql" sense, not the OS s

Re: [GENERAL] Php abstraction layers

2005-08-30 Thread Chris Travers
Antimon wrote: Hi, I'm working on a new web project based on php and i decided to use PostgreSQL 8.x as dbms. For triggers, views, stored procedures etc. I was going to write a simple wrapper class and use pg_* functions. But some friends adviced me to use an abstraction layer. I checked PEAR:DB

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Alvaro Herrera
On Tue, Aug 30, 2005 at 10:39:57PM -0500, Bruno Wolff III wrote: > On Wed, Aug 31, 2005 at 01:27:30 +0200, > Ben-Nes Yonatan <[EMAIL PROTECTED]> wrote: > > > > Now again im probably just paranoid but when I'm starting a transaction > > and in it im making more then 4 billions diffrent queries

Re: [GENERAL] Help with SPI...

2005-08-30 Thread Michael Fuhr
On Tue, Aug 30, 2005 at 01:28:11PM -0600, Cristian Prieto wrote: > Well, the new value is really the content of a memory segment, I > know I could store it again using SPI and an UPDATE statement, but > that means that I need to transform the val value into a string, > and I don't know the length o

Re: [GENERAL] optimum settings for dedicated box

2005-08-30 Thread Ian Harding
Mine in similar, and the only thing I have changed from defaults is work_mem. It made certain complex queries go from taking forever to taking seconds. I have a database connection pool limited to 10 connections, so I set it to 10MB. That means (to me, anyway) that work_mem will never gobble mor

Re: [GENERAL] optimum settings for dedicated box

2005-08-30 Thread Jim C. Nasby
On Tue, Aug 30, 2005 at 09:43:19PM -0700, Ian Harding wrote: > Mine in similar, and the only thing I have changed from defaults is > work_mem. It made certain complex queries go from taking forever to > taking seconds. I have a database connection pool limited to 10 > connections, so I set it to

Re: [GENERAL] Invalid page header in pg_class

2005-08-30 Thread gokulnathbabu manoharan
Hi Tom, Enabling the zero_damaged_pages solved the problem. I am in the process of dumping & restoring. Thanks for the help. Gokul. --- Tom Lane <[EMAIL PROTECTED]> wrote: > gokulnathbabu manoharan <[EMAIL PROTECTED]> > writes: > > In my sample databases the relfilenode for > pg_class > > was 1

Re: [GENERAL] or kills performance

2005-08-30 Thread Sim Zacks
My goal is a specific batchid, stock>0, ownerid=1 and either leadfree with a state of 1 or 3 OR not leadfree with a state of 2,3 or 4 The parenthesis are correct: where a.batchid=382 and e.stock>0 and e.ownerid=1 and ( (d.leadfree and leadstateid in (1,3) ) or (not d.leadfree and le

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Ben-Nes Yonatan
Alvaro Herrera wrote: On Tue, Aug 30, 2005 at 10:39:57PM -0500, Bruno Wolff III wrote: On Wed, Aug 31, 2005 at 01:27:30 +0200, Ben-Nes Yonatan <[EMAIL PROTECTED]> wrote: Now again im probably just paranoid but when I'm starting a transaction and in it im making more then 4 billions diffrent

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Martijn van Oosterhout
On Wed, Aug 31, 2005 at 09:19:05AM +0200, Ben-Nes Yonatan wrote: > >If the subtransaction writes at least a tuple, it counts as another > >transaction. Else it doesn't count. > > > > Oh crap I fear that now im in serious troubles > Where can I read about this limitation? and beside that what

Re: [GENERAL] Planner create a slow plan without an available index

2005-08-30 Thread Ben-Nes Yonatan
Martijn van Oosterhout wrote: On Wed, Aug 31, 2005 at 09:19:05AM +0200, Ben-Nes Yonatan wrote: If the subtransaction writes at least a tuple, it counts as another transaction. Else it doesn't count. Oh crap I fear that now im in serious troubles Where can I read about this limitation? a