[SQL] Damaged table "pg_access"

2000-11-27 Thread Jens Hartwig
Hello all, when I try to access the system-table "pg_class", I get the following error: zeda=# select * from pg_class; NOTICE: get_groname: group 1 not found pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally before or

Re: [PHP] Re: [PHP-DB] Re: [SQL] a script that queries database periodically

2000-11-27 Thread Joe Stump
> Because PHP is supposed to solve web development problems. And this is > one of them. It's very useful. Why solve one that is already solved? PHP isn't here to reinvent the wheel - get crontab and quit crying. --Joe > > -Roberto > -- > Computer Science Uta

Re: [PHP-DB] Re: [SQL] a script that queries database periodically

2000-11-27 Thread Roberto Mello
Jason wrote: > > aolserver is a web/application server. PHP is a server-side scripting > language. Why exactly *should* it have a job scheduler? > > Some (such as myself) might also ask why should a web server have a job > scheduler, but that's a thread for a different list :) Because

Re: Re(2): Re(2): [SQL] 7.0.3 BUG

2000-11-27 Thread Alain Toussaint
> >That's a rather interesting version report, seeing as how there is > >no such gcc release as 2.95.3 according to the GCC project's homepage. quick tidbit,there's no gcc 2.95.3 from GCC's but there's is one from Pentium gcc (see ),the pentium gcc group in this case used g

Re: [SQL] a script that queries database periodically

2000-11-27 Thread Mathijs Brands
On Mon, Nov 27, 2000 at 10:44:39PM +0100, Poul L. Christiansen allegedly wrote: > I have a bash script in crontab with the following line: > "lynx -dump > http://127.0.0.1/postgres/myPhpFile.php>${currentDir}php_output.html" > > You can also just put that line directly into crontab. > > Poul L.

Re: [SQL] a script that queries database periodically

2000-11-27 Thread Roberto Mello
"Poul L. Christiansen" wrote: > > I was thinking of writing up a PHP script and put into crontab, which is > > somehow easier than a shell script, but PHP is an apache module, so I > > cannot execute PHP under crontab (it has to be executed in a browser > > right?). I guess a shell script is nec

Re: [SQL] a script that queries database periodically

2000-11-27 Thread Poul L. Christiansen
I have a bash script in crontab with the following line: "lynx -dump http://127.0.0.1/postgres/myPhpFile.php>${currentDir}php_output.html" You can also just put that line directly into crontab. Poul L. Christiansen Bernie Huang wrote: > Hello, > > My boss wants me to write a script that will

Re: [SQL] count( distinct x )

2000-11-27 Thread Tom Lane
Anthony <[EMAIL PROTECTED]> writes: > I think it's time to get Mr. Sysadmin to upgrade to v7 ;) That's a good idea on many grounds, not only this one ;-) However, if you really need a 6.5.* solution, you could do SELECT DISTINCT foo INTO TEMP TABLE mytemp FROM ... SELECT COUNT(*

Re: [SQL] a script that queries database periodically

2000-11-27 Thread Serge Canizares
Why not use perl with DBI? If you know php, perl is just as easy. Bernie Huang wrote: > I was thinking of writing up a PHP script and put into crontab, which is > somehow easier than a shell script, but PHP is an apache module, so I > cannot execute PHP under crontab (it has to be executed in

Re: [SQL] a script that queries database periodically

2000-11-27 Thread Mathijs Brands
On Mon, Nov 27, 2000 at 11:22:45AM -0800, Bernie Huang allegedly wrote: > Hello, > > My boss wants me to write a script that will send a email report to him > monthly with the result of database queries. > > For example, an email would be like: > > Monthly report > +--+-+---

Re: [SQL] a script that queries database periodically

2000-11-27 Thread Brett W. McCoy
On Mon, 27 Nov 2000, Bernie Huang wrote: > I was thinking of writing up a PHP script and put into crontab, which is > somehow easier than a shell script, but PHP is an apache module, so I > cannot execute PHP under crontab (it has to be executed in a browser > right?). I guess a shell script is

Re: [SQL] count( distinct x )

2000-11-27 Thread Anthony
Kenn Thompson wrote: > Ok- messy, but it works > > CREATE VIEW testview AS > select distinct area from areapostcode where postcode like 'BS1%'; > > SELECT COUNT(*) FROM testview; > > kenn > > >>> Anthony <[EMAIL PROTECTED]> 11/27/00 01:07PM >>> > Kenn Thompson wrote: > > > What about > > > >

Re: [SQL] removing a DB??

2000-11-27 Thread Mathijs Brands
On Mon, Nov 27, 2000 at 12:34:38PM +0100, Jens Hartwig allegedly wrote: > Hello Bruno, > > you get a list of all available databases by issuing a query on > "pg_database": > > select * from pg_database; > > What do you mean with "internal DB's"? > > Regards, Jens You can also get a list of

[SQL] a script that queries database periodically

2000-11-27 Thread Bernie Huang
Hello, My boss wants me to write a script that will send a email report to him monthly with the result of database queries. For example, an email would be like: Monthly report +--+-+---+ | Vehicles | Mileage | # of Signouts | +--+-+---+ |

Re: [SQL] count( distinct x )

2000-11-27 Thread Anthony
Najm Hashmi wrote: > Anthony wrote: > > > Michael Fork wrote: > > > > > I think you want > > > > > > SELECT count(distinct(area)) FROM areapostcode WHERE postcode LIKE 'BS1%' > > > > > > > psql still not happy :( > > > > SELECT count(distinct(area)) FROM areapostcode WHERE postcode LIKE 'BS1%'; >

Re: [SQL] count( distinct x )

2000-11-27 Thread Anthony
Tom Lane wrote: > Anthony <[EMAIL PROTECTED]> writes: > > select count( distinct area ) from areapostcode where postcode like > > 'BS1%' > > the above statement fails with > > ERROR: parser: parse error at or near "distinct" > > What Postgres version are you running? Support for count(d

Re: [SQL] count( distinct x )

2000-11-27 Thread Tom Lane
Anthony <[EMAIL PROTECTED]> writes: > select count( distinct area ) from areapostcode where postcode like > 'BS1%' > the above statement fails with > ERROR: parser: parse error at or near "distinct" What Postgres version are you running? Support for count(distinct foo) was added in 7.0,

Re: [SQL] count( distinct x )

2000-11-27 Thread Anthony
Kenn Thompson wrote: > What about > > select count(*) from (select distinct area from areapostcode where postcode like >'BS1%') > select count(*) from (select distinct area from areapostcode where postcode like 'BS1%'); ERROR: parser: parse error at or near "select" Thanks, any more ideas? >

Re: [SQL] count( distinct x )

2000-11-27 Thread Anthony
Michael Fork wrote: > I think you want > > SELECT count(distinct(area)) FROM areapostcode WHERE postcode LIKE 'BS1%' > psql still not happy :( SELECT count(distinct(area)) FROM areapostcode WHERE postcode LIKE 'BS1%'; ERROR: parser: parse error at or near "distinct" Thanks, Bap. > > Michael

Re: [SQL] count( distinct x )

2000-11-27 Thread Michael Fork
I think you want SELECT count(distinct(area)) FROM areapostcode WHERE postcode LIKE 'BS1%' Michael Fork - CCNA - MCP - A+ Network Support - Toledo Internet Access - Toledo Ohio On Mon, 27 Nov 2000, Anthony wrote: > Apologies if this has been asked b4, but got this result when > attemplting to

Re: [SQL] count( distinct x )

2000-11-27 Thread Anthony
Jose Rodrigo Fernandez Menegazzo wrote: > > The problem I have is with this statement: > > > > select count( distinct area ) from areapostcode where postcode like > > 'BS1%' > > > > the above statement fails with > > ERROR: parser: parse error at or near "distinct" > > > > I am not the g

Re: [SQL] count( distinct x )

2000-11-27 Thread Jose Rodrigo Fernandez Menegazzo
> The problem I have is with this statement: > > select count( distinct area ) from areapostcode where postcode like > 'BS1%' > > the above statement fails with > ERROR: parser: parse error at or near "distinct" > > I am not the greatest when it comes to SQL, but the pgsql docs implied >

[SQL] count( distinct x )

2000-11-27 Thread Anthony
Apologies if this has been asked b4, but got this result when attemplting to search the archives on the website Not Found The requested URL /mhonarc/pgsql-sql/search.cgi was not found on this server. Apache/1.3.12 Server at postgresql.rmplc.co.uk Port 80 The problem I have is with this statem

Re: [SQL] Bad performing DELETE

2000-11-27 Thread Tom Lane
=?iso-8859-1?Q?Hans=2DJ=FCrgen=20Sch=F6nig?= <[EMAIL PROTECTED]> writes: > I have two tables: t_haus is about 1400 row and t_host has 364000 entries. > Both tables are indexed on edvnr. I did a vacuum on my db and all indices > are rebuild. > I want to delete all Entries in t_haus where a row can

Re: [SQL] ERROR: copyObject: don't know how to copy 611

2000-11-27 Thread Tom Lane
"Shane McEneaney" <[EMAIL PROTECTED]> writes: > I get the error ERROR: copyObject: don't know how to copy 611 > when I try to run the following procedure. The create table is causing > the problem. > CREATE FUNCTION "my_func" (int8) RETURNS int8 AS ' > declare >v_my_var ALIAS FOR $1; > beg

[SQL] Bad performing DELETE

2000-11-27 Thread Hans-Jürgen Schönig
> I have two tables: t_haus is about 1400 row and t_host has 364000 entries. Both tables are indexed on edvnr. I did a vacuum on my db and all indices are rebuild. I want to delete all Entries in t_haus where a row can be found in t_host. When using "delete from t_haus where t_haus.edvnr=t_host.e

Re: [SQL] removing a DB??

2000-11-27 Thread Jens Hartwig
Hello Bruno, you get a list of all available databases by issuing a query on "pg_database": select * from pg_database; What do you mean with "internal DB's"? Regards, Jens Bruno Boettcher schrieb: > > hello, > > i have a nice command to create a db 'createdb', but hows when you want > to

[SQL] removing a DB??

2000-11-27 Thread Bruno Boettcher
hello, i have a nice command to create a db 'createdb', but hows when you want to get rid of a DB?? searched for a removedb script Took me some time to read through the man page, find out how the command actually works, look up the SQL commands and find out that there's also a DROP DATABASE

[SQL] ERROR: copyObject: don't know how to copy 611

2000-11-27 Thread Shane McEneaney
I get the error ERROR: copyObject: don't know how to copy 611 when I try to run the following procedure. The create table is causing the problem. CREATE FUNCTION "my_func" (int8) RETURNS int8 AS ' declare v_my_var ALIAS FOR $1; begin create table my_table(my_id int); end; ' LANGUAGE 'p