[PATCHES] contribution: namespace.sql

2004-09-09 Thread Koju Iijima
Dear community,

We found that one of RT items "namespace" has only few test cases.
So I added more test cases to test whatever written in the document (chap
5.8).
I tried to negate the explanation of chap5.8 and to find any faults. But no
errors were found.

I got the diff against the CVS HEAD.

I hope applied.

Thank you!

koju


---
Koju Iijima

Software Engineer
Fujitsu Australia Software Technology
Address: 14 Rodborough Road, Frenchs Forest NSW 2086
Tel: +61 2 9452 9076
Fax: +61 2 9975 2899
Email: [EMAIL PROTECTED]
Web site: www.fastware.com

---
This is an email from Fujitsu Australia Software Technology Pty Ltd, ABN 27 003 693 
481. It is confidential to the ordinary user of the email address to which it was 
addressed and may contain copyright and/or legally privileged information. No one else 
may read, print, store, copy or forward all or any of it or its attachments. If you 
receive this email in error, please return to sender. Thank you.

If you do not wish to receive commercial email messages from Fujitsu Australia 
Software Technology Pty Ltd, please email [EMAIL PROTECTED]

namespaceRT.diff
Description: Binary data

---(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 list cleanly


Re: [PATCHES] contrib/dbmirror

2004-09-09 Thread Neil Conway
On Sun, 2004-09-05 at 01:59, [EMAIL PROTECTED] wrote:
> Here is a patch for dbmirror to be applied for the next beta.

Patch applied -- thanks!

Note that one hunk was rejected, but it was misguided anyway (trying to
change a $PostgreSQL$ tag into an $Id$, as a result of a private CVS
tree I'd guess) -- so I applied the patch without that change.

-Neil



---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [PATCHES] Minor psql consistency fixes

2004-09-09 Thread Neil Conway
Greg Sabino Mullane wrote:
Minor consistency fixes: have \df show schema and name first, 
make sure \di+ shows description last, and make \dl SQL look 
a little more standard.
Patch applied -- thanks!
-Neil
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[PATCHES] WIP: deferred-trigger rewrite

2004-09-09 Thread Tom Lane
Since this is a rather larger patch than we customarily apply during
beta, I thought I'd better circulate it for review before pushing it in.

It is not ready to apply yet because it lacks regression tests or doc
updates, and also I haven't yet done anything about the idea of saving
space by sharing information across many firings of the same trigger.
But it addresses the basic problem of firing AFTER triggers at the
"right times" within functions.  And I think it offers a reasonable
approach to the issues Stephan raised about what happens when a trigger
function mucks with the firing order by executing SET CONSTRAINTS.
In this implementation, any particular query determines the set of
pending triggers it will fire before any of them are actually executed.
A SET CONSTRAINTS within one of those triggers cannot alter the
scheduling of any already-scheduled-to-fire trigger, but it can enable
and execute triggers that the outer query has determined it will not
fire.

I also took the liberty of renaming structs and functions in the
interests of clarity.  In particular, all the "DeferredTrigger" stuff is
now "AfterTrigger" stuff, since it actually handles all AFTER triggers
whether they are "deferred" in the spec's sense or not.

Comments, objections, better ideas?  I hope to commit this in the next
couple days.

regards, tom lane



binG1qP6B39iq.bin
Description: trigger.patch.gz

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [PATCHES] psql tab-completion improvements

2004-09-09 Thread Bruce Momjian
Neil Conway wrote:
> Bruce Momjian wrote:
> > Is this for 8.0?  Seems it is fixes.
> 
> Personally, I think it is more feature work than fixes. But I wouldn't 
> object to committing it to HEAD in time for 8.0, because it is likely 
> low-impact.

That was my feeling.  Part fix, part low impact.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [PATCHES] psql tab-completion improvements

2004-09-09 Thread Neil Conway
Bruce Momjian wrote:
Is this for 8.0?  Seems it is fixes.
Personally, I think it is more feature work than fixes. But I wouldn't 
object to committing it to HEAD in time for 8.0, because it is likely 
low-impact.

-Neil
---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [PATCHES] psql tab-completion improvements

2004-09-09 Thread Greg Sabino Mullane

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
 
> Is this for 8.0? Seems it is fixes?
 
Well, there are no new features in it anyway. My vote is for 8.0,
if only so that any bugs get found quicker and fixed for 8.1 :)
 
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200409092206
 
-BEGIN PGP SIGNATURE-
 
iD8DBQFBQQwnvJuQZxSWSsgRAlWpAJ9AoWuGTGM9ix/ZcTy/lCaJ0c0qWACgh8Jm
2GAeWoEEjOorvxNWDHDIYHo=
=vLEd
-END PGP SIGNATURE-



---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [PATCHES] psql tab-completion improvements

2004-09-09 Thread Bruce Momjian

Is this for 8.0?  Seems it is fixes.

---

Greg Sabino Mullane wrote:
[ There is text before PGP section. ]
> 
[ PGP not available, raw data follows ]
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> NotDashEscaped: You need GnuPG to verify this message
> 
> 
> Some improvements for the tab-completion of psql. This should 
> address all of the items in the todo list and adds some new 
> things as well. Specifically:
> 
> * Add support for ALTER SEQUENCE ...
> * Add "RENAME TO" for ALTER TRIGGER xx ON yy
> * Pick proper table for ALTER TRIGGER xx ON ...
> * Support for ALTER USER xxx ...
> * Fix ALTER GROUP xxx DROP ...
> * Fix ALTER DOMAIN xxx DROP ...
> * Remove "OWNER TO" from ALTER DOMAIN xx DROP ...
> * Fix ALTER DOMAIN xx SET DEFAULT ..
> * Prevent ALTER INDEX xxx SET TABLESPACE from using "TO"
> * Support for ALTER LANGUAGE xxx (RENAME TO)
> * More support for ALTER TABLE xxx ALTER COLUMN xxx ...
> * More support for COPY
> 
> --
> Greg Sabino Mullane [EMAIL PROTECTED]
> PGP Key: 0x14964AC8 200408311930
> 
> 
> 
> 
> Index: tab-complete.c
> ===
> RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/tab-complete.c,v
> retrieving revision 1.114
> diff -c -r1.114 tab-complete.c
> *** tab-complete.c29 Aug 2004 05:06:54 -  1.114
> --- tab-complete.c31 Aug 2004 23:25:07 -
> ***
> *** 386,391 
> --- 386,400 
>   "   and pg_catalog.quote_ident(c1.relname)='%s'"\
>   "   and pg_catalog.pg_table_is_visible(c2.oid)"
>   
> + /* the silly-looking length condition is just to eat up the current word */
> + #define Query_for_list_of_tables_for_trigger \
> + "SELECT pg_catalog.quote_ident(relname) "\
> + "  FROM pg_catalog.pg_class"\
> + " WHERE (%d = length('%s'))"\
> + "   AND oid IN "\
> + "   (SELECT tgrelid FROM pg_catalog.pg_trigger "\
> + " WHERE pg_catalog.quote_ident(tgname)='%s')"
> + 
>   /*
>* This is a list of all "things" in Pgsql, which can show up after CREATE or
>* DROP; and there is also a query to get a list of them.
> ***
> *** 637,647 
>   else if (!prev_wd)
>   COMPLETE_WITH_LIST(sql_commands);
>   
> ! /* CREATE or DROP but not ALTER TABLE sth DROP */
>   /* complete with something you can create or drop */
>   else if (pg_strcasecmp(prev_wd, "CREATE") == 0 ||
>(pg_strcasecmp(prev_wd, "DROP") == 0 &&
> !   pg_strcasecmp(prev3_wd, "TABLE") != 0))
>   matches = completion_matches(text, create_command_generator);
>   
>   /* ALTER */
> --- 646,658 
>   else if (!prev_wd)
>   COMPLETE_WITH_LIST(sql_commands);
>   
> ! /* CREATE or DROP but not ALTER (TABLE|DOMAIN|GROUP) sth DROP */
>   /* complete with something you can create or drop */
>   else if (pg_strcasecmp(prev_wd, "CREATE") == 0 ||
>(pg_strcasecmp(prev_wd, "DROP") == 0 &&
> !   pg_strcasecmp(prev3_wd, "TABLE") != 0 &&
> !   pg_strcasecmp(prev3_wd, "DOMAIN") != 0 &&
> !   pg_strcasecmp(prev3_wd, "GROUP") != 0))
>   matches = completion_matches(text, create_command_generator);
>   
>   /* ALTER */
> ***
> *** 694,699 
> --- 705,726 
>   COMPLETE_WITH_LIST(list_ALTERINDEX);
>   }
>   
> + /* ALTER LANGUAGE  */
> + else if (pg_strcasecmp(prev3_wd, "ALTER") == 0 &&
> +  pg_strcasecmp(prev2_wd, "LANGUAGE") == 0)
> + COMPLETE_WITH_CONST("RENAME TO");
> + 
> + /* ALTER USER  */
> + else if (pg_strcasecmp(prev3_wd, "ALTER") == 0 &&
> +  pg_strcasecmp(prev2_wd, "USER") == 0)
> + {
> + static const char *const list_ALTERUSER[] =
> + {"ENCRYPTED", "UNENCRYPTED", "CREATEDB", "NOCREATEDB", "CREATEUSER",
> +  "NOCREATEUSER", "VALID UNTIL", "RENAME TO", "SET", "RESET", NULL};
> + 
> + COMPLETE_WITH_LIST(list_ALTERUSER);
> + }
> + 
>   /* ALTER DOMAIN  */
>   else if (pg_strcasecmp(prev3_wd, "ALTER") == 0 &&
>pg_strcasecmp(prev2_wd, "DOMAIN") == 0)
> ***
> *** 709,715 
>pg_strcasecmp(prev_wd, "DROP") == 0)
>   {
>   static const char *const list_ALTERDOMAIN2[] =
> ! {"CONSTRAINT", "DEFAULT", "NOT NULL", "OWNER TO", NULL};
>   
>   COMPLETE_WITH_LIST(list_ALTERDOMAIN2);
>   }
> --- 736,742 
>pg_strcasecmp(prev_wd, "DROP") == 0)
>   {
>   static const char *const list_ALTERDOMAIN2[] =
> ! {"CONSTRAINT", "DEFAULT", "NOT NULL", NULL};
>   
>   COMPLETE_WITH_LIST(list_ALTERDOMAIN2);
>   }
> ***
> *** 723,733 
>   
>   COMPLETE_WITH_LIST(list_ALTER

[PATCHES] contrib/dbase

2004-09-09 Thread Laurent Ballester
Hello,

 Here is a patch for contrib/dbase module to allow it to be compiled under
win32 with mingw compiler.

On dbf.h, add a include to define u_char type
On dbf2pg.c, rename Escape type already defined on Windows by GDI (Graphic
Device Interface) layer to Escape_db.


Regards, Laurent


dbf2pg.c.diff
Description: Binary data


dbf.h.diff
Description: Binary data

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [PATCHES] Minor psql consistency fixes

2004-09-09 Thread Neil Conway
Greg Sabino Mullane wrote:
Minor consistency fixes: have \df show schema and name first, 
make sure \di+ shows description last, and make \dl SQL look 
a little more standard.
I'll apply this in the next 24 hours, barring any objections.
-Neil
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [PATCHES] contrib/dbmirror

2004-09-09 Thread Neil Conway
[EMAIL PROTECTED] wrote:
Here is a patch for dbmirror to be applied for the next beta.
I'll apply this within the next 24 hours, barring any objections.
-Neil
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match