[GENERAL] Last x records

2001-02-27 Thread Matthias Teege
Moin, is there any way to get the last x records of an query result? I can use "... order by x DESC LIMIT n" but I need ASC not DESC, the last records in the correct order. Many thanks Matthias -- Matthias Teege -- [EMAIL PROTECTED] -- http://emugs.de make world not war PGP-Key auf Anfrage

[GENERAL] Unions in views

2000-08-03 Thread Matthias Teege
Moin, I use PostgreSQL 6.5.1 and PHP4 under FreeBSD and now I want to use unions in views. But PostgreSQL says "ERROR: Views on unions not implemented.". Are unions in views implemented in the current version (7.x)? Must I reinstall PHP if I update PostgreSQL? Many thank's Matthias

[GENERAL] Get the OID after an insert

2000-07-24 Thread Matthias Teege
Moin, ist there any possibility to get the OID returned by an insert clause in a plpgsql function? Something like "select into intAuftragID id from auftrag ..." but only for insert. Bis dann Matthias

[GENERAL] Was an insert successfully?

2000-07-22 Thread Matthias Teege
Moin, how can I check if an insert was successfully in an plpgsql function? I use 6.5.1 under FreeBSD. Many thanks Matthias

Re: [GENERAL] Why isn't that null

2000-06-27 Thread Matthias Teege
what type vkp is, but if it's a string type then comparing it > against a numeric shouldn't work IMHO. no it isn't. It is a float8 type. I changed my program in that way that the query includes NULL instead of ''. Bis dann Matthias -- Matthias Teege -- [EMAIL PROTECTED] -- http://emugs.de make world not war PGP-Key auf Anfrage

[GENERAL] Why isn't that null

2000-06-27 Thread Matthias Teege
Moin, I have al small problem with ISNULL in a trigger function. My definition looks like: IF NEW.vkp ISNULL THEN select t1.las into i_kd from auftrag t1, aufpos t2 where t2.auftrag = t1.id; select get_vkp(i_kd, NEW.artikel) into f_vkp; NEW.vkp:=f_vkp; END IF; The following S

[GENERAL] group by problem

2000-06-15 Thread Matthias Teege
Moin, i have an sql query which works perfect under PostgrSQL 6.0 but under 6.5.1 it brings: ERROR: Illegal use of aggregates or non-group column in target list. select T1.id, T1.name, T1.zusatz, T1.kontakt, T1.strasse, T1.land, T1.plz, T1.ort, T1.telefax from debitoren T1, auftrag T2 where T2.

[GENERAL] Connect from a new psql to an old 6.0 postmaster

1999-12-15 Thread Matthias Teege
Moin, I have two database servers. One running postgresql 6.0 and the new one running 6.5.1. If I run "psql -h oldone -d oldone -u" from the newer server and input username and password psql says: Connection to database 'oldone' failed. Failed to authenticate client as Postgres user 'olduser' u

Re: [GENERAL] Connect PostgreSQL 6.0 Server with php4b

1999-10-13 Thread Matthias Teege
of > thing to connect to the DB: > $dbCon = pg_PConnect("host=postgres.server.address user=username > password=password dbname=database.to.connect.to"); > > > At 06:45 AM 10/9/99, Matthias Teege wrote: > >Moin, > > > >i have an PostgreSQL 6.0 Server wich I wou

[GENERAL] Connect PostgreSQL 6.0 Server with php4b

1999-10-09 Thread Matthias Teege
Moin, i have an PostgreSQL 6.0 Server wich I would query with php4b. I have problems to make the connection because off php gives me the following error message: Warning: Unable to connect to PostgresSQL server: Failed to authenticate client as Postgres user 'nobody' using authentication scheme