Re: [SQL] Help with Procedures in pgsql

2000-11-30 Thread Robert B. Easter
On Monday 27 November 2000 15:01, Nelio Alves Pereira Filho wrote: > I have the folowing procedure in PL/pgsql: > > CREATE FUNCTION set_counter () RETURNS INT AS ' > DECLARE > nivel_rec record; > new_count integer; I always used the syntax like: nivel_rec nivel%ROWTYPE; Not

Re: [HACKERS] Re: [SQL] Rules with Conditions: Bug, or Misunderstanding

2000-11-30 Thread Tom Lane
Mark Hollomon <[EMAIL PROTECTED]> writes: > On Wednesday 29 November 2000 19:42, Tom Lane wrote: >> Hm. Perhaps the "cannot update view" test is too strict --- it's not >> bright enough to realize that the two rules together cover all cases, >> so it complains that you *might* be trying to update

[SQL] Help with Procedures in pgsql

2000-11-30 Thread Nelio Alves Pereira Filho
I have the folowing procedure in PL/pgsql: CREATE FUNCTION set_counter () RETURNS INT AS ' DECLARE nivel_rec record; new_count integer; BEGIN UPDATE nivel SET count=-2; FOR nivel_rec IN SELECT * FROM nivel LOOP new_count := set_counter_row (nivel_

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

2000-11-30 Thread Folke Ashberg
Hi! I think you have installed GET , so use in your cronab GET http://localhost/report_for_my_boss/create.php |mail -s "Hello Boss" [EMAIL PROTECTED] if you miss get try it with lynx: lynx -source -dump http://localhost/.. |mail regards Folke -- Folke Ashberg Stage Internet Services Gm

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

2000-11-30 Thread Jason
> 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 necessary. So, is it possible to > call '

Re: [HACKERS] Re: [SQL] Rules with Conditions: Bug, or Misunderstanding

2000-11-30 Thread Mark Hollomon
On Wednesday 29 November 2000 19:42, Tom Lane wrote: > > Hm. Perhaps the "cannot update view" test is too strict --- it's not > bright enough to realize that the two rules together cover all cases, > so it complains that you *might* be trying to update the view. As the > code stands, you must pr

[SQL] eject

2000-11-30 Thread ±è°­¿í
eject --MIME Multi-part separator--

Re: [SQL] String function page incorrect?

2000-11-30 Thread Roberto Mello
Jonathan Ellis wrote: > > I'm trying to find the correct function that returns the location of a > substring within a string. Looking at > http://www.postgresql.org/docs/user/x2731.htm, it gives the Function name as > "textpos" but in the Example column it uses "position". But neither one > wor

Re: [SQL] String function page incorrect?

2000-11-30 Thread Tom Lane
"Jonathan Ellis" <[EMAIL PROTECTED]> writes: > I'm trying to find the correct function that returns the location of a > substring within a string. Looking at > http://www.postgresql.org/docs/user/x2731.htm, it gives the Function name as > "textpos" but in the Example column it uses "position". B

Re: [SQL] I get an error with Foreign Keys

2000-11-30 Thread Stephan Szabo
On Thu, 30 Nov 2000, Brian Powell wrote: > I have around 40 tables defined, many relying on data in others so I have > foreign key constraints. However, whenever I try to delete from any table, > I get: > > ERROR: SPI_execp() failed in RI_FKey_cascade_del() > > What generates this? I need a

[SQL] I get an error with Foreign Keys

2000-11-30 Thread Brian Powell
I have around 40 tables defined, many relying on data in others so I have foreign key constraints. However, whenever I try to delete from any table, I get: ERROR: SPI_execp() failed in RI_FKey_cascade_del() What generates this? I need assistance in knowing where to begin. I checked again, an

[SQL] String function page incorrect?

2000-11-30 Thread Jonathan Ellis
I'm trying to find the correct function that returns the location of a substring within a string. Looking at http://www.postgresql.org/docs/user/x2731.htm, it gives the Function name as "textpos" but in the Example column it uses "position". But neither one works! bf2=# select position('high',

RE: [SQL] a script that queries database periodically

2000-11-30 Thread Wojciech Milek
Hi! You can compile PHP without HTTP server support then you get php exec 'shell' and: #!/usr/local/bin/php > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Bernie Huang > Sent: Monday, November 27, 2000 8:23 PM > To: PHP_DB; PHP_General; PGSQL-S

Re: [SQL] CREATE OR REPLACE VIEW

2000-11-30 Thread Palle Girgensohn
As a work around, you might get off telling php to ignore the errors, using error_reporting(); CREATE OR REPLACE cannot be found in the postgres docs, so I guess it is not there? /Palle Ricardo Dias Marques wrote: > > Hi all, > > Is CREATE OR REPLACE VIEW available in any way, in PostgreSQL 7

Re: [SQL] 7.0.3 BUG

2000-11-30 Thread Thomas Lockhart
> >> ERROR: copy: line 3910, Bad timestamp external representation > >> '2000-01-05 00:00:60.00+08' > >> Weird because those timestamps were generated by default now(). ... > Is there a work-around to this aside from manually changing the dump file? > Distribution Version: Linux Mandrake

[SQL] problem with keyword 'old'

2000-11-30 Thread Basilis Kladis
I am ussing Postgresql v. 6.3 in a RedHat Linux system. I try to create a rule to log the deletes on table 'filter' ussing the following: CREATE RULE log_delete_filter AS ON DELETE TO filter DO INSERT INTO log_activity (mod_table, mod_record, mod_type) VALUES ('filter', old.did, 'D');

[SQL] FW: Sharing Databases

2000-11-30 Thread Yoghini Thevarajah
Need help desperately. Is is possible at all to share tables between different databases. In SELECT query need to make join to two tables in different databases. Thanks a million in advance. Yoghini