Re: [SQL] Implementing "access lists" (was: Must I use DISTINCT?)

2009-02-06 Thread Michael B Allen
On Fri, Feb 6, 2009 at 1:11 AM, Stephan Szabo wrote: > > On Thu, 5 Feb 2009, Michael B Allen wrote: > >> Please consider the following SQL >> >> SELECT e.eid, e.name >> FROM entry e, access a >> WHERE e.eid = 120 >> AND (e.ownid = 66 OR e.aid = a.aid) >> >> The intent is to match one entry

Re: [SQL] count(distinct)

2009-02-06 Thread Richard Huxton
Zdravko Balorda wrote: > this is probably an old issue but I'm not all that experienced. > > I wonder if an index can be accessed rather directly, as to speed up > a query like "select count(distinct())", by simply calculating the > number of branches (leaves) an index has. Or at least to skip sor

[SQL] count(distinct)

2009-02-06 Thread Zdravko Balorda
Hi, this is probably an old issue but I'm not all that experienced. I wonder if an index can be accessed rather directly, as to speed up a query like "select count(distinct())", by simply calculating the number of branches (leaves) an index has. Or at least to skip sorting. Best regards, Zdr

[SQL] test

2009-02-06 Thread Boycott TechForums
This is a testplease disgregard.

[SQL] test

2009-02-06 Thread Boycott TechForums
This is a test, please disregard.

Re: [SQL] Data length and data precision

2009-02-06 Thread Bart van Houdt
Just what I needed, thx! -Oorspronkelijk bericht- Van: pgsql-sql-ow...@postgresql.org namens A. Kretschmer Verzonden: vr 6-2-2009 11:04 Aan: pgsql-sql@postgresql.org Onderwerp: Re: [SQL] Data length and data precision In response to Bart van Houdt : > Hi all, > > I'm trying to write so

Re: [SQL] Data length and data precision

2009-02-06 Thread A. Kretschmer
In response to Bart van Houdt : > Hi all, > > I'm trying to write some code to make a 'fingerprint' of a database. This to > compare a customer database with a reference database of our own. > Therefore I'm trying to retrieve information like this: > -Table name > pg_class.relname where relkind

[SQL] Data length and data precision

2009-02-06 Thread Bart van Houdt
Hi all, I'm trying to write some code to make a 'fingerprint' of a database. This to compare a customer database with a reference database of our own. Therefore I'm trying to retrieve information like this: -Table name pg_class.relname where relkind = 'r' -Column name pg_attribute where attre