Re: [SQL] Question on OUTER JOINS.

2003-06-27 Thread Ludwig Lim
--- Tom Lane <[EMAIL PROTECTED]> wrote: > Ludwig Lim <[EMAIL PROTECTED]> writes: > > 1) Is the ON clause of an OUTER JOIN always > > evaluated first before the WHERE clause? > > No; the planner will do whatever it thinks is the > most efficient way > (assuming it can prove that the reordering i

Re: [SQL] Question on OUTER JOINS.

2003-06-27 Thread Tom Lane
Ludwig Lim <[EMAIL PROTECTED]> writes: > 1) Is the ON clause of an OUTER JOIN always > evaluated first before the WHERE clause? No; the planner will do whatever it thinks is the most efficient way (assuming it can prove that the reordering it wants to do won't change the query result). > Is t

[SQL] Question on OUTER JOINS.

2003-06-27 Thread Ludwig Lim
Hi: 1) Is the ON clause of an OUTER JOIN always evaluated first before the WHERE clause? 2) Given the ff SQL statement : SELECT employee_id, a.status as status FROM permissions a LEFT JOIN (select * from employee where employee_id = 3) as b on (a.status=b.status) WH

Re: [SQL] need some help with a delete statement

2003-06-27 Thread Bruno Wolff III
On Fri, Jun 27, 2003 at 16:09:31 -0700, Matthew Hixson <[EMAIL PROTECTED]> wrote: > Hi, I have a bunch of records that I need to delete from our database. > These records represent shopping carts for visitors to our website. > The shopping carts I'd like to delete are the ones without anythin

[SQL] need some help with a delete statement

2003-06-27 Thread Matthew Hixson
Hi, I have a bunch of records that I need to delete from our database. These records represent shopping carts for visitors to our website. The shopping carts I'd like to delete are the ones without anything in them. Here is the schema: create sequence carts_sequence; create table carts( cart

[SQL] Inheritance and standards

2003-06-27 Thread Markus Bertheau
Hi, in how far are the Table Inheritance features of PostgreSQL SQL92 or SQL99? What other databases support table inheritance? Do they use the same syntax? Thanks -- Markus Bertheau Cenes Data GmbH ---(end of broadcast)--- TIP 2: you can get o

Re: [SQL] Postgres - Delphi Application

2003-06-27 Thread btober
> Dnia 2003-06-19 19:50, U¿ytkownik murali napisa³: > > I' would like to connect my postgres database on a linux server with > Delphi 5 Applications,which are located on Win95/98 Clients, very > helpful would be an example on how to realize a connection of these > things > > http://sourceforge.net

Re: [SQL] Postgres - Delphi Application

2003-06-27 Thread btober
> Dnia 2003-06-27 12:25, U¿ytkownik [EMAIL PROTECTED] napisa³: > >> I think I looked at zeos at some point and found that it did not >> support md5 authentication, which, at the time, I thought was >> important. >> ~Berend Tober > Zeos has nothing to authentication. It's a matter of libpq library

Re: [SQL] Change the behaviour of the SERIAL "Type"

2003-06-27 Thread Bruno Wolff III
On Fri, Jun 27, 2003 at 16:35:36 +0200, Dani Oderbolz <[EMAIL PROTECTED]> wrote: > Well, why not just use the Sequence? > Is there really such a performance hit when calling a trigger? I think the big issue is concurrency. Sequences are designed so that conncurrent uses of the sequence don't blo

Re: [SQL] Getting all rows even if not a member of any groups

2003-06-27 Thread Bruno Wolff III
On Fri, Jun 27, 2003 at 16:18:10 +0200, Együd Csaba <[EMAIL PROTECTED]> wrote: > > This is absolutelly what I want, but I can't understand how it is working. > Where can I find a descriptive (tale-like, for kids ... :) ) documentation > about using joins? If you look at the documentation for th

Re: [SQL] Change the behaviour of the SERIAL "Type"

2003-06-27 Thread Rod Taylor
> Well, why not just use the Sequence? > Is there really such a performance hit when calling a trigger? > In Oracle, one usually does such a thing, as there is no such nice > workaround > as SERIAL. > Hmm, I am still thinking about a special kinf of SERIAL, maybe called > TRIGGERED_SERIAL which cr

Re: [SQL] Change the behaviour of the SERIAL "Type"

2003-06-27 Thread Dani Oderbolz
Bruno Wolff III wrote: ... It shouldn't be too difficult to write some triggers that make something closer to autoincrement. It probably won't work very well if there are lots of concurrent updates though. You can either lock the table with the column exclusively and then find the largest value a

Re: [SQL] Change the behaviour of the SERIAL "Type"

2003-06-27 Thread Bruno Wolff III
On Fri, Jun 27, 2003 at 10:45:07 +0200, Dani Oderbolz <[EMAIL PROTECTED]> wrote: > > Yea, fine, but I propose a different (deeper) approach. > Why does SERIAL only enforce a DEFAULT? Because it is faster. > This is not an exact imitation of an autoincrement, as a DEFAULT can be > overwritten.

Re: [SQL] Getting all rows even if not a member of any groups

2003-06-27 Thread Együd Csaba
Bruno, > Please don't reply to messages to start a new thread. sorry, I will never do such things in the future. > select t_productgroups.name as pgroup, > t_products.id as productid > from t_products > left join (t_prod_in_pgr > join t_productgroups on (t_productgroups.id =

Re: [SQL] Postgres - Delphi Application

2003-06-27 Thread Együd Csaba
Tomasz, it seems to be interesting for me as well, but actually I can't download a file from the given url. I just click on the binary zip link, but nothing happen. How should I click? :) Thanks, -- Csaba - Original Message - From: "Tomasz Myrta" <[EMAIL PROTECTED]> To: "murali" <[EMAIL P

Re: [SQL] Getting all rows even if not a member of any groups

2003-06-27 Thread Bruno Wolff III
On Fri, Jun 27, 2003 at 13:13:07 +0200, Együd Csaba <[EMAIL PROTECTED]> wrote: > Hi, Please don't reply to messages to start a new thread. > I have a product table identified by its id field. There is a productgroups > table with productisd, productgroupid fields. And I have a prod_in_pgr > (pr

[SQL] Getting all rows even if not a member of any groups

2003-06-27 Thread Együd Csaba
Hi, I have a product table identified by its id field. There is a productgroups table with productisd, productgroupid fields. And I have a prod_in_pgr (productid, productgroupid) table which describes the membership of productgroups. Each product can be a member of zero or more productgroups, but o

Re: [SQL] Postgres - Delphi Application

2003-06-27 Thread Tomasz Myrta
Dnia 2003-06-27 12:25, Użytkownik [EMAIL PROTECTED] napisał: I think I looked at zeos at some point and found that it did not support md5 authentication, which, at the time, I thought was important. ~Berend Tober Zeos has nothing to authentication. It's a matter of libpq library, which currently

Re: [SQL] Change the behaviour of the SERIAL "Type"

2003-06-27 Thread Dani Oderbolz
Randall Lucas wrote: Wow, I had never actually faced this problem (yet) but I spied it as a possible stumbling block for porting MySQL apps, for which the standard practice is inserting a NULL. As I have made a fairly thorough reading of the docs (but may have not cross-correlated every piece

Re: [SQL] Postgres - Delphi Application

2003-06-27 Thread Tomasz Myrta
Dnia 2003-06-19 19:50, Użytkownik murali napisał: > Hi > > I' would like to connect my postgres database on a linux server with > Delphi 5 Applications,which are located on Win95/98 Clients, very > helpful would be an example on how to realize a connection of these things > > Thanks > > Murali htt