Re: [SQL] update from multiple rows

2005-01-23 Thread adam etienne
Thanks for your answer (BIn fact the computation is somewhat more complex than an average and the (Bdata set is quite large... I did some test with view & triggers but it's (Btoo slow.. (BMoreover, sometime i need to do big insertion or update and then other time (Bi need juste little updat

Re: [SQL] Question about a select

2005-01-23 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Kretschmer Andreas <[EMAIL PROTECTED]> writes: > Hi, > I have a table with this columns: machine, date and area. > Now i need a view with machine an week, calculated from date, and > sum(area), where date between CURRENT_DATE and now+N days. > Okay, this is not the

Re: [SQL] returning a record from PL/pgSQL

2005-01-23 Thread Michael Fuhr
On Fri, Jan 21, 2005 at 12:41:09PM +0100, KÖPFERL Robert wrote: > > I just tried hard to return > a single record fromout a plpgsql-function. While the (otherwise excelent) > documentation didn't give me an answer, I found out that this works: > > select into ret false, balance, balance; >

[SQL] Invalid Input syntax for type bigint

2005-01-23 Thread Ryan Miranda
hello everyone, I am trying to run the proc below but get an error : invalid input syntax for type bigint: "2004-10-26" Can anyone suggest what I am doing wrong here? Rx -- Function: public.getdateallocated(date, date) DROP FUNCTION public.getdateallocated(date, date); CREATE OR REPLACE FUNCTI

Re: [SQL] OID's

2005-01-23 Thread Mihail Nasedkin
Hello, pgsql-sql and Michael. MF> On Fri, Jan 21, 2005 at 11:17:34AM +0500, Mihail Nasedkin wrote: >> I have already read about "System Columns" of the PostgreSQL documentation. >> In the table "pg_catalog.pg_attribute" column "attrelid" contain >> only "system OID's" but not OID's from records o

Re: [SQL] Invalid Input syntax for type bigint

2005-01-23 Thread Michael Fuhr
On Sun, Jan 23, 2005 at 02:59:36PM -0800, Ryan Miranda wrote: > I am trying to run the proc below but get an error : invalid input > syntax for type bigint: "2004-10-26" Can anyone suggest what I am > doing wrong here? Apparently you're trying to use a date where a bigint is expected. One possibi

Re: [SQL] OID's

2005-01-23 Thread Michael Fuhr
On Mon, Jan 24, 2005 at 08:57:43AM +0500, Mihail Nasedkin wrote: > I don't need to know which tables have OIDS. I want know which system > table contain column OID with all OID's inserted into my tables. No system table contains a list of all OIDs, if that's what you're asking. > Or is there sys

Re: [SQL] OID's

2005-01-23 Thread Mihail Nasedkin
Thanks Michael for answer January, 24 2005, 9:58:35: MF> On Mon, Jan 24, 2005 at 08:57:43AM +0500, Mihail Nasedkin wrote: >> I don't need to know which tables have OIDS. I want know which system >> table contain column OID with all OID's inserted into my tables. MF> No system table contains a l

Re: [SQL] update from multiple rows

2005-01-23 Thread Michael Fuhr
On Sun, Jan 23, 2005 at 11:36:11AM +, adam etienne wrote: > In fact the computation is somewhat more complex than an average and the > data set is quite large... I did some test with view & triggers but it's > too slow.. Can you provide any more detail about the algorithm and the number of