[GENERAL] Functions

1999-11-03 Thread Simon Drabble
Ok, following on from the previous stuff, I'm now trying to put that update into a function. How can I reference the passed parameter(s)? CREATE FUNCTION fn_fubar(int4) AS 'UPDATE foo SET bar = tmp.numb FROM tmp WHERE tmp.numb = $$' LANGUAGSE 'sql'; where $$ would be the parameter passed t

Re: [GENERAL] query seems too slow

1999-11-03 Thread Timothy H. Keitt
I have indices on both tables for route_id and year. I neglected to mention that I am running 6.5.2 and have passed -F to the backend. I'm starting to think that postgres is getting caught in a non-terminating loop. Any other suggestions? Tim amy cheng wrote: > seems that you should have ind

[GENERAL] PHP4 Review "Brand New" its HOT!

1999-11-03 Thread Scott Perkins
fm: Scott Perkins coordinator Atlanta PHP Database Driven Websites User Group hosted by "Linux General Store" Check it out at- http://www.techweb.com/se/directlink.cgi?NWC19991101S0014

[GENERAL] PHP4 Review "Brand New" Its Hot!

1999-11-03 Thread Scott Perkins
fm: Scott Perkins coordinator Atlanta PHP Database Driven Websites User Group hosted by "Linux General Store" Check it out at- http://www.techweb.com/se/directlink.cgi?NWC19991101S0014

[GENERAL] indexed regex select optimisation missing?

1999-11-03 Thread Stuart Woolford
Hello people. Please bear with me, as I think I may have found either a bug or 'missing optimisation feature' in postgresql 6.5.2.. I'm trying to use postgresql 6.5.2 to implement (amongst other things) a searchable word index, ie: I have a table called 'inv_word_i' which contains the fields

Re: [GENERAL] Functions

1999-11-03 Thread Andrew Perrin - Demography
I believe it's $1, $2, etc., so it would be: > CREATE FUNCTION fn_fubar(int4) AS > 'UPDATE foo SET bar = tmp.numb FROM tmp WHERE tmp.numb = $1' > LANGUAGSE 'sql'; - Andrew J. Perrin - [EMAIL PROTECTED] - NT/Unix Admin/Sup

Re: [GENERAL] Functions

1999-11-03 Thread Aaron J. Seigo
hi... > CREATE FUNCTION fn_fubar(int4) AS > 'UPDATE foo SET bar = tmp.numb FROM tmp WHERE tmp.numb = $$' > LANGUAGSE 'sql'; i hate $1, $2 personally.. they make my eyes cross eventually (esp. once you have 3 or 4 params.. ick) and they are hard to maintain in larger functions (what was th

Re: [GENERAL] Functions

1999-11-03 Thread Simon Drabble
On Wed, 3 Nov 1999, Aaron J. Seigo wrote: > hi... > > > CREATE FUNCTION fn_fubar(int4) AS > > 'UPDATE foo SET bar = tmp.numb FROM tmp WHERE tmp.numb = $$' > > LANGUAGSE 'sql'; > > i hate $1, $2 personally.. they make my eyes cross eventually (esp. once you > have 3 or 4 params.. ick) and

Re: [GENERAL] Functions

1999-11-03 Thread Simon Drabble
On Wed, 3 Nov 1999, Andrew Perrin - Demography wrote: > I believe it's $1, $2, etc., so it would be: Hmmm...then I'm doing something else wrong, cos I'd tried that.. Oh well, thanks for the info. Simon. > > > CREATE FUNCTION fn_fubar(int4) AS > > 'UPDATE foo SET bar = tmp.numb FROM tmp

[GENERAL] 6.5 connection time: too slow (?)

1999-11-03 Thread Robert
Hi, I'm finally about to upgrade our prehistoric 6.1 to 6.5.2 and took few hours to do some highly unscientific (Perl/DBI) benchmarking just to see the difference... I was quite shocked when I found out that PG6.1 (on Linux 2.0.34, loaded K6/166 server) was consistently three times faster when c

Re: [GENERAL] 6.5 connection time: too slow (?)

1999-11-03 Thread Bruce Momjian
[Charset iso-8859-2 unsupported, filtering to ASCII...] > Hi, > > I'm finally about to upgrade our prehistoric 6.1 to 6.5.2 and took few > hours to do some highly unscientific (Perl/DBI) benchmarking just to see > the difference... I was quite shocked when I found out that PG6.1 (on > Linux 2.0.

[GENERAL] Plpgsql qestion

1999-11-03 Thread Yury Don
Hi All. Is it possible to create function (preferably in plpgsql) which gets table name and field name as an arguments and does select something from this table? Something like CREATE FUNCTION "ft" (text, text) RETURNS int4 AS ' declare res int4; begin select max($2

Re: [GENERAL] indexed regex select optimisation missing?

1999-11-03 Thread Gene Selkov, Jr.
> select key from inv_word_i where word='whatever' order by count desc ; > > and this is fast, however, if I use: > > select key from inv_word_i where word~'^whatever.*' order by count desc ; > > it is very slow. Did you try '^whatever' instead of '^whatever.*'? Based on common sense, the form

Re: [GENERAL] users in Postgresql

1999-11-03 Thread postgres
>> The contents of the pg_shadow table are written through to a file on disk >> called pg_pwd, so all the backends can easily access it. However, this >> write through is not automatic. The create user and alter user commands >> take care of that, but if you update pg_shadow directly, your changes

[GENERAL] ANNOUNCE UdmSearch-2.1.6

1999-11-03 Thread Alexander Barkov
ANNOUNCING: UdmSearch Version 2.1.6 Full featured web search engine WHAT IT IS: UdmSearch is free SQL based full featured web search engine software. You can use UdmSearch to build search engine over HTTP, FTP, NTTP servers as well as over local files. It supports MySQL/Postg