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

2006-07-31 Thread Mathieu Arnold
ch that I can do the placeholder? I think that ! is what you're looking for. -- Mathieu Arnold ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] ORDER BY CASE ...

2006-02-13 Thread Mathieu Arnold
+-le 13/02/2006 16:47 +0100, Mario Splivalo a dit : | On Mon, 2006-02-13 at 16:39 +0100, Mathieu Arnold wrote: |> | |> | I tought I'd get differently sorted data, since in the first query I |> | said 5=5, and in second I said 5=6. |> |> Well, no, in the first, the result o

Re: [SQL] ORDER BY CASE ...

2006-02-13 Thread Mathieu Arnold
uot; as value for the first, and "3" for the second query. -- Mathieu Arnold ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] multiple PK with a non UNIQUE field

2005-06-26 Thread Mathieu Arnold
) | ); You have to : CREATE TABLE appalto ( cod_op int not null, cod_com int not null, scadenza date not null, importoint not null, PRIMARY KEY (cod_op,cod_com), foreign key (cod_op,cod_com) references opere (cod_op,cod_com) ); -- Mathieu

Re: [SQL] date_trunc for 5 minutes intervals

2003-10-24 Thread Mathieu Arnold
achieve the desired outcome? maybe (date_part(epoch, field)::integer / 300 * 300)::timetamp for 5 minutes interval... -- Mathieu Arnold ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail

Re: [SQL] Password user postgres

2002-12-22 Thread Mathieu Arnold
I believe that on my 7.2 : cat /usr/local/pgsql/data/global/pg_pwd will tell you everything, the first field being the login and the seventh being the password. -- Mathieu Arnold ---(end of broadcast)--- TIP 3: if posting/reading through Us

[SQL] foreign key, on delete cascade...

2002-10-08 Thread Mathieu Arnold
ers" = TMP."tmp_reltriggers" FROM "tr" TMP WHERE "pg_class"."relname" = TMP."tmp_relname"; DROP TABLE "tr"; COMMIT TRANSACTION; Which was supposed to disable triggers on this table during the inserts. It was on 7.0.x I believe,

Re: [SQL] 7.3 schemas

2002-09-27 Thread Mathieu Arnold
se the schemas form JDBC, how is the connect-URL sopposed to be? > > Any links to docs on the new schema support are appreciated. I believe that : http://developer.postgresql.org/docs/postgres/ddl-schemas.html is what you want :) -- Mathieu Arnold ---(end of broadca

Re: [SQL] Stripping white-space in SELECT statments

2002-09-19 Thread Mathieu Arnold
27; and why not select artnrgrpmtrln_1 from sr where substr(artnrgrpmtrln_1, 0, 9) = '201901 ' -- Mathieu Arnold ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] triggers and plpgsql question

2002-08-28 Thread Mathieu Arnold
--On mercredi 28 août 2002 08:42 +0200 Mathieu Arnold <[EMAIL PROTECTED]> wrote: > > > --On mardi 27 août 2002 15:38 -0700 Josh Berkus <[EMAIL PROTECTED]> wrote: > >> >> Mathieu, >> >>> The thing I need, is to be able to know what does

Re: [SQL] triggers and plpgsql question

2002-08-27 Thread Mathieu Arnold
ll have to write a function per table. I'll have a look at SPI (as I believe after a short readout of the doc, I'll need it). -- Mathieu Arnold ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[SQL] triggers and plpgsql question

2002-08-27 Thread Mathieu Arnold
id_||TG_RELNAME has been deleted END IF; END; The thing I need, is to be able to know what does NEW contains, and I have not found out any mean to do so. If it's not possible to do so, I'll write a function per table, but for the beauty of all this, I would have liked to do it the w

Re: [SQL] sql subqueries problem

2002-08-20 Thread Mathieu Arnold
_devise) where rr.date_paiement <= > f.date_creation and rr.id_client=f.id_client > group by rr.id_client) as remise > From facture f > ); > > give you something closer to what you want? that's exactly it, I guess that I was not twisted enough for that one :) --

Re: [SQL] sql subqueries problem

2002-08-19 Thread Mathieu Arnold
--On lundi 19 août 2002 09:45 -0700 Stephan Szabo <[EMAIL PROTECTED]> wrote: > > On Mon, 19 Aug 2002, Mathieu Arnold wrote: > >> Hi >> >> I have my accounting in a database, and I have a problem with subqueries, >> here is what I

[SQL] sql subqueries problem

2002-08-19 Thread Mathieu Arnold
d, so, I wanted to add something like : WHERE ff.date_creation <= f.date_creation in the first subselect, and WHERE rr.date_paiement <= f.date_creation in the second subselect, but I can't because postgresql does not seem to be able to do it. Any idea ? -- Mathieu Arnold ---

Re: [SQL] Select + min question

2002-06-23 Thread Mathieu Arnold
, if I perform the following > query, I get the following error: > > devrim=# SELECT b_date FROM test WHERE active='t' AND id=min(id) LIMIT 1; > ERROR: Aggregates not allowed in WHERE clause > > What should I do? ANy suggestions? I believe that :