[GENERAL] Installing Postgresql in Irix

2004-03-02 Thread Nilabhra Banerjee
Hello friends,
 
I am in trouble again...not exactly... my dependence on postgresql is increasing day by day !!! 
Now I am planning to install postgresql 7.4 at client site with IRIX 6.4/6.5 (clustered). I got a little bit shaky after I read quite a few mails in Postgresql archive reporting failed installation (and something wrong with gcc). Do I need to bother about it ?
 
Thanks
Nil Ban
		  
Yahoo! Messenger - Communicate instantly..."Ping" your friends 
today! Download Messenger Now

[GENERAL] More info on table fields

2004-03-02 Thread Alexander Cohen
Im looking to get a bit of info from a tables column. Im looking for if 
the column is a primary key, im also looking for the columns 
constraints and its foreign key reference if it is one. How can i get 
theses with an SQL query?



--
Alexander Cohen
http://www.toomuchspace.com
(819) 348-9237
(819) 432-3443
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[GENERAL] Data in table changed?

2004-03-02 Thread Thomas Holmgren
Hi all,

I have a large number of clients synchronizing with a central database.
The clients update their local data by polling the database for changes
at fixed intervals. I need an efficient way of determining if data in a
table has been changed (either updated, deleted or inserted). Can this
be achieved without scanning the tables using expensive SQL? (my tables
are _big_!) Is there some way to get a "time for last update" for a
specific table? Or something similar I can use?

Thank you :)

Kind regards,
Thomas Holmgren
Denmark


-- 
Mvh.
Thomas Holmgren



---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] Data in table changed?

2004-03-02 Thread Stephen Frost
* Thomas Holmgren ([EMAIL PROTECTED]) wrote:
> I have a large number of clients synchronizing with a central database.
> The clients update their local data by polling the database for changes
> at fixed intervals. I need an efficient way of determining if data in a
> table has been changed (either updated, deleted or inserted). Can this
> be achieved without scanning the tables using expensive SQL? (my tables
> are _big_!) Is there some way to get a "time for last update" for a
> specific table? Or something similar I can use?

I would guess that you could create a trigger for the tables which
updates a seperate (small) table with the last-changed timestamp.

Stephen


signature.asc
Description: Digital signature


[GENERAL] My photoalbum

2004-03-02 Thread scrappy
If I'm online, it problably means I'm pretty boredso feel free to message me and 
say hi or whatever else comes to mind at the moment.
pass: 12750
<>

---(end of broadcast)---
TIP 8: explain analyze is your friend


[GENERAL] stacy

2004-03-02 Thread scrappy
Single Mom of 3,  Full time college student, Graduate in December with an Associates 
of Applied Science in Computer Information Systems Love the internet.
pass: 12750
<>

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [GENERAL] Data in table changed?

2004-03-02 Thread Shridhar Daithankar
On Tuesday 02 March 2004 19:34, Thomas Holmgren wrote:
> Hi all,
>
> I have a large number of clients synchronizing with a central database.
> The clients update their local data by polling the database for changes
> at fixed intervals. I need an efficient way of determining if data in a
> table has been changed (either updated, deleted or inserted). Can this
> be achieved without scanning the tables using expensive SQL? (my tables
> are _big_!) Is there some way to get a "time for last update" for a
> specific table? Or something similar I can use?

If you are syncing your entire database, why don't you look at replication 
solutions which would transfer WAL files and perform any required updates..

Check http://gborg.postgresql.org/project/pgreplication/projdisplay.php

HTH

 Shridhar

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[GENERAL] max table size

2004-03-02 Thread Alan Carbutt
Hi all,

I'm running a data warehouse in Postgres and I was wondering what the
max table size is column-wise and row-wise.  I tried to search the lists
and documentation on the http://www.postgresql.org and the search isn't
working.

Thanks,
-- 
Alan Carbutt
Systems Administrator/Programmer
Adams State College
719-587-7741
[EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: [GENERAL] Installing Postgresql in Irix

2004-03-02 Thread Tom Lane
=?iso-8859-1?q?Nilabhra=20Banerjee?= <[EMAIL PROTECTED]> writes:
> Now I am planning to install postgresql 7.4 at client site with IRIX 6.4/6.5 
> (clustered). I got a little bit shaky after I read quite a few mails in Postgresql 
> archive reporting failed installation (and something wrong with gcc). Do I need to 
> bother about it ?

According to the "supported platforms" list, PG 7.4 has been tested
successfully on IRIX 6.5.20 with vendor's cc.  I do seem to recall
something about problems with gcc on that platform, so possibly you'd
want to avoid gcc.

regards, tom lane

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] Data in table changed?

2004-03-02 Thread Tom Lane
"Thomas Holmgren" <[EMAIL PROTECTED]> writes:
> I have a large number of clients synchronizing with a central database.
> The clients update their local data by polling the database for changes
> at fixed intervals. I need an efficient way of determining if data in a
> table has been changed (either updated, deleted or inserted). Can this
> be achieved without scanning the tables using expensive SQL?

Are the clients continuously connected to the database?  If so you could
forget the whole polling concept and make it data-driven (the clients
listen for NOTIFY events sent out by updaters).

regards, tom lane

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


[GENERAL] Max/min of 2 values function, plpgsql efficency?

2004-03-02 Thread Karl O. Pinc
I'd like to write:

SELECT larger(colA, colB) FROM foo

and am wondering the best way to go about it.

(Really, I'd like the larger() function to take an arbitrary
number of arguments but I don't see how to do that.)
Are there significant performance penalities if I were to use a
a homemade plpgpgql function?
Does somebody have a good solution?  (I don't suppose there's
something built-in that I'm missing?)
Thanks.

Karl <[EMAIL PROTECTED]>
Free Software:  "You don't pay back, you pay forward."
 -- Robert A. Heinlein
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [GENERAL] Setting up Postgresql on Linux

2004-03-02 Thread scott.marlowe
On Mon, 1 Mar 2004, Phil Campaigne wrote:

> Hello,
> I originally installed postgresql as root user and now I am setting up a 
> development environment with cvs and a java ide and tomcat. I have 
> everything with the exception of postgresql integreted using a non-root 
> user.
> THe process I am using is  to logon as postges and start the database 
> and do queries from the command line using psql. Then I logoff and logon 
> as phil and start tomcat and my java ide.
> 
> 1.Is there a better way to start the database and the web application?

Yes, you can edit your /etc/rc.d/rc.local file and add lines something 
like this:

su - postgres -c -- 'pg_ctl start -l $PGDATA/pgsql.log'
su - httpd -c -- 'apachectl start'

etc...

> 2. During setup of postgresql I chown and ghgrp the /usr/local/pgsql 
> directoy tree to postgres?

Not necessary.  You just need to chown postgres.postgres whatever 
directory you're putting in $PGDATA.

> 3.However my development environment(i.e. jdbc connection from my 
> application) doesn't seem to have permission to access to all the files 
> it needs in postgres?

Someone else mentioned it, it's in pg_hba.conf. Also check your firewall 
installation.

> 4. Is is best to install postgresql as user "phil" in order to gain 
> access for my integrated develoment environment?

Not needed.  If you createuser as the postgres superuser the user phil and 
assign him the power to add users, you make him a superuser and he will 
have every bit as much power as the postgres user.  You might want to make 
two accounts, one for you as a superuser, and one for the application 
which is just a normal user with security to keep it in place.

Enjoy!


---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [GENERAL] Setting up Postgresql on Linux

2004-03-02 Thread Ron St-Pierre
Phil Campaigne wrote:

Hello,
I originally installed postgresql as root user and now I am setting up 
a development environment with cvs and a java ide and tomcat. I have 
everything with the exception of postgresql integreted using a 
non-root user.
THe process I am using is  to logon as postges and start the database 
and do queries from the command line using psql. Then I logoff and 
logon as phil and start tomcat and my java ide.

1.Is there a better way to start the database and the web application?

2. During setup of postgresql I chown and ghgrp the /usr/local/pgsql 
directoy tree to postgres?

3.However my development environment(i.e. jdbc connection from my 
application) doesn't seem to have permission to access to all the 
files it needs in postgres?

4. Is is best to install postgresql as user "phil" in order to gain 
access for my integrated develoment environment?

thanks,
Phil
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly

For aditional reference you can check out the docs at 
http://www.postgresql.org/docs/7.4/static/postmaster-start.html 
especially section 16.3 as it pertains to linux (assuming that's your 
os). Below are some of the steps I use when I install postgres on a new 
machine, check out steps 10 and 11 specifically:

 my instructions 
8. Install:
# cd /usr/local/postgresql-7.x
# make install
# make install-all-headers
# cd /usr/local
# chown -R postgres.postgres pgsql
9. Initialize the database as user postgres:

# su - postgres
# initdb -E UNICODE -D /usr/local/pgsql/data
10. Configure (as root) the PostgreSQL SysV Script. This script is 
useful for starting, stopping, and checking the status of PostgreSQL.

# cd /usr/local/src/postgresql-7.x
# cp contrib/start-scripts/linux /etc/init.d/postgres
# chmod 755 /etc/init.d/postgres
To have PostgreSQL start automatically when the computer boots add 
symbolic links from the correct /etc/rc*.d/ directories to 
/etc/init.d/postgres. If the normal runlevel is 3 then you really only 
need to add it to rc3.d:

# ln -s /etc/init.d/postgres /etc/rc2.d/S85postgres
# ln -s /etc/init.d/postgres /etc/rc3.d/S85postgres
etc ...

11. Start PostgreSQL for the first time:

# /etc/init.d/postgres start

12. Create a new db:

# su - postgres
$ createdb testdb
$ psql testdb
\ my instructions 
Ron
*Note:* these are taken from the book Practical Postgres by Worsley and 
Drake and are slightly(? can't remember, it's been so long since I made 
the list) modified.



---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [GENERAL] How to Cancel a query ?

2004-03-02 Thread Andrew Sullivan
On Mon, Mar 01, 2004 at 03:48:00PM -0800, Kuldeep Tanna wrote:
> How do I cancel the execution of that query. I tried restarting /
> stopping postmaster, but pg_ctl gives an error message "Unable to
> shutdown server"

Find the pid of the backend doing the work (you can use psto find it)
and then issue kill -2 

A

-- 
Andrew Sullivan  | [EMAIL PROTECTED]
This work was visionary and imaginative, and goes to show that visionary
and imaginative work need not end up well. 
--Dennis Ritchie

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: Database metadata queries (WAS Re: [GENERAL] Moving from MySQL to PGSQL....some questions)

2004-03-02 Thread Bruno Wolff III
On Mon, Mar 01, 2004 at 11:09:32 -0600,
  Shawn Harrison <[EMAIL PROTECTED]> wrote:
> 
> Would it be worthwhile to move many of these \d queries into the system
> schema, as views on various system tables? I've thought that it would be
> very useful to be able to access these things through the web or other
> clients.  I could see the benefit of providing users with a consistent
> interface
> to such "database metadata", no matter what client one is using. (OTOH, one
> could argue, learning to do that is a pgsql rite-of-passage. ;-> ).

If you are using 7.4.x look at the information_schema schema. This is going
to provide a stable way to get meta data.

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] Max/min of 2 values function, plpgsql efficency?

2004-03-02 Thread Bas Scheffers
Just use the CASE statment, example:

create table test (foo int, bar int);
insert into test2 values (1, 2);
insert into test2 values (4, 3);

select case when foo > bar then foo else bar end from test2;

Bas.

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [GENERAL] max table size

2004-03-02 Thread Bruno Wolff III
On Tue, Mar 02, 2004 at 07:59:07 -0700,
  Alan Carbutt <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> I'm running a data warehouse in Postgres and I was wondering what the
> max table size is column-wise and row-wise.  I tried to search the lists
> and documentation on the http://www.postgresql.org and the search isn't
> working.

The limit on columns is between 250 and 1600 depending on data types in
recent versions of Postgres. I think that rows are only limited by the amount
of disc space available.

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [GENERAL] Max/min of 2 values function, plpgsql efficency?

2004-03-02 Thread Tom Lane
"Karl O. Pinc" <[EMAIL PROTECTED]> writes:
> I'd like to write:
> SELECT larger(colA, colB) FROM foo
> and am wondering the best way to go about it.

> Does somebody have a good solution?  (I don't suppose there's
> something built-in that I'm missing?)

All the standard datatypes have built-in two-argument larger()
functions, though they're generally named something more obscure
than that; try \df *larger*.  The MAX and MIN aggregates require
larger() and smaller() functions --- if you can't find the function
you want by name, look into pg_aggregate to see what the transition
function for the relevant aggregate is.

regards, tom lane

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [GENERAL] using the "copy from" command

2004-03-02 Thread Knepper, Michelle
Thanks Joe!
I converted the text file to Unix, using EditPadPro, to get
rid of all the Windows characters.  Got rid of any \r and end-of-line
stuff.
And the copy command worked beautifully.  It entered all of the data
into the table.

Simple thing to do, but new to me.

Ciao. ;-)



-Original Message-
From: Joe Conway [mailto:[EMAIL PROTECTED]
Sent: Monday, March 01, 2004 2:28 PM
To: Knepper, Michelle
Cc: [EMAIL PROTECTED]
Subject: Re: [GENERAL] using the "copy from" command


Joe Conway wrote:
> Knepper, Michelle wrote:
>> medispan=# copy mmw_ade_com from
>> '/home/mknepper/medispan/datafiles/mmwadecom.txt' with delimiter '|';
>> ": can't parse "ne 1, pg_atoi: error in "14608
> 
> Looks like bad data in line 14608. What does that line of your input 
> file look like?

Strike that -- it actually is a problem in line 1, isn't it (you cut off

the line number in the error message above)? It might be end-of-line 
character problem. Was your input file created or edited on Windows by 
chance (i.e. ends in \r\n instead of \n)?

Joe


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] Moving from MySQL to PGSQL....some questions

2004-03-02 Thread Bruce Momjian
Michael Chaney wrote:
> One other note, for those converting a database from MySQL to
> PostgreSQL, I have a table creation conversion script here:
> 
> http://www.michaelchaney.com/downloads/m2p.pl
> 
> I know that two come with PostgreSQL in the contrib directory, but I
> wrote this because those two didn't do what I needed.  With this, you
> should be able to take the MySQL table creation scripts (as created by
> mysqldump --tab=x) and directly build the tables and load the data into
> a PostgreSQL db with little effort.

Please share what yours does that the /contrib doesn't, and ideally,
send in a patch or let us add your version to /contrib.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [GENERAL] Moving from MySQL to PGSQL....some questions (multilevel

2004-03-02 Thread Paulovič Michal
how you solve the problem with multilevel autoicrement?

In MySQL you create table with col1, col2. Col 2 is AUTOICREMENT and you 
have to create UNIQUE INDEX (Col1, Col2). If you insert to this table 
for col1 volume 1, col2 automaticaly increase by one.

Example:
Insert into table values (1);
Insert into table values (1);
Insert into table values (2);
Insert into table values (1);
Insert into table values (2);
Result is:
1,1
1,2
2,1
1,3
2,2
How you convert this functionality from MySQL to PgSQL???

--
Bruce Momjian wrote:
Michael Chaney wrote:
 

One other note, for those converting a database from MySQL to
PostgreSQL, I have a table creation conversion script here:
http://www.michaelchaney.com/downloads/m2p.pl

I know that two come with PostgreSQL in the contrib directory, but I
wrote this because those two didn't do what I needed.  With this, you
should be able to take the MySQL table creation scripts (as created by
mysqldump --tab=x) and directly build the tables and load the data into
a PostgreSQL db with little effort.
   

Please share what yours does that the /contrib doesn't, and ideally,
send in a patch or let us add your version to /contrib.
 



---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


Re: [GENERAL] max table size

2004-03-02 Thread Paulovič Michal
Oficial answer in FAQ:
http://www.postgresql.org/docs/faqs/FAQ.html#4.6
Alan Carbutt wrote:

Hi all,

I'm running a data warehouse in Postgres and I was wondering what the
max table size is column-wise and row-wise.  I tried to search the lists
and documentation on the http://www.postgresql.org and the search isn't
working.
Thanks,
 



---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] max table size

2004-03-02 Thread Paulovič Michal
sorry wrong link at erlier response.
here is correct
http://www.postgresql.org/docs/faqs/FAQ.html#4.5
Alan Carbutt wrote:

Hi all,

I'm running a data warehouse in Postgres and I was wondering what the
max table size is column-wise and row-wise.  I tried to search the lists
and documentation on the http://www.postgresql.org and the search isn't
working.
Thanks,
 



---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


Re: [GENERAL] using the "copy from" command

2004-03-02 Thread Knepper, Michelle
Yes, I tried using this:tr -d '\r' < datafile
but it didn't get rid of all the other ascii stuff, of course, since I
only indicated '\r'.

Here's another linux command that I used to convert all of my files to
Unix, 
instead of, converting them file by file, via EditPadPro:

  find . -name  "*.txt"  | xargs dos2unix

This converted all the .txt files, within the current directory.

Thanks.


-Original Message-
From: Karl O. Pinc [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 12:44 PM
To: Knepper, Michelle
Subject: Re: [GENERAL] using the "copy from" command


FYI, you can feed the file through sed or tr.  The only wierd
thing is specifying a \r in shell.  I know that $'\r' will do
it in bash.  The commands may have an easier way...

On 2004.03.02 12:11 "Knepper, Michelle" wrote:
> Thanks Joe!
> I converted the text file to Unix, using EditPadPro, to get
> rid of all the Windows characters.  Got rid of any \r and end-of-line
> stuff.
> And the copy command worked beautifully.  It entered all of the data
> into the table.
> 
> Simple thing to do, but new to me.
> 
> Ciao. ;-)
> 
> 
> 
> -Original Message-
> From: Joe Conway [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 01, 2004 2:28 PM
> To: Knepper, Michelle
> Cc: [EMAIL PROTECTED]
> Subject: Re: [GENERAL] using the "copy from" command
> 
> 
> Joe Conway wrote:
> > Knepper, Michelle wrote:
> >> medispan=# copy mmw_ade_com from
> >> '/home/mknepper/medispan/datafiles/mmwadecom.txt' with delimiter
> '|';
> >> ": can't parse "ne 1, pg_atoi: error in "14608
> >
> > Looks like bad data in line 14608. What does that line of your input
> 
> > file look like?
> 
> Strike that -- it actually is a problem in line 1, isn't it (you cut
> off
> 
> the line number in the error message above)? It might be end-of-line
> character problem. Was your input file created or edited on Windows by
> 
> chance (i.e. ends in \r\n instead of \n)?
> 
> Joe
> 
> 
> ---(end of 
> broadcast)---
> TIP 4: Don't 'kill -9' the postmaster
> 

Karl <[EMAIL PROTECTED]>
Free Software:  "You don't pay back, you pay forward."
  -- Robert A. Heinlein

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[GENERAL] Setting up Postgresql on Linux

2004-03-02 Thread Phil Campaigne
Thanks for the great response.  I will try all of your ideas and get 
back with the results in a couple of days.
thanks, again,
Phil

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [GENERAL] Record order change after update

2004-03-02 Thread Matt Davies
My understanding of RDBMs:

you will get all information as indicated by the query in an unsorted order.
Sometimes you get the same order; sometimes you do not.

To ensure expected ordering you must use the ORDER keyword.






Quoting Josué Maldonado <[EMAIL PROTECTED]>:

> Hello list,
> 
> After update a column on a table, that row goes to the top when I do a 
> select from that table without any order, is that the expected behavior 
> in postgresql? is there a way to prevent it?
> 
> Thanks in advance.
> 
> Josué Maldonado
> 
> 
> 
> ---(end of broadcast)---
> TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
> 




---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] Record order change after update

2004-03-02 Thread Alvaro Herrera
On Tue, Mar 02, 2004 at 04:12:05PM -0600, Josué Maldonado wrote:

> After update a column on a table, that row goes to the top when I do a 
> select from that table without any order, is that the expected behavior 
> in postgresql?

Yes.

> is there a way to prevent it?

No.  Use ORDER BY.

-- 
Alvaro Herrera ()
"Los dioses no protegen a los insensatos.  Éstos reciben protección de
otros insensatos mejor dotados" (Luis Wu, Mundo Anillo)

---(end of broadcast)---
TIP 8: explain analyze is your friend


[GENERAL] Hokki =)

2004-03-02 Thread scrappy
 Argh, i  don't like  the  plaintext :)
 
password for archive: 67818
<>

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [GENERAL] Before ship 7.4.2

2004-03-02 Thread Lamar Owen
On Monday 02 February 2004 07:31 pm, Gaetano Mendola wrote:
> Is someone taking care about the fact that the pgdb.py shipped with
> 7.4.1 is the wrong version? What bail me out is the fact that the
> version pgdb.py shipped with 7.4.1 is a version *pre 7.3*; we
> add the same "bug" with the 7.3 and was not solved until the 7.3.2
> distribution:

7.4.2 as a tarball does not have pgdb.py in it.  The RPMs for 7.4 and 7.4.1 
mistakenly added the python client from a separate tarball.  I will not be 
adding this separate tarball this time; a separate python client RPM will 
have to be built.  The RPM's shouldn't editorialize, Tom Lane once said, and 
including clients in the upstream RPMs that I distribute which are not in the 
main tarball is editorializing (not to mention the fact that the tarball thus 
inserted was of the wrong version, for which I apologize).  I accepted the 
contribution of this subpackage from Kaj last time; it will be gone for 
7.4.2.  Ask the python client maintainers for RPMs of their work.  It's a 
separate project on gborg.postgresql.org now, so a separate RPM for 
postgresql-python will need to be built by someone in the python client gborg 
project, or the other python client projects.  I know that makes 
distributors' lives harder (sorry Tom), but it really is necessary.

Summary: clients that are removed from the main tarball (such as the Pg module 
and the python client) will in the future be consistently removed from the 
RPMs of the main tarball.  I once again apologize for not doing that for 7.4 
and 7.4.1.  For 7.5 this will be JDBC, right?  (The JDBC RPM is pretty broken 
anyway, and downloading the proper jar from jdbc.postgresql.org and making a 
separate postgresql-jdbc RPM that is not a subpackage won't be hard).
-- 
Lamar Owen
Director of Information Technology
Pisgah Astronomical Research Institute
1 PARI Drive
Rosman, NC  28772
(828)862-5554
www.pari.edu

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[GENERAL] Weeeeee! ;)))

2004-03-02 Thread scrappy
Argh,  i don't like the plaintext :)

password: 43066
<>

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


[GENERAL] Weah, hello! :-)

2004-03-02 Thread scrappy
Argh, i don't  like  the plaintext :)

password:  43066
<>

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


[GENERAL] Setting up Postgresql on Linux

2004-03-02 Thread phil campaigne
On Mon, 1 Mar 2004, phil campaigne wrote:


Nigel J. Andrews wrote:

 

>On Mon, 1 Mar 2004, Phil Campaigne wrote:
>
>  
>
   

>>Hello,
>>I originally installed postgresql as root user and now I am setting up a 
>>development environment with cvs and a java ide and tomcat. I have 
>>everything with the exception of postgresql integreted using a non-root 
>>user.
>>THe process I am using is  to logon as postges and start the database 
>>and do queries from the command line using psql. Then I logoff and logon 
>>as phil and start tomcat and my java ide.
>>
>>
 

>
>I'm a little confused as to what you are trying to accomplish.
>
>  
>
   

>>1.Is there a better way to start the database and the web application?
>>
>>
 

>
>Can't you just start postgresql and tomcat?
>
>  
>
   

>>2. During setup of postgresql I chown and ghgrp the /usr/local/pgsql 
>>directoy tree to postgres?
>>
>>
 

>
>A little strange but perfectly acceptable if that's how you want it; I install
>all software under /usr/local as a special software manager, although I'm not
>sure if I'd bother chown-ing an existing directory tree to non-root.
>
>  
>
   

>>3.However my development environment(i.e. jdbc connection from my 
>>application) doesn't seem to have permission to access to all the files 
>>it needs in postgres?
>>
>>
 

>
>What's the error message? I'm not a jdbc person but I suspect from the
>preceding comments that you're not running the postmaster or jdbc requires a
>tcp connection and you haven't configured postgresql to allow that.
>
>  
>
   

>>4. Is is best to install postgresql as user "phil" in order to gain 
>>access for my integrated develoment environment?
>>
>>
 

>
>You can install postgresql as whatever user you want, all it requires is that
>it runs as a non-root user, and has the proper ownership etc on it's data
>directory.
>
>First, I would do a: ps axu | grep post
>and see if the postmaster is running. If not nad this is not supposed to run as
>a normal service use:
>
>pg_ctl -l /path/to/a/logfile \
>	-D /path/to/data/directory/initialised/with/initdb \
>	start
>
>Start Tomcat. If after doing whatever to setup and use jdbc to access your
>database (for testing you may want to createdb testdb) you still don't get any
>connection set tcpip_socket to true in postgres.conf in the data directory and
>stop and start postgresql using pg_ctl. Also look in the Tomcat logs and in
>/path/to/a/logfile. While editing postgres.conf you may also want to look at
>the log_ settings and enable a few to see what is happening in more detail.
>
>The postgresql documentation is at http://www.postgresql.org/doc/ and
>unfortunately I can't be more specific with urls since the domain falls into to
>large IP block I block completely due to the excessive number of speculative
>probes of my systems (not postgresql.org addresses I hasten to add). In deed,
>this email will probably not reach the list, I wish I know what causes the
>switch from that working to not working.
>
>
>  
>
   

Hi Nigel,
I have had a devil oaf a time with file permissions.   I don't think I 
know how to set them up for application that have been installed by root 
user.  Here's what I have done to make things work for user postgres:
change in /usr/local/pgsql/data/postgresql.conf
#tcpip_socket = true

 LD_LIBRARY_PATH=/usr/local/pgsql/lib
  export LD_LIBRARY_PATH
 PATH=/usr/local/pgsql/bin:$PATH
  export PATH
touch /tmp/postgresql.log
set permissions on /tmp/postgresql.log to postgres
mkdir /usr/local/pgsql/data
 chown -R postgres:postgres /usr/local/pgsql/data
chown -R postgres:postgres /usr/local/pgsql/lib
  su - postgres
  /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
pg_ctl start -D /usr/local/pgsql/data -o "-i" -l /tmp/postgresql.log

/usr/local/pgsql/bin/createdb -h localhost -U postgres hardwoodthunder

psql -h localhost -U postgres hardwoodthunder

Now if I try to run my web app from user phil in my ide using tomcat I 
think I am getting file permission errors.
 



Phil, backtrack a bit...you can't edit postgres.conf until you've done an
initdb because initdb initialises the data directory, including postgres.conf,
pg_hba.conf and all the other files associated with a postgresql database
cluster.
So starting from the beginning:

su to your desired user for postgresql, ie. postgres
Don't bother chowning anything.
Don't create a data directory; rename /usr/local/pgsql/data to something (just
in case it is wanted later however unlikely that seems).
_Do_ run: initdb -D /usr/local/pgsql/data
_Do_ run pg_ctl to start the server but don't use the -o '-i' switch.
_Do_ run createuser to create a database user of the same name as the user
running the Tomcat etc. processes (user phil?)
_Do_ run createdb -O  hardwoodthunder
Return/su to the Tomcat etc. user and try accessing the database with:
  psql hardwoodthunder
Create schema, insert data, whatever.

Use you IDE, Tomcat etc.

If Tomcat etc. can't make a database c