Re: [GENERAL] 3rd RFD: comp.databases.postgresql (was:

2004-12-05 Thread Rolf Østvik
[EMAIL PROTECTED] ("Marc G. Fournier") wrote in news:[EMAIL PROTECTED]: > On Sat, 4 Dec 2004, Rolf Xstvik wrote: > >> I am curious. Where can i learn about these 'official newsgroups'? >> I can't find any information about them on www.postgresql.org. > > http://archives.postgresql.org/pgsql-ann

[GENERAL] rewrite count distinct query

2004-12-05 Thread Chris Smith
Hi all, 'Scuse the long post :) I'm trying to include all relevant info.. I'm trying to work out a better way to approach a query, any tips are greatly appreciated. The relevant tables: db=# \d tp_conversions Table "public.tp_conversions" Column | Type |

Re: [GENERAL] [HACKERS] DBD::PgSPI 0.02

2004-12-05 Thread Michael Fuhr
On Mon, Dec 06, 2004 at 01:38:27AM -0500, [EMAIL PROTECTED] wrote: > On Sun, 5 Dec 2004, Michael Fuhr wrote: > > > Using PostgreSQL 8.0.0rc1 and Perl 5.8.6 on FreeBSD 4.10-STABLE and > > Solaris 9, I had to make a couple of changes to get DBD::PgSPI to > > build: > > > > 1. Add -I$POSTGRES_HOME/i

Re: [GENERAL] [HACKERS] DBD::PgSPI 0.02

2004-12-05 Thread alex
On Sun, 5 Dec 2004, Michael Fuhr wrote: > Using PostgreSQL 8.0.0rc1 and Perl 5.8.6 on FreeBSD 4.10-STABLE and > Solaris 9, I had to make a couple of changes to get DBD::PgSPI to > build: > > 1. Add -I$POSTGRES_HOME/include/server to Makefile.PL. Otherwise > the build fails with: You should point

Re: [GENERAL] [HACKERS] DBD::PgSPI 0.02

2004-12-05 Thread Michael Fuhr
On Mon, Dec 06, 2004 at 12:27:18AM -0500, [EMAIL PROTECTED] wrote: > A short note that I've updated DBD::PgSPI version 0.02 to CPAN. > > There are no new features - but the code now expects (and works with) > reasonably decent versions of perl (5.8.x) and pgsql (8.x). Using PostgreSQL 8.0.0rc1

Re: [GENERAL] When to encrypt

2004-12-05 Thread Derek Fountain
On Monday 06 December 2004 12:31, you wrote: > Derek Fountain <[EMAIL PROTECTED]> writes: > > If another SQL Injection vulnerability turns up (which it might, given > > the state of the website code), > > You will never see another SQL injection vulnerability if you simply switch > to always using

[GENERAL] DBD::PgSPI 0.02

2004-12-05 Thread alex
Hello, A short note that I've updated DBD::PgSPI version 0.02 to CPAN. There are no new features - but the code now expects (and works with) reasonably decent versions of perl (5.8.x) and pgsql (8.x). No warranty is given, this code compiles and 'scratches my itch'. If it happens to scratch y

[GENERAL] Rules

2004-12-05 Thread Jamie Deppeler
Hi, What i am trying to do is i have a join table eg primarykey field1 field2 and based on SQL Select have the values of field1 inserted into a new table which will scroll which will launch a trigger but im having problems getting this to work? Any ideas anyone? sql select may return 1 or more r

Re: [GENERAL] When to encrypt

2004-12-05 Thread Christopher Browne
In the last exciting episode, [EMAIL PROTECTED] (Derek Fountain) wrote: > It seems silly to tell him to encrypt everything, including customer > names and addresses, etc. - I've never heard of DB admin > recommending such action - and it'll have an impact on > performance. So where do I draw the li

Re: [GENERAL] When to encrypt

2004-12-05 Thread Greg Stark
Derek Fountain <[EMAIL PROTECTED]> writes: > If another SQL Injection vulnerability turns up (which it might, given the > state of the website code), You will never see another SQL injection vulnerability if you simply switch to always using prepared queries and placeholders. Make it a rule tha

Re: [GENERAL] source control integration

2004-12-05 Thread Greg Stark
Simon Wittber <[EMAIL PROTECTED]> writes: > What is currently regarded as postgresql best-practice for controlling > changes to a database? > > I currently administer SQL Server. I implemented a system which > scripts every database object each hour (into a SQL script on the > filesystem), and th

Re: [GENERAL] Select distinct sorting all rows 8.0rc1

2004-12-05 Thread Guy Rouillier
Pierre-Frédéric Caillaud wrote: > The planner is smarter with GROUP BY than with DISTINCT, so you can > rewrite your query as the following, whihc will probaly use a > HashAggregate, and be a lot faster : > > SELECT service_id FROM five_min_stats_200408 GROUP BY service_id; Pierre-Fré

Re: [GENERAL] initdb error: "could not identify current directory"

2004-12-05 Thread OpenMacNews
hi joel, It looks to me like you are attempting to mount a few volumes under /var? actually, no. i'm symlinking local volumes mounted where they're supposed to be, in /Volumes, to ny /var/sub-hierarchy. I think that's going to wrinkle your handkerchief in Darwin. it's all been settled, actually (

Re: [GENERAL] Constaints

2004-12-05 Thread Andrew - Supernews
On 2004-12-05, Jan Wieck <[EMAIL PROTECTED]> wrote: > PostgreSQL does not have userland session variables. You would have to > write some custom set/get functions in a procedural language that is > capable of holding global data across function calls (like PL/Tcl). You can fake session variables

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Andrew M
Hi, seems like I may have located the solution to my earlier problem: http://archives.postgresql.org/pgsql-jdbc/2003-08/msg00110.php many thanks Andrew On 5 Dec 2004, at 23:51, Doug McNaught wrote: Michael Fuhr <[EMAIL PROTECTED]> writes: On Sun, Dec 05, 2004 at 09:10:42PM +, Andrew M wrote: Th

Re: [GENERAL] initdb error: "could not identify current directory" (or,

2004-12-05 Thread Joel
> % cd /var/data/pgsql (B> still reports the absolute path (B> --> /Volumes/data/pgsql (B (BIt looks to me like you are attempting to mount a few volumes under /var? (B (BI think that's going to wrinkle your handkerchief in Darwin. (B (B-- (BJoel Rees <[EMAIL PROTECTED]> (Bdigitcom, inc

[GENERAL] When to encrypt

2004-12-05 Thread Derek Fountain
A customer of mine recently asked me to try a penetration test on his website, and I found a nice SQL Injection vulnerability. Using that vuln I was able to wander round his DB at will, viewing customer information, user logins, passwords, the lot. He asked me to make some recommendations, of wh

Re: [GENERAL] Function Problem

2004-12-05 Thread Michael Fuhr
On Mon, Dec 06, 2004 at 10:34:12AM +1100, Jamie Deppeler wrote: > I am trying to store value in a TEMPORARY table and I am getting the > following error > > ERROR: relation with OID 51533 does not exist The FAQ has a question regarding functions and temporary tables. See also past discussion in

[GENERAL] source control integration

2004-12-05 Thread Simon Wittber
What is currently regarded as postgresql best-practice for controlling changes to a database? I currently administer SQL Server. I implemented a system which scripts every database object each hour (into a SQL script on the filesystem), and then uses SVN to track changes and email me if a change h

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Doug McNaught
Michael Fuhr <[EMAIL PROTECTED]> writes: > On Sun, Dec 05, 2004 at 09:10:42PM +, Andrew M wrote: > >> The map i make reference to is a Jboss map used to make a jndi >> connection to postgreSQL. What document do I need to access to get hold >> of the envireonment variables, namely PGSSLMODE?

[GENERAL] Function Problem

2004-12-05 Thread Jamie Deppeler
Problem I am trying to store value in a TEMPORARY table and I am getting the following error ERROR: relation with OID 51533 does not exist Trigger CREATE TRIGGER "createtemporytable" AFTER INSERT ON "component" FOR EACH ROW EXECUTE PROCEDURE "createtemp"(); Function begin CREATE temporary TABLE

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
On Sun, Dec 05, 2004 at 09:10:42PM +, Andrew M wrote: > The map i make reference to is a Jboss map used to make a jndi > connection to postgreSQL. What document do I need to access to get hold > of the envireonment variables, namely PGSSLMODE? I don't know if the J-stuff wraps libpq or if

Re: [GENERAL] Constaints

2004-12-05 Thread Bruno Wolff III
On Sun, Dec 05, 2004 at 17:48:32 +, Jake Stride <[EMAIL PROTECTED]> wrote: > Would this be a postgresql session? If so how do I go about accessing it > from a query/setting the value of it? I have looked at set authorization > but I don't think this is where I should be looking! At the sta

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Andrew M
The map i make reference to is a Jboss map used to make a jndi connection to postgreSQL. What document do I need to access to get hold of the envireonment variables, namely PGSSLMODE? regards Andrew On 5 Dec 2004, at 21:00, Michael Fuhr wrote: On Sun, Dec 05, 2004 at 08:50:15PM +, Andrew M

[GENERAL] PostgreSQL RPMs for 8.0.0rc1 are available

2004-12-05 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, - - PostgreSQL New RPM Set 2004-12-05 Version: 8.0.0rc1 Set labels: 8.0.0.rc1-2PGDG - - - ---

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
On Sun, Dec 05, 2004 at 08:50:15PM +, Andrew M wrote: > > > PostgresDS > > jdbc:postgresql://localhost:5432/beyarecords connection-url> > org.postgresql.Driver > myName > myPass > > require > > > > > > would that do the trick? Sorry for so many questions..

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Andrew M
Ah... ok I need something like: PostgresDS jdbc:postgresql://localhost:5432/beyarecords org.postgresql.Driver myName myPass require would that do the trick? Sorry for so many questions.. i have a lot to learn about postgreSQL ;-) regards Andrew On 5 Dec 2004, a

Re: [GENERAL] Index bloat in 7.2

2004-12-05 Thread Christopher Browne
Clinging to sanity, [EMAIL PROTECTED] ("Julian Scarfe") mumbled into her beard: > I've got a box running 7.2.1 (yes, I know :-() in which an index for > a rapidly turning over (and regularly vacuumed) table is growing > steadily in size. The index in question is on a timestamp field > that is just

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
On Sun, Dec 05, 2004 at 08:07:26PM +, Andrew M wrote: > are you saying I need to do: > > 'select * from myTable where x=y sslmode=require' > > to make a request to the database a secure one? If so, as I am using > Hibernate, do you know how I would alter my maps to reflect this? No, "sslmo

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Andrew M
Michael, are you saying I need to do: 'select * from myTable where x=y sslmode=require' to make a request to the database a secure one? If so, as I am using Hibernate, do you know how I would alter my maps to reflect this? regards Andrew On 5 Dec 2004, at 19:41, Michael Fuhr wrote: On Sun, Dec 05

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
On Sun, Dec 05, 2004 at 12:27:33PM -0700, Michael Fuhr wrote: > On the client side you could set the PGSSLMODE environment variable > to "require" (or the older PGREQUIRESSL to "1"), which should tell > libpq to attempt only SSL connections. I forgot to mention that you could also use "sslmode=re

Re: [GENERAL] Index bloat in 7.2

2004-12-05 Thread Tom Lane
"Julian Scarfe" <[EMAIL PROTECTED]> writes: > I've got a box running 7.2.1 (yes, I know :-() in which an index for a > rapidly turning over (and regularly vacuumed) table is growing steadily in > size. The index in question is on a timestamp field that is just set to > now() on the entry of the ro

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
On Sun, Dec 05, 2004 at 11:02:33AM -0800, Steve Atkins wrote: > On Sun, Dec 05, 2004 at 11:27:57AM -0700, Michael Fuhr wrote: > > > > You can use psql to check if SSL is working. Psql prints a message > > like the following if SSL was successfully negotiated: > > > > SSL connection (cipher: DHE-R

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
On Sun, Dec 05, 2004 at 06:37:57PM +, Andrew M wrote: > is it possible to trace/monitor processes as they come into postgresql > tables like you can in windows SQLServer? See the "Run-time Configuration" section in the "Server Run-time Environment" chapter of the PostgreSQL documentation.

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Steve Atkins
On Sun, Dec 05, 2004 at 11:27:57AM -0700, Michael Fuhr wrote: > Right -- see the "Frontend/Backend Protocol" chapter in the > documentation, in particular the "SSL Session Encryption" section: > > http://www.postgresql.org/docs/7.4/static/protocol-flow.html#AEN52782 > > You can use psql to check

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Andrew M
Ok, is it possible to trace/monitor processes as they come into postgresql tables like you can in windows SQLServer? regards Andrew On 5 Dec 2004, at 18:27, Michael Fuhr wrote: On Sun, Dec 05, 2004 at 06:59:41PM +0100, Andreas Seltenreich wrote: Andrew M. writes: this what I get when I issue the

Re: [GENERAL] Select distinct sorting all rows 8.0rc1

2004-12-05 Thread Pierre-Frédéric Caillaud
The planner is smarter with GROUP BY than with DISTINCT, so you can rewrite your query as the following, whihc will probaly use a HashAggregate, and be a lot faster : SELECT service_id FROM five_min_stats_200408 GROUP BY service_id; This won't avoid the Seq Scan however. If y

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
On Sun, Dec 05, 2004 at 06:59:41PM +0100, Andreas Seltenreich wrote: > Andrew M. writes: > > > this what I get when I issue the openssl command: > > > > 6521:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake > > failure:s23_lib.c:226: > > > > could you explain what this means if you know? > >

[GENERAL] Index bloat in 7.2

2004-12-05 Thread Julian Scarfe
I've got a box running 7.2.1 (yes, I know :-() in which an index for a rapidly turning over (and regularly vacuumed) table is growing steadily in size. The index in question is on a timestamp field that is just set to now() on the entry of the row, to enable the query that clears out old data to a

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Andreas Seltenreich
Andrew M. writes: > this what I get when I issue the openssl command: > > 6521:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake > failure:s23_lib.c:226: > > could you explain what this means if you know? I'm afraid, I think my suggestion to use openssl's s_client with the postmaster's builti

Re: [GENERAL] Constaints

2004-12-05 Thread Jan Wieck
On 12/5/2004 12:48 PM, Jake Stride wrote: Bruno Wolff III wrote: On Sun, Dec 05, 2004 at 16:55:33 +, Jake Stride <[EMAIL PROTECTED]> wrote: Is there anyway to declare a constant that you can then use within a postgresql 'session', i am connecting from a PHP based application and trying to

Re: [GENERAL] Constaints

2004-12-05 Thread Jake Stride
Bruno Wolff III wrote: On Sun, Dec 05, 2004 at 16:55:33 +, Jake Stride <[EMAIL PROTECTED]> wrote: Is there anyway to declare a constant that you can then use within a postgresql 'session', i am connecting from a PHP based application and trying to integrate another. At the worst you

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Andrew M
Andreas, this what I get when I issue the openssl command: 6521:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:226: could you explain what this means if you know? When I do: /usr/local/pgsql/bin/postmaster -l -i -D /usr/local/pgsql/data I get: LOG: checkpoint record is a

Re: [GENERAL] Constaints

2004-12-05 Thread Bruno Wolff III
On Sun, Dec 05, 2004 at 16:55:33 +, Jake Stride <[EMAIL PROTECTED]> wrote: > Is there anyway to declare a constant that you can then use within a > postgresql 'session', i am connecting from a PHP based application and > trying to integrate another. > > What I want to be able to do is setu

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Michael Fuhr
On Sun, Dec 05, 2004 at 04:12:38PM +, Andrew M wrote: > I am running postgreSQL and just wanted to know how I confirm that SSL > is fully functional? I have placed server.key, server.crt and root.crt > in the data folder and am able to launch postgreSQL with no problems. I > m launching pos

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Andreas Seltenreich
Andrew M. writes: > To answer my own question I included the -l flag: > > /usr/local/pgsql/bin/postmaster -l -i -D /usr/local/pgsql/data > > No errors were reported, which I guess there would be if: > > 1. postgreSQL had not ben built with SSL support? or > 2. the certificate has not been properly

[GENERAL] Constaints

2004-12-05 Thread Jake Stride
Is there anyway to declare a constant that you can then use within a postgresql 'session', i am connecting from a PHP based application and trying to integrate another. What I want to be able to do is setup a rule on another table so that whenever a query is run on the table it appends another

Re: [GENERAL] SSL confirmation

2004-12-05 Thread Andrew M
To answer my own question I included the -l flag: /usr/local/pgsql/bin/postmaster -l -i -D /usr/local/pgsql/data No errors were reported, which I guess there would be if: 1. postgreSQL had not ben built with SSL support? or 2. the certificate has not been properly setup? regards Andrew On 5 Dec 200

[GENERAL] SSL confirmation

2004-12-05 Thread Andrew M
Hi, I am running postgreSQL and just wanted to know how I confirm that SSL is fully functional? I have placed server.key, server.crt and root.crt in the data folder and am able to launch postgreSQL with no problems. I m launching postgreSQl with the following command: /usr/local/pgsql/bin/postm

Re: [GENERAL] Preview of Fourth PostgreSQL RFD.

2004-12-05 Thread Bruno Wolff III
On Sat, Dec 04, 2004 at 14:07:50 -0800, Mike Cox <[EMAIL PROTECTED]> wrote: > > Core PostgreSQL development, bug reports, are off-topic in > comp.databases.postgresql. Those topics are to be discussed in pgsql.* or > the PostgreSQL mailing lists. I think this is going a bit far. I think the pr

Re: [pgsql-www] [GENERAL] List archives search function broken

2004-12-05 Thread John Hansen
> John, > > you could always rely on your script where you check if db > handler is alive and if not then show gentle error message > with link to www.pgsql.ru I never check if dbhandler is alive in the frontend This was the backend OS that shut down, which also hosts the filesystems for th

Re: [pgsql-www] [GENERAL] List archives search function broken

2004-12-05 Thread Oleg Bartunov
John, you could always rely on your script where you check if db handler is alive and if not then show gentle error message with link to www.pgsql.ru Oleg On Sun, 5 Dec 2004, John Hansen wrote: Using the list archive search function currently fails with 503 Service Unavailable. Should messa

Re: [pgsql-www] [GENERAL] List archives search function broken

2004-12-05 Thread John Hansen
> > Using the list archive search function currently fails with > > 503 Service Unavailable. > > > > Should messages about list archive problems go to pgsql-general, or > > would it be better to use one of the other lists like bugs, hackers, > > or www? > > I think complaints should go to -www l

Re: [GENERAL] [ANNOUNCE] PostgreSQL 8.0.0 Release Candidate 1

2004-12-05 Thread Thomas Hallgren
David Fetter wrote: It's also on http://bt.postgresql.org/ :) I don't know why, but I always seem to have problems with the torrents at bt.postgresql.org. I click them and my download manager says "starting" but then nothing happens. I can however download the torrents using "wget " and start th

Re: [GENERAL] List archives search function broken

2004-12-05 Thread Oleg Bartunov
On Sat, 4 Dec 2004, Michael Fuhr wrote: Using the list archive search function currently fails with 503 Service Unavailable. Should messages about list archive problems go to pgsql-general, or would it be better to use one of the other lists like bugs, hackers, or www? I think complaints should go