Re: [GENERAL] Re: Error on Windows server could not open relation base/xxx/xxx Permission denied

2010-06-13 Thread Magnus Hagander
On Sun, Jun 13, 2010 at 5:11 AM, Craig Ringer wrote: > On 13/06/10 02:34, Adrian Klaver wrote: > >>> Question: Is it possible that there's corruption in the database which is >>> being incorrectly reported as "Permission denied"? > > It's certainly not impossible. It'd really help if Pg would prin

[GENERAL] How to emulate password generation in PHP with PlpgSQL?

2010-06-13 Thread Andre Lopes
Hi, I need to create users in a database function. I'am dealing with a PHP application, the code that generate the password is this: [code] public function salt() { return substr(md5(uniqid(rand(), true)), 0, 10); } public function hash_password($password, $salt=false)

[GENERAL] table partition or index

2010-06-13 Thread AI Rumman
For how many records I should go for a table partition instead of using just index? Any idea please.

Re: [GENERAL] table partition or index

2010-06-13 Thread Stephen Frost
* AI Rumman (rumman...@gmail.com) wrote: > For how many records I should go for a table partition instead of using just > index? > Any idea please. General rule of thumb is that you don't need partitioning until you're into the 100's of millions of records. Stephen signature.asc Descrip

[GENERAL] how to alias a table

2010-06-13 Thread Ivan Sergio Borgonovo
I'm refactoring some code and I'll find helpful to be able to alias tables. What I'd like to do would be to refer to the same table with an alias in the code and later substitute the alias with an actual VIEW. Of course I could define a view as select * from original_table right from the start bu

Re: [GENERAL] how to alias a table

2010-06-13 Thread Tim Landscheidt
Ivan Sergio Borgonovo wrote: > I'm refactoring some code and I'll find helpful to be able to alias > tables. > What I'd like to do would be to refer to the same table with an > alias in the code and later substitute the alias with an actual VIEW. > Of course I could define a view as > select *

Re: [GENERAL] Best way to store case-insensitive data?

2010-06-13 Thread Lew
Please don't top-post. Mike Christensen wrote: Ah, I should probably upgrade to 8.4. However, I'll probably just wait for 9.0 to come out. So it seems like citext will be about the same as casting both sides to LOWER(), plus putting an index on the lowercase version of the text. I'd probably

Re: [GENERAL] pgcon 2010 videos?

2010-06-13 Thread fdd sds
On Jun 9, 3:45 pm, Aljosa Mohorovic wrote: > i've found some videos of conference > athttp://www.fosslc.org/drupal/category/event/pgcon2010 > but some are missing. > also, there is no mention of videos on pgcon page. > anybody knows if missing videos will appear somewhere and why there is > no li

Re: [GENERAL] how to alias a table

2010-06-13 Thread fdd sds
On Jun 13, 10:07 am, m...@webthatworks.it (Ivan Sergio Borgonovo) wrote: > I'm refactoring some code and I'll find helpful to be able to alias > tables. > > What I'd like to do would be to refer to the same table with an > alias in the code and later substitute the alias with an actual VIEW. > > Of

Re: [GENERAL] pgcon 2010 videos?

2010-06-13 Thread fdd sds
On Jun 9, 3:45 pm, Aljosa Mohorovic wrote: > i've found some videos of conference > athttp://www.fosslc.org/drupal/category/event/pgcon2010 > but some are missing. > also, there is no mention of videos on pgcon page. > anybody knows if missing videos will appear somewhere and why there is > no li

Re: [GENERAL] Partial indexes instead of partitions

2010-06-13 Thread Sergey Konoplev
On 11 June 2010 17:15, Leonardo F wrote: > Basically what I'm trying to do is to partition the index in the table > where the data is going to be inserted into smaller indexes, but > without using partitions: I would use partial indexes. > "Historic" data will have just the big index... Well, you

[GENERAL] Hosting without pgcrypto functions. There are other solutions?

2010-06-13 Thread Andre Lopes
Hi, I have an account in A2Hosting.com, and I'm developing some functions that deal with encryption. A2Hosting.com don't have available the function "digest()" [code] ERROR: function digest(unknown, unknown) does not exist LINE 1: select digest('', 'sha1') ^ HINT: No functio

Re: [GENERAL] Re: Error on Windows server could not open relation base/xxx/xxx Permission denied

2010-06-13 Thread John T. Dow
I have information We had noticed two relations, their numbers being 16384/16642 and 16384/16792. Here is what pg_class has for them. "relname";"relnamespace";"reltype";"relowner";"relam";"relfilenode";"reltablespace";"relpages";"reltuples";"reltoastrelid";"reltoastidxid";"relhasindex";"relissh

Re: [GENERAL] Re: Error on Windows server could not open relation base/xxx/xxx Permission denied

2010-06-13 Thread Massa, Harald Armin
John, I have noticed that postgres is very unhappy if the proper "postgres" user > doesn't have access to the files. But I have also noticed that other users > seem to be able to have access without causing problems. can you please give more information about the (windows)-user "postgres" ? is

Re: [GENERAL] Re: Error on Windows server could not open relation base/xxx/xxx Permission denied

2010-06-13 Thread Adrian Klaver
On Sunday 13 June 2010 1:41:01 pm John T. Dow wrote: > I have information > > We had noticed two relations, their numbers being 16384/16642 and > 16384/16792. > > Here is what pg_class has for them. > > > "relname";"relnamespace";"reltype";"relowner";"relam";"relfilenode";"reltab >lespace";"relpage

Re: [GENERAL] Re: Error on Windows server could not open relation base/xxx/xxx Permission denied

2010-06-13 Thread John T. Dow
>can you please give more information about the (windows)-user "postgres" ? >is it a local user on that machine? How was that user created? It's the user created by the one-click installer. I believe it owns the postgres data directory and is used to start the server. Other than that, the inten

Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-13 Thread Clemens Schwaighofer
Right now I added two simple wrappers in my .psqlrc \set shsh 'SHOW search_path;' \set setsh 'SET search_path TO' So I can at least set and check the schema more quickly. But seeing it in the PROMPT would be th best. On Sat, Jun 12, 2010 at 05:26, Scott Marlowe wrote: > On Fri, Jun 11, 2010 at

Re: [GENERAL] Re: Error on Windows server could not open relation base/xxx/xxx Permission denied

2010-06-13 Thread John T. Dow
I was talking to a friend (Joe Newcomer) who said that Unix doesn't have mandatory file locks and he guessed that the empty, system, read only files I saw at my client's site were unix-like lock files. To test that, on my home development computer I typed this command in the base\16384 diretory

[GENERAL] Unable to (re) start PostgreSQL 8.4.4/WinXP

2010-06-13 Thread kunalashar
I have PostgreSQL 8.4.4 on Windows XP. I cannot get the service to (re) start. At first installation, the service started up fine, but I couldn't access the DB remotely. So I changed the pg_hba.conf file and the postgresql.conf file as suggested. Now, the service seems to take forever to start

Re: [GENERAL] Unable to (re) start PostgreSQL 8.4.4/WinXP

2010-06-13 Thread John R Pierce
kunalashar wrote: I have PostgreSQL 8.4.4 on Windows XP. I cannot get the service to (re) start. At first installation, the service started up fine, but I couldn't access the DB remotely. So I changed the pg_hba.conf file and the postgresql.conf file as suggested. Now, the service seems to ta