Re: [GENERAL] time value '24:00:00'

2006-11-02 Thread Richard Huxton
Uwe C. Schroeder wrote: why don't you just use < '00:00:00'::time and avoid the issue? IMHO there shouldn't even be a 24:00:00, because that would imply that there is a 24:00:01 - which there is not. It should go from 23:59 to 00:00 But then, I didn't write the spec for time in general, so may

Re: [GENERAL] time value '24:00:00'

2006-11-02 Thread Uwe C. Schroeder
On Thursday 02 November 2006 00:16, Richard Huxton wrote: > Uwe C. Schroeder wrote: > > why don't you just use < '00:00:00'::time > > and avoid the issue? > > > > IMHO there shouldn't even be a 24:00:00, because that would imply that > > there is a 24:00:01 - which there is not. > > It should go fr

[GENERAL] Availability of pg_backend_pid() immediately after connection establishment

2006-11-02 Thread Hari Bhaskaran
Someone in this group mentioned a while back that pg_backend_pid() function works only after some 1/2 second after the connection has been established. This had something to do with the stats collector to make its sweep every .5 seconds?. Does anyone have more information on this? Any help i

Re: [GENERAL] time value '24:00:00'

2006-11-02 Thread Richard Huxton
Uwe C. Schroeder wrote: Ah, times and dates are wonderful things though. For example, '23:59:60' is a valid time (and not equal to 24:00:00 or 00:00:00) every so often. http://en.wikipedia.org/wiki/Leap_second Yeah, but isn't the third part milliseconds? Doesn't "milli" imply 1000 and not 60.

Re: [GENERAL] time value '24:00:00'

2006-11-02 Thread Uwe C. Schroeder
On Thursday 02 November 2006 00:59, Richard Huxton wrote: > Uwe C. Schroeder wrote: > >> Ah, times and dates are wonderful things though. For example, '23:59:60' > >> is a valid time (and not equal to 24:00:00 or 00:00:00) every so often. > >> > >> http://en.wikipedia.org/wiki/Leap_second > > > > Y

Re: [GENERAL] postgres import

2006-11-02 Thread Albe Laurenz
psql -h host -p port -d database -U user >> >>> It's a good enough solution in most cases, but when the rowcount >>> starts to skyrocket, it simply doesn't seem to cut it (at least I >>> couldn't make it to). >> >> INSERT statements? You dumped with the -d flag, didn't you? > > No I didn't, a

Re: [GENERAL] time value '24:00:00'

2006-11-02 Thread Richard Huxton
Uwe C. Schroeder wrote: On Thursday 02 November 2006 00:59, Richard Huxton wrote: Uwe C. Schroeder wrote: Ah, times and dates are wonderful things though. For example, '23:59:60' is a valid time (and not equal to 24:00:00 or 00:00:00) every so often. http://en.wikipedia.org/wiki/Leap_second Y

Re: [GENERAL] Availability of pg_backend_pid() immediately after connection establishment

2006-11-02 Thread Magnus Hagander
> Someone in this group mentioned a while back that > pg_backend_pid() function works only after some 1/2 second > after the connection has been established. This had > something to do with the stats collector to make its sweep > every .5 seconds?. Does anyone have more information on this?

Re: [HACKERS] [GENERAL] Index greater than 8k

2006-11-02 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, Nov 01, 2006 at 07:16:37PM -0300, Alvaro Herrera wrote: > [EMAIL PROTECTED] wrote: [...] > > a "functional trigram index"? (this would be very cool). > > Heh :-) I meant an index, using the pg_trgm opclass (which indexes > trigrams; hence the

Re: [GENERAL] time value '24:00:00'

2006-11-02 Thread Christopher Browne
On 11/1/06, Uwe C. Schroeder <[EMAIL PROTECTED]> wrote: why don't you just use < '00:00:00'::time and avoid the issue? IMHO there shouldn't even be a 24:00:00, because that would imply that there is a 24:00:01 - which there is not. It should go from 23:59 to 00:00 But then, I didn't write the s

[GENERAL] Weird double single quote issue

2006-11-02 Thread Peter
It is like the weirdest thing ever... I have a proc that dynamically generates SQL, executes it and returns results as setof record. Some of fields are strings with single quotes inside them. Since these strings are being picked up from database I store them as: 'string to be stored with ''

[GENERAL] compiling c-function on various version

2006-11-02 Thread Hitoshi Harada
Is there any way to compile c-function using pre-processor macro?? The code below is able to be compiled on 8.1.4: --- if(timestamp2tm(timestamp, NULL, tm, &fsec, NULL, NULL ) != 0){ // error } --- but not on 8.0.4, since the arguments of timestamp2tm() are changed. I tried like this: ---

Re: [GENERAL] Grouping My query

2006-11-02 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/01/06 23:43, Martin Kuria wrote: > Dear Richard, > > Thanks for your response, you are right I am trying to do headings, I > thought I could do it from writing a SQL statement, but as you have > suggested it can only be achieved on the client co

Re: [GENERAL] Weird double single quote issue

2006-11-02 Thread Martijn van Oosterhout
On Thu, Nov 02, 2006 at 01:35:41PM +0200, Peter wrote: > It is like the weirdest thing ever... > > I have a proc that dynamically generates SQL, executes it and returns > results as setof record. Some of fields are strings with single quotes > inside them. Since these strings are being picked up

Re: [GENERAL] compiling c-function on various version

2006-11-02 Thread Martijn van Oosterhout
On Thu, Nov 02, 2006 at 10:53:52PM +0900, Hitoshi Harada wrote: > but couldn't, PG_VERSION is string type. > any other macro or definitions?? In recent versions there's a PG_VERSION_NUM. For older versions you can track changes in the catalog version number. Have a nice day, -- Martijn van Oost

Re: [GENERAL] Weird double single quote issue

2006-11-02 Thread Richard Huxton
Peter wrote: Now, the weirdest thing is that for some db users everything works as it should, but for others the returned string is with TWO single quotes! select 'string to be stored with '' quotemark'::text as returned_string returns string to be stored with '' quotemark I cannot replicat

Re: [GENERAL] Weird double single quote issue

2006-11-02 Thread Peter
Now, the weirdest thing is that for some db users everything works as it should, but for others the returned string is with TWO single quotes! select 'string to be stored with '' quotemark'::text as returned_string returns string to be stored with '' quotemark I cannot replicate the same b

Re: [GENERAL] Weird double single quote issue

2006-11-02 Thread Richard Huxton
Peter wrote: Now, the weirdest thing is that for some db users everything works as it should, but for others the returned string is with TWO single quotes! select 'string to be stored with '' quotemark'::text as returned_string returns string to be stored with '' quotemark I cannot replic

[GENERAL] pg_proc Question

2006-11-02 Thread Oisin Glynn
I have named all my functions in a pretty unique way and would like to export just my functions. Is there any way to move just these functions from one db to another.has anyone got a clever piece of SQL that spits out ddl from a select on pg_proc? Or could I use the copy command on pg_proc to

Re: [GENERAL] pg_proc Question

2006-11-02 Thread Martijn van Oosterhout
On Thu, Nov 02, 2006 at 09:57:28AM -0500, Oisin Glynn wrote: > I have named all my functions in a pretty unique way and would like to > export just my functions. Is there any way to move just these functions > from one db to another.has anyone got a clever piece of SQL that spits > out ddl from

Re: [GENERAL] Weird double single quote issue

2006-11-02 Thread Peter
Now, the weirdest thing is that for some db users everything works as it should, but for others the returned string is with TWO single quotes! select 'string to be stored with '' quotemark'::text as returned_string returns string to be stored with '' quotemark I cannot replicate the sam

[GENERAL] lots of values for IN() clause

2006-11-02 Thread Markus Schiltknecht
Hi, One of our PostgreSQL 8.1.5 databases constantly crashed on a certain query (backend SEGFAULTs). I've figured the crashes were caused by a very long IN() clause. You can easily reproduce the crash by feeding the output of the python script below to your database. Fortunately, 8.2 (as o

[GENERAL] Help Needed in Postgis

2006-11-02 Thread ajay kamath
Hi,    I'm new to the mapserver and postgis system. I'm not very familiar with the structure applications involving these. My query is probably a very elementry one . Can someone please help me resolve this.AIM: I have a working Mapserver demo application, the common one which displays the map of I

Re: [GENERAL] DELETE performance issues

2006-11-02 Thread Schwenker, Stephen
Hey, The api uses hibernate to do all the work. Here is a bit of the log of the sql queries it does. The JBPM_bytelock queries seem to execute quite fast but when the api starts switching back and forth from JBPM_BYTEARRAY and JBPM_VARIABLEINSTANCE it seems to run slow. Like probably about 1 se

Re: [GENERAL] What is causing 'canceling statement due to user

2006-11-02 Thread Thomas Kellerer
On 27.10.2006 10:13 Csaba Nagy wrote: JDBC *can* cancel a running statement. You just need to call cancel() from another thread. http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#cancel() Works great in my SQL front end. Are you sure ? Ever tried to cancel a long running statem

[GENERAL] new and old not available in rule subselects?

2006-11-02 Thread Egil Möller
It seems like you can not use the magical relations new and old in sub-selects in rules. Why is this, or is there something I haven't understood correctly about rules and new and old? create table "user" ( username varchar, created timestamp default now(), detstroyed timestamp default null);

[GENERAL] Database engine poll

2006-11-02 Thread None Known
Interesting poll here: http://linux.inet.hr/poll_favorite_database.html PostgreSQL is already standing strong, but hey, let's support it even more. ;) ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropr

[GENERAL] pg_dump question

2006-11-02 Thread Thomas Burns
Hi, I would like to use pg_dump to backup a list of tables to one file, but it looks like the -t option only supports one file. So, pg_dump gives you the option of backing up and entire database or one file, but nothing in between. Am I missing something? Is there a way to backup multiple

Re: [GENERAL] PostGIS

2006-11-02 Thread Brent Wood
Sandeep Kumar Jakkaraju wrote: I use postgis to wipe my ASS ... no good documentation ... The docs are a bit technical, but the product is excellent, I use it to manage a variety of spatial datasets, with up to hundreds of millions of features, on half a dozen systems. I'd highly recommend i

Re: [GENERAL] pg_proc Question

2006-11-02 Thread Oisin Glynn
Martijn van Oosterhout wrote: On Thu, Nov 02, 2006 at 09:57:28AM -0500, Oisin Glynn wrote: I have named all my functions in a pretty unique way and would like to export just my functions. Is there any way to move just these functions from one db to another.has anyone got a clever piece of S

Re: [GENERAL] PostGIS

2006-11-02 Thread Sandeep Kumar Jakkaraju
Hi All .. Please forgive my ignorance After all it is open source ...so how can one trust it fully I am GIS guy (i think ..) Like We have used the Haversine formula ...given on most of the websites ... to calculate the distance between to lat/lon points .. which doesnt match with the dista

Re: [GENERAL] postgres import

2006-11-02 Thread Tomi NA
2006/11/2, Albe Laurenz <[EMAIL PROTECTED]>: psql -h host -p port -d database -U user >> >>> It's a good enough solution in most cases, but when the rowcount >>> starts to skyrocket, it simply doesn't seem to cut it (at least I >>> couldn't make it to). >> >> INSERT statements? You dumped wi

Re: [GENERAL] Availability of pg_backend_pid() immediately after connection establishment

2006-11-02 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: >> Someone in this group mentioned a while back that >> pg_backend_pid() function works only after some 1/2 second >> after the connection has been established. > No, pg_backend_pid() returns MyProcPid, which is set on backend startup. > However, th

Re: [GENERAL] Weird double single quote issue

2006-11-02 Thread Richard Huxton
Peter wrote: Allright, the quote_literal() function helped to a certain extent. One field is now always properly formatted, and one other sometimes is quoted... and sometimes is not. It still feels like internal PG issue to me... we'll try upgrading to latest revision and see what happens..

Re: [GENERAL] PostGIS

2006-11-02 Thread James Cradock
On Nov 2, 2006, at 10:41 AM, Sandeep Kumar Jakkaraju wrote:After all it is open source ...so how can one trust it fully If you have a question about how something is working, and you find the end-user documentation to be lacking, you can look at the software's source.  -James Cradock, [EMAI

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Shelby Cain
I don't get a segfault on 8.0.8 under linux or 8.1.4 under win32. The backend (correctly I assume) issues a hint to increase max_stack_depth in both cases. $ psql -h localhost -p 5432 -d test -U readwrite < script.sql Password: CREATE TABLE ERROR: stack depth limit exceeded HINT: Increase

Re: [GENERAL] pg_dump question

2006-11-02 Thread A. Kretschmer
am Wed, dem 01.11.2006, um 13:50:58 -0800 mailte Thomas Burns folgendes: > Hi, > > I would like to use pg_dump to backup a list of tables to one file, > but it looks like > the -t option only supports one file. So, pg_dump gives you the > option of backing > up and entire database or one file

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Markus Schiltknecht
Hi, thanks for testing, unfortunately I don't have a 8.0 around. And as 8.2 works and is probably coming very soon... Regards Markus Shelby Cain wrote: I don't get a segfault on 8.0.8 under linux or 8.1.4 under win32. The backend (correctly I assume) issues a hint to increase max_stack_de

Re: [GENERAL] pg_dump question

2006-11-02 Thread Alvaro Herrera
A. Kretschmer wrote: > am Wed, dem 01.11.2006, um 13:50:58 -0800 mailte Thomas Burns folgendes: > > Hi, > > > > I would like to use pg_dump to backup a list of tables to one file, > > but it looks like > > the -t option only supports one file. So, pg_dump gives you the > > option of backing >

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Shelby Cain
No segfault in 8.1.5 on win32 either... - Original Message From: Markus Schiltknecht <[EMAIL PROTECTED]> To: Shelby Cain <[EMAIL PROTECTED]> Cc: pgsql general Sent: Thursday, November 2, 2006 9:55:08 AM Subject: Re: [GENERAL] lots of values for IN() clause Hi, thanks for testing, unfor

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Alvaro Herrera
Markus Schiltknecht wrote: > Hi, > > One of our PostgreSQL 8.1.5 databases constantly crashed on a certain > query (backend SEGFAULTs). I've figured the crashes were caused by a > very long IN() clause. > > You can easily reproduce the crash by feeding the output of the python > script below t

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Richard Huxton
Markus Schiltknecht wrote: Hi, thanks for testing, unfortunately I don't have a 8.0 around. And as 8.2 works and is probably coming very soon... If you can reliably reproduce it (I can't here - Debian on x86) - a bug-report on the bugs mailing list or the website would probably be appreciat

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Alvaro Herrera
Alvaro Herrera wrote: > Markus Schiltknecht wrote: > > Hi, > > > > One of our PostgreSQL 8.1.5 databases constantly crashed on a certain > > query (backend SEGFAULTs). I've figured the crashes were caused by a > > very long IN() clause. > > > > You can easily reproduce the crash by feeding the

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Richard Huxton
Markus Schiltknecht wrote: Hi, One of our PostgreSQL 8.1.5 databases constantly crashed on a certain query (backend SEGFAULTs). I've figured the crashes were caused by a very long IN() clause. (Sorry for replying twice in a row) Could it be out-of-memory rather than a segfault you're seeing

Re: [GENERAL] pg_dump question

2006-11-02 Thread Andreas Kretschmer
Alvaro Herrera <[EMAIL PROTECTED]> schrieb: > > > I would like to use pg_dump to backup a list of tables to one file, > > > but it looks like > > > the -t option only supports one file. So, pg_dump gives you the > > > option of backing > > > up and entire database or one file, but nothing in be

Re: [GENERAL] pg_dump question

2006-11-02 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/02/06 09:56, Alvaro Herrera wrote: > A. Kretschmer wrote: >> am Wed, dem 01.11.2006, um 13:50:58 -0800 mailte Thomas Burns folgendes: >>> Hi, >>> >>> I would like to use pg_dump to backup a list of tables to one file, >>> but it looks like >>>

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Markus Schiltknecht
Hello Alvaro, yeah, thanks, that's it. postgresql.conf had: max_stack_depth = 8192 # min 100, size in KB I don't know who put it at 8192. According to the fine manual at [1], it should be set to something below 'ulimit -s', which gives 8192 on the machine in question. I've no

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Markus Schiltknecht
Hi, Richard Huxton wrote: If you can reliably reproduce it (I can't here - Debian on x86) - a bug-report on the bugs mailing list or the website would probably be appreciated by the developers. PG version, OS version, method of install etc. I've thought about that, but I somehow just *knew*

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Martijn van Oosterhout
On Thu, Nov 02, 2006 at 05:16:40PM +0100, Markus Schiltknecht wrote: > OTOH, having to configure such things is not exactly user friendly. I > guess it's difficult to determine the stack limit in a cross-platform > way. Or does having that configuration option other reasons for existence? A patc

Re: [GENERAL] Weird double single quote issue

2006-11-02 Thread Tom Lane
Peter <[EMAIL PROTECTED]> writes: > 2. No. In fact I can replicate the problem on the same computer using > PgAdmin (connecting as two different users) > 3. I can isolate the part but it does not help much. I'm even doing > RAISE NOTICE and printing out the actual SQL statement that is being > e

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Alvaro Herrera
Markus Schiltknecht wrote: > Hello Alvaro, > > yeah, thanks, that's it. postgresql.conf had: > > max_stack_depth = 8192 # min 100, size in KB > > I don't know who put it at 8192. According to the fine manual at [1], it > should be set to something below 'ulimit -s', which gives

Re: [GENERAL] pg_dump question

2006-11-02 Thread Alvaro Herrera
Andreas Kretschmer wrote: > Alvaro Herrera <[EMAIL PROTECTED]> schrieb: > > > > I would like to use pg_dump to backup a list of tables to one file, > > > > but it looks like > > > > the -t option only supports one file. So, pg_dump gives you the > > > > option of backing > > > > up and entire d

Re: [GENERAL] DELETE performance issues

2006-11-02 Thread Tom Lane
"Schwenker, Stephen" <[EMAIL PROTECTED]> writes: > All the tables have primary keys and when I explain the queries, they > use the primary key index. I have increased the shared memory which > only seems to help when the same table is accessed synchronously but > this switching back and forth betw

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Gurjeet Singh
But I do not understand why the IN list has to make so many recursive calls???I know if it was possible, it'd have been done already... but can 'making it iterative' (whatever 'it' stands for) be reconsidered? -- [EMAIL PROTECTED][EMAIL PROTECTED] gmail | hotmail | yahoo }.com On 11/2/06, Alvaro He

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Tom Lane
"Gurjeet Singh" <[EMAIL PROTECTED]> writes: > But I do not understand why the IN list has to make so many recursive > calls??? Existing releases effectively expand "foo IN (1,2,3,...)" to "(((foo = 1) OR foo = 2) OR foo = 3) ..." which can be a deeply nested OR structure. IIRC this is changed in

Re: [GENERAL] lots of values for IN() clause

2006-11-02 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom recently added a check for getrlimit(RLIMIT_STACK), but I don't know > if that considered the "megabyte or so". *peeks the code* Yeah, > there's a 512 kb "daylight", but there's also an absolute maximum of > 2MB. No, there's no absolute maximum (u

Re: [GENERAL] Weird double single quote issue

2006-11-02 Thread brian
Tom Lane wrote: Peter <[EMAIL PROTECTED]> writes: 2. No. In fact I can replicate the problem on the same computer using PgAdmin (connecting as two different users) 3. I can isolate the part but it does not help much. I'm even doing RAISE NOTICE and printing out the actual SQL statement that is

[GENERAL] query takes 65 times longer if I add 1 column (explain attached)

2006-11-02 Thread Dan Weber
I've got a query that takes a very long time to execute if I add anadditional column to the SELECT clause. Here is Query A, the slow one.  I've numbered the rowsof the EXPLAIN for convenience.psql=# explain analyze SELECT timestamp, src_ip, dst_ip, id,   string_one, string_two FROM table_one LEFT J

Re: [GENERAL] query takes 65 times longer if I add 1 column (explain attached)

2006-11-02 Thread Tom Lane
"Dan Weber" <[EMAIL PROTECTED]> writes: > I've got a query that takes a very long time to execute if I add an > additional column to the SELECT clause. What have you got work_mem set to? I'm guessing that the case where it doesn't add the Materialize node is because it estimates the size of the d

[GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
Hello all, Is there an existing mechanism is postgresql that can automatically increment/decrement on a daily basis w/out user interaction? The use case I'm considering is where a student is in some type of contract with an instructor of some sort, and that contract puts a time limit on the s

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread A. Kretschmer
am Thu, dem 02.11.2006, um 13:14:22 -0500 mailte louis gonzales folgendes: > Hello all, > Is there an existing mechanism is postgresql that can automatically > increment/decrement on a daily basis w/out user interaction? The use You can use CRON for such tasks. I hope for, you have a operating

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread brian
louis gonzales wrote: Hello all, Is there an existing mechanism is postgresql that can automatically increment/decrement on a daily basis w/out user interaction? The use case I'm considering is where a student is in some type of contract with an instructor of some sort, and that contract puts

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
Hey Brian, Yeah I had considered this, using cron, I just feel like that is too dirty. Actually I didn't see Andreas' post, can someone forward that? I'm running this application on Solaris 9. Ultimately what I want to know is, is there something that is internal to postgresql that can be use

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread Glen Parker
louis gonzales wrote: Hey Brian, Yeah I had considered this, using cron, I just feel like that is too dirty. Actually I didn't see Andreas' post, can someone forward that? I'm running this application on Solaris 9. Ultimately what I want to know is, is there something that is internal to post

Re: [SQL] [GENERAL] Is there anyway to...

2006-11-02 Thread imad
Or you can probably use a PostgreSQL administration tool for scheduled jobs. I know a number of such tools which provide this feature and EnterpriseDB Management Server is one of them. --Imad www.EnterpriseDB.com On 11/2/06, A. Kretschmer <[EMAIL PROTECTED]> wrote: am Thu, dem 02.11.2006, um

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread Andreas Kretschmer
louis gonzales <[EMAIL PROTECTED]> schrieb: > Hey Brian, > Yeah I had considered this, using cron, I just feel like that is too dirty. Why? > > Actually I didn't see Andreas' post, can someone forward that? Sorry, i posted to the list, and i can see my mail. > > I'm running this applicatio

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
To all who replied, first, thank you! Second, I simply said 'dirty' never said dislike or anything like that. I've used and use cron for different OS related operations and have for years. I LOVE cron itself. What I mean with 'dirty' is that I'm trying to take away as much as possible from

[GENERAL] Does anyone have a compiled dblink_tds for Redhat EL 4.x?

2006-11-02 Thread Tony Caduto
I am having trouble getting dblink_tds compiled on my system. i downloaded the source and followed the directions but keep getting this error: [EMAIL PROTECTED] dblink_tds]# make /postgresql-8.1.4/src/Makefile.global.in:309: /postgresql-8.1.4/src/Makefile.port: No such file or directory --

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread AgentM
On Nov 2, 2006, at 14:02 , Glen Parker wrote: louis gonzales wrote: Hey Brian, Yeah I had considered this, using cron, I just feel like that is too dirty. Actually I didn't see Andreas' post, can someone forward that? I'm running this application on Solaris 9. Ultimately what I want to k

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
Apparently this isn't the first time someone else thought a sleep or timer mechanism, independent of user action would be of great value and didn't want to use external programs to accomplish it. http://developer.*postgresql*.org/pgdocs/postgres/release-8-2.html * Add a server-side *sleep* *fun

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread A. Kretschmer
am Thu, dem 02.11.2006, um 14:24:20 -0500 mailte louis gonzales folgendes: > visit the student profile it will only show/flag the status if the time > has elapsed. Is there like a sleep() function that postgresql has? > That could be part of the plan. So sleep(24hours) - pseudo code - wake

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread Glen Parker
louis gonzales wrote: Fine so let's say when the instructor creates the user profile, this can trigger the creation of a sequence, say, but IF the instructor doesn't visit that student's profile for a month, I want something that, independent of any other action, will be either incrementing or

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread Richard Troy
On Thu, 2 Nov 2006, AgentM wrote: > > > > Just some commentary... This is exactly the sort of thing cron is > > for. Duplicating that functionality in the RDBMS would be silly > > IMO. I don't see why you could consider cron to be "dirty" for > > this application... > > I actually tried to com

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread AgentM
On Nov 2, 2006, at 15:00 , Richard Troy wrote: On Thu, 2 Nov 2006, AgentM wrote: Just some commentary... This is exactly the sort of thing cron is for. Duplicating that functionality in the RDBMS would be silly IMO. I don't see why you could consider cron to be "dirty" for this applicati

Re: [GENERAL] DELETE performance issues

2006-11-02 Thread Reece Hart
On Thu, 2006-11-02 at 11:27 -0500, Tom Lane wrote: Are you absolutely sure about that last?  Unindexed foreign key references are the explanation nine times out of ten when someone complains about deletes being slow. This was certainly the major cause when I had slow deletes. (T

Re: [GENERAL] query takes 65 times longer if I add 1 column (explain attached)

2006-11-02 Thread Dan Weber
What have you got work_mem set to?The default, 1024.  The fact that the estimates diverge so far from reality can no doubt beblamed on the horridly bad rowcount estimates: 3 rows estimated vs 179 actual for table_one, and 128592 estimated vs 4202 actual fortable_two.  Have you ANALYZEd these tables

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/02/06 13:24, louis gonzales wrote: [snip] >>> I'm running this application on Solaris 9. Ultimately what I want to >>> know is, is there something that is internal to postgresql that can >>> be used that doesn't need external action, to make it

Re: [SQL] [GENERAL] Is there anyway to...

2006-11-02 Thread Dave Page
imad wrote: Or you can probably use a PostgreSQL administration tool for scheduled jobs. I know a number of such tools which provide this feature and EnterpriseDB Management Server is one of them. As is pgAdmin's pgAgent. Regards, Dave ---(end of broadcast)

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread Andreas Kretschmer
Ron Johnson <[EMAIL PROTECTED]> schrieb: > >> Take a look at http://pgfoundry.org/projects/pgjob/ > > I did. > > > Latest File Releases > > Package Version DateNotes / Monitor Download > > This Project Has Not Released Any Files OMG. Sorry. Andreas -- Really, I'm not out to de

[GENERAL] Counting records in a PL/pgsql cursor

2006-11-02 Thread Magnus Hagander
Is there any way to count how many hits I got in a cursor in PL/pgsql? I have a function that will "window" through the result of a (large) query based on two parameters, but I also want to return the number of hits to the client. Right now I'm looping through the entire cursor and incrementing a

[GENERAL] Catch multiple records when doing Select Into

2006-11-02 Thread SunWuKung
I have a SELECT INTO varname columname FROM ... statement and I would like to raise an exception when that returns more than one record. GET DIAGNOSTICS rowcount = ROW_COUNT seems to return always one for this. Currently I find no other way to do that than to run this statement twice - first to see

[GENERAL] Select permissions on System tables

2006-11-02 Thread Ketema
I created a view as: CREATE OR REPLACE VIEW caviar_schemas AS SELECT n.oid::integer AS schema_id, n.nspname::information_schema.sql_identifier::text AS schema_name FROM pg_namespace n, pg_authid u WHERE n.nspowner = u.oid AND pg_has_role(n.nspowner, 'MEMBER'::text) AND u.rolname::information

Re: [GENERAL] Catch multiple records when doing Select Into

2006-11-02 Thread Ketema
It would be easier if we could see the context in which you are doing the select into. However I think this may help. Try putting the select into in a loop: declare _result record; _rows integer; begin _rows := 0; for _result in select statement here loop in here p

[GENERAL] Cannot rename file pg_xlog\0000.....

2006-11-02 Thread Mike G
Hi, I had someone pull the plug on my database about a week ago. When it was restarted postgres would not start because of the postmaster.pid file existed already. I deleted the pid file and attempt to restart the postmaster but it again failed. The error this time was that Log could not ren

[GENERAL] not null across multiple columns

2006-11-02 Thread Matthew Terenzio
here is an interesting question (to me) suppose you wanted to be certain that either one of two or more columns were present Like in a user table, either a username or an email need to be present to create a row. You can't use not null because it's an either or situation. what's the best

Re: [GENERAL] not null across multiple columns

2006-11-02 Thread George Pavlov
several ways to do it, here's one: check (coalesce(a,b,c) not null) if you want one or the other to be present, but not both see this thread: http://archives.postgresql.org/pgsql-general/2006-09/msg00207.php > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED

Re: [GENERAL] not null across multiple columns

2006-11-02 Thread Reece Hart
On Thu, 2006-11-02 at 19:10 -0500, Matthew Terenzio wrote: > suppose you wanted to be certain that either one of two or more > columns were present > > Like in a user table, either a username or an email need to be present > to create a row. > > You can't use not null because it's an either or s

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
A. Kretschmer wrote: am Thu, dem 02.11.2006, um 14:24:20 -0500 mailte louis gonzales folgendes: visit the student profile it will only show/flag the status if the time has elapsed. Is there like a sleep() function that postgresql has? That could be part of the plan. So sleep(24hours) -

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
Glen, Two things: 1) The instructor should only get a flag when the date conflict occurs, once they create this student profile account, they shouldn't have to manually check, I want the program to do, what programs should do, automate as much as possible! So the suggestion about 'generating a

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread Wes Sheldahl
On 11/2/06, AgentM <[EMAIL PROTECTED]> wrote: On Nov 2, 2006, at 14:02 , Glen Parker wrote:> louis gonzales wrote:>> Hey Brian,>> Yeah I had considered this, using cron, I just feel like that is>> too dirty.>> Actually I didn't see Andreas' post, can someone forward that? >> I'm running this applic

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
Wes, Thanks. That is fair. Wes Sheldahl wrote: On 11/2/06, *AgentM* <[EMAIL PROTECTED] > wrote: On Nov 2, 2006, at 14:02 , Glen Parker wrote: > louis gonzales wrote: >> Hey Brian, >> Yeah I had considered this, using cron, I just feel like that is

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread Glen Parker
Wes Sheldahl wrote: if you did have a cron job run to check, you would probably just have it set a boolean field on expired records or something of that sort, and run it a little after midnight, at the start of each day, assuming durations were always being measured in days. Exactly. You fl

Re: [GENERAL] Is there anyway to...

2006-11-02 Thread louis gonzales
I suppose I'll just concede now :) Thanks for putting up with my sarcasm and humoring my other ideas. I really wanted to see if there were any other methods out there and do appreciate everyone's ideas. Thanks again, CRON it is. Glen Parker wrote: Wes Sheldahl wrote: if you did have a cr

[GENERAL] Geometry

2006-11-02 Thread Bob Pawley
Can anyone point me to an overview of PostgreSQL geometry ?   Bob Pawley

Re: [GENERAL] Geometry

2006-11-02 Thread A. Kretschmer
am Thu, dem 02.11.2006, um 19:30:25 -0800 mailte Bob Pawley folgendes: > Can anyone point me to an overview of PostgreSQL geometry ? What do you mean? An Overview about PostgreSQL? Okay: http://www.postgresql.org/about/ Or geometric datatypes? Okay: http://www.postgresql.org/docs/8.1/interactive