Re: [GENERAL] Database Name Case Sensitivity

2001-04-05 Thread ADBAAMD
Peter Eisentraut wrote: > ADBAAMD writes: > >> Brian T. Allen wrote: >> >>> I just ran into that too, and find it most undesirable. I don't know >>> whether that is part of the SQL spec or not, but it seems very odd. The >>> queries seem t

Re: [GENERAL] Database Name Case Sensitivity

2001-04-05 Thread ADBAAMD
Brian T. Allen wrote: > I just ran into that too, and find it most undesirable. I don't know > whether that is part of the SQL spec or not, but it seems very odd. The > queries seem to be converted to lowercase before they ever reach the SQL > engine. Correct me if I'm wrong, but doesn

Re: [GENERAL] Can I get the default value for an attribute (field) ?

2001-04-02 Thread ADBAAMD
Mike Mascari wrote: > If you start psql with the -E option you'll see it generates a query > similar to the following: > > SELECT substring(d.adsrc for 128) FROM pg_attrdef d, pg_class c > WHERE c.relname = 'my_table' AND c.oid = d.adrelid NAD d.adnum = X > > where my_table is the table in que

Re: [GENERAL] Ok, why isn't it using *this* index?

2001-04-01 Thread ADBAAMD
Denis A. Doroshenko wrote: > On Sun, Apr 01, 2001 at 05:11:46PM -0400, Paul Tomblin wrote: > >> Ok, so if I understand you correctly, the fact that about 90% of the >> records have country='USA' and about 9% of the records have >> country='CANADA' means that it's never going to use the index bec

Re: [GENERAL] another index question

2001-04-01 Thread ADBAAMD
Tom Lane wrote: > OK, indeed this is a bug --- the planner has a bad interaction for LIMIT > clauses used in "IN" subselects. Will fix. > > You could avoid the bug, and get a better plan at the top level anyway, > by writing > > SELECT frm,rcpt,subject FROM mesg_headers WHERE mesgnum = (SELECT

Re: [GENERAL] Ok, why isn't it using *this* index?

2001-04-01 Thread ADBAAMD
Paul Tomblin wrote: > Quoting ADBAAMD ([EMAIL PROTECTED]): > > Ok, so if I understand you correctly, the fact that about 90% of the > records have country='USA' and about 9% of the records have > country='CANADA' means that it's never going to use the i

Re: [GENERAL] Ok, why isn't it using *this* index?

2001-04-01 Thread ADBAAMD
Paul Tomblin wrote: > Quoting ADBAAMD ([EMAIL PROTECTED]): > >> Paul Tomblin wrote: >> >>> I have a table with columns 'country' and 'state'. I put indexes on both >>> of them. I've done the "vacuum analyze" as per the f

Re: [GENERAL] What is faster?

2001-03-30 Thread ADBAAMD
Mihai Gheorghiu wrote: > I have a short table (10 records) with a primary key column. > > What primary key column data type will make search faster: int2 or char? > What about char(n) n=2,3...? > I'm looking for speed, as that search is very frequent. With such a short table, won't a in