[SQL] Are SQL queries locale dependent?

2005-02-25 Thread Martin Schäfer
Hi, I recently found out that my app doesn't work in Spain because it creates localized queries like this: create table t (c1 float8, c2 float8); insert into t (c1, c2) values (3,14159, 1,4142); I understand that PostgreSQL obviously can't parse this query. But I'm not sure how to fix this que

Re: [SQL] How to find out programmatically whether a query on a view will use an index?

2005-01-26 Thread Martin Schäfer
> > I'm using the PostGIS spatial extension. Some of my spatial > queries (like > > live zooming and panning) should only be performed when the column > > containing the spatial data is spatially indexed, otherwise > the first query > > takes almost forever and users will just kill the > appl

Re: [SQL] How to find out programmatically whether a query on a view will use an index?

2005-01-24 Thread Martin Schäfer
> > Is there no way to get a machine readable query plan? > > No, and no such API is likely to be defined in the future either, > because we reserve the right to change plan structures at any time. How about a list of the indices used in a query? That alone would already be very useful. Martin

[SQL] How to find out programmatically whether a query on a view will use an index?

2005-01-24 Thread Martin Schäfer
Hi, I'm using the PostGIS spatial extension. Some of my spatial queries (like live zooming and panning) should only be performed when the column containing the spatial data is spatially indexed, otherwise the first query takes almost forever and users will just kill the application out of frus

Re: [SQL] Find out whether a view's column is indexed?

2004-06-10 Thread Martin Schäfer
> From: Richard Huxton [mailto:[EMAIL PROTECTED] > > Martin Schäfer wrote: > > Is there any way to find out whether a column that's used > in a view is indexed? > > > > The following query: > > > > SELECT ic.relname AS index_name > [snip] >

[SQL] Find out whether a view's column is indexed?

2004-06-10 Thread Martin Schäfer
Is there any way to find out whether a column that's used in a view is indexed? The following query: SELECT ic.relname AS index_name FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a, pg_opclass oc, pg_namespace n WHERE i.indrelid = bc.oid AND i.indexrelid