Re: [SQL] Sql error

2001-04-12 Thread Tom Lane
"comp" <[EMAIL PROTECTED]> writes: > but after connection when I type testdb=3D>\df it gives this error: > " ERROR: Function 'oid8types(oidvector)' does not exist. Use the version of psql that came with 7.0.3, not some older version. regards, tom lane --

[SQL] Re: Update

2001-04-12 Thread Tom Lane
Kyle <[EMAIL PROTECTED]> writes: > It appears that the first function would get evaluated first under 7.0.3 > but the last function gets evaluated first under 7.1. Is that accurate? Actually, I was under the impression that (all else being equal) WHERE clauses would get evaluated right-to-left i

Re: [SQL] enumerating rows

2001-04-12 Thread Peter Eisentraut
Kovacs Zoltan writes: > Maybe a trivial question, maybe it's foreign from SQL, I'dont know... > How to add a column which stands for the row number in each row of the > result? E.g.: > > row_no | column1 | column2 | ... > ---+-+-+ ... > 1 | datum11 | datum12 | ... >

[SQL] Re: DROP TABLE in transaction

2001-04-12 Thread Joel Burton
On Thu, 12 Apr 2001, David Olbersen wrote: > On Thu, 12 Apr 2001, Peter Eisentraut wrote: > > > Because DROP TABLE removes the table file on disk, and you can't roll back > > that. Actually, in 7.1 you can. ;-) > > Well I understand that it's being taken from the disk, but why does that actio

Re: [SQL] DROP TABLE in transaction

2001-04-12 Thread David Olbersen
On Thu, 12 Apr 2001, Peter Eisentraut wrote: > Because DROP TABLE removes the table file on disk, and you can't roll back > that. Actually, in 7.1 you can. ;-) Well I understand that it's being taken from the disk, but why does that action have to be done *right now*? Why can't it be postponed

Re: [SQL] DROP TABLE in transaction

2001-04-12 Thread Peter Eisentraut
David Olbersen writes: > I was wondering if anybody could explain to me why I can't roll back dropping a > table. Because DROP TABLE removes the table file on disk, and you can't roll back that. Actually, in 7.1 you can. ;-) > I would think that of all the events that should be rollback-able,

[SQL] RE: RE: Re: select substr???

2001-04-12 Thread Jeff Eckermann
The references to REs in the docs are a little hard to find (maybe it's just me). Bruce's book gives a good coverage, with the benefit of an index to find where that is. AFAICT, the implementation is "extended regular expressions", like egrep. My choice of characters to match was a little arbitr

[SQL] Re: Triggers on SELECT

2001-04-12 Thread Joel Burton
On Thu, 12 Apr 2001, Lonnie Cumberland wrote: > Hello All, > > I have been reading on the uses of the Triggers from within the PL/pgSQL > language and have seen that you can set up triggers for such things as UPDATE, > and INSERT. > > I was just wondering why there was no trigger mechanicism fo

Re: [SQL] Function overlaps_interval

2001-04-12 Thread Roberto Mello
On Thu, Apr 12, 2001 at 11:23:28AM -0700, Josh Berkus wrote: > Folks, > > I wrote this PL/pgSQL function for my current project, and thought it > would be generally useful. An expansion of the builtin > overlaps(dt1,dt2,dt3,dt4) function, this function returns the interval > of time for wh

[SQL] DROP TABLE in transaction

2001-04-12 Thread David Olbersen
Hello. I was wondering if anybody could explain to me why I can't roll back dropping a table. I would think that of all the events that should be rollback-able, dropping a table would be the first on the list. -- Dave ---(end of broadcast)--- TIP

[SQL] Triggers on SELECT

2001-04-12 Thread Lonnie Cumberland
Hello All, I have been reading on the uses of the Triggers from within the PL/pgSQL language and have seen that you can set up triggers for such things as UPDATE, and INSERT. I was just wondering why there was no trigger mechanicism for the SELECT statement? I could find some possible uses for

[SQL] Function overlaps_interval

2001-04-12 Thread Josh Berkus
Folks, I wrote this PL/pgSQL function for my current project, and thought it would be generally useful. An expansion of the builtin overlaps(dt1,dt2,dt3,dt4) function, this function returns the interval of time for which the two datetime ranges overlap. Roberto, please include t

[SQL] Full outer join

2001-04-12 Thread Tim Perdue
Looking at the docs for 7.1, it appears that full outer joins are supported: http://www.postgresql.org/devel-corner/docs/user/queries.html However, I keep getting this error, and I don't know what it means: ERROR: FULL JOIN is only supported with mergejoinable join conditions I've tried several

Re: [SQL] RE: Re: select substr???

2001-04-12 Thread Albert REINER
Thanks, interesting. I did not find any mention of regular expressions in the 7.0.2 docs I installed locally. BTW, your code does not do exactly the same, as it removes any whitespace while the other one only collapses consecutive blanks. But, of course, regular expressions in PL/pgSQL make this

Re: [SQL] Calling plSQL functions

2001-04-12 Thread Josh Berkus
Lonnie, > Sorry for the bad terminology as I will try to get it corrected as I > have a > better learning of how to use postgresql properly. No problem. I just wanted to clarify your question; I didn't understand it. > create function register_user(text,text,text,text,text,text,text,text,tex

Re: [SQL] Calling plSQL functions

2001-04-12 Thread Lonnie Cumberland
I solved the problem Josh. It had to do with the "select ..." statement in the function and also I needed to include a "record" variable so the the "select into " could act upon. Thanks for the help anyway. Cheers, Lonnie --- Josh Berkus <[EMAIL PROTECTED]> wrote: > Lonnie, > > It may be that

Re: [SQL] Calling plSQL functions

2001-04-12 Thread Lonnie Cumberland
Hello Josh, Sorry for the bad terminology as I will try to get it corrected as I have a better learning of how to use postgresql properly. I will simply show you what I have done which should clarify things better. I have created a table "user_info" in a database "trdata" with a file called tab