[GENERAL] PL/pgSQL functions and RETURN NEXT

2005-01-30 Thread Craig Bryden
Hi Firstly, let me say that I am a newbie to PostgreSQL. I have written a PL/pgSQL function that will return a set of results. I have included the code below *** CREATE TYPE pr_SomeFunction_Re

Re: [GENERAL] [pgsql-advocacy] MySQL worm attacks Windows servers

2005-01-30 Thread Neil Conway
Josh Berkus wrote: If you know of a PostgreSQL package, from any source, that installs with trust on network ports, please notify Core (and Core only, please). Why only -core? -Neil ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

Re: [GENERAL] changing sort_mem on the fly?

2005-01-30 Thread Jim C. Nasby
On Sat, Jan 29, 2005 at 09:23:06PM +1100, Neil Conway wrote: > Tom Lane wrote: > >The correct place for a sysadmin to limit memory usage would be in the > >ulimit settings the postmaster starts under. Of course, Neil's argument > >still holds in general: anyone who can write arbitrary queries is n

Re: [GENERAL] changing sort_mem on the fly?

2005-01-30 Thread Neil Conway
Jim C. Nasby wrote: I'd really like to see an improvement in how sort_mem/work_mem is handled. So would I :) (I think it's well known that the current system is not optimal.) Do you have any thoughts on how to improve it? -Neil ---(end of broadcast)

Re: [GENERAL] changing sort_mem on the fly?

2005-01-30 Thread Jim C. Nasby
On Sun, Jan 30, 2005 at 08:50:49PM +1100, Neil Conway wrote: > Jim C. Nasby wrote: > >I'd really like to see an improvement in how sort_mem/work_mem is > >handled. > > So would I :) (I think it's well known that the current system is not > optimal.) > > Do you have any thoughts on how to improve

Re: [GENERAL] Pinning buffers for long times like outer joins might do.

2005-01-30 Thread Tzahi Fadida
> -Original Message- > [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane > > Tzahi Fadida <[EMAIL PROTECTED]> writes: > > I am writing an algorithm in a dynamic c library and using > heap_fetch. > > I want to pin strategic buffers for long times like an Outer joins > > might do for the i

Re: [GENERAL] PL/pgSQL functions and RETURN NEXT

2005-01-30 Thread John Sidney-Woollett
Here's an example that I butchered to cut it down to size that should illustrate what you need to do (basically use a LOOP construct) CREATE TYPE customer.InvoiceItem AS ( WCCustOrderID varchar(16), OrderDate date, Currency varchar(3), TaxCode varchar(3), Ta

[GENERAL] pgpool 2.5b2 released

2005-01-30 Thread Tatsuo Ishii
Pgpool 2.5b2 supports "master slave mode" which can cope with master/slave replication softwares such as Slony-I. In this mode pgpool sends non SELECT queries to master only. SELECTs are load balanced by pgpool. Other features of 2.5b2 include: - ability to add timestamp to each log entry - contro

Re: [GENERAL] [pgsql-advocacy] MySQL worm attacks Windows servers

2005-01-30 Thread Dawid Kuroczko
On Sun, 30 Jan 2005 20:23:15 +1100, Neil Conway <[EMAIL PROTECTED]> wrote: > Josh Berkus wrote: > > If you know of a PostgreSQL package, from any source, that installs with > > trust > > on network ports, please notify Core (and Core only, please). > > Why only -core? I think it is in good taste

Re: [GENERAL] [pgsql-advocacy] MySQL worm attacks Windows servers

2005-01-30 Thread Peter Eisentraut
Dawid Kuroczko wrote: > I think it is in good taste that when you find a > bug/vulnerability/etc first you contact the author (in this case: > core), leave them some time to fix the problem and then go on > announcing it to the > world. In this case, core is not the author of the object in questio

Re: [GENERAL] PL/pgSQL functions and RETURN NEXT

2005-01-30 Thread Sven Willenberger
Craig Bryden wrote: Hi Firstly, let me say that I am a newbie to PostgreSQL. I have written a PL/pgSQL function that will return a set of results. I have included the code below *** CREATE TYPE

Re: [GENERAL] Pg database, need a solution to a problem

2005-01-30 Thread Robert Treat
On Friday 28 January 2005 15:42, Joshua D. Drake wrote: > > Does anyone have any suggestions for how to get the > > testcase id's and suite's replicated to the production > > database with out touching the other tables in there? > > I would just do a pg_dump on selected tables, but > > there are se

Re: [GENERAL] Pg database, need a solution to a problem

2005-01-30 Thread Lonni J Friedman
On Sun, 30 Jan 2005 11:56:04 -0500, Robert Treat <[EMAIL PROTECTED]> wrote: > On Friday 28 January 2005 15:42, Joshua D. Drake wrote: > > > Does anyone have any suggestions for how to get the > > > testcase id's and suite's replicated to the production > > > database with out touching the other tab

Re: [GENERAL] Rule problem with OLD / NEW record set (repost)

2005-01-30 Thread Ralph Graulich
Hi Tom, Yes, because (loosely speaking) OLD refers to the view, and once you've done the INSERT there is now another matching row in the view. Try doing the UPDATE first, then the INSERT. First of all thanks alot for your input. - If I change the order of the statement, so the UPDATE comes before

[GENERAL] Freeradius and Postgresql

2005-01-30 Thread Mike-Olumide Johnson
Hi All,Have setup RADIUS using freeRadius-1.0.1 and its working perfectly. Thesetup also works fine with mikrotik NAS to deploy hotspot.Installed Postresql. 'Service postgresql status' shows its running. Createda table named 'radius', each time I try to execute SQL from my webmininterface,

Re: [GENERAL] [pgsql-advocacy] MySQL worm attacks Windows servers

2005-01-30 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Dawid Kuroczko wrote: >> I think it is in good taste that when you find a >> bug/vulnerability/etc first you contact the author (in this case: >> core), leave them some time to fix the problem and then go on >> announcing it to the >> world. > In this

Re: [GENERAL] changing sort_mem on the fly?

2005-01-30 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > On Sun, Jan 30, 2005 at 08:50:49PM +1100, Neil Conway wrote: >> Do you have any thoughts on how to improve it? > See http://archives.postgresql.org/pgsql-general/2003-06/msg01072.php > and http://archives.postgresql.org/pgsql-general/2003-06/msg01089.ph

Re: [GENERAL] Freeradius and Postgresql

2005-01-30 Thread Tom Lane
"Mike-Olumide Johnson" <[EMAIL PROTECTED]> writes: > 'Output from SQL commands in file > /root/freeradius-1.0.1/src/modules/rlm_sql/drivers/rlm_sql_postgresql/db_ pos > tgresql.sql .. psql: Warning: The -u option is deprecated. Use -U. That means what it says. > /root/freeradius-1.0.1/src/modules

Re: [GENERAL] [pgsql-advocacy] MySQL worm attacks Windows servers

2005-01-30 Thread Alvaro Herrera
On Sun, Jan 30, 2005 at 12:55:28PM -0500, Tom Lane wrote: > We don't really have an official security contact. The next best thing > is to send such reports to pgsql-core, which is not an open list, but > will reach a good chunk of those with an interest in fixing such > problems. IMHO this fact

[GENERAL] ANNOUNCE: ShellSQL 0.7

2005-01-30 Thread Edward Macnaghten
Hi Announcing ShellSQL 0.7 to an unsuspecting world... ShellSQL is a utility to allow SQL to be intergrated easily into UNIX/LINUX shell scripts. The web page is at http://www.edlsystems.com/shellsql - and at sourceforge at http://sourceforge.net/projects/shellsql . Version 0.7 includes many bu

[GENERAL] FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings

2005-01-30 Thread Rick Apichairuk
Greetings, I am trying to increase the number of max_connections to 200 and found out I couldn't even start postgresql. So I tried to increase max_connections gradually (currently at 50 from 40 default) and adjust shared memory settings along the way. Even at 50 max_connections, I still cannot get

Re: [GENERAL] [pgsql-advocacy] MySQL worm attacks Windows servers

2005-01-30 Thread Josh Berkus
Tom, > We don't really have an official security contact. The next best thing > is to send such reports to pgsql-core, which is not an open list, but > will reach a good chunk of those with an interest in fixing such > problems. Is there any reason not to set up a "[EMAIL PROTECTED]" mail alias?

Re: [GENERAL] FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings

2005-01-30 Thread Richard Poole
On Sun, Jan 30, 2005 at 03:21:25PM -0500, Rick Apichairuk wrote: > I am trying to increase the number of max_connections to 200 and found > out I couldn't even start postgresql. So I tried to increase > max_connections gradually (currently at 50 from 40 default) and adjust > shared memory settings

Re: [GENERAL] [pgsql-advocacy] MySQL worm attacks Windows servers

2005-01-30 Thread Tom Lane
Josh Berkus writes: >> We don't really have an official security contact. The next best thing >> is to send such reports to pgsql-core, which is not an open list, but >> will reach a good chunk of those with an interest in fixing such >> problems. > Is there any reason not to set up a "[EMAIL PR

Re: [GENERAL] [pgsql-advocacy] MySQL worm attacks Windows servers

2005-01-30 Thread Marc G. Fournier
where should it be aliased to? pgsql-core? On Sun, 30 Jan 2005, Josh Berkus wrote: Tom, We don't really have an official security contact. The next best thing is to send such reports to pgsql-core, which is not an open list, but will reach a good chunk of those with an interest in fixing such pro

Re: [GENERAL] FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings

2005-01-30 Thread Tom Lane
Rick Apichairuk <[EMAIL PROTECTED]> writes: > This is confusing because the requested size is both higher than > SHMMIN and lower than SHMMAX as you can see below: SHMALL is the other limit that might cause this failure. regards, tom lane ---(end

Re: [GENERAL] FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings

2005-01-30 Thread Alvaro Herrera
On Sun, Jan 30, 2005 at 03:21:25PM -0500, Rick Apichairuk wrote: > This is confusing because the requested size is both higher than > SHMMIN and lower than SHMMAX as you can see below: Maybe your problem is shmall: > [ [EMAIL PROTECTED] ] $ sysctl -a | grep kern.ipc > kern.ipc.shmmax: 33554432

Re: [GENERAL] FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings

2005-01-30 Thread Rick Apichairuk
On Sun, 30 Jan 2005 20:50:21 +, Richard Poole <[EMAIL PROTECTED]> wrote: > On Sun, Jan 30, 2005 at 03:21:25PM -0500, Rick Apichairuk wrote: > > > I am trying to increase the number of max_connections to 200 and found > > out I couldn't even start postgresql. So I tried to increase > > max_conn

Re: [GENERAL] changing sort_mem on the fly?

2005-01-30 Thread Jim C. Nasby
On Sun, Jan 30, 2005 at 01:05:15PM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > On Sun, Jan 30, 2005 at 08:50:49PM +1100, Neil Conway wrote: > >> Do you have any thoughts on how to improve it? > > > See http://archives.postgresql.org/pgsql-general/2003-06/msg01072.php >

Re: [GENERAL] changing sort_mem on the fly?

2005-01-30 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > Since the planner knows how many rows will > be going into the sort and how wide they are, ISTM it should be able to > estimate how much memory will be needed. ... which is different from how much will be available. See cost_sort(): * If the total vo

Re: [GENERAL] FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings

2005-01-30 Thread Jim C. Nasby
On Sun, Jan 30, 2005 at 04:26:29PM -0500, Rick Apichairuk wrote: > Is the shared_buffers per process? The reason I ask is the formula > given on http://www.postgresql.org/docs/7.4/static/kernel-resources.html > for calculating how much SHMMAX you need is: > > SHMMAX = 250 kB + 8.2 kB * shared_buff

Re: [GENERAL] [pgsql-advocacy] MySQL worm attacks Windows servers

2005-01-30 Thread Marc G. Fournier
On Sun, 30 Jan 2005, Tom Lane wrote: Josh Berkus writes: We don't really have an official security contact. The next best thing is to send such reports to pgsql-core, which is not an open list, but will reach a good chunk of those with an interest in fixing such problems. Is there any reason not

Re: [GENERAL] FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings

2005-01-30 Thread Chris
I've tested this up to 250 connections on 5.3: options SHMMAXPGS=131072 options SEMMNI=128 options SEMMNS=512 options SEMUME=100 options SEMMNU=256 ---(end of broadcast)--- TIP 2: you can get off all lists at

Re: [GENERAL] changing sort_mem on the fly?

2005-01-30 Thread Jim C. Nasby
On Sun, Jan 30, 2005 at 04:49:39PM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > Since the planner knows how many rows will > > be going into the sort and how wide they are, ISTM it should be able to > > estimate how much memory will be needed. > > ... which is different

[GENERAL] example for read committed/volitile functions

2005-01-30 Thread elein
I tried to reproduce the case where 7.4 and 8.0 differ on the scope of volitile function with READ COMMITTED transactions. In an open transaction in read committed mode. Then I access the table and sum columns in a function. The results are always consistent between 7.4 and 8.0 and can see com

Re: [GENERAL] example for read committed/volitile functions

2005-01-30 Thread Tom Lane
[EMAIL PROTECTED] (elein) writes: > I tried to reproduce the case where 7.4 and 8.0 differ > on the scope of volitile function with READ COMMITTED > transactions. > In an open transaction in read committed mode. > Then I access the table and sum columns in a function. > The results are always c

Re: [GENERAL] [pgsql-advocacy] MySQL worm attacks Windows servers

2005-01-30 Thread Greg Stark
Dawid Kuroczko <[EMAIL PROTECTED]> writes: > > Why only -core? > > I think it is in good taste that when you find a bug/vulnerability/etc > first you contact the author (in this case: core), leave them some > time to fix the problem and then go on announcing it to the > world. > > I think it is

Re: [GENERAL] example for read committed/volitile functions

2005-01-30 Thread elein
On Sun, Jan 30, 2005 at 05:46:03PM -0500, Tom Lane wrote: > [EMAIL PROTECTED] (elein) writes: > > I tried to reproduce the case where 7.4 and 8.0 differ > > on the scope of volitile function with READ COMMITTED > > transactions. > > > In an open transaction in read committed mode. > > Then I acce

Re: [GENERAL] FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings

2005-01-30 Thread Rick Apichairuk
I tried the settings you gave and they worked (with some caveats). After I recompiled the FreeBSD kernel with the options: options SYSVSHM options SYSVMSG options SYSVSEM options SHMMAXPGS=131072 options SEMMNI=128 options SEMMNS=512 options

Re: [GENERAL] example for read committed/volitile functions

2005-01-30 Thread Tom Lane
[EMAIL PROTECTED] (elein) writes: > I have multiple statements in a READ COMMITTED transaction that > can see COMMITs from another concurrent transaction (although not > vice versa, of course). The behaviour is consistent in 7.4 and 8.0 > and correct imho. Right, but put those same statements in

Re: [GENERAL] [pgsql-advocacy] MySQL worm attacks Windows servers

2005-01-30 Thread Martijn van Oosterhout
On Sun, Jan 30, 2005 at 06:05:37PM -0500, Greg Stark wrote: > There are always ways for a sysadmin to close the vulnerability, even if it > means temporarily limiting access until the fix is available. How would you > like to be a sysadmin that finds his system exploited only to discover that > the

Re: [GENERAL] example for read committed/volitile functions

2005-01-30 Thread elein
That example is good, except I see the opposite of what the release notes say. In 7.4 I see committed transactions from another session in my function and in 8.0 I do not. I will go back and verify my tests :( I don't suppose it is likely that the release notes have it backwards. Perhaps I am r

[GENERAL] 8.0.0 RC5-2 Processes/Interfaces Under Windows

2005-01-30 Thread Randy Yates
I've installed this version on my Win2K machine and can connect using pgAdminIII just fine. I then installed libpqxx 2.4.2 via (i.e., for and under) cygwin and find that no matter what I do I cannot get the most basic test routine (test001.cxx) to execute. The problem appears to be in the connec

[GENERAL] postgresql 7.4.6 slowing down

2005-01-30 Thread Frans
I'm using Fedora Core 2, apache 2.0 and postgresql 7.4.6. Recently, the application is slowing down. When I check the process using "top", sometimes postmaster process time is increasing and the process is never end, I think this cause the application slowing down and sometimes this process make th

Re: [GENERAL] FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings

2005-01-30 Thread Sven Willenberger
Rick Apichairuk wrote: I tried the settings you gave and they worked (with some caveats). After I recompiled the FreeBSD kernel with the options: options SYSVSHM options SYSVMSG options SYSVSEM options SHMMAXPGS=131072 options SEMMNI=128 options SEMM

Re: [GENERAL] FreeBSD 5.2.1, postgresql 7.4.5 and shared memory settings

2005-01-30 Thread Rick Apichairuk
On Sun, 30 Jan 2005 21:12:08 -0500, Sven Willenberger <[EMAIL PROTECTED]> wrote: > I assume you added these variables to either the GENERIC or a custom > kernel in /usr/src/sys/i386/conf. If you created a custom kernel called > CUSTOM, then you would: That's what I did. > cd /usr/src > make bui

[GENERAL] postgres session termination

2005-01-30 Thread Rick Schumeyer
I think this is a common task, but I’m not sure how to do it.   I want to run a query that can return many records, display them 10 at a time, and be able to go forward/backward in the list.  I’m not concerned about the list changing after the initial query.   I’m accessing this via a