Re: [PATCHES] PL/PGSQL: Dynamic Record Introspection

2005-07-14 Thread Neil Conway
Titus von Boxberg wrote: With the following patch it's possible to - extract all field names of a record into an array - extract field count of a record - address a single field of a record with a variable containing the field name (additional to the usual record.fieldname notation where the

Re: [PATCHES] Final cleanup of SQL:1999 references

2005-07-14 Thread Neil Conway
Simon Riggs wrote: This doc patch replaces all inappropriate references to SQL:1999 when it is used as if it were the latest (and/or still valid) SQL standard. Applied, thanks. -Neil ---(end of broadcast)--- TIP 4: Have you searched our list

Re: [PATCHES] PL/PGSQL: Dynamic Record Introspection

2005-07-14 Thread Pavel Stehule
good idea. it's what can eliminate not neccessery using plperl. I would to see it in plpgsql. regards Pavel On Thu, 14 Jul 2005, Titus von Boxberg wrote: Hi all, I needed introspection capabilities for record types to write more generic trigger procedures in PL/PGSQL. With the

Re: [PATCHES] thousands comma numeric formatting in psql

2005-07-14 Thread Bruce Momjian
Thanks, fixed, and applied. I also centralized the malloc into a function. We could use pg_malloc, but that doesn't export out to /scripts, where this is shared. We will fix that some day, but not right now. --- Eugen

Re: [PATCHES] A minor patch to mark xml/xslt functions immutable

2005-07-14 Thread Neil Conway
Ilia Kantor wrote: Immutability is obvious, because xml procession result depends on the document and request solely. Thanks, applied with some tweaks. I've attached the patch I applied. -Neil Index: contrib/xml2/pgxml.sql.in ===

Re: [PATCHES] Final cleanup of SQL:1999 references

2005-07-14 Thread Peter Eisentraut
Am Mittwoch, 13. Juli 2005 18:01 schrieb Simon Riggs: This doc patch replaces all inappropriate references to SQL:1999 when it is used as if it were the latest (and/or still valid) SQL standard. SQL:2003 is used in its place. I don't necessarily consider this search and replace to be

Re: [PATCHES] thousands comma numeric formatting in psql

2005-07-14 Thread Bruce Momjian
Eugen Nedelcu wrote: Regarding locale aproach, it is trivial to replace langinfo with localeconv: struct lconv *l = localeconv(); char *dec_point = l-decimal_point; instead of: #include langinfo.h char *dec_point = nl_langinfo(__DECIMAL_POINT); I used langinfo because in linux libc

Re: [PATCHES] A couple of patches for PostgreSQL 64bit support

2005-07-14 Thread Koichi Suzuki
I asked originally for some experimental evidence showing any value in having more than 2Gb of shared buffers. In the absence of any convincing demonstration, I'm not very inclined to worry about whether we can handle wider-than-int shared memory size. Hi, Attached is a result of pgbench

Re: [PATCHES] thousands comma numeric formatting in psql

2005-07-14 Thread Peter Eisentraut
Am Donnerstag, 14. Juli 2005 10:48 schrieb Bruce Momjian: OK, I have applied the following patch to make numerisep a boolean, made it locale-aware, set defaults if the locale doesn't return meaningful values, added code to handle locale-reported groupings, and updated the documentation. Then

Re: [PATCHES] thousands comma numeric formatting in psql

2005-07-14 Thread Tom Lane
Bruce Momjian pgman@candle.pha.pa.us writes: OK, I have applied the following patch to make numerisep a boolean, numericsep is no longer even remotely reasonable as a name for the parameter. Something like numeric_use_locale would be appropriate (but probably too wordy). The only question I

Re: [PATCHES] Final cleanup of SQL:1999 references

2005-07-14 Thread Neil Conway
Peter Eisentraut wrote: I think it would be less confusing in these cases to simply write This is conforming to the SQL standard. and then mention in the appendix that we consider SQL:2003 to be the baseline. How would this help? ISTM you are just suggesting we replace conforming to SQL:2003

Re: [PATCHES] Final cleanup of SQL:1999 references

2005-07-14 Thread Peter Eisentraut
Am Donnerstag, 14. Juli 2005 15:53 schrieb Neil Conway: How would this help? ISTM you are just suggesting we replace conforming to SQL:2003 with conforming with the SQL standard, and a note in the appendix that indicates by SQL standard we actually mean SQL:2003. I recall that most mentions of

Re: [PATCHES] Final cleanup of SQL:1999 references

2005-07-14 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: If people are really concerned about whether a given feature conforms to SQL-92, SQL:1999, or SQL:2003, all we have done is provided them with the same information in a slightly different form. No, you have *removed* the information. The convention we

Re: [PATCHES] Final cleanup of SQL:1999 references

2005-07-14 Thread Simon Riggs
On Thu, 2005-07-14 at 10:12 -0400, Tom Lane wrote: Neil Conway [EMAIL PROTECTED] writes: If people are really concerned about whether a given feature conforms to SQL-92, SQL:1999, or SQL:2003, all we have done is provided them with the same information in a slightly different form. No,

Re: [PATCHES] thousands comma numeric formatting in psql

2005-07-14 Thread Bruce Momjian
Tom Lane wrote: The only question I have is whether those locale values are single-byte strings in all locals, or could they be multi-byte or multi-character, in which case I have to treat them as strings. I think you have to assume they could be strings. OK, the following applied patch

Re: [PATCHES] thousands comma numeric formatting in psql

2005-07-14 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian pgman@candle.pha.pa.us writes: OK, I have applied the following patch to make numerisep a boolean, numericsep is no longer even remotely reasonable as a name for the parameter. Something like numeric_use_locale would be appropriate (but probably too wordy).

Re: [PATCHES] Change Ownership Permission Checks

2005-07-14 Thread Tom Lane
Stephen Frost [EMAIL PROTECTED] writes: Attached please find a patch to change how the permissions checking for alter-owner is done. With roles there can be more than one 'owner' of an object and therefore it becomes sensible to allow specific cases of ownership change for

Re: [PATCHES] PL/PGSQL: Dynamic Record Introspection

2005-07-14 Thread Titus von Boxberg
Neil Conway schrieb: Titus von Boxberg wrote: Can you supply some proper regression tests, please? i.e. patch sql/plpgsql.sql and expected/plpgsql.out in src/test/regress In sql/plpgsql.sql I have added a function testing the new features and altered expected/plpgsql.out A few minor

Re: [PATCHES] Final cleanup of SQL:1999 references

2005-07-14 Thread Neil Conway
Simon Riggs wrote: The main point is that SQL:1999 no longer has any validity as a standard and has been wholly superceded by SQL:2003. SQL:1999 has interest only for historical reasons, for those who care when a particular feature was introduced. Right; I guess the question is whether we

Re: [PATCHES] PL/PGSQL: Dynamic Record Introspection

2005-07-14 Thread Titus von Boxberg
Neil Conway schrieb: Titus von Boxberg wrote: Can you supply some proper regression tests, please? i.e. patch sql/plpgsql.sql and expected/plpgsql.out in src/test/regress In sql/plpgsql.sql I have added a function testing the new features and altered expected/plpgsql.out A few minor

Re: [PATCHES] PL/PGSQL: Dynamic Record Introspection

2005-07-14 Thread Titus von Boxberg
Neil Conway schrieb: I wonder if this is the right syntax. record%identifier is doing something fundamentally different from record.identifier, but the syntax doesn't make that clear. I don't have any concrete suggestions for improvement, mind you... :) What do you mean by right syntax. There

Re: [PATCHES] thousands comma numeric formatting in psql

2005-07-14 Thread Eugen Nedelcu
The new code is broken. Please test it with resonably large tables. Do not test it with querys like: select -132323435.34343; If I use a query like: select * from my_table limit 100; I can't see anything on my screen until I hit CTRL^C If I use a pager (\pset pager less) strange things