Re: [GENERAL] Native type for storing fractions (e.g 1/3)?

2007-03-14 Thread Peter Eisentraut
Ron Johnson wrote: > On 03/14/07 18:55, Ken Johanson wrote: > > In SQL servers in general, or in PG, is there a native field type > > to store fractions? Or must one resort to char or separate > > numerator/denominator columns? > > 1/3 repeats ad infinitum, and '1/3' would have to be converted to >

Re: [GENERAL] Lifecycle of PostgreSQL releases

2007-03-14 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > I can't really argue for 8.2 versus 8.3, but I can argue that as 8.3 is > literally around the corner, it may make sense to wait. Today is the ides of March ... while the most optimistic estimate I've heard for 8.3 release is high summer. Maybe that

Re: [GENERAL] Lifecycle of PostgreSQL releases

2007-03-14 Thread Joshua D. Drake
Tom Lane wrote: > "Joshua D. Drake" <[EMAIL PROTECTED]> writes: >> Erik Jones wrote: >>> I really hope you meant upgrades to 8.2.x. And, no, it's not worth >>> waiting. Upgrade at the soonest available opportunity, expecially the >>> 7.4.x servers. > >> I don't really agree with this. If he is r

Re: [GENERAL] Lifecycle of PostgreSQL releases

2007-03-14 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Erik Jones wrote: >> I really hope you meant upgrades to 8.2.x. And, no, it's not worth >> waiting. Upgrade at the soonest available opportunity, expecially the >> 7.4.x servers. > I don't really agree with this. If he is running 7.4.16 there very

Re: [GENERAL] Native type for storing fractions (e.g 1/3)?

2007-03-14 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/14/07 18:55, Ken Johanson wrote: > In SQL servers in general, or in PG, is there a native field type to > store fractions? Or must one resort to char or separate > numerator/denominator columns? 1/3 repeats ad infinitum, and '1/3' would have to

[GENERAL] Automating access grants

2007-03-14 Thread Kynn Jones
I need advice, and a lot of it, from those with more experience, since I have practically none. Please, let me know your opinion on the following. We have an in-house Postgres database that we would like to make publicly accessible via a password-less login (user: anonymous). (We already have a

Re: [GENERAL] pre-parser query manipulation

2007-03-14 Thread Randall Smith
Erik Jones wrote: This may be a dupe. I sent and had some issues with my mail client and afterwards it was sitting all alone in my outbox, if you've already seen this, sorry for the resend... On Mar 14, 2007, at 2:08 PM, Randall Smith wrote: Hi, I'm attempting to process a query written in

Re: [GENERAL] [Bulk] Re: quoted identifier behaviour

2007-03-14 Thread Randall Smith
Stephan Szabo wrote: On Wed, 14 Mar 2007, Randall Smith wrote: Scott Marlowe wrote: This whole discussion is reminding me of one of my personal mantras, and that is that relying on "artifacts" of behaviour is generally a bad idea. For instance, many databases accept != for not equal, but the

Re: [GENERAL] [Bulk] Re: quoted identifier behaviour

2007-03-14 Thread Randall Smith
Alvaro Herrera wrote: Randall Smith wrote: Scott Marlowe wrote: This whole discussion is reminding me of one of my personal mantras, and that is that relying on "artifacts" of behaviour is generally a bad idea. For instance, many databases accept != for not equal, but the sql standard quite cl

Re: [GENERAL] How to write a function that manipulates a set of results

2007-03-14 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Ashley Moran wrote: >> Also I'm unsure how the use of temporary tables will affect the >> running of the query. This function will be called up to 400 times >> by a wrapping function that needs to complete quickly (relatively - >> the calculations

[GENERAL] plperl function called > once in cascading triggers

2007-03-14 Thread Kenneth Downs
Consider the case where an AFTER STATEMENT trigger calls a plperl function which performs a loop. Inside of the loop it updates at least one other table. The table being updated has an AFTER STATEMENT trigger that calls the same plperl function (w/different parms of course), which goes into

[GENERAL] Native type for storing fractions (e.g 1/3)?

2007-03-14 Thread Ken Johanson
In SQL servers in general, or in PG, is there a native field type to store fractions? Or must one resort to char or separate numerator/denominator columns? Thanks, Ken ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [GENERAL] Lifecycle of PostgreSQL releases

2007-03-14 Thread Joshua D. Drake
Erik Jones wrote: > On Mar 14, 2007, at 6:17 PM, CAJ CAJ wrote: > >> Hello, >> >> What is the lifecycle of a 8.0/8.1/8.2 releases? With 8.3 scheduled to >> be released in July, what will be the status of the 7.4.x branch? >> >> We are planning pg upgrades from 8.0.x/7.4.x to 6.2.x and were >> wond

[GENERAL] 30ms to 30s execution time: query optimization problem

2007-03-14 Thread Tomi N/A
I have a problem with query optimization. Since it's a bit hard to explain, I'll describe the database structure and list the queries first. The database holds contacts information for a call center. The general idea is to have operators call a random contact and record the results. Rules for pick

Re: [GENERAL] [Bulk] Re: quoted identifier behaviour

2007-03-14 Thread Stephan Szabo
On Wed, 14 Mar 2007, Randall Smith wrote: > Scott Marlowe wrote: > > This whole discussion is reminding me of one of my personal mantras, and > > that is that relying on "artifacts" of behaviour is generally a bad > > idea. > > > > For instance, many databases accept != for not equal, but the sql

Re: [GENERAL] Lifecycle of PostgreSQL releases

2007-03-14 Thread Erik Jones
On Mar 14, 2007, at 6:17 PM, CAJ CAJ wrote: Hello, What is the lifecycle of a 8.0/8.1/8.2 releases? With 8.3 scheduled to be released in July, what will be the status of the 7.4.x branch? We are planning pg upgrades from 8.0.x/7.4.x to 6.2.x and were wondering if it's worth waiting for th

Re: [GENERAL] pre-parser query manipulation

2007-03-14 Thread Erik Jones
This may be a dupe. I sent and had some issues with my mail client and afterwards it was sitting all alone in my outbox, if you've already seen this, sorry for the resend... On Mar 14, 2007, at 2:08 PM, Randall Smith wrote: Hi, I'm attempting to process a query written in the form: S

[GENERAL] Lifecycle of PostgreSQL releases

2007-03-14 Thread CAJ CAJ
Hello, What is the lifecycle of a 8.0/8.1/8.2 releases? With 8.3 scheduled to be released in July, what will be the status of the 7.4.x branch? We are planning pg upgrades from 8.0.x/7.4.x to 6.2.x and were wondering if it's worth waiting for the 8.3 release. Thanks in advance!

[GENERAL] database locks

2007-03-14 Thread Tomasz Rakowski
Hi , I'm facing frustrating problem with locking in postgres server. I have application which do update one table few thousands time each minute. From time to time call to database is locked and is waiting for something (In pgAdmin3 in 'Server Status' window in 'Lock' tab I can see UPDATE stateme

Re: [GENERAL] How to write a function that manipulates a set of results

2007-03-14 Thread Alvaro Herrera
Ashley Moran wrote: > > On Mar 14, 2007, at 7:25 pm, Tom Lane wrote: > >Sure: use a table. What was the objection to temp tables exactly? > > My boss is under the impression that calling the procedure twice on > the same connection creates a name conflict for the temporary table. > > Also I'm

Re: [GENERAL] How to write a function that manipulates a set of results

2007-03-14 Thread Joshua D. Drake
> Sorry my sheer ignorance here. I have already written a working, fully > tested - albeit unoptimised - implementation of this algorithm in Ruby, > accessible as a basic (HTTP GET) web service. However, a developer here > believes that the overhead of an HTTP connection over our gigabit LAN > w

Re: [GENERAL] How to write a function that manipulates a set of results

2007-03-14 Thread Ashley Moran
On Mar 14, 2007, at 7:25 pm, Tom Lane wrote: Sure: use a table. What was the objection to temp tables exactly? My boss is under the impression that calling the procedure twice on the same connection creates a name conflict for the temporary table. Also I'm unsure how the use of temporary

Re: [GENERAL] Debugging Server Code

2007-03-14 Thread Klint Gore
On Wed, 14 Mar 2007 12:56:25 -0700, "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > It certainly would be great. IIRC there is actually one for plpgsql over > at pgfoundry. Do you remember what it's called? In the search for plpgsql I get pgflows, plpsm, and enterprise db's debugger (which the sum

Re: [GENERAL] [Bulk] Re: quoted identifier behaviour

2007-03-14 Thread Alvaro Herrera
Randall Smith wrote: > Scott Marlowe wrote: > >This whole discussion is reminding me of one of my personal mantras, and > >that is that relying on "artifacts" of behaviour is generally a bad > >idea. > > > >For instance, many databases accept != for not equal, but the sql > >standard quite clearly

Re: [GENERAL] [Bulk] Re: quoted identifier behaviour

2007-03-14 Thread Randall Smith
Scott Marlowe wrote: This whole discussion is reminding me of one of my personal mantras, and that is that relying on "artifacts" of behaviour is generally a bad idea. For instance, many databases accept != for not equal, but the sql standard quite clearly says it's <>. If you're relying on cas

Re: [GENERAL] DST failing on 8.1.3

2007-03-14 Thread Jaime Silvela
I copied the files over, restarted, and everything's fine. Tom Lane wrote: Jaime Silvela <[EMAIL PROTECTED]> writes: I looked for those timezone files, and they're missing on my production installation. Probably the upgrade from 7.* to 8.1 was a quick&dirty one. I don't even have a 'timezon

Re: [GENERAL] Plperl Question

2007-03-14 Thread Stuart Cooper
Answers in place: I'm trying to write a plperl function to copy the new row e.g. NEW in plpgsql into another table. I was looking for a similar effect to the INSERT INTO blah VALUES (NEW.*) Syntax that can be used in plpgsql. So fat the best I have come up with is: $collist = ""; $val

Re: [GENERAL] [Bulk] Re: quoted identifier behaviour

2007-03-14 Thread Scott Marlowe
This whole discussion is reminding me of one of my personal mantras, and that is that relying on "artifacts" of behaviour is generally a bad idea. For instance, many databases accept != for not equal, but the sql standard quite clearly says it's <>. If you're relying on case folding meaning that

Re: [GENERAL] [Bulk] Re: quoted identifier behaviour

2007-03-14 Thread Randall Smith
Ted Byers wrote: - Original Message - From: "Randall Smith" <[EMAIL PROTECTED]> I'll give the pghackers forum a visit and since I'm already on the subject here, I'll make a direct comparison of the situation. Microsoft's Internet Explorer web browser is known to have poor support fo

Re: [GENERAL] CREATE TABLESPACE dynamically

2007-03-14 Thread Richard Huxton
William Garrison wrote: I am writing scripts to create a database that I want to run in my development, testing, and production environments. That means I need to be able to do something like IF CREATE TABLESPACE foo LOCATION E'C:\database'; ELSE CREATE TABLESPACE foo LOCATION E'Z:\datab

Re: [GENERAL] Debugging Server Code

2007-03-14 Thread Dave Page
> --- Original Message --- > From: "Raymond O'Donnell" <[EMAIL PROTECTED]> > To: "'pgsql general'" > Sent: 14/03/07, 20:51:33 > Subject: Re: [GENERAL] Debugging Server Code > > On 14/03/2007 20:26, Dave Page wrote: > > > The next major version of pgAdmin will also include the native (i

[GENERAL] CREATE TABLESPACE dynamically

2007-03-14 Thread William Garrison
I am writing scripts to create a database that I want to run in my development, testing, and production environments. That means I need to be able to do something like IF CREATE TABLESPACE foo LOCATION E'C:\database'; ELSE CREATE TABLESPACE foo LOCATION E'Z:\database'; I can't seem to fi

Re: [GENERAL] How to write a function that manipulates a set of results

2007-03-14 Thread Tony Caduto
Ashley Moran wrote: It fetches about 20 rows from a table of approx 4 million, then it needs to do further calculations to narrow them down further. Previously we have only written database code for SQL Server, and there we would use a table variable. Apparently temporary tables are not equi

Re: [Bulk] Re: [GENERAL] quoted identifier behaviour

2007-03-14 Thread Ted Byers
- Original Message - From: "Randall Smith" <[EMAIL PROTECTED]> I'll give the pghackers forum a visit and since I'm already on the subject here, I'll make a direct comparison of the situation. Microsoft's Internet Explorer web browser is known to have poor support for the CSS standard

Re: [GENERAL] Debugging Server Code

2007-03-14 Thread Raymond O'Donnell
On 14/03/2007 20:26, Dave Page wrote: The next major version of pgAdmin will also include the native (ie. non-java) version of the debugger client. Fantastic! When d'you think it might be out? Is it available in a development version to play with yet? Ray. -

Re: [GENERAL] daylight savings patches needed?

2007-03-14 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/14/07 15:23, Vivek Khera wrote: > > On Mar 12, 2007, at 6:08 PM, Martijn van Oosterhout wrote: > >> On Mon, Mar 12, 2007 at 01:13:42PM -0600, Ed L. wrote: >>> Would I be correct in understanding that every pre-8.0 cluster >>> must be restarted

Re: [GENERAL] quoted identifier behaviour

2007-03-14 Thread Randall Smith
Thomas Kellerer wrote: Randall Smith wrote on 14.03.2007 18:59: I'm trying to get Postgresql to work with software that uses JDBC and Oracle for a large government project. So I have to report that the application won't work with Postgresql because it (PG) doesn't adhere to the standard. Tha

Re: [GENERAL] Debugging Server Code

2007-03-14 Thread Dave Page
> --- Original Message --- > From: "Adam Rich" <[EMAIL PROTECTED]> > To: "'Kenneth Downs'" <[EMAIL PROTECTED]> > Sent: 14/03/07, 20:06:46 > Subject: Re: [GENERAL] Debugging Server Code > > For PostgreSQL, in addition to the pgfoundry solution Joshua mentioned, > there's also a debugger

Re: [GENERAL] DST failing on 8.1.3

2007-03-14 Thread Vivek Khera
On Mar 14, 2007, at 2:00 PM, Tom Lane wrote: Should work to just copy over the timezone directory tree from a correct installation on the same machine architecture (I can't recall right now if the file format is machine-dependent or not). You might have to restart the postmaster too, befor

Re: [GENERAL] daylight savings patches needed?

2007-03-14 Thread Vivek Khera
On Mar 12, 2007, at 6:08 PM, Martijn van Oosterhout wrote: On Mon, Mar 12, 2007 at 01:13:42PM -0600, Ed L. wrote: Would I be correct in understanding that every pre-8.0 cluster must be restarted in order for the OS changes to take affect?!? Possibly, I imagine many C libraries would cache th

Re: [GENERAL] quoted identifier behaviour

2007-03-14 Thread Randall Smith
This is the last statement I found on the issue, which is someone hopeful. http://archives.postgresql.org/pgsql-hackers/2006-11/msg00347.php Randall ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to

Re: [GENERAL] quoted identifier behaviour

2007-03-14 Thread Thomas Kellerer
Randall Smith wrote on 14.03.2007 18:59: I'm trying to get Postgresql to work with software that uses JDBC and Oracle for a large government project. So I have to report that the application won't work with Postgresql because it (PG) doesn't adhere to the standard. That's usually something I

Re: [GENERAL] Debugging Server Code

2007-03-14 Thread Adam Rich
Kenneth Downs wrote: > I'm guessing that there is no step-wise debugger for pgsql. If there > is, then glory be and call me a dummy for not R'ing TFM. > > In fact, I've never heard of a step-wise debugger for any DB > server, am I wrong? > Yes. I've done step-wise debugging in Oracle (PL/S

Re: [GENERAL] Debugging Server Code

2007-03-14 Thread Joshua D. Drake
Kenneth Downs wrote: > I'm guessing that there is no step-wise debugger for pgsql. If there > is, then glory be and call me a dummy for not R'ing TFM. > In fact, I've never heard of a step-wise debugger for any DB server, am > I wrong? > > As I grovel through some plPerl code in a statement level

Re: [GENERAL] quoted identifier behaviour

2007-03-14 Thread Randall Smith
Tom Lane wrote: Randall Smith <[EMAIL PROTECTED]> writes: I'm an advocate of Postgresql and usually tout SQL compliance as a strength, so it bothers me that this is not in line to be corrected. It's not that it's not on the radar screen, it's just that no one sees a way to do it that's going t

[GENERAL] Debugging Server Code

2007-03-14 Thread Kenneth Downs
I'm guessing that there is no step-wise debugger for pgsql. If there is, then glory be and call me a dummy for not R'ing TFM. In fact, I've never heard of a step-wise debugger for any DB server, am I wrong? As I grovel through some plPerl code in a statement level trigger that depends on an

Re: [GENERAL] DST problem on Windows Server

2007-03-14 Thread Magnus Hagander
George Weaver wrote: > A client has PostgreSQL 8.2.1 installed on a Windows 2000 server. > > The time on the server is correct but PostgreSQL is returning a time 1 > hour in advance. In other words, it the server time is 1:00 pm, > PostgreSQL is returning 2:00 pm. Both the PostgreSQL server and

Re: [GENERAL] grant permissions to set variable?

2007-03-14 Thread Tom Lane
Vivek Khera <[EMAIL PROTECTED]> writes: > CREATE OR REPLACE FUNCTION setlogtime(integer) RETURNS void AS $$ >SET log_min_duration_statement = $1; >SHOW log_min_duration_statement; > $$ LANGUAGE SQL SECURITY DEFINER; > How can I write this function? Use a plpgsql EXECUTE command. In gener

Re: [GENERAL] How to write a function that manipulates a set of results

2007-03-14 Thread Tom Lane
Ashley Moran <[EMAIL PROTECTED]> writes: > ... All of which is easy with table variable, but I can't see how to > translate it to PL/pgsql. Is there any way to manipulate result sets > in a set-based manner like this? Sure: use a table. What was the objection to temp tables exactly?

Re: [GENERAL] Multiple TRIGGERs and OLD versus NEW "records"

2007-03-14 Thread Jorge Godoy
Tom Lane <[EMAIL PROTECTED]> writes: > Jorge Godoy <[EMAIL PROTECTED]> writes: >> If I change some column -- e.g. fill in some automatic calculated column or a >> timestamp column --, when I run the second trigger will OLD be the data >> stored >> at the database already or will it be affected by

[GENERAL] pre-parser query manipulation

2007-03-14 Thread Randall Smith
Hi, I'm attempting to process a query written in the form: SELECT fields FROM table WHERE conditions FOR UPDATE OF field_name when Postgresql supports: SELECT fields FROM table WHERE conditions FOR UPDATE OF table_name I'd like to remove the OF clause in the case only one table is que

Re: [GENERAL] quoted identifier behaviour

2007-03-14 Thread Tom Lane
Randall Smith <[EMAIL PROTECTED]> writes: > I'm an advocate of Postgresql and usually tout SQL compliance as a > strength, so it bothers me that this is not in line to be corrected. It's not that it's not on the radar screen, it's just that no one sees a way to do it that's going to be acceptable

Re: [GENERAL] How to write a function that manipulates a set of results

2007-03-14 Thread Andreas Kretschmer
Ashley Moran <[EMAIL PROTECTED]> schrieb: > > On Mar 14, 2007, at 6:02 pm, Andreas Kretschmer wrote: > >select * from . > >For instance, if your SRF-function is called foo(), do: > >select * from foo(); > > > Andreas, > > It's more complicated than that. What we need to do is something along

Re: [GENERAL] grant permissions to set variable?

2007-03-14 Thread Vivek Khera
On Mar 14, 2007, at 11:36 AM, Richard Huxton wrote: Vivek Khera wrote: I want to do some debugging on an app, and I'd like to set on a per-connection basis "set log_min_duration_statement = 10;" Obviously since I'm not super user I get permission denied. Is there some GRANT I can grant to

Re: [GENERAL] How to write a function that manipulates a set of results

2007-03-14 Thread Ashley Moran
On Mar 14, 2007, at 6:02 pm, Andreas Kretschmer wrote: select * from . For instance, if your SRF-function is called foo(), do: select * from foo(); Andreas, It's more complicated than that. What we need to do is something along the lines of: results = SELECT * FROM foo(); DELETE FROM

Re: [GENERAL] DST failing on 8.1.3

2007-03-14 Thread Tom Lane
Jaime Silvela <[EMAIL PROTECTED]> writes: > I looked for those timezone files, and they're missing on my production > installation. Probably the upgrade from 7.* to 8.1 was a quick&dirty one. > I don't even have a 'timezone' folder in the share directory. Oh, that's your problem then --- 'EST5EDT

Re: [GENERAL] How to write a function that manipulates a set of results

2007-03-14 Thread Andreas Kretschmer
Ashley Moran <[EMAIL PROTECTED]> schrieb: > The closest I've come from reading the docs is functions that return > SETOF. However I can't see any way to query the result set like a table. Right. > Can anyone offer any hints/links? select * from . For instance, if your SRF-function is call

Re: [GENERAL] quoted identifier behaviour

2007-03-14 Thread Randall Smith
Albe Laurenz wrote: Randall Smith wrote: Are there plans to make Postgresql's behavior SQL compliant with regards to quoted identifiers? My specific need is to access tables named in lower case by an uppercase quoted identifier, which is in line with the SQL standard. So if I created table

Re: [GENERAL] DST failing on 8.1.3

2007-03-14 Thread Jaime Silvela
Thanks. Yes, I do confirm it was EST5EDT and I ran your regression to confirm. I looked for those timezone files, and they're missing on my production installation. Probably the upgrade from 7.* to 8.1 was a quick&dirty one. I don't even have a 'timezone' folder in the share directory. Would it

[GENERAL] How to write a function that manipulates a set of results

2007-03-14 Thread Ashley Moran
Hi I'm passing this on second hand so forgive me if I'm a bit vague... My boss is trying to write a function in PL/pgsql that manipulates a small, temporary set of data. It fetches about 20 rows from a table of approx 4 million, then it needs to do further calculations to narrow them down

Re: [GENERAL] DST problem on Windows Server

2007-03-14 Thread Walter Vaughan
George Weaver wrote: A client has PostgreSQL 8.2.1 installed on a Windows 2000 server. W2K has been EOL'ed for quite some time. You might want to stress that to your client. I don't know what you bill per hour, but their not-upgrading cost savings should be negative and keep climbing. Did y

Re: [GENERAL] quoted identifier behaviour

2007-03-14 Thread Albe Laurenz
Randall Smith wrote: > Are there plans to make Postgresql's behavior SQL compliant with regards > to quoted identifiers? My specific need is to access tables named in > lower case by an uppercase quoted identifier, which is in line with the > SQL standard. So if I created table foo, I should b

Re: [GENERAL] quoted identifier behaviour

2007-03-14 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > Are there plans to make Postgresql's behavior SQL compliant with regards > to quoted identifiers? No. > My specific need is to access tables named in lower case by an uppercase > quoted identifier, which is in line with the SQL standard.

[GENERAL] DST problem on Windows Server

2007-03-14 Thread George Weaver
A client has PostgreSQL 8.2.1 installed on a Windows 2000 server. The time on the server is correct but PostgreSQL is returning a time 1 hour in advance. In other words, it the server time is 1:00 pm, PostgreSQL is returning 2:00 pm. Both the PostgreSQL server and Windows server have been reb

[GENERAL] quoted identifier behaviour

2007-03-14 Thread Randall Smith
Are there plans to make Postgresql's behavior SQL compliant with regards to quoted identifiers? My specific need is to access tables named in lower case by an uppercase quoted identifier, which is in line with the SQL standard. So if I created table foo, I should be able to access it like "FO

Re: [GENERAL] DST failing on 8.1.3

2007-03-14 Thread Tom Lane
Guy Fraser <[EMAIL PROTECTED]> writes: > On Wed, 2007-03-14 at 12:12 -0400, Tom Lane wrote: >> Is it really 'EST5EDT', or 'est5edt' ? 8.1 is case sensitive about this. > /usr/local/share/postgresql/timezone/EST5EDT > /usr/local/share/postgresql/timezone/SystemV/EST5EDT > /usr/share/zoneinfo/EST5E

Re: [GENERAL] DST failing on 8.1.3

2007-03-14 Thread Guy Fraser
On Wed, 2007-03-14 at 12:12 -0400, Tom Lane wrote: > Jaime Silvela <[EMAIL PROTECTED]> writes: > > ... before doing that I'd like to find out what's the > > problem with the DST not taking. > > > The timezone is 'EST5EDT', and > > Is it really 'EST5EDT', or 'est5edt' ? 8.1 is case sensitive abo

Re: [GENERAL] DST failing on 8.1.3

2007-03-14 Thread Tom Lane
Jaime Silvela <[EMAIL PROTECTED]> writes: > ... before doing that I'd like to find out what's the > problem with the DST not taking. > The timezone is 'EST5EDT', and Is it really 'EST5EDT', or 'est5edt' ? 8.1 is case sensitive about this. regards, tom lane

[GENERAL] Plperl Question

2007-03-14 Thread Chris Coleman
Hi, I'm trying to write a plperl function to copy the new row e.g. NEW in plpgsql into another table. I was looking for a similar effect to the INSERT INTO blah VALUES (NEW.*) Syntax that can be used in plpgsql. So fat the best I have come up with is: $collist = ""; $vallist = ""; while (($

Re: [GENERAL] DST failing on 8.1.3

2007-03-14 Thread Guy Fraser
On Wed, 2007-03-14 at 11:16 -0400, Jaime Silvela wrote: > I'm running a production database on Linux (select version() = > "PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.3") > I read that all 8.1.* versions are DST-compliant, and sure enough, my > development server, which

Re: [GENERAL] Multiple TRIGGERs and OLD versus NEW "records"

2007-03-14 Thread Tom Lane
Jorge Godoy <[EMAIL PROTECTED]> writes: > If I change some column -- e.g. fill in some automatic calculated column or a > timestamp column --, when I run the second trigger will OLD be the data stored > at the database already or will it be affected by the NEW data returned from > the previous trig

Re: [GENERAL] Trigger Question

2007-03-14 Thread Jason Lee
Thanks! That did the trick. I had tried that logic in the function, but I had always used an AFTER trigger, so it didn't work. Thanks, again. You've saved my sanity. :) - Jason Lee, SCJP Senior Software Engineer http://www.iec-okc.com > -Original Message- > From: Richard Huxton

Re: [GENERAL] Trigger Question

2007-03-14 Thread Alban Hertroys
Jason Lee wrote: > I'm trying to write a trigger that updates a date_changed field on a > record anytime that record is updated. I have a function written, and > the trigger created, but everytime I update the record, I get a > recursion limit error. It appears that the action performed by my Yo

Re: [GENERAL] Trigger Question

2007-03-14 Thread Terry Lee Tucker
On Wednesday 14 March 2007 11:15, Jason Lee wrote: > I'm trying to write a trigger that updates a date_changed field on a > record anytime that record is updated. I have a function written, and > the trigger created, but everytime I update the record, I get a > recursion limit error. It appears t

Re: [GENERAL] Statement logging

2007-03-14 Thread Hannes Dorbath
On 14.03.2007 10:10, hubert depesz lubaczewski wrote: On 3/14/07, Hannes Dorbath <[EMAIL PROTECTED]> wrote: Is there any way to enable statement logging at runtime without a restart? If not I think that would be a nice feature, as one sometimes need to debug applications that are already in pro

Re: [GENERAL] Trigger Question

2007-03-14 Thread Richard Huxton
Jason Lee wrote: I'm trying to write a trigger that updates a date_changed field on a record anytime that record is updated. I have a function written, and the trigger created, but everytime I update the record, I get a recursion limit error. [snip] declare begin update unit_specification

Re: [GENERAL] grant permissions to set variable?

2007-03-14 Thread Richard Huxton
Vivek Khera wrote: I want to do some debugging on an app, and I'd like to set on a per-connection basis "set log_min_duration_statement = 10;" Obviously since I'm not super user I get permission denied. Is there some GRANT I can grant to the user in question to allow this? I don't really wa

[GENERAL] Trigger Question

2007-03-14 Thread Jason Lee
I'm trying to write a trigger that updates a date_changed field on a record anytime that record is updated. I have a function written, and the trigger created, but everytime I update the record, I get a recursion limit error. It appears that the action performed by my trigger is causing the trigg

[GENERAL] DST failing on 8.1.3

2007-03-14 Thread Jaime Silvela
I'm running a production database on Linux (select version() = "PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.3") I read that all 8.1.* versions are DST-compliant, and sure enough, my development server, which runs 8.1.0, switched fine, as did my 8.2.3 database at home. Th

[GENERAL] grant permissions to set variable?

2007-03-14 Thread Vivek Khera
I want to do some debugging on an app, and I'd like to set on a per- connection basis "set log_min_duration_statement = 10;" Obviously since I'm not super user I get permission denied. Is there some GRANT I can grant to the user in question to allow this? I don't really want to do it globa

[GENERAL] max_connections (postgresql.conf)

2007-03-14 Thread MG
Hello, we are using SCO OpenServer6 and Postgresql 8.1.4. We increased the parameter max_connections in the postgresql.conf to 300. In Section 16.4.1 of the dokumentation we try to find out how to adjust depending parameters. But we can't figure it out. What would be reasonable values for the

Re: [GENERAL] PgAgent

2007-03-14 Thread Richard Huxton
Ezequias R. da Rocha wrote: Richard Huxton escreveu: Ezequias R. da Rocha wrote: Hello, Has someone noticed the problem of installation of contribs of postgreSQL 8.2.3. I was looking for pgAgent and didn't noticed notting. Has someone another alternative solution to install it ? It's

Re: [GENERAL] PgAgent

2007-03-14 Thread Ezequias R. da Rocha
Richard Huxton escreveu: Ezequias R. da Rocha wrote: Hello, Has someone noticed the problem of installation of contribs of postgreSQL 8.2.3. I was looking for pgAgent and didn't noticed notting. Has someone another alternative solution to install it ? It's part of pgAdmin, not Postgre

Re: [GENERAL] PgAgent

2007-03-14 Thread Richard Huxton
Ezequias R. da Rocha wrote: Hello, Has someone noticed the problem of installation of contribs of postgreSQL 8.2.3. I was looking for pgAgent and didn't noticed notting. Has someone another alternative solution to install it ? It's part of pgAdmin, not PostgreSQL -- Richard Huxton

[GENERAL] PgAgent

2007-03-14 Thread Ezequias R. da Rocha
Hello, Has someone noticed the problem of installation of contribs of postgreSQL 8.2.3. I was looking for pgAgent and didn't noticed notting. Has someone another alternative solution to install it ? Regards Ezequias ---(end of broadcast)

Re: [GENERAL] Statement logging

2007-03-14 Thread Richard Huxton
hubert depesz lubaczewski wrote: On 3/14/07, A. Kretschmer <[EMAIL PROTECTED]> wrote: Not necessary, you can set it via session without reload or restart. but then it will work only for the connection that did set it. and i understood that hannes wanted to profile working application - so it's

Re: [GENERAL] Statement logging

2007-03-14 Thread hubert depesz lubaczewski
On 3/14/07, A. Kretschmer <[EMAIL PROTECTED]> wrote: Not necessary, you can set it via session without reload or restart. but then it will work only for the connection that did set it. and i understood that hannes wanted to profile working application - so it's not really useful. depesz -- ht

[GENERAL] Multiple TRIGGERs and OLD versus NEW "records"

2007-03-14 Thread Jorge Godoy
Hi! (Consider these UPDATE triggers) I can't test this for now since I'm not with a test database handy for now, but I was thinking on what happens to OLD and NEW when running multiple triggers. For example, for the first trigger OLD is the equivalent to the data that is stored at the databas

Re: [GENERAL] Statement logging

2007-03-14 Thread A. Kretschmer
am Wed, dem 14.03.2007, um 10:10:02 +0100 mailte hubert depesz lubaczewski folgendes: > On 3/14/07, Hannes Dorbath <[EMAIL PROTECTED]> wrote: > >Is there any way to enable statement logging at runtime without a restart? > >If not I think that would be a nice feature, as one sometimes need to > >d

Re: [GENERAL] Statement logging

2007-03-14 Thread hubert depesz lubaczewski
On 3/14/07, Hannes Dorbath <[EMAIL PROTECTED]> wrote: Is there any way to enable statement logging at runtime without a restart? If not I think that would be a nice feature, as one sometimes need to debug applications that are already in production.. change log_min_duration_statement and do pg_

Re: [GENERAL] Statement logging

2007-03-14 Thread A. Kretschmer
am Wed, dem 14.03.2007, um 9:57:41 +0100 mailte Hannes Dorbath folgendes: > Is there any way to enable statement logging at runtime without a restart? > > If not I think that would be a nice feature, as one sometimes need to > debug applications that are already in production.. set log_stateme

[GENERAL] Statement logging

2007-03-14 Thread Hannes Dorbath
Is there any way to enable statement logging at runtime without a restart? If not I think that would be a nice feature, as one sometimes need to debug applications that are already in production.. Thanks! -- Regards, Hannes Dorbath ---(end of broadcast)-

[GENERAL] information_schema.table_privileges

2007-03-14 Thread Alexi Gen
Am not able to understand 2 things about table_privileges and is_grantable. Can someone please help out with this? Create a table (acctmast). Check information_schema.table_privileges - there will not be any records for this table. Grant only SELECT permissions to a single user - (dbasr). A sin