Re: [HACKERS] parallel regression test failure

2003-07-27 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes:
> That is a very good guess.  All the errors seem related to the parser.

No, I don't think bison's got anything to do with it.  AFAICS all the
reported failures look more like syscache-level problems.  I'm betting
on a locking issue.  It'll be easier to find once you guys home in on
the date we broke it.

regards, tom lane

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


Re: [HACKERS] postmaster core ( finally I have it )

2003-07-27 Thread Tom Lane
"Mendola Gaetano" <[EMAIL PROTECTED]> writes:
> The process killed made always the same select ( with different
> id_package ):

> SELECT id_publisher, publisher_name, id_package, package_name
> FROM v_psl_package_info
> WHERE id_package = 177;

> (gdb) where
> #0  0x08171fdd in RelationBuildRuleLock ()
> #1  0x081722ab in RelationBuildDesc ()
> #2  0x0817311c in RelationIdGetRelation ()
> #3  0x08077b95 in relation_open ()
> #4  0x08077d24 in heap_openrv ()
> #5  0x080b1015 in addRangeTableEntry ()
> #6  0x080ab6de in transformTableEntry ()
> #7  0x080ab942 in transformFromClauseItem ()
> #8  0x080ab321 in transformFromClause ()
> #9  0x0809f639 in transformSelectStmt ()
> #10 0x0809dcc4 in transformStmt ()
> #11 0x0809da06 in parse_analyze ()

Hmm.  RelationBuildRuleLock is concerned with reading the rule
information for a table; specifically, it's evidently trying to
read the rules for v_psl_package_info.  I suspect some form of
data corruption in the pg_rewrite row(s) for this table.  Do you
see any misbehavior when you do

select * from pg_rewrite where ev_class = 'v_psl_package_info'::regclass

In particular, are any of the columns NULL in these rows?

regards, tom lane

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


Re: [HACKERS] postmaster core ( finally I have it )

2003-07-27 Thread Mendola Gaetano
From: "Tom Lane" <[EMAIL PROTECTED]>
> "Mendola Gaetano" <[EMAIL PROTECTED]> writes:
> > The process killed made always the same select ( with different
> > id_package ):
> 
> > SELECT id_publisher, publisher_name, id_package, package_name
> > FROM v_psl_package_info
> > WHERE id_package = 177;
> 
> > (gdb) where
> > #0  0x08171fdd in RelationBuildRuleLock ()
> > #1  0x081722ab in RelationBuildDesc ()
> > #2  0x0817311c in RelationIdGetRelation ()
> > #3  0x08077b95 in relation_open ()
> > #4  0x08077d24 in heap_openrv ()
> > #5  0x080b1015 in addRangeTableEntry ()
> > #6  0x080ab6de in transformTableEntry ()
> > #7  0x080ab942 in transformFromClauseItem ()
> > #8  0x080ab321 in transformFromClause ()
> > #9  0x0809f639 in transformSelectStmt ()
> > #10 0x0809dcc4 in transformStmt ()
> > #11 0x0809da06 in parse_analyze ()
> 
> Hmm.  RelationBuildRuleLock is concerned with reading the rule
> information for a table; specifically, it's evidently trying to
> read the rules for v_psl_package_info.  I suspect some form of
> data corruption in the pg_rewrite row(s) for this table.  Do you
> see any misbehavior when you do
> 
> select * from pg_rewrite where ev_class = 'v_psl_package_info'::regclass

All seems good.

> In particular, are any of the columns NULL in these rows?

I did:
select * 
from pg_rewrite 
where ev_class = 'v_psl_package_info'::regclass and
  ( rulename is null or
ev_class is null or
ev_attr is null or
ev_type is null or
is_instead is null or
ev_qual is null or
ev_action is null );


and I had:  No rows.



v_psl_package_info is a view, shall we look in another direction ?




thank you 
Gaetano




---(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] [PATCHES] PATCH: Memory leaks on start-up

2003-07-27 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes:
> This patch no longer applies cleanly.  The call is now:
>   freeaddrinfo_all(hint.ai_family, addrs);
> Would you please submit a new patch, or is it no longer required?

That part of the patch is not needed (it is the same as what I changed,
except that while I was at it I renamed freeaddrinfo2 to the hopefully
more mnemonic freeaddrinfo_all).  The change in miscinit should still
work though.

regards, tom lane

---(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] postmaster core ( finally I have it )

2003-07-27 Thread Tom Lane
"Mendola Gaetano" <[EMAIL PROTECTED]> writes:
> From: "Tom Lane" <[EMAIL PROTECTED]>
>> I suspect some form of
>> data corruption in the pg_rewrite row(s) for this table.  Do you
>> see any misbehavior when you do
>> 
>> select * from pg_rewrite where ev_class = 'v_psl_package_info'::regclass

> All seems good.

I really don't see any other explanation for a crash in that routine
than problems with the pg_rewrite data.

Do you get this any time you try to do something with the
v_psl_package_info view, or is it a once-in-a-while problem?
If the latter, I wonder whether it could be an issue with a
flaky disk sector ...

regards, tom lane

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


[HACKERS] make clean fails (more info)

2003-07-27 Thread nolan
Sorry if I didn't mention it before, but this was on FreeBSD.
--
Mike Nolan

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


[HACKERS] Make clean fails

2003-07-27 Thread nolan
Make clean fails on an up-to-date CVS (as of 2:40 PM CDT on Sunday).

Here's the final part of the output:

make[2]: Leaving directory `/home/nolan/beta/pgsql/contrib/tablefunc'
make[2]: Entering directory `/home/nolan/beta/pgsql/contrib/tips'
make[2]: Nothing to be done for `clean'.
make[2]: Leaving directory `/home/nolan/beta/pgsql/contrib/tips'
make[2]: Entering directory `/home/nolan/beta/pgsql/contrib/tsearch'
rm -f libtsearch.a
rm -f libtsearch.so libtsearch.so.0 libtsearch.so.0.0
rm -f tsearch.sql
rm -f crc32.o morph.o txtidx.o query.o gistidx.o rewrite.o
rm -f parser.c
rm -rf results tmp_check log
rm -f regression.diffs regression.out regress.out run_check.out
make[2]: Leaving directory `/home/nolan/beta/pgsql/contrib/tsearch'
make: *** tsearch2: No such file or directory.  Stop.
make: Entering an unknown directorymake: Leaving an unknown directorymake[1]: **
* [clean] Error 2
make[1]: Leaving directory `/home/n
--
Mike Nolan



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

   http://archives.postgresql.org


Re: [HACKERS] postmaster core ( finally I have it ) [ vacuum pg_rewrite ]

2003-07-27 Thread Mendola Gaetano
From: "Tom Lane" <[EMAIL PROTECTED]>
> "Mendola Gaetano" <[EMAIL PROTECTED]> writes:
> > From: "Tom Lane" <[EMAIL PROTECTED]>
> >> I suspect some form of
> >> data corruption in the pg_rewrite row(s) for this table.  Do you
> >> see any misbehavior when you do
> >>
> >> select * from pg_rewrite where ev_class =
'v_psl_package_info'::regclass
>
> > All seems good.
>
> I really don't see any other explanation for a crash in that routine
> than problems with the pg_rewrite data.
>
> Do you get this any time you try to do something with the
> v_psl_package_info view, or is it a once-in-a-while problem?
> If the latter, I wonder whether it could be an issue with a
> flaky disk sector ...

Is once-in-a-while but always at 00 minutes. This select is performed each
20 minutes and
the core happen always at 00 never at 20 and never at 40!

I have scheduled also a vacuumdb -z each 15 minutes so only at
00 these are running together.

I had another core at 21:00 today and this is the log of the vacuum
( there was that error just during the pg_rewrite vacuum!):

INFO:  --Relation pg_catalog.pg_description--
INFO:  Pages 12: Changed 0, Empty 0; Tup 1390: Vac 0, Keep 0, UnUsed 1.
Total CPU 0.00s/0.00u sec elapsed 0.20 sec.
INFO:  --Relation pg_toast.pg_toast_16416--
INFO:  Pages 0: Changed 0, Empty 0; Tup 0: Vac 0, Keep 0, UnUsed 0.
Total CPU 0.00s/0.00u sec elapsed 0.01 sec.
INFO:  Analyzing pg_catalog.pg_description
INFO:  --Relation pg_catalog.pg_group--
INFO:  Pages 1: Changed 0, Empty 0; Tup 3: Vac 0, Keep 0, UnUsed 9.
Total CPU 0.00s/0.00u sec elapsed 0.00 sec.
INFO:  --Relation pg_toast.pg_toast_1261--
INFO:  Pages 0: Changed 0, Empty 0; Tup 0: Vac 0, Keep 0, UnUsed 0.
Total CPU 0.00s/0.00u sec elapsed 0.01 sec.
INFO:  Analyzing pg_catalog.pg_group
INFO:  --Relation pg_catalog.pg_proc--
INFO:  Pages 111: Changed 0, Empty 0; Tup 1822: Vac 0, Keep 0, UnUsed 272.
Total CPU 0.02s/0.00u sec elapsed 0.29 sec.
INFO:  --Relation pg_toast.pg_toast_1255--
INFO:  Pages 0: Changed 0, Empty 0; Tup 0: Vac 0, Keep 0, UnUsed 0.
Total CPU 0.00s/0.00u sec elapsed 0.00 sec.
INFO:  Analyzing pg_catalog.pg_proc
INFO:  --Relation pg_catalog.pg_rewrite--
INFO:  Pages 47: Changed 0, Empty 0; Tup 231: Vac 0, Keep 0, UnUsed 74.
Total CPU 0.00s/0.00u sec elapsed 0.07 sec.
INFO:  --Relation pg_toast.pg_toast_16410--
INFO:  Pages 22: Changed 0, Empty 0; Tup 77: Vac 0, Keep 0, UnUsed 33.
Total CPU 0.00s/0.00u sec elapsed 0.03 sec.
INFO:  Analyzing pg_catalog.pg_rewrite
WARNING:  Message from PostgreSQL backend:
The Postmaster has informed me that some other backend
died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am
going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
connection to server was lost
vacuumdb: vacuum  empdb failed


I think we are near the solution now.


Thank you
Gaetano





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


[HACKERS] make check createdb fails

2003-07-27 Thread nolan
More problems with the latest CVS on FreeBSD:

make[3]: Leaving directory `/home/nolan/beta/pgsql/contrib/spi'
/bin/sh ./pg_regress --temp-install --top-builddir=../../.. --schedule=./paralle
l_schedule --multibyte=SQL_ASCII
== removing existing temp installation==
== creating temporary installation==
== initializing database system   ==
== starting postmaster==
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Segmentation fault (core dumped)

--
Mike Nolan

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

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


Re: [HACKERS] postmaster core ( finally I have it ) [ vacuum pg_rewrite ]

2003-07-27 Thread Tom Lane
"Mendola Gaetano" <[EMAIL PROTECTED]> writes:
> Is once-in-a-while but always at 00 minutes. This select is performed each
> 20 minutes and
> the core happen always at 00 never at 20 and never at 40!

Now that is very interesting ... why would that be?

Could we see the definition of this view?

> I had another core at 21:00 today and this is the log of the vacuum
> ( there was that error just during the pg_rewrite vacuum!):

I think that's just coincidence.

regards, tom lane

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


[HACKERS] FAQ programming entry?

2003-07-27 Thread Robert Creager

Hey Guys,

I'm working on translating my system to use pg_sphere.  The question I
have, which I think would make a good FAQ entry (or section is usage
example?), is that I have a C language trigger function.  How do I use
spoint (and other types) internal to that set of functions?

Note that I am being deliberately lazy here, as I'm sure I could figure
it out looking at the source code, but I don't find anything in the
document which would help me.  Additionally, I don't see any header
files installed in the pgsql directory tree related to pg_sphere...

Do you want me to try and write this?

Cheers,
Rob

-- 
 14:29:11 up 9 days, 18:29,  2 users,  load average: 2.01, 2.02, 2.00


pgp0.pgp
Description: PGP signature


Re: [HACKERS] postmaster core ( finally I have it ) [ vacuum pg_rewrite ]

2003-07-27 Thread Mendola Gaetano
"Tom Lane" <[EMAIL PROTECTED]> writes:
> "Mendola Gaetano" <[EMAIL PROTECTED]> writes:
> > Is once-in-a-while but always at 00 minutes. This select is performed
each
> > 20 minutes and
> > the core happen always at 00 never at 20 and never at 40!
>
> Now that is very interesting ... why would that be?
>
> Could we see the definition of this view?

Of course here it is:

CREATE OR REPLACE VIEW v_psl_package_info AS
  SELECT pb.id_publisher   AS id_publisher,
 pb.name   AS publisher_name,
 pk.id_package AS id_package,
 pk.name   AS package_name

  FROM  v_packages pk JOIN v_publishers pb USING (id_publisher);




CREATE OR REPLACE VIEW v_packages AS
  SELECT p.id_packageAS id_package,
 p.id_publisher  AS id_publisher,
 p.name  AS name,
 p.information   AS information,
 p.description   AS description,
 sp_lookup_key('package_type', p.id_package_type)
 AS TYPE,
 sp_lookup_key('target', p.id_target)
 AS target,
 p.port  AS port,
 p.priority  AS priority,
 sp_lookup_key('fec', p.id_fec)
 AS fec,
 p.input_group   AS input_group,
 p.output_group  AS output_group,
 CASE WHEN p.updatable
  THEN 1
  ELSE 0
 END AS updatable,
 p.checksum  AS checksum,
 p.version   AS version,
 p.start_fileAS start_file,
 p.view_target_group AS view_target_group,
 p.target_group  AS target_group,
 CASE WHEN p.auto_listen
  THEN 1
  ELSE 0
 END AS auto_listen,
 CASE WHEN p.public_flag
  THEN 1
  ELSE 0
 END AS public_flag,
 p.needed_versionAS needed_version,
 p.logic_version AS logic_version,
 p.package_size  AS package_size,
 ps.id_drm_process   AS id_drm_process,
 ps.id_cas_service   AS id_cas_service,
 ps.id_cas_settings  AS id_cas_settings,
 ps.id_drm_service   AS id_drm_service

  FROM packages p LEFT OUTER JOIN package_security ps USING (id_package)
  ORDER BY p.id_publisher, p.name;




CREATE OR REPLACE VIEW v_publishers AS
  SELECT p.id_publisher AS id_publisher,
 p.loginAS login,
 p.password AS password,
 p.ftp_password AS ftp_password,
 p.name AS name,
 p.address  AS address,
 p.city AS city,
 sp_lookup_descr('country', p.id_country)
AS country,
 p.zip  AS zip,
 p.phone_number AS phone_number,
 p.fax_number   AS fax_number,
 p.emailAS email,
 p.web_site AS web_site,
 p.description  AS description,
 v.id_pid   AS id_pid,
 v.id_transponder AS id_transponder,
 v.transponder  AS transponder,
 v.pid  AS pid,
 v.satelliteAS satellite,
 v.frequencyAS downlink_freq,
 v.polarization AS polarization,
 v.fec  AS fec,
 v.symbol_rate  AS symbol_rate,
 v.description  AS txp_description,
 a.multicast_ip AS multicast_ip

  FROM publishers p JOIN v_pids v USING (id_pid)
JOIN addresses a USING (id_publisher)
  WHERE id_publisher<>0
  ORDER BY p.name;


CREATE OR REPLACE VIEW v_pids AS
  SELECT p.id_pid  AS id_pid,
 t.id_transponder  AS id_transponder,
 t.nameAS transponder,
 p.pid AS pid,
 sp_lookup_descr('orbital_ptn', t.orbital_pos)
   AS satellite,
 t.frequency   AS frequency,
 t.polarizationAS polarization,
 t.fec AS fec,
 t.symbol_rate AS symbol_rate,
 t.description AS description

  FROM  pids p JOIN transponders t USING (id_transponder);



and the code for the function sp_lookup_key:


CREATE OR REPLACE FUNCTION sp_lookup_key ( TEXT,INTEGER )
RETURNS TEXT AS'
DECLARE
  lookup_name  ALIAS FOR $1;
  my_id_keyALIAS FOR $2;
  my_id_lookup INTEGER;
  my_key   TEXT;
BEGIN

   SELECT INTO my_id_lookup id_lookup
   FROM v_lookup_tables
   WHERE name = lookup_name::varchar;

   IF NOT FOUND THEN
  RETURN NULL;
   END IF;

   SELECT INTO my_key key
   FROM lookup_tables
   WHERE id_table = my_id_lookup
   AND   id_key   = my_id_key;

   IF NOT FOUND THEN
  RETURN NULL;
   END IF;

   RETURN my_key;


END;
' LANGUAGE 'plpgsql'
WITH ( iscachable );



> > I had another core at 21:00 today and this is the log of the vacuum
> > ( there was that error just during the pg_rewrite vacuum!):
>
> I thi

[HACKERS] arrays

2003-07-27 Thread ivan

hi :>

i wrote function to change array to setof record, because better is
working with tuples .

http://www.psycho.pl/public/src/pgsql/array.tar.bz2

i will very glade when you check this , because im afraid thed i make same
mistakes .. (if its good ist could be added to contrib/array as one more
funciton)

its good to select like this (im writing from mem, not coping so sorry for
mistakes in names)

SELECT * FROM pg_catalog.pg_type t inner join pg_catalog.pg_namespace n ON
(t.typnamespace=n.oid) WHERE pg_type = 'my_type' AND n.nspname IN (SELECT
a FROM ( array_to_setof(current_schemas()) ) s (schema name));

declaration is setof record array_to_setof ( anyarray);

i trayed created it like "any" array_to_setof( anyarray) but i had problem
with select. i also trying write setof_to_array as aggregate, but i have
problem with returns type , because aggregate cat have 'anyarray' as
result ;(

thx for your opionion.
bye

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

   http://archives.postgresql.org


Re: [HACKERS] FAQ programming entry?

2003-07-27 Thread Robert Creager

Sorry, wrong list...

On Sun, 27 Jul 2003 14:37:59 -0600
Robert Creager <[EMAIL PROTECTED]> said something like:

> 
> Hey Guys,
> 
> I'm working on translating my system to use pg_sphere.  The question I
> have, which I think would make a good FAQ entry (or section is usage
> example?), is that I have a C language trigger function.  How do I use
> spoint (and other types) internal to that set of functions?
> 
> Note that I am being deliberately lazy here, as I'm sure I could
> figure it out looking at the source code, but I don't find anything in
> the document which would help me.  Additionally, I don't see any
> header files installed in the pgsql directory tree related to
> pg_sphere...
> 
> Do you want me to try and write this?
> 
> Cheers,
> Rob
> 
> -- 
>  14:29:11 up 9 days, 18:29,  2 users,  load average: 2.01, 2.02, 2.00
> 


-- 
 15:30:40 up 9 days, 19:31,  2 users,  load average: 2.00, 2.00, 2.00


pgp0.pgp
Description: PGP signature


[HACKERS] granularity of locks in postgresql

2003-07-27 Thread Jenny -
The following lines are from readme file present in the 
\src\backend\storage\lmgr folder of postgresql

"If we are setting a table level lock
Both the blockId and tupleId (in an item pointer this is called
the position) are set to invalid, if it is a page level lock the
blockId is valid, while the tupleId is still invalid.  Finally if
this is a tuple level lock (we currently never do this) then both
the blockId and tupleId are set to valid specifications."
I dont see any field called tupleId in LockTag..does it have another name?
Also, "(we currently never do this)"--> does this mean that we currently can 
acquire tuplelevel(row level) locks in postgresql?
Thank you
Jenny

_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

---(end of broadcast)---
TIP 6: Have you searched our list archives?
  http://archives.postgresql.org


Re: [HACKERS] [PATCHES] PATCH: Memory leaks on start-up

2003-07-27 Thread Bruce Momjian

miscinit.c part of patch applied.  Thanks.

The other part Tom already addressed.

---



Lee Kindness wrote:
Content-Description: message body text

> Tom, happier with the attached patch?
> 
> I'd have to disagree with regards to the memory leaks not being worth
> a mention - any such leak can cause problems when the PostgreSQL
> installation is either unattended, long-living andor has very high
> connection levels. Half a kilobyte on start-up isn't negligible in
> this light.
> 
> Regards, Lee.
> 
> Tom Lane writes:
>  > Lee Kindness <[EMAIL PROTECTED]> writes:
>  > > Guys, attached is a patch to fix two memory leaks on start-up.
>  > 
>  > I do not like the changes to miscinit.c.  In the first place, it is not
>  > a "memory leak" to do a one-time allocation of state for a proc_exit
>  > function.  A bigger complaint is that your proposed change introduces
>  > fragile coupling between CreateLockFile and its callers, in order to
>  > save no resources worth mentioning.  More, it introduces an assumption
>  > that the globals directoryLockFile and socketLockFile don't change while
>  > the postmaster is running.  UnlinkLockFile should unlink the file that
>  > it was originally told to unlink, regardless of what happens to those
>  > globals.
>  > 
>  > If you are intent on spending code to free stuff just before the
>  > postmaster exits, a better fix would be for UnlinkLockFile to free its
>  > string argument after using it.
> 

> Index: src/backend/libpq/pqcomm.c
> ===
> RCS file: /projects/cvsroot/pgsql-server/src/backend/libpq/pqcomm.c,v
> retrieving revision 1.157
> diff -u -r1.157 pqcomm.c
> --- src/backend/libpq/pqcomm.c12 Jun 2003 07:36:51 -  1.157
> +++ src/backend/libpq/pqcomm.c22 Jul 2003 14:16:46 -
> @@ -363,7 +363,7 @@
>   added++;
>   }
>  
> - freeaddrinfo(addrs);
> + freeaddrinfo2(family, addrs);
>  
>   if (!added)
>   {
> Index: src/backend/utils/init/miscinit.c
> ===
> RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/init/miscinit.c,v
> retrieving revision 1.104
> diff -u -r1.104 miscinit.c
> --- src/backend/utils/init/miscinit.c 27 Jun 2003 19:08:37 -  1.104
> +++ src/backend/utils/init/miscinit.c 22 Jul 2003 14:16:46 -
> @@ -673,8 +673,15 @@
>  static void
>  UnlinkLockFile(int status, Datum filename)
>  {
> - unlink((char *) DatumGetPointer(filename));
> - /* Should we complain if the unlink fails? */
> +  char *fname = (char *)DatumGetPointer(filename);
> +  if( fname != NULL )
> +{
> +  if( unlink(fname) != 0 )
> + {
> +   /* Should we complain if the unlink fails? */
> + }
> +  free(fname);
> +}
>  }
>  
>  /*

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

-- 
  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: [HACKERS] arrays

2003-07-27 Thread Tom Lane
ivan <[EMAIL PROTECTED]> writes:
> declaration is setof record array_to_setof ( anyarray);

> i trayed created it like "any" array_to_setof( anyarray) but i had problem
> with select. i also trying write setof_to_array as aggregate, but i have
> problem with returns type , because aggregate cat have 'anyarray' as
> result ;(

I think you want to declare it like this:

create function array_to_setof(anyarray) returns setof anyelement as ...

Joe Conway may already have written something like this --- look in his
contrib modules.

regards, tom lane

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


Re: [HACKERS] Make clean fails

2003-07-27 Thread Tom Lane
[EMAIL PROTECTED] writes:
> Make clean fails on an up-to-date CVS (as of 2:40 PM CDT on Sunday).

> make: *** tsearch2: No such file or directory.  Stop.

I suspect you forgot "-d" in your cvs update commands.  You really need
both -d and -P to make cvs update behave reasonably ... I have no idea
why they are not the default behavior.

regards, tom lane

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


[HACKERS] Error message editing is done (or at least I am)

2003-07-27 Thread Tom Lane
I'm declaring victory and going home ;-).  If anyone else would like
to make a cleanup pass over the error message texts, be my guest.

regards, tom lane

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

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


Re: [HACKERS] Error message editing is done (or at least I am)

2003-07-27 Thread Christopher Kings-Lynne
> I'm declaring victory and going home ;-).  If anyone else would like
> to make a cleanup pass over the error message texts, be my guest.

You're a legend, Tom.  We thank you :)

Chris


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


Re: [HACKERS] Error message editing is done (or at least I am)

2003-07-27 Thread Gavin Sherry
On Mon, 28 Jul 2003, Christopher Kings-Lynne wrote:

> > I'm declaring victory and going home ;-).  If anyone else would like
> > to make a cleanup pass over the error message texts, be my guest.
> 
> You're a legend, Tom.  We thank you :)

I agree. I gave a talk to an Australian unix user group on Friday night
and everyone was impressed with the logging modifications and the new wire
protocol.

Gavin


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

   http://archives.postgresql.org


Re: [HACKERS] arrays

2003-07-27 Thread Joe Conway
Tom Lane wrote:
Joe Conway may already have written something like this --- look in his
contrib modules.
I did write the function, but it isn't in any of the contrib modules.
Here's a link to the thread:
http://archives.postgresql.org/pgsql-hackers/2002-12/msg00453.php
It was never committed due to dissatisfaction over the fact that table 
functions cannot have columns from other FROM clause items as arguments. 
Since then Peter pointed out that SQL99 specifically includes this 
functionality with the keyword UNNEST, and uses a LATERAL clause to 
allow referencing adjacent FROM items. Hopefully I'll find time to 
pursue implementing that for 7.5.

Joe

---(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] Make clean fails

2003-07-27 Thread nolan
> [EMAIL PROTECTED] writes:
> > Make clean fails on an up-to-date CVS (as of 2:40 PM CDT on Sunday).
> 
> > make: *** tsearch2: No such file or directory.  Stop.
> 
> I suspect you forgot "-d" in your cvs update commands.  You really need
> both -d and -P to make cvs update behave reasonably ... I have no idea
> why they are not the default behavior.

Yep, that solved both the make clean and the coredump problems.
Is that piece of information in the developers FAQ anywhere?
--
Mike Nolan

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


[HACKERS] followup on previous

2003-07-27 Thread Christopher Kings-Lynne
Just a slight nitpick, shouldn't this line:

# - Previous Postgres Versions -

Be this:

# - Previous PostgreSQL Versions -

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


[HACKERS] new postgresql.conf

2003-07-27 Thread Christopher Kings-Lynne
Just saw these:

#default_transaction_isolation = 'read committed'
#default_transaction_read_only = false

Does the second option control the new read only transaction mode?  I
thought 'read only' was just a new level of transaction isolation (ie. one
of the 4 sql standard ones), so why does it need its own GUC var?

Chris


---(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] new postgresql.conf

2003-07-27 Thread Gavin Sherry
On Mon, 28 Jul 2003, Christopher Kings-Lynne wrote:

> Just saw these:
> 
> #default_transaction_isolation = 'read committed'
> #default_transaction_read_only = false
> 
> Does the second option control the new read only transaction mode?  I
> thought 'read only' was just a new level of transaction isolation (ie. one
> of the 4 sql standard ones), so why does it need its own GUC var?

It is a transaction access mode, not an isolation level. ansi sql supports
two modes: read only and read write.

Gavin


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


[HACKERS] Sorry/spam - how do you unsubscribe?

2003-07-27 Thread Steven Vajdic



---(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] Make clean fails

2003-07-27 Thread Tom Lane
[EMAIL PROTECTED] writes:
>> I suspect you forgot "-d" in your cvs update commands.  You really need
>> both -d and -P to make cvs update behave reasonably ... I have no idea
>> why they are not the default behavior.

> Yep, that solved both the make clean and the coredump problems.
> Is that piece of information in the developers FAQ anywhere?

It's in the "how to use CVS" instructions ...

regards, tom lane

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


Re: [HACKERS] new postgresql.conf

2003-07-27 Thread Tom Lane
"Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes:
> Just saw these:
> #default_transaction_isolation = 'read committed'
> #default_transaction_read_only = false
> Does the second option control the new read only transaction mode?

Yes.

> I thought 'read only' was just a new level of transaction isolation (ie. one
> of the 4 sql standard ones), so why does it need its own GUC var?

No, it's orthogonal to isolation.  A read-only transaction could
sensibly want either READ COMMITTED or SERIALIZABLE behavior, depending
on whether it wants to see the effects of commits while it's in progress.

regards, tom lane

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


Re: [HACKERS] Regression test failure date.

2003-07-27 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes:
> I have only been running nightly paralell regression runs since June 27,
> so it is possible that the paralell regression was broken in February,
> fixed in May, then broken some time after that.

Any further progress on this?

My best theory at the moment is that we have a problem with relcache
entry creation failing if it's interrupted by an SI inval message at
just the right time.  I don't much want to grovel through six months
worth of changelog entries looking for candidate mistakes, though.

regards, tom lane

---(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] Make clean fails

2003-07-27 Thread nolan
> > Yep, that solved both the make clean and the coredump problems.
> > Is that piece of information in the developers FAQ anywhere?
> 
> It's in the "how to use CVS" instructions ...

So it is.  I probably read that before I got CVS working here, and it
isn't mentioned (or that section of the docs referenced) in the CVS section 
in the Developer's FAQ.  

I found both sections insufficient for me to get CVS working here, and
since I am thinking about using it for another project I picked up a 
copy of 'ESSENTIAL CVS' to fill in some of the gaps in my knowledge.  

Just part of the baptism of fire for a newbie, I guess. :-)
--
Mike Nolan

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


Re: [HACKERS] Make clean fails

2003-07-27 Thread Philip Yarra
On Mon, 28 Jul 2003 04:27 pm, [EMAIL PROTECTED] wrote:
> Just part of the baptism of fire for a newbie, I guess. :-)

I've found the learning curve pretty steep too. Is it worth putting together 
some of these 'gotchas' into a neophyte-developer-FAQ? 

As a side note: anyone else noticed that developer.postgresql.org is 
displaying an apache test page? I assume this might be an indicator of work 
in progress.

Regards, Philip Yarra.

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


[HACKERS] developer.postgresql.org is broken

2003-07-27 Thread Christopher Kings-Lynne
It's showing the apache page.

Chris


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