[SQL] iceberg queries

2003-02-03 Thread Wei Weng
Does PostgreSQL optimizer handle iceberg queries well? Thanks Wei ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] Format in psql

2003-02-03 Thread Bhuvan A
> man psql. > > Inside psql: > \pset border 2 > Fine, \pset border 2 draws the border. But it donot format the multi line value, without affecting the format of other column. I want to format the multi line column appropriately. It should not affect the format of other column, similar to perl f

[SQL] pg_views

2003-02-03 Thread Lex Berezhny
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 parsing the SQL myself, but obviously

Re: [SQL] float and numeric in 7.3

2003-02-03 Thread Tom Lane
Tomasz Myrta <[EMAIL PROTECTED]> writes: > 7.3 can't automaticaly cast float into numeric? Nope, we tightened it up --- that's not an implicit cast anymore. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and un

[SQL] SQL99/SQL92 Grammar

2003-02-03 Thread Les Hazlewood
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 translator, and I need the grammar to do so (not Postgres's grammar...the standard grammar). It must be available somewhere, because Postgre

[SQL] float and numeric in 7.3

2003-02-03 Thread Tomasz Myrta
Hi I've just upgraded Postgresql 7.2 -> 7.3 Some of my views use function "round" with datatype "float". They don't work after upgrading: ERROR: Function round(double precision, integer) does not exist What happened? 7.3 can't automaticaly cast float into numeric? Or maybe 7.2 had both funct

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread mallah
Hi , This is to confirm that the EXPLAIN problem does not occur anymore after successfully upgrading to 7.3.1 from 7.3.0 Thanks everyone. Regards Mallah. explain select * from shippers1 where city='DELHI';

[SQL] unsubscribe

2003-02-03 Thread Josef Astner
unsubscribe ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Rajesh Kumar Mallah.
Hmmm... upgrade to 7.3.1 was not that smooth.. after upgrade i could not run a single query.. tradein_clients=> SELECT * from hogs; ERROR: current transaction is aborted, queries ignored until end of transaction block tradein_clients=> any other query seems to be giving the same ERROR. check t

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Rajesh Kumar Mallah.
On Monday 03 February 2003 09:20 pm, Christoph Haller wrote: > > Sorry Postgresql has really made my VIEWS ugly. > > It wasnt' so when i fed them. > > > > I wish pgsql stores the create view defination some day , > > just like it does for indexes (pg_get_indexdef) > > Did you ever try > > SELECT *

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Rajesh Kumar Mallah.
Thanks , if that is so i am upgrading it right away and posting you the results. Its my live DB server :-) Regds mallah. On Monday 03 February 2003 09:15 pm, Tom Lane wrote: > "Rajesh Kumar Mallah." <[EMAIL PROTECTED]> writes: > > I think if i do that i will hve to immediately upgrade > > all

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Christoph Haller
> > Sorry Postgresql has really made my VIEWS ugly. > It wasnt' so when i fed them. > > I wish pgsql stores the create view defination some day , > just like it does for indexes (pg_get_indexdef) > Did you ever try SELECT * FROM pg_views ; It definitely has all view definitions. Regards, Christ

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Bruce Momjian
No, you can mix them. --- Rajesh Kumar Mallah. wrote: > > > Thank you . But i have a problem , > > I think if i do that i will hve to immediately upgrade > all the 7.3.0 clients in other machines to 7.3.1 rite? > > > r

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Tom Lane
"Rajesh Kumar Mallah." <[EMAIL PROTECTED]> writes: > I think if i do that i will hve to immediately upgrade > all the 7.3.0 clients in other machines to 7.3.1 rite? No. regards, tom lane ---(end of broadcast)--- TIP 3: if p

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Rajesh Kumar Mallah.
Thank you . But i have a problem , I think if i do that i will hve to immediately upgrade all the 7.3.0 clients in other machines to 7.3.1 rite? regds Mallah. On Monday 03 February 2003 09:10 pm, Tom Lane wrote: > "Rajesh Kumar Mallah." <[EMAIL PROTECTED]> writes: > > It is PostgreSQL 7.3.0

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Tom Lane
"Rajesh Kumar Mallah." <[EMAIL PROTECTED]> writes: > It is PostgreSQL 7.3.0 on Linux. Try 7.3.1 then. I think this is this problem: 2002-12-06 14:28 tgl * src/backend/commands/explain.c (REL7_3_STABLE): Explain's code for showing quals of SubqueryScan nodes has been broken all

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Rajesh Kumar Mallah.
It is PostgreSQL 7.3.0 on Linux. Sorry Postgresql has really made my VIEWS ugly. It wasnt' so when i fed them. I wish pgsql stores the create view defination some day , just like it does for indexes (pg_get_indexdef) Here is the EXPLAIN ANALYZE output of a query that is working on the view.

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Tom Lane
"Rajesh Kumar Mallah." <[EMAIL PROTECTED]> writes: > tradein_clients=# explain SELECT count(*) from shippers1 where city='DELHI'; > ERROR: get_names_for_var: bogus varno 5 What version is this? ISTR having fixed some bugs that might cause that. > i can paste the nasty view definations if nothi

Re: [SQL] cannot EXPLAIN query...

2003-02-03 Thread Tomasz Myrta
Rajesh Kumar Mallah. wrote: Hi, the query is running fine but i cannot EXPLAIN or (ANALYZE) it. I am seeing this message for the first time: tradein_clients=# SELECT count(*) from shippers1 where city='DELHI'; +---+ | count | +---+ | 2 | +---+ (1 row) tradein_clients=# tradei

[SQL] cannot EXPLAIN query...

2003-02-03 Thread Rajesh Kumar Mallah.
Hi, the query is running fine but i cannot EXPLAIN or (ANALYZE) it. I am seeing this message for the first time: tradein_clients=# SELECT count(*) from shippers1 where city='DELHI'; +---+ | count | +---+ | 2 | +---+ (1 row) tradein_clients=# tradein_clients=# explain SELECT

Re: [SQL] Format in psql

2003-02-03 Thread Ian Barwick
On Monday 03 February 2003 11:54, Bhuvan A wrote: > Hi, > > I am using pgsql-7.2.3. Can i able to format the output of a SELECT sql in > psql as perl format? > > Something like, > +--++ > | work_desc_id | shor

Re: [SQL] Format in psql

2003-02-03 Thread Tomasz Myrta
Bhuvan A wrote: Hi, I am using pgsql-7.2.3. Can i able to format the output of a SELECT sql in psql as perl format? Something like, +--++ | work_desc_id | short_desc | +-

[SQL] Format in psql

2003-02-03 Thread Bhuvan A
Hi, I am using pgsql-7.2.3. Can i able to format the output of a SELECT sql in psql as perl format? Something like, +--++ | work_desc_id | short_desc | +--+---

Re: [SQL] Commenting PLPGSQL

2003-02-03 Thread Tomasz Myrta
David Durst wrote: Is it possible to have comment lines inside PLPGSQL?? -- comment Regards, Tomasz Myrta ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to

Re: [SQL] TEMP tables

2003-02-03 Thread Tomasz Myrta
Lex Berezhny wrote: hi, I have a plpgsql procedure that needs to create a temporary table, use it as a stack internally, and then disgard it when the procedure exits. What are the recommendations or solutions on using temporary tables inside functions on a per call basis? thanks a lot, I

[SQL] Commenting PLPGSQL

2003-02-03 Thread David Durst
Is it possible to have comment lines inside PLPGSQL?? ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing li

Re: [SQL] update and IN vs. EXISTS

2003-02-03 Thread Tambet Matiisen
> -Original Message- > From: pginfo [mailto:[EMAIL PROTECTED]] > Sent: Saturday, February 01, 2003 3:50 PM > To: Bruno Wolff III > Cc: [EMAIL PROTECTED] > Subject: Re: [SQL] update and IN vs. EXISTS > > > > > Bruno Wolff III wrote: > > > On Sat, Feb 01, 2003 at 12:40:00 +0100, > >