Re: [SQL] Temp tables and functions

2006-10-11 Thread Mark R. Dingee
Thanks, Jim. I'll give it a try. On Tue, 2006-10-10 at 21:11 -0500, Jim C. Nasby wrote: > On Tue, Oct 10, 2006 at 03:21:36PM -0400, [EMAIL PROTECTED] wrote: > > Everyone, > > > > I've written a function (language = sql) which uses a temporary table to > > simplify the process; however, when I g

Re: [SQL] Given 02-01-2006 to 02-28-2006, output all days.

2006-02-20 Thread Mark R. Dingee
Pedro, Would something such as this suffice? Mark create function get_date_range(date, date) returns setof date as ' DECLARE     cur date; BEGIN     cur := $1;     while cur <= $2 LOOP          return next cur;          cur := cur + interval ''1 day'';     end LOOP;     return; END;' language

Re: [SQL] PGSQL encryption functions

2005-11-02 Thread Mark R. Dingee
find a backdoor into sensitive data. Thanks Mark On Wednesday 02 November 2005 01:59 pm, Bruno Wolff III wrote: > On Tue, Nov 01, 2005 at 17:00:50 -0500, > > "Mark R. Dingee" <[EMAIL PROTECTED]> wrote: > > Bruno, > > > > I use an authenticate() functio

Re: [SQL] PGSQL encryption functions

2005-11-02 Thread Mark R. Dingee
that the methodology is appropriate or that I'm being a bit paranoid? Thanks On Tuesday 01 November 2005 05:13 pm, Tom Lane wrote: > "Mark R. Dingee" <[EMAIL PROTECTED]> writes: > > md5 works, but I've been able to > > brute-force crack it very

Re: [SQL] PGSQL encryption functions

2005-11-01 Thread Mark R. Dingee
ing for an alternative. Any thoughts would be greatly appreciated. Thanks, Mark On Tuesday 01 November 2005 04:28 pm, Bruno Wolff III wrote: > On Tue, Nov 01, 2005 at 14:38:05 -0500, > > "Mark R. Dingee" <[EMAIL PROTECTED]> wrote: > > Everyone, > > > >

Re: [SQL] PGSQL encryption functions

2005-11-01 Thread Mark R. Dingee
I'll check it out. Thanks, Josh On Tuesday 01 November 2005 02:49 pm, Josh Berkus wrote: > Mark, > > > I'm in need of a one-way pgsql script that will take a plain-text string > > and return an ecrypted string (preferably 32 character) . I've been > > using md5('string'), but I'm concerned it's

[SQL] PGSQL encryption functions

2005-11-01 Thread Mark R. Dingee
Everyone, I'm in need of a one-way pgsql script that will take a plain-text string and return an ecrypted string (preferably 32 character) . I've been using md5('string'), but I'm concerned it's too weak for my needs. Does anyone have any recommendations? Thanks, Mark

Re: [SQL] Can EXCEPT Be Used for To Solve This Problem?

2005-08-25 Thread Mark R. Dingee
you can also do select ... order by update_time desc offset 1 limit 1 On Thursday 25 August 2005 10:47 am, Vivek Khera wrote: > On Aug 24, 2005, at 4:47 PM, Lane Van Ingen wrote: > > I want to select 2nd oldest transaction from foo (transaction 3). The > > solution below > > works, but I think t

[SQL] Multi-column returns from pgsql

2005-07-22 Thread Mark R. Dingee
Hi Everyone, Does anyone know if/how it's possible to return multi-column sets from a pgsql function? Right now I'm using something like the following as a work around CREATE OR REPLACE FUNCTION my_func() returns SETOF TEXT AS ' DECLARE rec record; BEGIN FOR rec IN SELECT txt1, txt2 FRO