[SQL] how to call a function with row-type arg

2003-09-11 Thread sad
hi how to call a function with a row_type arg ?? that is the question CREATE FUNCTION foo(tablename) returns int . SELECT foo ( ??? ); ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [SQL] How do I replace select ... into commands?

2003-09-11 Thread Richard Sydney-Smith
Thanks that fixed it. the more I use it the happier I get with postgresql. Best Regards Richard - Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> To: "Richard Sydney-Smith" <[EMAIL PROTECTED]> Cc: "Stephan Szabo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, September

Re: [SQL] How do I replace select ... into commands?

2003-09-11 Thread Tom Lane
"Richard Sydney-Smith" <[EMAIL PROTECTED]> writes: > execute ''select max('' || seq_fld || '') into mx from '' || tbl; You can't use INTO in an EXECUTE'd select (basically because the string to be executed is not processed by plpgsql at all, merely sent down to the SQL engine, which does not

Re: [SQL] How do I replace select ... into commands?

2003-09-11 Thread Richard Sydney-Smith
Stephen replied : > Something like the above should work, what's the exact function and error > message and what version are you using? > > thanks Stephen. Exact function definition follows: PG Version is 7.3.1 on Windows 2000 This procedure allocates unique record number to a number of tables.

Re: [SQL] How do I replace select ... into commands?

2003-09-11 Thread Stephan Szabo
On Fri, 12 Sep 2003, Richard Sydney-Smith wrote: > I have a number of sybase procedures in which I use something like > > declare > mx : integer; > begin > select max(field) from table into mx; > return mx; > end; > > Postgresql is telling me that select...into has not been implemented > yet. what

[SQL] How do I replace select ... into commands?

2003-09-11 Thread Richard Sydney-Smith
I have a number of sybase procedures in which I use something like   declare mx : integer; begin select max(field) from table into mx; return mx; end;   Postgresql is telling me that select...into has not been implemented yet. what is the best way to perform this action with the commands offe

Re: [SQL] MD5 function is not available ?

2003-09-11 Thread Tomasz Myrta
Hey, I've searched for MD5 crypting function in PG, but I did not find it. Anyone knows how to implement this function in PG ? Best wishes, Marek L. Use contrib/pgcrypto Regards, Tomasz Myrta ---(end of broadcast)--- TIP 3: if posting/reading through

Re: [SQL] [GENERAL] MD5 function is not available ?

2003-09-11 Thread Richard Huxton
On Thursday 11 September 2003 09:38, Marek Lewczuk wrote: > Hey, > I've searched for MD5 crypting function in PG, but I did not find it. > Anyone knows how to implement this function in PG ? Is it not in the contrib/pgcrypto directory in the source distro? Or, check the contrib package of your bi

[SQL] MD5 function is not available ?

2003-09-11 Thread Marek Lewczuk
Hey, I've searched for MD5 crypting function in PG, but I did not find it. Anyone knows how to implement this function in PG ? Best wishes, Marek L. ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command