Re: [GENERAL] assigning password from script

2007-07-01 Thread Pavel Stehule
Hello look on http://www.postgresql.org/docs/8.0/interactive/libpq-pgpass.html Pavel Stehule 2007/7/2, Ashish Karalkar <[EMAIL PROTECTED]>: Hello All, I want to create a user through script and dont want user to assign password interactively, I want it to be assigned through some file or

Re: [GENERAL] assigning password from script

2007-07-01 Thread Ashish Karalkar
Thanks for your replay Scott, I am using just sql script and there is no option like pwd with createuser command With Regards Ashish... - Original Message - From: "Scott Marlowe" <[EMAIL PROTECTED]> To: "Ashish Karalkar" <[EMAIL PROTECTED]> Sent: Monday, July 02, 2007 11:17 AM Subject

Re: [GENERAL] 'Session local' variables

2007-07-01 Thread Tom Lane
"Nick Johnson" <[EMAIL PROTECTED]> writes: > On 7/2/07, Tom Lane <[EMAIL PROTECTED]> wrote: >> "Nick Johnson" <[EMAIL PROTECTED]> writes: >>> I want to write a contrib module that exports a couple of functions >>> that PLs (that don't natively support this) can use to set/get >>> session-local vari

[GENERAL] Tables not created in proper schema

2007-07-01 Thread Ashish Karalkar
Hello All, I am trying to create databse with script. I run this script from root prompt with command $ su - postgres -c 'path to script.sql' In the script I follow following steps 1) create user xyz 2) create database xyz -O xyz 3) create schema xyz 4) {PG_PATH}/psql -d xyz -U xyz -f /usr/l

Re: [GENERAL] 'Session local' variables

2007-07-01 Thread Nick Johnson
On 7/2/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Nick Johnson" <[EMAIL PROTECTED]> writes: > I want to write a contrib module that exports a couple of functions > that PLs (that don't natively support this) can use to set/get > session-local variables. Um, why do you need to do anything? Don't c

Re: [GENERAL] 'Session local' variables

2007-07-01 Thread Tom Lane
"Nick Johnson" <[EMAIL PROTECTED]> writes: > I want to write a contrib module that exports a couple of functions > that PLs (that don't natively support this) can use to set/get > session-local variables. Um, why do you need to do anything? Don't current_setting() and set_config() cover this?

[GENERAL] assigning password from script

2007-07-01 Thread Ashish Karalkar
Hello All, I want to create a user through script and dont want user to assign password interactively, I want it to be assigned through some file or anything else some this like createuser -P * OR createuser -P Is there any way? Thanks in Advance With Regards Ashish...

[GENERAL] recovery_target_time ignored or recovery always recovers to end of WAL

2007-07-01 Thread Jason L. Buberel
I am trying to learn/practice the administrative steps that would need to be taken in a 'fat finger' scenario, and I am running into problems. I am trying to use 'recovery.conf' to set the database state to about 15 minutes ago in order to recover from accidentally deleting important data. Howe

[GENERAL] 'Session local' variables

2007-07-01 Thread Nick Johnson
I want to write a contrib module that exports a couple of functions that PLs (that don't natively support this) can use to set/get session-local variables. I have a couple of questions: - Can I simply use a global variable for my hash? Am I correct in thinking that stored procedures and functions

Re: [GENERAL] shmctl EIDRM preventing startup

2007-07-01 Thread Michael Fuhr
On Sun, Jul 01, 2007 at 10:06:58PM -0400, Tom Lane wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > Has anybody figured out if this is a Linux kernel bug? I might > > have until Monday morning if anybody can suggest something to look > > at; after that the admins will probably reboot and/or r

Re: [GENERAL] Can't change working directory to C:/Documents and Settings in Windows

2007-07-01 Thread Casey Crosbie
Tom, Thanks for that bit of insight on using the directories in Unix. I originally tried no quotes or double quotes for my directory change and no quotes worked for me. But after your mentioning the single quotes I tested it out and those seem to work in Windows psql directory changes as well

Re: [GENERAL] shmctl EIDRM preventing startup

2007-07-01 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Maybe what is happening is that an entirely unrelated process created a > segment with that ID, attached to it, and then it was deleted. I don't > know how to check however. AFAIK, EIDRM should imply that the segment has been IPC_RMID'd but still exist

Re: [GENERAL] shmctl EIDRM preventing startup

2007-07-01 Thread Alvaro Herrera
Michael Fuhr wrote: > One of the servers I use (RHEL AS 4; Linux 2.6.9-34.ELsmp x86_64) > appears to be in the same state after a reboot as the server in the > "Restart after poweroutage" thread from a few months ago: > > http://archives.postgresql.org/pgsql-general/2007-03/msg00738.php > > As in

Re: [GENERAL] Can't change working directory to C:/Documents and Settings in Windows

2007-07-01 Thread Tom Lane
Jorge Godoy <[EMAIL PROTECTED]> writes: > On Sunday 01 July 2007 22:25:24 Casey Crosbie wrote: >> Jorge, >> Thanks for the suggestion. But unfortunately, I tried both >> \cd "C:/Document~1" and just \cd C:/"Document~1" and neither worked. > Sorry. It should be up to 8 chars: "Docume~1" or some va

Re: [GENERAL] shmctl EIDRM preventing startup

2007-07-01 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > One of the servers I use (RHEL AS 4; Linux 2.6.9-34.ELsmp x86_64) > appears to be in the same state after a reboot as the server in the > "Restart after poweroutage" thread from a few months ago: > http://archives.postgresql.org/pgsql-general/2007-03/msg0

Re: [GENERAL] Can't change working directory to C:/Documents and Settings in Windows

2007-07-01 Thread Casey Crosbie
Jorge, The \cd C:/Docume~1 worked! Thank you very much for your help! Casey Jorge Godoy wrote: On Sunday 01 July 2007 22:25:24 Casey Crosbie wrote: Jorge, Thanks for the suggestion. But unfortunately, I tried both \cd "C:/Document~1" and just \cd C:/"Document~1" and neither worked. Sorry

Re: [GENERAL] Can't change working directory to C:/Documents and Settings in Windows

2007-07-01 Thread Jorge Godoy
On Sunday 01 July 2007 22:25:24 Casey Crosbie wrote: > Jorge, > > Thanks for the suggestion. But unfortunately, I tried both > \cd "C:/Document~1" and just \cd C:/"Document~1" and neither worked. Sorry. It should be up to 8 chars: "Docume~1" or some variation like that (I've seen ~2 due to so

Re: [GENERAL] Can't change working directory to C:/Documents and Settings in Windows

2007-07-01 Thread Casey Crosbie
Jorge, Thanks for the suggestion. But unfortunately, I tried both \cd "C:/Document~1" and just \cd C:/"Document~1" and neither worked. Casey Jorge Godoy wrote: On Sunday 01 July 2007 21:51:08 Casey Crosbie wrote: Andrej, Thanks for the suggestion. As you said, I tried enclosing "Documents a

[GENERAL] shmctl EIDRM preventing startup

2007-07-01 Thread Michael Fuhr
One of the servers I use (RHEL AS 4; Linux 2.6.9-34.ELsmp x86_64) appears to be in the same state after a reboot as the server in the "Restart after poweroutage" thread from a few months ago: http://archives.postgresql.org/pgsql-general/2007-03/msg00738.php As in the thread, "ipcs -a" shows no po

Re: [GENERAL] Can't change working directory to C:/Documents and Settings in Windows

2007-07-01 Thread Jorge Godoy
On Sunday 01 July 2007 21:51:08 Casey Crosbie wrote: > Andrej, > > Thanks for the suggestion. As you said, I tried enclosing "Documents and > Setting" and even "C:/Documents and Settings" and neither worked. Please > let me know if you have any other ideas. This looks like that old Windows

Re: [GENERAL] Can't change working directory to C:/Documents and Settings in Windows

2007-07-01 Thread Casey Crosbie
Andrej, Thanks for the suggestion. As you said, I tried enclosing "Documents and Setting" and even "C:/Documents and Settings" and neither worked. Please let me know if you have any other ideas. Thanks, Casey Andrej Ricnik-Bay wrote: On 7/2/07, Casey Crosbie <[EMAIL PROTECTED]> wrote: Hel

Re: [GENERAL] Can't change working directory to C:/Documents and Settings in Windows

2007-07-01 Thread Andrej Ricnik-Bay
On 7/2/07, Casey Crosbie <[EMAIL PROTECTED]> wrote: Hello, I am running the windows version of PostgreSQL 8.1 on my XP laptop. I was trying the \cd command to change working directories [to import query files to run] to the Documents and Settings directory (eventually to the desktop) and I am ge

[GENERAL] Can't change working directory to C:/Documents and Settings in Windows

2007-07-01 Thread Casey Crosbie
Hello, I am running the windows version of PostgreSQL 8.1 on my XP laptop. I was trying the \cd command to change working directories [to import query files to run] to the Documents and Settings directory (eventually to the desktop) and I am getting an error where psql doesn't recognize the g

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Tom Lane
"Alexander Todorov" <[EMAIL PROTECTED]> writes: > On 7/2/07, Tom Lane <[EMAIL PROTECTED]> wrote: >> The fresh-initdb approach is more likely to work without any strange >> corner cases. If you try a setup where the system catalogs are on >> persistent storage but you have a tablespace on ramdisk,

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alexander Todorov
On 7/2/07, Tom Lane <[EMAIL PROTECTED]> wrote: David Fetter <[EMAIL PROTECTED]> writes: > On Sun, Jul 01, 2007 at 03:55:11PM -0400, Alvaro Herrera wrote: >> So mount a ramdisk and initdb in there. > You could also put a tablespace on a ramdisk and create the table > there. Thanks for this hint

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alvaro Herrera
David Fetter escribió: > On Sun, Jul 01, 2007 at 03:55:11PM -0400, Alvaro Herrera wrote: > > Alexander Todorov escribió: > > > On 7/1/07, Tom Lane <[EMAIL PROTECTED]> wrote: > > > >That's why I asked if you thought losing data at crash was a > > > >feature > > > Yes it is. I don't want to actually

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes: > On Sun, Jul 01, 2007 at 03:55:11PM -0400, Alvaro Herrera wrote: >> So mount a ramdisk and initdb in there. > You could also put a tablespace on a ramdisk and create the table > there. The fresh-initdb approach is more likely to work without any strange c

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread David Fetter
On Sun, Jul 01, 2007 at 03:55:11PM -0400, Alvaro Herrera wrote: > Alexander Todorov escribió: > > On 7/1/07, Tom Lane <[EMAIL PROTECTED]> wrote: > > >That's why I asked if you thought losing data at crash was a > > >feature > > Yes it is. I don't want to actually save the data on disk. > So mount a

Re: [GENERAL] Trapping errors from pl/perl (trigger) functions

2007-07-01 Thread Wiebe Cazemier
On Sunday 01 July 2007 21:50, Tom Lane wrote: > Why would you expect it to? The raise_exception SQLSTATE applies > specifically and solely to the plpgsql RAISE command. The entire > point of those identifiers is to match fairly narrow classes of > exceptions, not anything thrown by anyone. > >

Re: [GENERAL] Trapping errors from pl/perl (trigger) functions

2007-07-01 Thread Michael Fuhr
On Sun, Jul 01, 2007 at 03:50:09PM -0400, Tom Lane wrote: > IMHO the real problem with both RAISE and the plperl elog command > is there's no way to specify which SQLSTATE to throw. In the case > of the elog command I think you just get a default. That default is XX000 (internal_error): test=> c

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alvaro Herrera
Alexander Todorov escribió: > On 7/1/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > >So mount a ramdisk and initdb in there. > > As I wrote in my first post that is the straight forward approach. > The question was is there something else that exists in PostgreSQL and > will do the same job. Wha

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alexander Todorov
On 7/1/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: So mount a ramdisk and initdb in there. As I wrote in my first post that is the straight forward approach. The question was is there something else that exists in PostgreSQL and will do the same job. ---(end of broadc

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alvaro Herrera
Alexander Todorov escribió: > On 7/1/07, Tom Lane <[EMAIL PROTECTED]> wrote: > >That's why I asked if you thought losing data at crash was a feature > Yes it is. I don't want to actually save the data on disk. So mount a ramdisk and initdb in there. -- Alvaro Herrera http

Re: [GENERAL] Trapping errors from pl/perl (trigger) functions

2007-07-01 Thread Tom Lane
Wiebe Cazemier <[EMAIL PROTECTED]> writes: > When I do something on the table which the trigger function prevents, I get a > message saying ERROR: blablabla. When such an error is generated by a pl/pgsql > trigger function, I can trap the error with WHEN raise_exception. This does > not work for th

Re: [GENERAL] Trapping errors from pl/perl (trigger) functions

2007-07-01 Thread Wiebe Cazemier
On Sunday 01 July 2007 21:16, Michael Fuhr wrote: > What have you tried and how did the outcome differ from your > expectations? The pl/perl trigger function in question generates an exception by elog(ERROR, "message"). I also tried die(), which didn't make a difference. When I do something on t

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alexander Todorov
On 7/1/07, Tom Lane <[EMAIL PROTECTED]> wrote: That's why I asked if you thought losing data at crash was a feature Yes it is. I don't want to actually save the data on disk. ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Trapping errors from pl/perl (trigger) functions

2007-07-01 Thread Michael Fuhr
On Sat, Jun 30, 2007 at 10:30:32PM +0200, Wiebe Cazemier wrote: > I have a pl/perl trigger function which can give an error, and I would like to > catch it in a pl/pgsql function, but I can't seem to trap it. What have you tried and how did the outcome differ from your expectations? > Is it possi

Re: [GENERAL] Is this a bug?

2007-07-01 Thread Tom Lane
"Harry Jackson" <[EMAIL PROTECTED]> writes: > If I made a mistake and changed the "id" column to "user_id" then from > some the statement executes. > =# delete from map_users_roles where user_id = (select user_id from > users WHERE username = 'blah'); This is a standard "outer reference" constru

[GENERAL] Is this a bug?

2007-07-01 Thread Harry Jackson
The following sql statement fails because the column "user_id" does not exist in the users table. =# select user_id from users WHERE username = 'blah'; ERROR: column "user_id" does not exist LINE 1: select user_id from users WHERE username = 'blah.. ^ The following shows a v

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Tom Lane
"Alexander Todorov" <[EMAIL PROTECTED]> writes: > On 7/1/07, Tom Lane <[EMAIL PROTECTED]> wrote: >> As long as shared_buffers is high enough, there doesn't seem to be much >> point in worrying about this; the incremental performance gain will be >> minimal since everything will be in RAM anyway. >

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alexander Todorov
On 7/1/07, Tom Lane <[EMAIL PROTECTED]> wrote: As long as shared_buffers is high enough, there doesn't seem to be much point in worrying about this; the incremental performance gain will be minimal since everything will be in RAM anyway. Yes it will be but this does not mean there will be no di

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Tom Lane
"Alexander Todorov" <[EMAIL PROTECTED]> writes: > is there anything to emulate the MySQL memory table engine? > A straight forward solution is to create a ramfs volume and mount/link > content under /var/lib/postresql there. Then add some scripts to > save/restore databases when the server restarts

[GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alexander Todorov
Hello, is there anything to emulate the MySQL memory table engine? A straight forward solution is to create a ramfs volume and mount/link content under /var/lib/postresql there. Then add some scripts to save/restore databases when the server restarts. I am wondering is there something else? Greet

Re: [GENERAL] Standby servers and incrementally updated backups

2007-07-01 Thread Robert Treat
On Friday 29 June 2007 13:47, Erik Jones wrote: > On Jun 29, 2007, at 10:15 AM, Jim Nasby wrote: > > On Jun 25, 2007, at 4:54 PM, Erik Jones wrote: > >> On Jun 25, 2007, at 4:40 PM, Simon Riggs wrote: > >>> On Mon, 2007-06-25 at 16:00 -0500, Erik Jones wrote: > On Jun 25, 2007, at 3:40 PM, Sim

Re: [GENERAL] greatest/least semantics different between oracle and postgres

2007-07-01 Thread Robert Treat
On Saturday 30 June 2007 14:13, paul rivers wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:pgsql-general- > > [EMAIL PROTECTED] On Behalf Of Pavel Stehule > > Sent: Saturday, June 30, 2007 10:37 AM > > To: Bruno Wolff III; Pavel Stehule; pgsql-general@postgresql.org > > S

Re: [GENERAL] [ASK] create data ware house in postgre

2007-07-01 Thread Ben
On Jun 29, 2007, at 11:07 PM, adolf pandapotan wrote: Hello, please i'm to introduce my self, I'm adolf, student, i'm new in postgre.I'm want to create a data warehouse in postgre 8.4.2. Can anyone help me? Because i have been try to search in google, but i can't find the details. 1. A

Re: [GENERAL] stem & tsearch2, want different stemmed words

2007-07-01 Thread Marcus Engene
Oleg Bartunov wrote: On Sat, 30 Jun 2007, Marcus Engene wrote: Hi! bond=> SELECT to_tsvector('default','animation animal'); to_tsvector - 'anim':1,2 (1 row) bond=> Sorry for a silly question, I wonder, how do I override this? I would want different stemmed words for these. cre

[GENERAL] [ASK] create data ware house in postgre

2007-07-01 Thread adolf pandapotan
Hello, please i'm to introduce my self, I'm adolf, student, i'm new in postgre.I'm want to create a data warehouse in postgre 8.4.2. Can anyone help me? Because i have been try to search in google, but i can't find the details. Thanks, regards adolf _

Re: [GENERAL] postgressqlnot support inwindows 2000

2007-07-01 Thread Magnus Hagander
Dave Page wrote: > >> siva prakash wrote: >>> if i run the setup choose language then go to next button it shows error >>> *"Failed to create process: 2!* >> Please don't remove the mailinglist from the CC list, so others can >> learn from the answers. >> >> The error you get indicates that your w

Re: [GENERAL] Looking for help regarding getting the latest inserted sequence value.

2007-07-01 Thread Martijn van Oosterhout
On Sat, Jun 30, 2007 at 11:21:59AM -0700, Richard Broersma Jr wrote: > I don't want to derail the thread too much, but would it be nice if the > returning could be used in > a insert sub-query? Absolutly, however the semantics are not so simple. I remember something about when to invoke triggers?