[SQL] Thanks

2001-08-15 Thread Bill
Thanks all for the help :) I got to do all this, because there a existing system running on SQL Server/SQL Anyway which using all these syntax though out the coding, and I got to make it support postgreSQL And here is a question relate to the DataDiff function in SQL Server, is it possible t

Re: [SQL] Temp tables being written to disk. Avoidable?

2001-08-15 Thread Bruce Momjian
> Hi Tom, > > Thanks for your response, enlightening as always. > > > Not at present --- temp tables are not different from real tables, > > except for some naming shenanigans. So creation of a temp table will > > involve some disk hits. > > Ok, would it be a good idea to modify that for the f

[SQL] \set variant for use in regular sql commands

2001-08-15 Thread Jeff Barrett
I need to use the \set command in regular sql (I am running postgres queries through php and it does not seem to support the \ commands in general). How can I set a variable with regular sql? I want to be able to do the following: \set testvar '1,2,3,4,5' \set testvar '6,7,8,':testvar Which is

Re: [SQL] Re: Re: DateDiff, IsNull?

2001-08-15 Thread Josh Berkus
Alan, Tom, Ross, etc: > > Well, Alan, overloading operators is sort of important to the user > > definable types in postgresql. And any cross-type functionality, > actually. Hmmm ... I wasn't aware that what SQL does is "operator overloading", per se. Instead, I was under the SQL-spec impressio

Re: [SQL] on update restrict

2001-08-15 Thread Jan Wieck
Mister ics wrote: > > > > The behaviour is correct according to the SQL specifications. > > RESTRICT (as well as NO ACTION) means, you cannot change the > > primary key value of the referenced row. All other values can > > be changed of course. > > > > So an attempt to > > > >

[SQL] Re: Re: DateDiff, IsNull?

2001-08-15 Thread Alan Gutierrez
Tom, Manuel, Ross Not only do I learn that PostgreSQL supports operator overloading, I learn that this is not a bad thing. It's a big day for me! I tend to think of operator overloading as an over used, non-portable C++ feature. I could be wrong about C++ too. Probably am. Don't want to debate C

Re: [SQL] on update restrict

2001-08-15 Thread Mister ics
> > The behaviour is correct according to the SQL specifications. > RESTRICT (as well as NO ACTION) means, you cannot change the > primary key value of the referenced row. All other values can > be changed of course. > > So an attempt to > > UPDATE t1 SET id = 2 WHERE

Re: [SQL] psql connection being reset during function?

2001-08-15 Thread Randall Skelton
Excellent! The function you suggest is certainly a better approach... 5 minutes of processing and it was done. Thanks Tom. Cheers, Randall On Tue, 14 Aug 2001, Tom Lane wrote: > Randall Skelton <[EMAIL PROTECTED]> writes: > > problem #2: While this works perfectly for a small table of 10 entri