Re: [SQL] Returning a set of dates

2011-06-10 Thread Samuel Gendler
On Fri, Jun 10, 2011 at 9:28 PM, C. Bensend wrote: > SELECT next_bill_date( '2011-01-01', '1 month', '4 months' ); > > > .. I expect the following result set: > > > next_bill_date > > > 2011-07-01 > 2011-08-01 > 2011-09-01 > 2011-10-01 > > > http://www.postgresql.org/docs/8.4/i

[SQL] Returning a set of dates

2011-06-10 Thread C. Bensend
Hey folks, I am still slogging away on my pet project, and I'm giving up - I need help from the experts to try to get this function working like I want it to. I have a very basic function, thanks to you guys a few months ago: CREATE OR REPLACE FUNCTION public.next_bill_date(d date, perio

[SQL] ANY for Array value check

2011-06-10 Thread Emi Lu
Good morning, String array compare command, I forgot how to do it. E.g., create table z_drop(id varchar[]); insert into z_drop values('{"a1", "a2", "b1", "b2", "b3"}'); I'd like to do: select * from z_drop where id = any('a1', 'b1'); What is the command? Thanks a lot! Emi -- Sent via pgsq