Re: [PATCHES] pg_restore -F bug

2005-04-30 Thread Neil Conway
Tom Lane wrote:
Certainly --- particularly if the error makes it dump core, as seems
likely (haven't tried it).
Ok, backpatched to stable branches back to 7.2
-Neil
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
  http://www.postgresql.org/docs/faq


Re: [PATCHES] format string cleanup

2005-04-30 Thread Neil Conway
Neil Conway wrote:
Barring any objections, I'll apply this to HEAD and backport it to 
stable branches back to 7.2 tomorrow.
Applied and backpatched. I noticed an additional pg_dump format string 
bug in 7.2 and fixed that as well (it does not occur in later branches). 
I also didn't bother backporting the ruleutils changes back farther than 
7.4, since those changes are just cleanup/paranoia anyway.

-Neil
---(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


[PATCHES] Problem with Create Domain example

2005-04-30 Thread Robert Treat
The example given in create domain seems to be broken. ISTM it requires some 
extra escaping to be usable (at least in my goings on today it sure was, and 
I the entries in pg_constraint sure seem to indicate this as well).  I 
suggest that the examples should be updated as per the following patch. 

Oh.. and Andrew @ Supernews had nothing to do with this ;-)

-- 
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
Index: create_domain.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/create_domain.sgml,v
retrieving revision 1.20
diff -c -r1.20 create_domain.sgml
*** create_domain.sgml	4 Jan 2005 00:39:53 -	1.20
--- create_domain.sgml	30 Apr 2005 22:06:33 -
***
*** 167,174 
  programlisting
  CREATE DOMAIN us_postal_code AS TEXT
  CHECK(
!VALUE ~ '^\d{5}$'
! OR VALUE ~ '^\d{5}-\d{4}$'
  );
  
  CREATE TABLE us_snail_addy (
--- 167,174 
  programlisting
  CREATE DOMAIN us_postal_code AS TEXT
  CHECK(
!VALUE ~ '^\\d{5}$'
! OR VALUE ~ '^\\d{5}-\\d{4}$'
  );
  
  CREATE TABLE us_snail_addy (

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [PATCHES] Problem with Create Domain example

2005-04-30 Thread Alvaro Herrera
On Sat, Apr 30, 2005 at 06:12:27PM -0400, Robert Treat wrote:

 --- 167,174 
   programlisting
   CREATE DOMAIN us_postal_code AS TEXT
   CHECK(
 !VALUE ~ '^\\d{5}$'
 ! OR VALUE ~ '^\\d{5}-\\d{4}$'
   );

Huh, why not

VALUE ~ '^\\d{5}(-\\d{4})?$'

?

-- 
Alvaro Herrera ([EMAIL PROTECTED])
Cuando no hay humildad las personas se degradan (A. Christie)

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


Re: [PATCHES] Problem with Create Domain example

2005-04-30 Thread Robert Treat
On Saturday 30 April 2005 21:14, Alvaro Herrera wrote:
 On Sat, Apr 30, 2005 at 06:12:27PM -0400, Robert Treat wrote:
  --- 167,174 
programlisting
CREATE DOMAIN us_postal_code AS TEXT
CHECK(
  !VALUE ~ '^\\d{5}$'
  ! OR VALUE ~ '^\\d{5}-\\d{4}$'
);

 Huh, why not

 VALUE ~ '^\\d{5}(-\\d{4})?$'

 ?

Not sure what your driving at here... my point is that the \ escaping is 
incorrect in the current examples.  

If you want to argue that we could make the check constraint simpler (or is 
that more advanced) that seems like another issue.  IMHO having the OR'd 
checks is better because it shows that you can stack constraints inside a 
domain if you want. 

-- 
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [PATCHES] Problem with Create Domain example

2005-04-30 Thread David Fetter
On Sat, Apr 30, 2005 at 10:08:32PM -0400, Robert Treat wrote:
 On Saturday 30 April 2005 21:14, Alvaro Herrera wrote:
  On Sat, Apr 30, 2005 at 06:12:27PM -0400, Robert Treat wrote:
   --- 167,174 
 programlisting
 CREATE DOMAIN us_postal_code AS TEXT
 CHECK(
   !VALUE ~ '^\\d{5}$'
   ! OR VALUE ~ '^\\d{5}-\\d{4}$'
 );
 
  Huh, why not
 
  VALUE ~ '^\\d{5}(-\\d{4})?$'
 
  ?
 
 Not sure what your driving at here... my point is that the \
 escaping is incorrect in the current examples.  
 
 If you want to argue that we could make the check constraint simpler
 (or is that more advanced) that seems like another issue.  IMHO
 having the OR'd checks is better because it shows that you can
 stack constraints inside a domain if you want. 

That was pretty much my thought.  It's extremely easy to turn regexes
into unmaintainable garbage, whereas the original code is maintainable :)

Cheers,
D
-- 
David Fetter [EMAIL PROTECTED] http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

---(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] Problem with Create Domain example

2005-04-30 Thread Alvaro Herrera
On Sat, Apr 30, 2005 at 07:45:29PM -0700, David Fetter wrote:

  Not sure what your driving at here... my point is that the \
  escaping is incorrect in the current examples.  
 
 That was pretty much my thought.  It's extremely easy to turn regexes
 into unmaintainable garbage, whereas the original code is maintainable :)

Yes, that's true.  I'll go back to my lair now.

-- 
Alvaro Herrera ([EMAIL PROTECTED])
Al principio era UNIX, y UNIX habló y dijo: Hello world\n.
No dijo Hello New Jersey\n, ni Hello USA\n.

---(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] [INTERFACES] bcc32 libpq compile problem

2005-04-30 Thread Bruce Momjian
Fabio Guidi wrote:
 The change to include pthread.h i done by myself when i try to build 
 again, no problem for ecpg i change my source to run only with libpq, 
 thanks a lot for help ...

Great.  I figured you had made that change on your end.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (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] [INTERFACES] bcc32 libpq compile problem

2005-04-30 Thread Fabio Guidi




The change to include pthread.h i done by myself when i try to build
again, no problem for ecpg i change my source to run only with libpq,
thanks a lot for help ... 

bye
Fabio

Bruce Momjian ha scritto:

  [EMAIL PROTECTED] wrote:
  
  
All OK with libpq, what can i do to work under windows with ecpg ?

  
  
Uh, we don't have any ecpg makefiles for MSC or BCC.  I am afraid you
will have to take the psql or libpq bcc32.mak and try to hack it around
to work, but it isn't going to be simple.