[SQL] unsubscribe

2007-02-09 Thread Patrice Oliver
unsubscribe -- Patrice Oliver Utilisateur GNU / Linux Enregistré 430054 http://counter.li.org Jabber ID : [EMAIL PROTECTED] ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.post

[SQL] dynamic sql

2007-02-09 Thread Gabriel Adolfo Sirni
Error using the command EXECUTE IMMEDIATE with an OUT parameter Example: I have this procedure pr_prueba, who call other procedure "pr_out_area_code" using the command execute immediate, who has an IN paramter and an OUT paramter. Procedure pr_prueba(param in varchar2) is v_name varchar2(50); BEG

Re: [SQL] huge disparities in =/IN/BETWEEN performance

2007-02-09 Thread Tom Lane
Joe <[EMAIL PROTECTED]> writes: > George didn't provide the inside of his view, but it's > possible that my earlier example could be rephrased as follows: > create view v_foo as select * from tab where x < 5; > select * from v_foo where x = 10; So try it: regression=# create table tab (x int); CR

Re: [SQL] dynamic sql

2007-02-09 Thread Tom Lane
Gabriel Adolfo Sirni <[EMAIL PROTECTED]> writes: > Procedure pr_prueba(param in varchar2) is > v_name varchar2(50); > BEGIN > EXECUTE IMMEDIATE ' Begin pr_out_area_code(:1,:2); > End; ' USING param, OUT v_name; > END; You're asking the wrong people; this is not an Oracle mailing list.

[SQL] alias not applied

2007-02-09 Thread Sabin Coanda
Hi all, I have two queries: 1. SELECT i AS "PK_ID", d AS "Deleted" FROM ( SELECT 52 AS i, true AS d ) x ORDER BY i 2. SELECT i AS "PK_ID", d AS "Deleted" FROM ( SELECT 49 AS i, true AS d UNION SELECT 51 AS i, true AS d ) x ORDER BY i The first returns the columns "PK_ID", "Deleted" The secon

Re: [SQL] alias not applied

2007-02-09 Thread Frank Bax
At 11:04 AM 2/9/07, Sabin Coanda wrote: I have two queries: 1. SELECT i AS "PK_ID", d AS "Deleted" FROM ( SELECT 52 AS i, true AS d ) x ORDER BY i 2. SELECT i AS "PK_ID", d AS "Deleted" FROM ( SELECT 49 AS i, true AS d UNION SELECT 51 AS i, true AS d ) x ORDER BY i The first returns the colum

Re: [SQL] alias not applied

2007-02-09 Thread Tom Lane
"Sabin Coanda" <[EMAIL PROTECTED]> writes: > I have two queries: > 1. SELECT i AS "PK_ID", d AS "Deleted" FROM ( SELECT 52 AS i, true AS d ) x > ORDER BY i > 2. SELECT i AS "PK_ID", d AS "Deleted" FROM ( SELECT 49 AS i, true AS d > UNION SELECT 51 AS i, true AS d ) x ORDER BY i > The first re

Re: [SQL] alias not applied

2007-02-09 Thread Sabin Coanda
You are right. I use "PostgreSQL 8.1.0 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)" on Windows. But I just tried it on a newer version and it works well ( "PostgreSQL 8.1.4 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8)" ). Than

Re: [SQL] huge disparities in =/IN/BETWEEN performance

2007-02-09 Thread George Pavlov
Thanks all for the various useful thoughts. Let me backtrack a bit and state my real underlying issue a bit with actual examples. Hope not to bore you with the length of this. Looks to me like an optimizer issue unless I am missing something. So, suppose I have a query: select * from stuff inner

[SQL] Have anyone this man e-mail ?

2007-02-09 Thread Ezequias Rodrigues da Rocha
Hi list, I am looking for this guy for some help with Slony-I. http://people.planetpostgresql.org/xzilla/index.php?/archives/200-Alpha-testing-Slony-on-win32-Crib-Notes.html Robert Treat

Re: [SQL] huge disparities in =/IN/BETWEEN performance

2007-02-09 Thread Tom Lane
"George Pavlov" <[EMAIL PROTECTED]> writes: > I somehow wish I could tell the optimizer to > first figure out which stuff_ids are related to the user_id that is > being asked for and then look ONLY those up in the stuff_events table > using the index on stuff_id. This is not really an optimizer p