Re: [SQL] Inserting a tab character

2003-02-04 Thread Ludwig Lim
--- Luke Pascoe <[EMAIL PROTECTED]> wrote: > I have a table which defines various possible file > delimiters (CHAR(1) NOT > NULL), for the moment it'll only contain comma and > tab. Inserting a comma is > easy, but inserting a tab is proving somewhat more > difficult. > > How do I do it in 'psql'

Re: [SQL] Inserting a tab character

2003-02-04 Thread Matthew Horoschun
Hi Luke. On Wednesday, February 5, 2003, at 02:39 PM, Luke Pascoe wrote: I have a table which defines various possible file delimiters (CHAR(1) NOT NULL), for the moment it'll only contain comma and tab. Inserting a comma is easy, but inserting a tab is proving somewhat more difficult. How d

[SQL] Inserting a tab character

2003-02-04 Thread Luke Pascoe
I have a table which defines various possible file delimiters (CHAR(1) NOT NULL), for the moment it'll only contain comma and tab. Inserting a comma is easy, but inserting a tab is proving somewhat more difficult. How do I do it in 'psql'? Luke Pascoe. ---(end of broadc

Re: [SQL] Serialized Transaction Locking Issues

2003-02-04 Thread Tom Lane
justin <[EMAIL PROTECTED]> writes: > I'm currently in the midst of working on a serializable transaction > which drops indexes on several tables, does a bulk copy, and rebuilds > the indexes. Based on what I've read it seemed as though I'd be able to > concurrently execute read only queries agai

Re: [SQL] iceberg queries

2003-02-04 Thread Jan Wieck
Tom Lane wrote: > > Jan Wieck <[EMAIL PROTECTED]> writes: > > As to the original question, if an index is available that returns the > > rows in the sort order of the GROUP BY clause, PostgreSQL defaults to an > > index scan, otherwise it will do a sort of the rows matching an optional > > WHERE c

[SQL] Serialized Transaction Locking Issues

2003-02-04 Thread justin
Hello, I'm currently in the midst of working on a serializable transaction which drops indexes on several tables, does a bulk copy, and rebuilds the indexes. Based on what I've read it seemed as though I'd be able to concurrently execute read only queries against these tables, returning result

Re: [SQL] pg_views

2003-02-04 Thread Tom Lane
Jan Wieck <[EMAIL PROTECTED]> writes: > Lex Berezhny wrote: >> My goal is to take a view name as input and output the tables and >> columns composing the view. > Don't forget that a view's columns can contain complex expressions > instead of simple table.column references. Yes. This problem is n

Re: [SQL] iceberg queries

2003-02-04 Thread Tom Lane
Jan Wieck <[EMAIL PROTECTED]> writes: > As to the original question, if an index is available that returns the > rows in the sort order of the GROUP BY clause, PostgreSQL defaults to an > index scan, otherwise it will do a sort of the rows matching an optional > WHERE clause. This sorted set is the

Re: [SQL] iceberg queries

2003-02-04 Thread Jan Wieck
Christoph Haller wrote: > > > > > Does PostgreSQL optimizer handle iceberg queries well? > > > What do you mean by "iceberg query" ? > I've never heard this term. Iceberg queries compute one or more aggregate functions to find aggregate values above a specified threshold. A typical iceberg query

Re: [SQL] pg_views

2003-02-04 Thread Jan Wieck
Lex Berezhny wrote: > > hi, > > I'm trying to write some code that can analyze the database structure > and i need a way to discover the composition of a view (the tables and > table.column info). > > I've managed to do much of this by querying the pg_views for the > definition and literally

Re: [SQL] iceberg queries

2003-02-04 Thread Bruno Wolff III
On Tue, Feb 04, 2003 at 09:08:56 -0500, Wei Weng <[EMAIL PROTECTED]> wrote: > It is a query that looks like > > SELECT target1, target2... targetn, SUN(t.qty) > FROM Table t > GROUP BY target1 > HAVING SUM(t.qty)>=10 > > You can replace SUM(t.qty)>=10 with other aggregate constraints. There we

Re: [SQL] iceberg queries

2003-02-04 Thread Wei Weng
It is a query that looks like SELECT target1, target2... targetn, SUN(t.qty) FROM Table t GROUP BY target1 HAVING SUM(t.qty)>=10 You can replace SUM(t.qty)>=10 with other aggregate constraints. - Original Message - From: Christoph Haller To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]

Re: [SQL] SQL99/SQL92 Grammar

2003-02-04 Thread Bruce Momjian
See the developers FAQ for URL's. --- Les Hazlewood wrote: > > Does anyone have a definitive BNF grammar of SQL99 or SQL92? (I'd prefer 99 > but I'll take what I can get ;) > > I'm trying to make a simplified XML to SQL

Re: [SQL] pg_views

2003-02-04 Thread Christoph Haller
> > I'm wondering if PostgreSQL actually reparses the view definition on > each invocation or if it stores the required information in some > accessible place. > The documentation says: Whenever a query against a view (i.e. a virtual table) is made, the rewrite system rewrites the user's query

Re: [SQL] iceberg queries

2003-02-04 Thread Christoph Haller
> > Does PostgreSQL optimizer handle iceberg queries well? > What do you mean by "iceberg query" ? I've never heard this term. Regards, Christoph ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]