Re: [PATCHES] WIP: plpgsql source code obfuscation

2008-01-28 Thread Gregory Stark
at is advantage? It wouldn't require any core changes. It would be just another PL language to load which can be installed like other ones. This could be a big advantage because it doesn't look like there is a lot of support for putting th obfuscation directly into the core

Re: [PATCHES] WIP: plpgsql source code obfuscation

2008-01-28 Thread Gregory Stark
has any opportunity to substitute its result for the original in prosrc. That might be interesting for other applications like compiled languages, though I think they would still want to save the source in prosrc and the bytecode in probin. -- Gregory Stark EnterpriseDB http://www.en

Re: [PATCHES] WIP: plpgsql source code obfuscation

2008-01-28 Thread Gregory Stark
ass it to the normal plperl. In such a scheme I think you would put the key in an attribute of the language. Either in pg_lang or some configuration location which the obfuscate:plperl interpreter knows where to find. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me abo

Re: [PATCHES] WIP: plpgsql source code obfuscation

2008-01-28 Thread Gregory Stark
exempt free software from any crypto export licenses. Doesn't stop some other country from coming up with the same idea of course but we don't generally worry about what laws some hypothetical country might introduce at some point in the future. That way lies madness. -- Gregory Sta

Re: [PATCHES] Proposed patch: synchronized_scanning GUC variable

2008-01-29 Thread Gregory Stark
skew, plus page headers, and every record will have a different system data such as xmin for one. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training! ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [PATCHES] [8.4] Updated WITH clause patch (non-recursive)

2008-01-30 Thread Gregory Stark
lan. Or somehow to check whether it wouldn't be faster to just inline the memoized node directly because perhaps there's a path available which would work for this read of it. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-De

[PATCHES] Bitmap index scan preread using posix_fadvise (Was: There's random access and then there's random access)

2008-01-30 Thread Gregory Stark
int32 n = PG_GETARG_INT32(0); int32 lobound = PG_GETARG_INT32(1); int32 hibound = PG_GETARG_INT32(2); Datum *elems = palloc(sizeof(Datum) * n); ArrayType *retval; int i; for (i=0; i -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about Ent

Re: [PATCHES] Bitmap index scan preread using posix_fadvise

2008-02-01 Thread Gregory Stark
"Gregory Stark" <[EMAIL PROTECTED]> writes: > Aside from some autoconf tests and the documentation for the GUC I > think it's all in there. I'm sorry, it seems I accidentally grabbed an old tree to generate this patch. I'll send along a better more recen

Re: [PATCHES] Bitmap index scan preread using posix_fadvise

2008-02-01 Thread Gregory Stark
ray(select (1+random()*100)::integer from generate_series(1,100))); bitmap-preread-v8.diff.gz Description: Binary data -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support! ---

Re: [PATCHES] Proposed patch for bug #3921

2008-02-03 Thread Gregory Stark
Kind of verbose but nice that it's the same syntax as constraints. Not sure how easy it would be to shoehorn into t he like processing, I could look at that if you want. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Re

Re: [PATCHES] Proposed patch for 8.3 VACUUM FULL crash

2008-02-11 Thread Gregory Stark
utside of CVS in this case we perhaps suffered from the opposite problem. The patch was fairly heavily tested on this end before it was posted and I'm not sure those tests have been repeated since the merge. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com

Re: [PATCHES] Proposed patch to change TOAST compression strategy

2008-02-18 Thread Gregory Stark
ind a few backreferences. I'll try some tests and see. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [PATCHES] Logging conflicted queries on deadlocks

2008-03-21 Thread Gregory Stark
at. As the patch stands, every query involved > in the deadlock will be reported, which might be undesirable. We could > make the test use the outermost session user's ID instead of current > ID, but that might only move the security risks someplace else. > Thoughts? Perhaps

Re: [PATCHES] Logging conflicted queries on deadlocks

2008-03-21 Thread Gregory Stark
"Gregory Stark" <[EMAIL PROTECTED]> writes: > There's no way the other transaction's timeout could fire while we're doing > this is there? Are we still holding the lw locks at this point which would > prevent that? Ah, reading the patch I see comments in

Re: [PATCHES] int8/float8/time/timestamp[tz]/float4 passed by value, was Re: Fix HAVE_LONG[_LONG]_INT_64 to really define to 1

2008-03-24 Thread Gregory Stark
d correct every time and now > because of the passbyval nature of int8, the !AggState version is not slower > than using the pointer directly. Does this mean count() and sum() are slower on a 32-bit machine? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get train

Re: [PATCHES] int8/float8/time/timestamp[tz]/float4 passed by value, was Re: Fix HAVE_LONG[_LONG]_INT_64 to really define to 1

2008-03-24 Thread Gregory Stark
g I've been wanting to do for a while and basically the same approach I would have taken. It seems sound to me. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches

Re: [PATCHES] Re: int8/float8/time/timestamp[tz]/float4 passed by value, was Re: Fix HAVE_LONG[_LONG]_INT_64 to really define to 1

2008-03-24 Thread Gregory Stark
"Zoltan Boszormenyi" <[EMAIL PROTECTED]> writes: > Zoltan Boszormenyi írta: >> Gregory Stark írta: >>> 4) Your problems with tsearch and timestamp etc raise an interesting >>> problem. >>>We don't need to mark this in pg_control because

Re: [PATCHES] [WIP] Keeping track of snapshots

2008-03-28 Thread Gregory Stark
ction which needs a snapshot... AFAICT VACUUM had better not ever need a snapshot because its xmin isn't included in other vacuum commands' globalxmin so there's no guarantee that if it had a snapshot that the tuples visible in that snapshot wouldn't disappear out from

Re: [PATCHES] Consistent \d commands in psql

2008-03-31 Thread Gregory Stark
ust your user functions. That's a real headache and it gets worse as we add more and more system functions too. It might be cute to see if the pattern matches any user functions and if not try again with system functions. So you would still get results if you did "\df rtrim&

Re: [PATCHES] Consistent \d commands in psql

2008-03-31 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> It might be cute to see if the pattern matches any user functions and if not >> try again with system functions. So you would still get results if you did >> "\df

Re: [PATCHES] Consistent \d commands in psql

2008-03-31 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> One --perhaps nice, perhaps not-- property of this is that if you defined a >> function named "rtrim" and then did "\df rtrim" it would show you _both_

Re: [PATCHES] Consistent \d commands in psql

2008-04-01 Thread Gregory Stark
nd proposal. I prefer it to my own first proposal or any of the others. I admit I was thinking primarily of non-globbing cases for pattern. As in, I would want \df rtrim to "work". I suppose it could be annoying to have to type \df public.* -- there's nothing stopping us from

Re: [PATCHES] psql command aliases support

2008-04-02 Thread Gregory Stark
wful. Even if it's not implemented right away I think we should figure out what the syntax would be for passing arguments to be interpolated into the query before backing ourselves into a corner. I can't imagine much of a use case for being able to alias backslash commands themselves. Th

Re: [PATCHES] Consistent \d commands in psql

2008-04-02 Thread Gregory Stark
k the same logic as \df applies for those other things too. \dt pg_class should "just work". And if you create a macaddr data type it doesn't seem like too much of an imposition to play it safe and have \dT macaddr show the user that there are now two matching data types. So I guess I

Re: [PATCHES] psql command aliases support

2008-04-03 Thread Gregory Stark
; > Of course, the patch doesn't work this way. Only complete tokens delivered by > the parser are substituted, illustrated here with your example: To be more explicit what I meant was someone doing #= \alias old select version(); ... #= \oldd #= \old #= select 'where is all my output

Re: [PATCHES] psql command aliases support

2008-04-03 Thread Gregory Stark
kages where packagename like :1 \setquery bbdb select * from bbdb where name like :1 \query deb postgres \query bbdb peter to run a saved query. I'm not attached to "setquery" though. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches

Re: [PATCHES] psql command aliases support

2008-04-03 Thread Gregory Stark
"Bernd Helmle" <[EMAIL PROTECTED]> writes: > --On Donnerstag, April 03, 2008 14:36:59 +0100 Gregory Stark > <[EMAIL PROTECTED]> wrote: > >>> \o foo instead of \i foo -- check your keyboard layout >> >> The point is here you've typed a diffe

Re: [PATCHES] Expose checkpoint start/finish times into SQL.

2008-04-04 Thread Gregory Stark
record that the last checkpoint record *points to*. That represents the "guarantee" that the database is making to the sysadmin about data integrity. Everything before that time is guaranteed to have reached data files already. Everything after it may or may not be in the data files and has

Re: [PATCHES] Ordered Append WIP patch v1

2008-04-06 Thread Gregory Stark
"Bruce Momjian" <[EMAIL PROTECTED]> writes: > Alvaro Herrera wrote: >> Gregory Stark wrote: >> > >> > Here's the WIP patch I described on -hackers to implemented "ordered" >> > append >> > nodes. >> >> D

Re: [PATCHES] Database owner installable modules patch

2008-04-06 Thread Gregory Stark
hich case we wouldn't need an uninstall script at all. The hacks to do this seem pretty dirty but on the other hand the idea of having modules consist of a bunch of objects rather than arbitrary SQL actually seems cleaner and more robust. -- Gregory Stark EnterpriseDB http://www.

Re: [PATCHES] Indexam API changes

2008-04-08 Thread Gregory Stark
han have to wait for the complete index scan to finish before processing any. Is that it? In general I think we need to be more open to incremental improvements. I think there are several fronts on which we refuse patches to do X because it's useless without Y and have nobody working on Y bec

Re: [PATCHES] Partial match in GIN

2008-04-08 Thread Gregory Stark
verloading the comparison function. Then if the support function is there it supports that type of scan and if it doesn't then it doesn't, rather than depending on a magic third argument to completely change behaviour. You can always share code using an internal function or if the behavi

[PATCHES] EXPLAIN progress info

2008-04-08 Thread Gregory Stark
uch as BSD where the default will probably be C-t). But no reviewing it until we finish with the March patches! Do as I say, not as I do :( explain-progress.diff.gz Description: Binary data -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about Enterprise

Re: [PATCHES] EXPLAIN progress info

2008-04-08 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> I know I should still be looking at code from the March Commitfest but I was >> annoyed by this *very* FAQ: > >> http://archives.postgresql.org/pgsq

Re: [PATCHES] EXPLAIN progress info

2008-04-09 Thread Gregory Stark
"Heikki Linnakangas" <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Gregory Stark <[EMAIL PROTECTED]> writes: >>> There are downsides: >> >> Insurmountable ones at that. This one already makes it a non-starter: >> >>>

Re: [PATCHES] EXPLAIN progress info

2008-04-10 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> I think a better way to get a real "percentage done" would be to add a method >> to each node which estimates its percentage done based on the percentage done >

Re: [PATCHES] datum passed to macro which expects a pointer

2008-04-12 Thread Gregory Stark
es > pass by value instead of pass by reference. There was a patch to do this posted recently here as well. http://archives.postgresql.org/pgsql-patches/2008-03/msg00335.php Hm. I suppose it's true that you could make Datum 64-bit even on 32-bit machines and make int8 and float8 pas

Re: [PATCHES] Improve shutdown during online backup

2008-04-16 Thread Gregory Stark
is have a separate program (I would write a client but a server-side function would work too) to kick off users based on various criteria you can specify. Then you can put in your backup scripts two commands, one to kick off idle users and then do a smart shutdown. -- Gregory Stark EnterpriseD

Re: [PATCHES] Proposed patch - psql wraps at window width

2008-04-17 Thread Gregory Stark
he ioctl's going to get back but it's unlikely to be right. In any case I may want to format the output to a width narrower than the window because I'm going to narrow it. Also, how would you suggest figuring the width to use for output going to a file? ioctl is irrelevant in th

Re: [PATCHES] Proposed patch - psql wraps at window width

2008-04-17 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> Also, how would you suggest figuring the width to use for output going to a >> file? ioctl is irrelevant in that case, imho it should just default to 80 >> colu

Re: [PATCHES] Proposed patch - psql wraps at window width

2008-04-18 Thread Gregory Stark
ll be formatted with a line length appropriate to the current terminal (using an ioctl(2) if available, the value of $COLUMNS, or falling back to 80 characters if neither is available). Cat pages will only be saved when the default formatting can be used, that is when

Re: [PATCHES] Proposed patch - psql wraps at window width

2008-04-18 Thread Gregory Stark
"Bryce Nesbitt" <[EMAIL PROTECTED]> writes: > I asked the folks over at "Experts Exchange" to test the behavior of the ioctl I always thought that was a joke domain name, like Pen Island.com. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com

Re: [PATCHES] float4/float8/int64 passed by value with tsearchfixup

2008-04-18 Thread Gregory Stark
I for i386 does no such thing. You can get behaviour like that from GCC using function attributes like regparam but it's not the default. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! -- Sent via pgsql-pat

Re: [PATCHES] float4/float8/int64 passed by value with tsearchfixup

2008-04-20 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >>> Tom Lane wrote: >>>> Specifically, I think what you missed is that on some platforms C >>>> functions pass or return float values differently from si

Re: [PATCHES] float4/float8/int64 passed by value with tsearchfixup

2008-04-20 Thread Gregory Stark
27;t see any way not to kill v0 for non-integral types if we want to make float4 and float8 pass-by-value. We could leave those pass-by-reference and just make bigint pass-by-value. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand P

Re: [PATCHES] [HACKERS] Proposed patch - psql wraps at window width

2008-04-29 Thread Gregory Stark
HTML" for example, nor would we want there to > be.) Well there's no unaligned HTML or aligned unaligned either... > I think that could be fixed easily by having the syntax be something > like > > \pset format aligned:80 > \pset format aligned:autowrap I suppose. I

Re: [PATCHES] [HACKERS] Proposed patch - psql wraps at window width

2008-04-30 Thread Gregory Stark
\pset format html:autowrap But I think we agree that isn't happening so why spell it "aligned:autowrap" instead of just "wrap"? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning -- Se

Re: [PATCHES] create or replace language

2008-05-05 Thread Gregory Stark
; the trusted flag as well. I'm not so sure. What about if a PL language wants to include a version number in the language handler? Or if a new version has to change the name for some reason -- perhaps they discover that the old name doesn't work on some linkers for so

Re: [PATCHES] Patch to change psql default banner v6

2008-05-15 Thread Gregory Stark
the top of \?. > > The purpose of 'help' is to provide useful help. If it only says "see \?" > then it's just redirecting you somewhere else, which isn't useful. Haven't been following this thread. Has the idea of making "help" just a

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-18 Thread Gregory Stark
"David Fetter" <[EMAIL PROTECTED]> writes: > On Mon, May 19, 2008 at 12:21:20AM -0400, Gregory Stark wrote: >> "Zoltan Boszormenyi" <[EMAIL PROTECTED]> writes: >> > Also, it seems there are no infinite recursion detection: >> > >>

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-18 Thread Gregory Stark
d the results. But that's not actually reliable. It's quite possible to have clauses which will limit the output but not in a way the database can determine. Consider for example a tree-traversal for a binary tree stored in a recursive table reference. The DBA might know that th

Re: [PATCHES] [HACKERS] WITH RECURSIVE patch V0.1

2008-05-19 Thread Gregory Stark
at concept with the join plans like merge join or hash join which expect you to be able to be able to process the records in a specific order? It sounds like you might have to keep around a stack of started executor nodes or something but hopefully we can avoid anything like that because, w

Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1

2008-05-21 Thread Gregory Stark
't have already. The recursive query syntax in the spec actually does include the ability to assign an output column to show what level of recursive iteration you're on. So alternately we could have a GUC variable which just allows the DBA to prohibit any recursive query without such

Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1

2008-05-21 Thread Gregory Stark
ry. > > statement_timeout :) Good point. Though it occurs to me that if you set FETCH_COUNT in psql (or do the equivalent in your code ) statement_timeout becomes much less useful. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's

[PATCHES] \d+ should display the storage options for columns

2008-05-21 Thread Gregory Stark
+(storage[0]=='m' ? "MAIN" : + (storage[0]=='x' ? "EXTENDED" : + (storage[0]=='e' ? "EXTERNAL" : + "???"; + #ifdef WIN32

Re: [PATCHES] \d+ should display the storage options for columns

2008-05-21 Thread Gregory Stark
"Gregory Stark" <[EMAIL PROTECTED]> writes: > Oleg pointed out to me here that while we have a command to *set* the toast > storage characteristics there's no actual supported way to display the current > settings. > > It seems like this would be a reasonable

Re: [PATCHES] \d+ should display the storage options for columns

2008-05-23 Thread Gregory Stark
(storage[0]=='e' ? "external" : ! "???", ! false); ! printTableAddCell(&cont, PQgetvalue(res, i, 6), false)

Re: [PATCHES] Feature: give pg_dump a WHERE clause expression

2008-06-02 Thread Gregory Stark
he dependencies between them. That's functionality that isn't available elsewhere and can't be reproduced without just reimplementing pg_dump. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! -- Sent via pgsq

Re: [PATCHES] [HACKERS] Hint Bits and Write I/O

2008-06-27 Thread Gregory Stark
ld be simpler to have a wrapper function HTSV() macro which passes flexible=true to HTSV_internal(). Then vacuum can call HTSV_internal(). I'm not sure what the performance tradeoff is between having an extra argument to HTSV and having HTSV check a global which messes with optimizations.

Re: [PATCHES] [HACKERS] Hint Bits and Write I/O

2008-06-27 Thread Gregory Stark
values were found? If HTSV can hint xmin for a tuple but finds xmax still in progress perhaps that's a good sign it's not worth dirtying the page? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's Post

Re: [PATCHES] Explain XML patch v2

2008-07-02 Thread Gregory Stark
"Tom Raney" <[EMAIL PROTECTED]> writes: > This is an update to my EXPLAIN XML patch submitted a few days ago. > > I've added a documentation patch and modified some of the code per comments > by > Gregory Stark. You should update the wiki at http://wiki.po

Re: [PATCHES] WIP Join Removal

2008-09-02 Thread Gregory Stark
ossible joins to *add*. So even if the user writes "select * from invoices where customer_id=?" the planner might be able to discover that it can find those records quicker by scanning customer, finding the matching and then using an index to look them up in invoices. -- G

Re: [PATCHES] WIP Join Removal

2008-09-02 Thread Gregory Stark
ROM b) Can do a semijoin without taking care to avoid duplicating records in "a" if there should be duplicate values of "pk" in "b". c) Turn bad mysqlish queries which are really semijoins (used to work around their historic lack of subqueries) such as: SELECT DISTIN

<    1   2   3