Re: [SQL] Reverse Index ... how to ...

2006-04-05 Thread Marc G. Fournier
On Wed, 5 Apr 2006, Tom Lane wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: I'm still searching through Google and whatnot, but not finding anything off the bat ... is there some way of creating a 'REVERSE INDEX' on a column in a table? For instance,

[SQL] Ignore, test of an alias

2006-04-29 Thread Marc G. Fournier
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: [EMAIL PROTECTED] Yahoo!: yscrappy ICQ: 7615664 ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your

[SQL] timestamp query doesn't use an index ...

2006-05-20 Thread Marc G. Fournier
<= to just =, the index is used, but that is expected ... Is there some other way I can either write above query *or* do an index, such that it will use the index? thanks ... Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email . [EMAIL PROTECTE

Re: [SQL] timestamp query doesn't use an index ...

2006-05-20 Thread Marc G. Fournier
On Sun, 21 May 2006, Michael Glaesemann wrote: On May 21, 2006, at 10:42 , Marc G. Fournier wrote: -> Seq Scan on page_schedule ps2 (cost=0.00..2364.95 rows=33110 width=16) (actual time=0.021..623.363 rows=94798 loops=1) I don't know about rewriting the query, but it appe

Re: [SQL] timestamp query doesn't use an index ...

2006-05-21 Thread Marc G. Fournier
On Sun, 21 May 2006, Tom Lane wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: I'm trying to figure out some way to speed up the following query: select ps2.page_id, ps2.template_component_id, max(ps2.start_time) from page_schedule ps2 where ps2.st

[SQL] DBD::Pg ... how would I format this prepare?

2006-07-26 Thread Marc G. Fournier
I need to do: NOW() + '2 day'::interval where 2 is a variable ... if I do: NOW() + '? day'::interval it, of course, takes the ? as a literal ... so is there some way I can do this such that I can do the placeholder? Thx Marc G. Fournier Hub.Org Netwo

Re: [SQL] DBD::Pg ... how would I format this prepare?

2006-07-26 Thread Marc G. Fournier
On Wed, 26 Jul 2006, Jim Buttafuoco wrote: try now() + (? || ' day')::interval Perfect ... had thought of that, but put my ) after ::interval instead of before ;( Thx ... -- Original Message --- From: "Marc G. Fournier" <[EMAIL PROTECTED]> To

[SQL] Way to reverse ordering of an IP ... ?

2006-09-05 Thread Marc G. Fournier
ight allow this, but can't seem to figure out a proper format for it ;( If I have to write a function to do it, fine ... just wanted to make sure I wasn't missing something first ... Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Emai

[SQL] Recursive pl/pgsql function ...

2006-10-15 Thread Marc G. Fournier
12) from company_details; ERROR: control reached end of function without RETURN CONTEXT: PL/pgSQL function "get_next_billing_date" Something I've written wrong in the function, or just not something that is doable? Thanks ... Marc G. Fournier Hub.Org Networking Services (http://www.h

Re: [SQL] Recursive pl/pgsql function ...

2006-10-15 Thread Marc G. Fournier
--On Sunday, October 15, 2006 23:27:34 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: More then one Record: # select get_next_billing_date(activated, 12) from company_details; ERROR: control reached end of function without RET

Re: [SQL] get_next_billing_date() ...

2006-10-20 Thread Marc G. Fournier
--On Monday, October 16, 2006 09:53:56 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: In fact, more info to work with ... it likes the date, just not when I use it as part of a SELECT query of a table ... I suspect it's n

[SQL] Problem with joins

2000-07-05 Thread Jean-Marc Libs
gant way of doing it: a solution or pointers to relevant online litterature would be welcome. Thanks, Jean-Marc Libs -- Jean-Marc Libs, ingénieur INTERNET/INTRANET Actimage 1 rue St Leon F-67000 STRASBOURGhttp://www.actimage.net Professionnel : [EMAIL PROTECTED] Lieu de travail : [EMAIL PROTECTED]

Re: Antw: [SQL] Problem with joins

2000-07-05 Thread Jean-Marc Libs
On Wed, 5 Jul 2000, Gerhard Dieringer wrote: > Jean-Marc Libs wrote: > >... > >I have also tried: > >select source_name,data_value from source,data where data_source_id=source_id union >select source_name,source_id,NULL from source,data > > >This is a bit bet

[SQL] SERIAL type does not generate new ID ?

2000-07-10 Thread Jean-Marc Libs
(film_id)+1,'$film_country_id','$film_country_id2','$film_country_id3','$film_country_id4','$film_prod_year','$film_ec_certif','$film_ce_certif','$film_eur_support','$film_media_support','$film_provisoire')"

Re: [SQL] SERIAL type does not generate new ID ?

2000-07-12 Thread Jean-Marc Libs
On Sat, 10 Jun 2000, Jean-Marc Libs wrote: Hi all, > I don't really understand what happens, so I put context, then problem: > > 1/ Context > -- > I have this table: > > CREATE TABLE film ( > film_id SERIAL PRIMARY KEY, snip > ) > ; > SELECT

<    1   2