Re: [SQL] \copy multiline

2012-11-29 Thread Sebastian P . Luque
On Thu, 29 Nov 2012 10:33:37 +0100, Guillaume Lelarge wrote: > On Wed, 2012-11-28 at 21:21 -0600, Seb wrote: >> Hi, >> I use \copy to output tables into CSV files: >> \copy (SELECT ...) TO 'a.csv' CSV >> but for long and complex SELECT statements, it is cumbersome and >> confusing to write eve

Re: [SQL] \copy multiline

2012-11-29 Thread Sebastian P . Luque
On Thu, 29 Nov 2012 08:01:31 +, Ben Morrow wrote: > Quoth splu...@gmail.com (Seb): >> I use \copy to output tables into CSV files: >> \copy (SELECT ...) TO 'a.csv' CSV >> but for long and complex SELECT statements, it is cumbersome and >> confusing to write everything in a single line, and

[SQL] Planner behaviour

2009-10-21 Thread Sebastian
#x27;moc.niamodemosA'::text)) (6 rows) With LIMIT it takes endless, without only a fraction of a second. PS: with LIMIT 100 the behavior switches to the same behavior as without limit Thank you very much Sebastian -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] subquery question

2009-03-12 Thread Sebastian Böhm
e) I found various ways to do this via unions or joins, but none of them seem efficient, what is the best way to do that ? thank you very much Sebastian

[SQL] Downgrade database and problem with sequences

2008-12-19 Thread Sebastian Rychter
returns nothing. Is there any way to dump my database and then restore it on a previous version and keep using that pg_get_serial_sequence() function ? Thanks, Sebastian -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http

Re: [SQL] Query optimizing

2008-11-10 Thread Sebastian Ritter
Cheers for you help guys. Having filtered and then joined has substantially reduced the run time. Much obliged, Sebastian On Mon, Nov 10, 2008 at 12:32 PM, Richard Huxton <[EMAIL PROTECTED]> wrote: > Sebastian Ritter wrote: > > Could it have something > > to do with

Re: [SQL] Query optimizing

2008-11-10 Thread Sebastian Ritter
joining them together as opposed to joining first and then filtering? Does the opitmiser not choose the best course of action either way yielding the same result? This might be a stupid question. Sebastian On Mon, Nov 10, 2008 at 12:03 PM, Richard Huxton <[EMAIL PROTECTED]> wrote: >

Re: [SQL] Query optimizing

2008-11-10 Thread Sebastian Ritter
hanks for you help, Sebastian On Mon, Nov 10, 2008 at 11:48 AM, Helio Campos Mello de Andrade < [EMAIL PROTECTED]> wrote: > Hi Sebastian, > > - First of all i think there is an open-parenthesis missing in the query > V2. > Maybe in the V2 version you cold restrict the results

[SQL] Query optimizing

2008-11-10 Thread Sebastian Ritter
d. Any help would be much appreciated. Kind regards, Sebastian

Re: [SQL] reliable lock inside stored procedure (SOLVED)

2008-11-03 Thread Sebastian Böhm
Hi Richard, thank you for your answer! Am 03.11.2008 um 12:06 schrieb Richard Huxton: Sebastian Böhm wrote: Hi, I have a stored procedure and I need a SHARE ROW EXCLUSIVE lock in this procedure (otherwise data will get corrupted). OK. PostgreSQL doesn't have "stored proced

[SQL] reliable lock inside stored procedure

2008-11-03 Thread Sebastian Böhm
only be established inside transactions, but does it fail fatal enough so that the procedure getss aborted? (more fatal than LOCK does?) thank you very much. /sebastian -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http

Re: [SQL] Extremely Low performance with ODBC

2008-05-28 Thread Sebastian Rychter
quot;Richard Broersma" <[EMAIL PROTECTED]> >To: "Sebastian Rychter" <[EMAIL PROTECTED]> >Cc: pgsql-sql@postgresql.org >Subject: Re: Extremely Low performance with ODBC >Message-ID: ><[EMAIL PROTECTED]> > >On Mon, May 26, 2008 at 9:34 PM, Sebas

Re: [SQL] Extremely Low performance with ODBC

2008-05-26 Thread Sebastian Rychter
thing like that before. Thanks once again, Sebastian -Mensaje original- De: Richard Broersma [mailto:[EMAIL PROTECTED] Enviado el: Martes, 27 de Mayo de 2008 01:14 a.m. Para: Sebastian Rychter CC: pgsql-sql@postgresql.org Asunto: Re: [SQL] Extremely Low performance with ODBC On Mon, M

Re: [SQL] Extremely Low performance with ODBC

2008-05-26 Thread Sebastian Rychter
Title_ID" AND "Patient"."City_ID"=PatientCity."City_ID" AND "Patient"."Province_ID"=PatientProvince."Province_ID" AND "Patient"."Country_ID"=PatientCountry.

Re: [SQL] Extremely Low performance with ODBC

2008-05-23 Thread Sebastian Rychter
ows=1 loops=1) Hash Cond: ("PatientDoctorProvince"."Province_ID" = "Patient"."DoctorProvince_ID") -> Seq Scan on "Province" "PatientDoctorProvince" (cost=0.00..1.78 rows=78 width=4) (actual time=0.005..0.150 rows=78 loops=1) ->

Re: [SQL] Extremely Low performance with ODBC

2008-05-23 Thread Sebastian Rychter
oins the query only takes 3 seconds (as with PgAdmin). I still can't understand if the problem resides on the ODBC driver, the Query Planner or it's just a mix of both. -Mensaje original- De: Richard Broersma [mailto:[EMAIL PROTECTED] Enviado el: Viernes, 23 de Mayo de 2008 01

[SQL] Extremely Low performance with ODBC

2008-05-22 Thread Sebastian Rychter
idea ? Thanks, Sebastian

Re: [SQL] Data layer migration from MSSQL

2008-02-21 Thread Sebastian Rychter
Select “order” from Table1 Thanks again. De: Medi Montaseri [mailto:[EMAIL PROTECTED] Enviado el: jueves, 21 de febrero de 2008 16:43 Para: Sebastian Rychter CC: pgsql-sql@postgresql.org Asunto: Re: [SQL] Data layer migration from MSSQL I think the grammer should help the parser to

[SQL] Data layer migration from MSSQL

2008-02-21 Thread Sebastian Rychter
nsitivity or at least determine that I am going to use certain reserved words as table fields (or any other possible solutions) ? Thanks, Sebastian

[SQL] PL/pgSQL question

2008-02-14 Thread Sebastian Ritter
|| | (1 row) This returns a null row. I am trying to make it behave such that it returns zero rows like a straight select. >select * from usertable where id =-1; id | col1 | col2 | col3| name | email ++-++ (0 rows) Is this possible in anyway? Regards, Sebastian

Re: [SQL] Was: fetch first rows of grouped data

2007-08-28 Thread Sebastian Ritter
(cities.id = x.city_id) I think that would work. Seb On 8/28/07, Sebastian Ritter <[EMAIL PROTECTED]> wrote: > > Hi There, > > You can do something like : > > SELECT * FROM cities c LEFT OUTER JOIN events e ON (c.id =e.city_id) ORDER > BY e.date DESC LIMIT 2 > &g

Re: [SQL] Database normalization

2007-08-28 Thread Sebastian Ritter
Thanks guys, Sebastian On 8/28/07, Bart Degryse <[EMAIL PROTECTED]> wrote: > > Im using Django as my Object relational Mapper so im pretty sure I > can not add a constraint such as ... > Then you should seriously consider changing your mapper. > > >>> "Seba

Re: [SQL] Database normalization

2007-08-28 Thread Sebastian Ritter
Hi, On 8/28/07, Andrew Sullivan <[EMAIL PROTECTED]> wrote: > > On Tue, Aug 28, 2007 at 03:37:22PM +0100, Sebastian Ritter wrote: > > Thanks for the information. > > > > Both tables would be exactly sames apart from the foreign key relation > to > > clients

Re: [SQL] Database normalization

2007-08-28 Thread Sebastian Ritter
be overlap between client_ids and service_ids. Cheers, Sebastian On 8/28/07, Erik Jones <[EMAIL PROTECTED]> wrote: > > On Aug 28, 2007, at 6:47 AM, Sebastian Ritter wrote: > > > Hello, > > > > I have a fairly basic question about database design where im not &g

Re: [SQL] Database normalization

2007-08-28 Thread Sebastian Ritter
terms of searching speed that is. Kindest regards. Sebastian On 8/28/07, Andrew Sullivan <[EMAIL PROTECTED]> wrote: > > On Tue, Aug 28, 2007 at 12:47:45PM +0100, Sebastian Ritter wrote: > > > The update/message format is exactly the same for both. Should I make > tw

Re: [SQL] Database normalization

2007-08-28 Thread Sebastian Ritter
ean? > > The major problem is simply relating the foreign key in the updates table > back to the correct entity, client or service. > > Regards, > Sebastian > >

[SQL] Postgres 8.1 sequences and 'CALL'-syntax

2006-04-27 Thread Schnabl, Sebastian
use sequences in conjunction with "call"-syntax?? Thx in advance __ Sebastian Schnabl  Qualitype AG  Quality Assurance Systems |Bioinformatics  Moritzburger Weg 67 | 01109 D

Re: [SQL] Problem with a Pettern Matching Check

2005-08-15 Thread Sebastian Siewior
ve 2 or 3 digits so I tried to save some space :) > And why are you storing numbers as a string, anyway? If you defined > the column as a numeric type, postgres will tell you if you try to > insert something non-numeric. Correct. I will not let the values to be used together with sum/avg/

[SQL] Problem with a Pettern Matching Check

2005-08-15 Thread Sebastian Siewior
;. For some reason, I'm unable to find out why, it also avoids things like '1' and '12'. Could someone please give me hint? :) I was trying this one on PostgreSQL 8.0.3 -- Regards Sebastian Siewior ---(end of broadcast)--

[SQL] Getting points from polygon

2004-08-15 Thread Sebastian Albrecht
].x FROM country ... Thanks in advance and best regards, Sebastian ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[SQL] invalid input syntax for integer: ""

2004-05-04 Thread Sebastian Tewes
. so mybe someone know a litte trick to save me ?? don't like to reformat 10MB datasource ...   thank's    Sebastian  

[SQL] start and end of the week

2002-09-26 Thread Sebastian N. Mayordomo
How do I get the start and end date of the present week? Is this possible? For example this week Start = Sept. 22 End = Sept. 28 Thank you very much. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[SQL] Load or Copy ??

2001-02-07 Thread Sebastian
D BY '|' LINES TERMINATED BY '\n'"); And for PostgreSQL: Regards, Sebastian

[SQL] Re: Search

2001-02-06 Thread Sebastian
Thank you!!! It works perfect !! Regards, Sebastian PM <[EMAIL PROTECTED]> schrieb in im Newsbeitrag: 95otrr$hjg$[EMAIL PROTECTED] > force lower case or use the non case-senstitive search e.g. > > lower(column) LIKE lower('%$suchbegriffe[$i]%') > > or > >

[SQL] Search

2001-02-06 Thread Sebastian --[ www.flashhilfe.de ]--
Hi I hope someone can help me My problem: I have make a search machine whit: LIKE '%$suchbegriffe[$i]%' but when I search Test - the search machine shows only entries whit Test. But not test or tESt. (sorry for my bad english) Regards, Sebastian