Re: [HACKERS] PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument

2003-07-09 Thread qhwt
Hello,

 On Mon, Jul 07, 2003 at 12:55:06AM +0900, [EMAIL PROTECTED] wrote:
  
  When hints.ai_family is PF_UNSPEC, getaddrinfo() returns two entries,
  first one being IPv6 one, and the second one is IPv4 one, even if
  IPv6 support is not compiled in the kernel(this is true at least on
  my FreeBSD box).

Sorry, this turned out to be bogus; AI_ADDRCONFIG flag was already present as
early as FreeBSD 4.3-RELEASE, but I forgot adding the flag in my test code.
The flag is not documented in the getaddrinfo(3) man page.

On Sun, Jul 06, 2003 at 06:35:52PM +0200, Kurt Roeckx wrote:
 And that is why you have AI_ADDRCONFIG, which seems to be broken
 for him.

I doubt RedHat 6 or MacOS X really support AI_ADDRCONFIG. Is it actually
defined somewhere in the system headers? Anyway it seems like its absence
is hidden by the following lines:

src/include/libpq/pqcomm.h:
85-/* Some systems don't have it, so default it to 0 so it doesn't
86- * have any effect on those systems. */
87:#ifndef  AI_ADDRCONFIG
88:#define  AI_ADDRCONFIG 0
89-#endif

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


Re: [HACKERS] sugsestions

2003-07-09 Thread Rod Taylor
On Tue, 2003-07-08 at 21:31, ivan wrote:
 What do you think about :
 
 1. OPTION RETURNS NULL ON NULL INPUT (when function is created) change to
   RETURNS val ON NULL INPUT  ???

I personally think this should be up to the specific function to
capture.  This way it could be a complex result.

 2. CREATE TYPE .. with  INHERITS (..) like in CREATE TABLE
  but type should be normaly with including base type
  create type A AS (A INT,B INT);
 and
  create type B AS (C INT, D INT) INHERITS( A ); ==
  create type B AS (A INT, B INT, C INT, D INT );
  can be ??

I like this.  The equivalent table syntax for absorbing table structure
into another table is LIKE:

CREATE TABLE othertable (acol integer);
CREATE TABLE a (col integer, LIKE othertable, anothercol integer);

I could see:

CREATE TYPE a AS (a integer, b integer);
CREATE TYPE b AS (LIKE a, c integer, d integer);

 5. What do you think about crontab in postgres database , like pg_crontab
   ?

This has been debated several times.  Each time it has ended with
standard cron being the best solution for cron.


signature.asc
Description: This is a digitally signed message part


Re: [HACKERS] CREATE DATABASE command in Extended Query mode of 3.0

2003-07-09 Thread Tom Lane
Carlos Guzman Alvarez [EMAIL PROTECTED] writes:
 Hello:
 No, it should just work.  Can you give a test case?  Do you see similar
 problems with other utility commands, or is it only CREATE DATABASE?

 I have made a litlle test more and i have it working now, i have made 
 change for send a Sync message instead of a Flush message after execute 
 the command and now seems to be working as expected, is this correct or 
 it needs to work with the Flush too??

You do need to use Sync rather than Flush to create transaction
boundaries and error restart points.  I suspect your problem was coming
from having only a Flush and not a Sync between the CREATE DATABASE and
the *prior* command.

regards, tom lane

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


[HACKERS] Behind on email

2003-07-09 Thread Bruce Momjian
You might have noticed I am behind on email.

I had a big family reunion at my house during the July 4th holiday, with
16 people staying for 2-4 days.  This cut into my email time, and I left
for OSCON and Linuxtag right after that.

I am stuggling to read email and be visible at OSCON.  I am not sure if
I can get the backlog cleared before the 15th.  I return from Linuxtag
on the evening of the 14th.

For those waiting with patches, I will get to them.  Sorry.

-- 
  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 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [HACKERS] CREATE DATABASE command in Extended Query mode of 3.0

2003-07-09 Thread Carlos Guzman Alvarez
Hello:

You do need to use Sync rather than Flush to create transaction
boundaries and error restart points.  I suspect your problem was coming
from having only a Flush and not a Sync between the CREATE DATABASE and
the *prior* command.


Huummm there are no prior executed commands, the CREATE DATABASE command 
is the first i execute after connect to the server :)



--
Best regards
Carlos Guzmán Álvarez
Vigo-Spain


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


[HACKERS] initcap incompatibility issue

2003-07-09 Thread nolan
The initcap function is not completely consistent with Oracle's initcap
function:

 SELECT initcap('alex hyde-whyte');

In Oracle 9.2i this will return 'Alex Hyde-White', in PostgreSQL 7.3.3
it returns 'Alex Hyde-white'.

It looks like a relatively simple change to oracle_compat.c in
backend/utils/adt, but is this a bugfix that can be made during the
pre-beta period for 7.4 or does it need to wait?
--
Mike Nolan

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [HACKERS] initcap incompatibility issue

2003-07-09 Thread nolan
 
 The initcap function is not completely consistent with Oracle's initcap
 function:
 
  SELECT initcap('alex hyde-whyte');
 
 In Oracle 9.2i this will return 'Alex Hyde-White', in PostgreSQL 7.3.3
 it returns 'Alex Hyde-white'.

No, it doesn't change the 'y' to an 'i', that's a typo in my earlier
note.  As far as I can tell, not capitalizing the first letter after a dash
is the only inconsistency with Oracle's implementation of this function.

If a patch is in order at this time, I will try to produce it, I need to 
learn set up CVS and how to do that anyway.  :-)
--
Mike Nolan

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [HACKERS] initcap incompatibility issue

2003-07-09 Thread nolan
 As far as I can tell, not capitalizing the first letter after a dash
 is the only inconsistency with Oracle's implementation of this function.

Wrong again.  Oracle also capitalizes the first letter after a comma, 
semicolon, colon, period, and both a single and double quote.  (And that's 
all I've tested so far.)

So, I guess I need to write a program to test all possible combinations
to see how incompatible the function is.

Making this change will be a larger patch than I had initially anticipated.

That also brings into question whether this is really a bugfix or a
specification change, a question which is relevant since we're in the 
feature freeze for 7.4.
--
Mike Nolan 

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] initcap incompatibility issue

2003-07-09 Thread scott.marlowe
On Wed, 9 Jul 2003 [EMAIL PROTECTED] wrote:

  As far as I can tell, not capitalizing the first letter after a dash
  is the only inconsistency with Oracle's implementation of this function.
 
 Wrong again.  Oracle also capitalizes the first letter after a comma, 
 semicolon, colon, period, and both a single and double quote.  (And that's 
 all I've tested so far.)
 
 So, I guess I need to write a program to test all possible combinations
 to see how incompatible the function is.
 
 Making this change will be a larger patch than I had initially anticipated.
 
 That also brings into question whether this is really a bugfix or a
 specification change, a question which is relevant since we're in the 
 feature freeze for 7.4.

It sounds like Oracle is simply regexing for anything that ISN'T a letter 
to initcap right after it.  If that's the case, you could just regex too.


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

   http://www.postgresql.org/docs/faqs/FAQ.html


[HACKERS] Beta start date

2003-07-09 Thread Bruce Momjian

Let's start beta July 18 or that weekend.  I can catch up with email by
then, and Tom will have the elog() changes done by then too.

---

Bruce Momjian wrote:
 You might have noticed I am behind on email.
 
 I had a big family reunion at my house during the July 4th holiday, with
 16 people staying for 2-4 days.  This cut into my email time, and I left
 for OSCON and Linuxtag right after that.
 
 I am stuggling to read email and be visible at OSCON.  I am not sure if
 I can get the backlog cleared before the 15th.  I return from Linuxtag
 on the evening of the 14th.
 
 For those waiting with patches, I will get to them.  Sorry.

-- 
  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 4: Don't 'kill -9' the postmaster


Re: [HACKERS] running transactions in postgresql

2003-07-09 Thread Alvaro Herrera
On Tue, Jul 08, 2003 at 07:41:48AM -0700, Jenny - wrote:

 [unquotable HTML, please post only text/plain!]

At transaction start
(src/backend/access/transam/xact.c::StartTransaction()),
src/backend/storage/lmgr/lmgr.c::XactLockTableInsert() is executed,
which takes a special lock on a ficticious XactLockTableId.

Maybe that's what you are seeing?

-- 
Alvaro Herrera (alvherre[a]dcc.uchile.cl)
Uno puede defenderse de los ataques; contra los elogios se esta indefenso

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

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [HACKERS] Beta start date

2003-07-09 Thread Mendola Gaetano
Bruce Momjian [EMAIL PROTECTED] wrote:
 Let's start beta July 18 or that weekend.  I can catch up with email by
 then, and Tom will have the elog() changes done by then too.

What about the PITR ( point in time recovery )? 
I mean: the 7.4 will have PITR or not ?


Thank you in advance
Gaetano




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


Re: [HACKERS] Beta start date

2003-07-09 Thread Christopher Kings-Lynne
 Bruce Momjian [EMAIL PROTECTED] wrote:
  Let's start beta July 18 or that weekend.  I can catch up with email by
  then, and Tom will have the elog() changes done by then too.
 
 What about the PITR ( point in time recovery )? 
 I mean: the 7.4 will have PITR or not ?

Nope.

Chris


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


Re: [HACKERS] weird problem

2003-07-09 Thread Gavin Sherry
On Thu, 10 Jul 2003, Christopher Kings-Lynne wrote:

 Just saw this on our demo server:
 
 [EMAIL PROTECTED]:~/htdocs/webdb/conf# /usr/local/pgsql-7.3.3/bin/psql -p5473
 phppgadmin
 psql: FATAL:  cannot open segment 1 of relation
 pg_trigger_tgrelid_tgname_index (target block 8310112): No such file or
 directory

Seems like a hosed file system to me. You'll probably need to go to
backups and should do some hardware tests.

Which file system is this running on. There seem to be a large number of
people on IRC will similar problems when running on ReiserFS.

Gavin


---(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: [HACKERS] weird problem

2003-07-09 Thread Alvaro Herrera
On Thu, Jul 10, 2003 at 11:45:09AM +1000, Gavin Sherry wrote:
 On Thu, 10 Jul 2003, Christopher Kings-Lynne wrote:
 
  Just saw this on our demo server:
  
  [EMAIL PROTECTED]:~/htdocs/webdb/conf# /usr/local/pgsql-7.3.3/bin/psql -p5473
  phppgadmin
  psql: FATAL:  cannot open segment 1 of relation
  pg_trigger_tgrelid_tgname_index (target block 8310112): No such file or
  directory
 
 Seems like a hosed file system to me. You'll probably need to go to
 backups and should do some hardware tests.

Hmm...  I was thinking the index could be somehow corrupted.  However,
it's strange that all databases have the same problem, since pg_trigger
is not shared across databases.

Have you tried reindexing pg_trigger?


 Which file system is this running on. There seem to be a large number of
 people on IRC will similar problems when running on ReiserFS.

Well, older versions of ReiserFS corrupted data for me after crashes
(not PG data though -- CUPS config files and stuff).  I supposed newer
versions were fixed, and I think Cristopher runs FreeBSD anyway?

-- 
Alvaro Herrera (alvherre[a]dcc.uchile.cl)
Uno puede defenderse de los ataques; contra los elogios se esta indefenso

---(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: [HACKERS] weird problem

2003-07-09 Thread Christopher Kings-Lynne
 Hmm...  I was thinking the index could be somehow corrupted.  However,
 it's strange that all databases have the same problem, since pg_trigger
 is not shared across databases.
 
 Have you tried reindexing pg_trigger?

Can't - I can't log into any database.

Maybe it's one of psql's startup queries causing the problem?

Chris


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


[HACKERS] static dumper idea

2003-07-09 Thread Christopher Kings-Lynne
How's this for an idea?  We release a statically compiled version of pg_dump
(from the 7.4 tree say) that is able to dump 7.3, 7.2 databases etc.  We
recommend to people that they use that to dump their existing database?

We could have it continually available as a database dumper...

Chris


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


Re: [HACKERS] initcap incompatibility issue

2003-07-09 Thread Tom Lane
scott.marlowe [EMAIL PROTECTED] writes:
 On Wed, 9 Jul 2003 [EMAIL PROTECTED] wrote:
 Wrong again.  Oracle also capitalizes the first letter after a comma, 
 semicolon, colon, period, and both a single and double quote.  (And that's 
 all I've tested so far.)

 It sounds like Oracle is simply regexing for anything that ISN'T a letter 
 to initcap right after it.  If that's the case, you could just regex too.

Or more likely, use the appropriate ctype.h function (isalpha, probably).

 That also brings into question whether this is really a bugfix or a
 specification change, a question which is relevant since we're in the 
 feature freeze for 7.4.

AFAIK, our specification for this function is be like Oracle, so it's
a bug fix and fair game for 7.4.  Of course, the sooner you get it in
the more likely we'll see it that way ;-).  Later in beta, only critical
bugfixes will be accepted, and this one surely ain't very critical.

regards, tom lane

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

   http://www.postgresql.org/docs/faqs/FAQ.html


[HACKERS] Array functions 7.4

2003-07-09 Thread Christopher Kings-Lynne
Hi Guys,

Is there a new function I can use in 7.4 to get an array as a recordset?
eg. I want an easy way of splitting up all the aclitems from an aclitem[],
rather than trying to parse it all in PHP.  (usernames with commas in them
are the problem you see!)

Chris


---(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: [HACKERS] weird problem

2003-07-09 Thread Stephan Szabo

On Thu, 10 Jul 2003, Christopher Kings-Lynne wrote:

  Hmm...  I was thinking the index could be somehow corrupted.  However,
  it's strange that all databases have the same problem, since pg_trigger
  is not shared across databases.
 
  Have you tried reindexing pg_trigger?

 Can't - I can't log into any database.

 Maybe it's one of psql's startup queries causing the problem?

Maybe, perhaps try a standalone backend (I think you'll need to give it a
-P as well).  But it is wierd that it's happening on all databases.



---(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: [HACKERS] Possible psql bug

2003-07-09 Thread Philip Yarra
On Thu, 10 Jul 2003 12:35 pm, Christopher Kings-Lynne wrote:
 When I run psql on freebsd/alpha with latest CVS and no postmaster running,
 I get this:
 bizarre socket name

Interesting... I'm running OSF on Alpha and I get the usual 
/tmp/.s.PGSQL.5432. Perhaps it's related to IPv6 socket changes? I'm pretty 
sure we don't have IPv6 support, so it would make sense it doesn't show up 
here if I guess right.

What's your `uname -a`? FreeBSD has had IPv6 support for a while, IIRC.

Regards, Philip.

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [HACKERS] Possible psql bug

2003-07-09 Thread Christopher Kings-Lynne
 Interesting... I'm running OSF on Alpha and I get the usual
 /tmp/.s.PGSQL.5432. Perhaps it's related to IPv6 socket changes? I'm
pretty
 sure we don't have IPv6 support, so it would make sense it doesn't show up
 here if I guess right.

 What's your `uname -a`? FreeBSD has had IPv6 support for a while, IIRC.

FreeBSD alpha.cacheboy.net 4.7-STABLE FreeBSD 4.7-STABLE #0: Mon Feb  3
19:25:10 WST 2003
[EMAIL PROTECTED]:/home/obj/usr/src/sys/GENERIC  alpha

I seem to have IPV6 running:

de0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500
inet 192.168.0.200 netmask 0xff00 broadcast 192.168.0.255
inet6 fe80::200:f8ff:fe22:4ba6%de0 prefixlen 64 scopeid 0x1
ether 00:00:f8:22:4b:a6
media: Ethernet autoselect (10baseT/UTP)
status: active
lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff00
ppp0: flags=8010POINTOPOINT,MULTICAST mtu 1500
sl0: flags=c010POINTOPOINT,LINK2,MULTICAST mtu 552
faith0: flags=8002BROADCAST,MULTICAST mtu 1500


Chris


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed:

2003-07-09 Thread Kenji Sugita
From: Kurt Roeckx [EMAIL PROTECTED]
Subject: Re: [HACKERS] PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid 
argument
Date: Sun, 6 Jul 2003 18:44:35 +0200

;;; On Sun, Jul 06, 2003 at 06:30:04PM +0200, Kurt Roeckx wrote:
;;;  Try the attached patch instead.
;;; 
;;; Oops, that one was a little broken. I change it.
;;; 
;;; Try the attached one instead.

I tried the newest one.

  Red Hat 6.2
$ postmaster
# Waiting forever

$ top
 11:24am  up 276 days, 14:12,  2 users,  load average: 0.90, 0.66, 0.35
46 processes: 44 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: 49.6% user,  0.8% system,  0.0% nice, 49.5% idle
Mem:  2009220K av, 1544312K used,  464908K free,   37792K shrd, 1402556K buff
Swap:  265064K av,4024K used,  261040K free   78444K cached

  PID USER PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
12074 sugita10   0  1668 1668  1328 R   0 99.2  0.0   1:00 postmaster
..

  Mac OS X 10.2.6
$ postmaster
2003-07-08 11:48:32 [1512] LOG:  PGSTAT: socket() failed: Protocol not supported


Kenji Sugita  

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] Problem retrieve Chinese characters in browser

2003-07-09 Thread Gerhard Haring
Colin Ng (IWE) wrote:
 Hi everybody,
  
 I created a db with encoding 'SQL-ASCII'. And I wrote a JSP application 
 to manipulate corporate information which including both 
 Traditional/Simplified Chinese characters. However, I can read both 
 Traditional/Simplified Chinese information from my MS Access (OS: 
 TChinese Win2K+MS Office XP with switch default language setting for 
 workaround) but I can't read Simplified Chinese completely from the 
 browser! (Some characters become '??' even I set the codepage for the 
 JSP page). Can anybody help?

Probably, but not here. This is the list about development of
PostgreSQL. User support questions are off-topic here. If your question
is PostgreSQL-related, may I kindly ask you to post on a more suitable
PostgreSQL list, like pgsql-general?

Anyway it seems to me like your question is more related to HTML or your
particular browser and doesn't have to do much with the database. There
are appropriate newsgroups for this as well.

Lastly, putting chinese characters in a database with encoding SQL-ASCII
is obviously going to create problems. SQL-ASCII is the encoding which
contains the 127 characters from the US-ASCII charset, nothing more. I'd
 recommend you use a BIG-5 or UNICODE database encoding instead.

-- Gerhard



---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [HACKERS] Possible psql bug

2003-07-09 Thread Philip Yarra
On Thu, 10 Jul 2003 01:33 pm, Christopher Kings-Lynne wrote:
 FreeBSD alpha.cacheboy.net 4.7-STABLE FreeBSD 4.7-STABLE #0: Mon Feb  3

Hmm... I have 7.4devel built on FreeBSD 4.8 Intel running ipv6 at home - I'll 
try the same tonight. It might help determine if it's architecture or OS.

Regards, Philip.

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