Jeff Ross <[EMAIL PROTECTED]> writes:
> To debug this I've extracted the code into its own function:
> CREATE FUNCTION gen_password() RETURNS text AS $$
> DECLARE
> password text;
> chars := 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
> BEGIN
You forgot to give a type fo
On Sun, 18 Feb 2007, Jeff Ross wrote:
> Tom Lane wrote:
> >
> > Since ceil() produces float8 which does not implicitly cast to int,
> > this call has probably never done what you thought --- AFAICS it will
> > cast all the arguments to text and invoke substring(text,text,text)
> > which treats its
Tom Lane wrote:
Thanks for the reply, Tom.
Jeff Ross <[EMAIL PROTECTED]> writes:
This used to work before my upgrade to 8.2.1.
Which version were you using before?
8.1.x
The error the function now throws is:
ERROR: invalid regular expression: invalid backreference
nu
Jeff Ross <[EMAIL PROTECTED]> writes:
> This used to work before my upgrade to 8.2.1.
Which version were you using before?
> The error the function now throws is:
> ERROR: invalid regular expression: invalid backreference
> number
> 2007-02-15 15:32:57.264729500 CONTEXT: SQL function
> "subs
I've got a function that generates usernames and passwords on insert if
they haven't yet been set. The code block is:
-- create a new username for new people
IF (LENGTH(COALESCE(new_pp_username, '')) = 0) THEN
LOOP
gen_pp_username := LOWER(SUBSTRING(new_pp_first_name from 1 for
2