Re: [HACKERS] A worst case for qsort

2014-08-07 Thread Rod Taylor
On Thu, Aug 7, 2014 at 3:06 PM, Peter Geoghegan wrote: > I think that pre-sorted, all-unique text datums, that have all > differences beyond the first 8 bytes, that the user happens to > actually want to sort are fairly rare. While I'm sure it's not common, I've seen a couple of ten-million tup

Re: [HACKERS] A worst case for qsort

2014-08-07 Thread Rod Taylor
reduce conflict issues that a random ordering may cause between jobs. regards, Rod On Thu, Aug 7, 2014 at 5:23 PM, Rod Taylor wrote: > > On Thu, Aug 7, 2014 at 3:06 PM, Peter Geoghegan wrote: > >> I think that pre-sorted, all-unique text datums, that have all >> differenc

[HACKERS] Row Level Security UPDATE Confusion

2017-04-06 Thread Rod Taylor
4: ERROR: 42501: new row violates row-level security policy for table "t" LOCATION: ExecWithCheckOptions, execMain.c:2045 */ SET session authorization default; SELECT * FROM t; This seems consistent in both Pg 9.5 and upcoming Pg 10. -- Rod Taylor

Re: [HACKERS] Row Level Security UPDATE Confusion

2017-04-14 Thread Rod Taylor
On Thu, Apr 13, 2017 at 5:31 PM, Stephen Frost wrote: > Rod, all, > > * Joe Conway (m...@joeconway.com) wrote: > > On 04/13/2017 01:31 PM, Stephen Frost wrote: > > > * Robert Haas (robertmh...@gmail.com) wrote: > > >> On Thu, Apr 6, 2017 at 4:05 PM, Rod Ta

Re: [HACKERS] Row Level Security UPDATE Confusion

2017-04-14 Thread Rod Taylor
On Fri, Apr 14, 2017 at 7:41 AM, Rod Taylor wrote: > > > > On Thu, Apr 13, 2017 at 5:31 PM, Stephen Frost wrote: > >> Rod, all, >> >> * Joe Conway (m...@joeconway.com) wrote: >> > On 04/13/2017 01:31 PM, Stephen Frost wrote: >> > > * Rob

Re: [HACKERS] Row Level Security UPDATE Confusion

2017-04-14 Thread Rod Taylor
On Fri, Apr 14, 2017 at 9:09 AM, Stephen Frost wrote: > Rod, > > * Rod Taylor (rod.tay...@gmail.com) wrote: > > My actual use-case involves a range. Most users can see and manipulate > the > > record when CURRENT_TIMESTAMP is within active_period. Some users > >

[HACKERS] RLS in CTE incorrect permission failure

2017-06-21 Thread Rod Taylor
copy this policy to a number of structures. The function within the policy doesn't seem to be able to see records inserted by earlier statements in the CTE. Perhaps this is as simple as adding a command counter increment in the right place? Fails in 9.5.7 and HEAD. -- Rod Taylor cte_rl

Re: [HACKERS] RLS in CTE incorrect permission failure

2017-06-21 Thread Rod Taylor
On Wed, Jun 21, 2017 at 7:46 PM, Tom Lane wrote: > Rod Taylor writes: > > In the attached script, the second insert into t2 (as part of the CTE) > > should succeed. > > No, I don't think so. You declared the check function as STABLE which > means it is confined t

Re: [HACKERS] Row Level Security Documentation

2017-08-03 Thread Rod Taylor
spans more > rows. > Done. I couldn't figure out a morecols=1 equivalent to keep everything under the Policy heading without a full colspec. > For empty cells, maybe a dash would be clearer. Not sure. Looked cluttered to me. Tried N/A first which was even worse. -- Rod Taylor

Re: [HACKERS] Row Level Security UPDATE Confusion

2017-05-05 Thread Rod Taylor
at for you to check that you no longer see a > difference between the single ALL policy and the split SELECT/UPDATE > policies. > > Thanks! > > Stephen > -- Rod Taylor

[HACKERS] Row Level Security Documentation

2017-05-11 Thread Rod Taylor
I think the biggest piece missing is something to summarize the giant blocks of text. Attached is a table that has commands and policy types, and a "yes" if it applies. -- Rod Taylor diff --git a/doc/src/sgml/ref/create_policy.sgml b/doc/src/sgml/ref/create_policy.sgml index

Re: [HACKERS] Row Level Security Documentation

2017-05-11 Thread Rod Taylor
Of course, better thoughts appear immediately after hitting the send button. This version of the table attempts to stipulate which section of the process the rule applies to. On Thu, May 11, 2017 at 8:40 PM, Rod Taylor wrote: > I think the biggest piece missing is something to summarize

Re: [HACKERS] Changeset Extraction v7.3

2014-01-28 Thread Rod Taylor
On Tue, Jan 28, 2014 at 4:56 PM, Andres Freund wrote: > On 2014-01-28 21:48:09 +, Thom Brown wrote: > > On 28 January 2014 21:37, Robert Haas wrote: > > > On Tue, Jan 28, 2014 at 11:53 AM, Robert Haas > wrote: > > >> I've rebased it here and am hacking on it still. > > > > > > Andres and I a

Re: [HACKERS] record identical operator

2013-09-17 Thread Rod Taylor
On Tue, Sep 17, 2013 at 8:23 AM, Kevin Grittner wrote: > > Of course, that begs the question of whether == is already "taken". > If not, we could knock one '=' off of everything above except for > "equals". What existing uses are known for == ? > == is already taken as a common typo in plpgsql

Re: [HACKERS] pgbench progress report improvements

2013-09-21 Thread Rod Taylor
On Sat, Sep 21, 2013 at 4:55 AM, Fabien COELHO wrote: > > > I suggest getting the term "stddev" in there somehow, maybe like this: >> >> progress: 37.0 s, 115.2 tps, latency avg=8.678 ms stddev=1.792 >> > > My issue is to try to keep the line width under control so as to avoid > line breaks in

Re: [HACKERS][PROPOSAL] Covering + unique indexes.

2015-09-15 Thread Rod Taylor
On Tue, Sep 15, 2015 at 12:57 PM, Anastasia Lubennikova < a.lubennik...@postgrespro.ru> wrote: > > Proposal Clarification. > I see that discussion become too complicated. So, I'd like to clarify > what we are talking about. > > We are discussing 2 different improvements of index. > The one is "pa

[HACKERS] FKey not enforced resulting in broken Dump/Reload

2013-07-19 Thread Rod Taylor
A poorly coded trigger on the referencing table has the ability to break foreign keys, and as a result create a database which cannot be dumped and reloaded. The BEFORE DELETE trigger accidentally does RETURN NEW, which suppresses the DELETE action by the foreign key trigger. This allows the recor

Re: [HACKERS] Column Redaction

2014-10-10 Thread Rod Taylor
On Fri, Oct 10, 2014 at 10:56 AM, Stephen Frost wrote: > * Thom Brown (t...@linux.com) wrote: > > On 10 October 2014 12:45, Stephen Frost wrote: > > >> There's a difference between intending that there shouldn't be a way > > >> past security and just making access a matter of walking a longer >

[HACKERS] GIN over array of ENUMs

2013-01-11 Thread Rod Taylor
I wish to create this data structure but GIN does not currently support an array of ENUM. Is intarray() a good place to look into adding ENUM support or is there already an operator class for working supports enums that I simply don't see at the moment. This is being done as an alternative to a ve

Re: [HACKERS] PG 9.0 and standard_conforming_strings

2010-02-03 Thread Rod Taylor
On Wed, Feb 3, 2010 at 13:20, Robert Haas wrote: > On Wed, Feb 3, 2010 at 12:34 PM, Greg Sabino Mullane > wrote: >> Perl (DBD::Pg anyway) has been compatible since May 2008. > > I would interpret that to mean that there is a significant possibility > that a too-old DBD::Pg could get used with a

[HACKERS] CIText and pattern_ops

2010-04-23 Thread Rod Taylor
Is there any particular reason why the citext module doesn't have citext_pattern_ops operator family? Specifically, I wish to index for this type of query: ... WHERE citext_column LIKE 'Foo%'; This, of course, is equivalent to ILIKE 'Foo%' which does not appear to be indexable without using a fu

Re: [HACKERS] WIP: cross column correlation ...

2011-02-25 Thread Rod Taylor
> 4. Even if we could accurately estimate the percentage of the table > that is cached, what then? For example, suppose that a user issues a > query which retrieves 1% of a table, and we know that 1% of that table > is cached. How much of the data that the user asked for is cache? > Hard to say,

Re: [HACKERS] WIP: cross column correlation ...

2011-02-26 Thread Rod Taylor
On Fri, Feb 25, 2011 at 14:26, Alvaro Herrera wrote: > Excerpts from Rod Taylor's message of vie feb 25 14:03:58 -0300 2011: > > > How practical would it be for analyze to keep a record of response times > for > > given sections of a table as it randomly accesses them and generate some > > kind of

Re: [HACKERS] WIP: cross column correlation ...

2011-02-28 Thread Rod Taylor
> > But it's not the same as tracking *sections of a table*. > > I dunno. I imagine if you have a "section" of a table in different > storage than other sections, you created a tablespace and moved the > partition holding that section there. Otherwise, how do you prevent the > tuples from moving

Re: [HACKERS] foreign keys for array/period contains relationships

2011-03-20 Thread Rod Taylor
On Mon, Oct 25, 2010 at 15:11, Peter Eisentraut wrote: > Example #4: PK is period, FK is timestamp. FK must be contained in some > PK period. > > CREATE TABLE pk (a period PRIMARY KEY, ...); > > CREATE TABLE fk (x timestamp REFERENCES pk (a), ...); > > As above, we can probably arrange the opera

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-15 Thread Rod Taylor
& the & hotel: 268.577 ms 259.293 ms 257.408 ms hotel & and & the: 253.574 ms 258.071 ms 250.280 ms I was hoping that the 'and & the & hotel' case would improve with this patch to be closer to the 'hotel' search, as I thought that was the kind of thi

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-15 Thread Rod Taylor
itive skin home remedies removing rust heating does non raw apple cider home remedies help maintain healthy can vinegar mess up your apple cide vineger ph balance regards, Rod On Fri, Nov 15, 2013 at 12:51 PM, Alexander Korotkov wrote: > On Fri, Nov 15, 2013 at 6:57 PM, Rod Taylor wrote:

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-15 Thread Rod Taylor
On Fri, Nov 15, 2013 at 2:26 PM, Alexander Korotkov wrote: > On Fri, Nov 15, 2013 at 11:18 PM, Rod Taylor wrote: > >> 2%. >> >> It's essentially sentence fragments from 1 to 5 words in length. I wasn't >> expecting it to be much smaller. >> >&

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-18 Thread Rod Taylor
On Fri, Nov 15, 2013 at 2:42 PM, Alexander Korotkov wrote: > On Fri, Nov 15, 2013 at 11:39 PM, Rod Taylor wrote: > >> >> The patched index is 58% of the 9.4 master size. 212 MB instead of 365 MB. >> > > Good. That's meet my expectations :) > You mention tha

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-18 Thread Rod Taylor
I checked out master and put together a test case using a small percentage of production data for a known problem we have with Pg 9.2 and text search scans. A small percentage in this case means 10 million records randomly selected; has a few billion records. Tests ran for master successfully an

Re: [HACKERS] GIN improvements part2: fast scan

2013-11-18 Thread Rod Taylor
257.408 ms hotel & and & the: 253.574 ms 258.071 ms 250.280 ms I was hoping that the 'and & the & hotel' case would improve with this patch to be closer to the 'hotel' search, as I thought that was the kind of thing it targeted. Unfortunately, it did

Re: [HACKERS] PoC: Make it possible to disallow WHERE-less UPDATE and DELETE

2017-02-04 Thread Rod Taylor
On Thu, Feb 2, 2017 at 11:40 AM, Alvaro Herrera wrote: > Pavel Stehule wrote: > > > Identification of unjoined tables should be very useful - but it is far > to > > original proposal - so it can be solved separately. > > > > This patch is simple - and usually we prefer more simple patches than on

[HACKERS] LOCK TABLE .. DEFERRABLE

2016-04-05 Thread Rod Taylor
n the processes holding those locks. It also keeps a list of everything it did lock so they can be unlocked if necessary. I'll add it to the open November commitfest. regards, Rod Taylor diff --git a/doc/src/sgml/ref/lock.sgml b/doc/src/sgml/ref/lock.sgml index b946eab..e852f1d 100644 --- a/

Re: [HACKERS] LOCK TABLE .. DEFERRABLE

2016-04-05 Thread Rod Taylor
On Tue, Apr 5, 2016 at 1:10 PM, Simon Riggs wrote: > If a lock is successfully obtained on one table, but not on all tables, it >> releases that lock and will retry to get them as a group in the future. >> Since inheritance acts as a group of tables (top + recursive cascade to >> children), this

Re: [HACKERS] Allow "snapshot too old" error, to prevent bloat

2015-02-19 Thread Rod Taylor
On Wed, Feb 18, 2015 at 4:57 PM, Kevin Grittner wrote: > >> But max_standby_streaming_delay, max_standby_archive_delay and > >> hot_standby_feedback are among the most frequent triggers for > >> questions and complaints that I/we see. > >> > > Agreed. > > And a really bad one used to be vacuum_de

[HACKERS] 8.3 to 8.4 Upgrade issues

2010-08-10 Thread Rod Taylor
We recently upgraded from 8.3 to 8.4 and have seen a performance degredation which we are trying to explain and I have been asked to get a second opinion on the cost of going from LATIN1 to UTF8 (Collation and CType) where the encoding remained SQL_ASCII.. Does anybody have experience on the cost,

Re: [HACKERS] 8.3 to 8.4 Upgrade issues

2010-08-10 Thread Rod Taylor
On Tue, Aug 10, 2010 at 13:49, Tom Lane wrote: > Rod Taylor writes: >> Does anybody have experience on the cost, if any, of making this change? > >> Pg 8.3: >> Encoding: SQL_ASCII >> LC_COLLATE: en_US >> LC_CTYPE: en_US > >> Pg 8.4: >> Enc

Re: [HACKERS] array of domain types

2016-06-02 Thread Rod Taylor
On Thu, Jun 2, 2016 at 10:42 AM, Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > On 02.06.2016 17:22, Tom Lane wrote: > >> konstantin knizhnik writes: >> >>> Attached please find patch for DefineDomain function. >>> >> You didn't attach the patch, >> > > Sorry, but I did attached the pa

Re: [HACKERS] Design for In-Core Logical Replication

2016-07-20 Thread Rod Taylor
itial implementation may only allow mypub from a single connection. I also suspect multiple publications will be normal even if only 2 nodes. Old slow moving data almost always got different treatment than fast-moving data; even if only defining which set needs to hit the other node first and which set can trickle through later. regards, Rod Taylor

[HACKERS] Time bug with small years

2011-11-24 Thread Rod Taylor
I have no idea what is going on with the minutes/seconds, particularly for years under 1895 where it gets appended onto the timezone component? sk_test=# select version(); version Po

[HACKERS] NOT IN Doesn't use Anti Joins?

2009-12-17 Thread Rod Taylor
I'm sure there is a good reason why NOT IN will not use an Anti-Join plan equivalent to NOT EXISTS due to NULL handling, but in this particular case the value being compared is in the PRIMARY KEY of both structures being joined. The NOT IN plan was killed after 10 minutes. The NOT EXISTS plan retu

[HACKERS] update_process_title=off and logger, wal, ... processes

2009-12-29 Thread Rod Taylor
With the update_process_title parameter set to off some PostgreSQL processes still change their ps title to a different name than the default. I appreciate this setting came about for performance reasons which the logger, wal writer, autovacuum, and stats collector would not have but I actually req

Re: [HACKERS] WIP: default values for function parameters

2008-12-12 Thread Rod Taylor
How about IS or INTO? param_name IS 3 param_name IS 'some string value' 3 INTO param_name 'some string value' INTO param_name On Fri, Dec 12, 2008 at 8:47 AM, Pavel Stehule wrote: > 2008/12/12 David E. Wheeler : >> On Dec 12, 2008, at 2:39 PM, Tom Lane wrote: >> >>> So I think that really th

Re: FWD: Re: [HACKERS] Updated backslash consistency patch

2009-01-15 Thread Rod Taylor
I would settle for just following the search path as set by the user. If you explicitly include pg_catalog in the search path, then you should see those settings. If you do not explicitly include pg_catalog on the search_path, then it should not find those items. Right now pg_catalog sneaks its

Re: [HACKERS] remove flatfiles.c

2009-09-01 Thread Rod Taylor
On Tue, Sep 1, 2009 at 19:34, Greg Stark wrote: > On Wed, Sep 2, 2009 at 12:01 AM, Alvaro > Herrera wrote: > >> The use cases where VACUUM FULL wins currently are where storing two > >> copies of the table and its indexes concurrently just isn't practical. > > > > Yeah, but then do you really nee

Re: [HACKERS] COPY enhancements

2009-10-08 Thread Rod Taylor
> Yeah. I think it's going to be hard to make this work without having > standalone transactions. One idea would be to start a subtransaction, > insert tuples until one fails, then rollback the subtransaction and > start a new one, and continue on until the error limit is reached. > I've found p

[HACKERS] Could regexp_matches be immutable?

2009-10-14 Thread Rod Taylor
I tried making a functional index based on an expression containing the 2 argument regexp_matches() function. Is there a reason why this function is not marked immutable instead of normal? regards, Rod Taylor -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

Re: [HACKERS] Could regexp_matches be immutable?

2009-10-21 Thread Rod Taylor
> So, having dismissed my original off-the-cuff answer to Rod, the next > question is what's really going wrong for him.  I get this from > a quick trial: I wish I had kept specific notes on what I was actually trying to do. I tried to_number first then the expression as seen below. I guess I saw

Re: [HACKERS] Using views for row-level access control is leaky

2009-10-22 Thread Rod Taylor
> > \c - secretary > > CREATE OR REPLACE FUNCTION expose_person (person text, phone text) > RETURNS bool AS $$ > begin >  RAISE NOTICE 'person: % number: %', person, phone; >  RETURN true; > END; $$ LANGUAGE plpgsql COST 0.01; > > postgres=>  SELECT * FROM phone_number WHERE expose_person(perso

Re: [HACKERS] Out parameters handling

2009-03-07 Thread Rod Taylor
It wouldn't be so bad if you could assign internal and external column names. Within the function you call the column "v_foo" but the caller of the function receives column "foo" instead. OUT v_foo varchar AS "foo" Another alternative is requiring a prefix like plout for the replacement to occu

Re: [HACKERS] Out parameters handling

2009-03-07 Thread Rod Taylor
> actually - function name should be used as label now. This code is working: Not helpful for me. The most typical conflict I have is actually the OUT parameter and table name, not a column of the table. Really don't want to prefix all tables with a hardcoded schema or do variable substitution fo

Re: [HACKERS] Out parameters handling

2009-03-07 Thread Rod Taylor
On Sat, Mar 7, 2009 at 11:32 AM, Tom Lane wrote: > Robert Haas writes: >> On Sat, Mar 7, 2009 at 9:08 AM, Rod Taylor wrote: >>> It wouldn't be so bad if you could assign internal and external column >>> names. > >> This is a good point.  Uglifying the p

Re: [HACKERS] command.c breakup

2002-04-14 Thread Rod Taylor
I'm not exactly sure what you're touching, but could it wait for the below pg_depend patch to be either accepted or rejected? It lightly fiddles with a number of files in the command and catalog directories. http://archives.postgresql.org/pgsql-patches/2002-04/msg00050.php > > That shouldn't b

Re: [HACKERS] command.c breakup

2002-04-14 Thread Rod Taylor
Sounds fair. I'd have brought it up earlier but was away last week. The changes I made are very straight forward and easy enough to redo. -- Rod Taylor Your eyes are weary from staring at the CRT. You feel sleepy. Notice how restful it is to watch the cursor blink. Close your eyes

[HACKERS] Security Issue..

2002-04-14 Thread Rod Taylor
klash later. A number of pg_dump items will be moved into base functions. Trigger statement, type formatting (various view fields). Whats the radix of the numeric, int, etc. types anyway? As a bonus, this adds a layer between the actual system tables and the clients. Might allow changes to be d

Re: [HACKERS] Security Issue..

2002-04-14 Thread Rod Taylor
s to occur :) -- Rod Taylor Your eyes are weary from staring at the CRT. You feel sleepy. Notice how restful it is to watch the cursor blink. Close your eyes. The opinions stated above are yours. You cannot imagine why you ever felt otherwise. - Original Message - From: "Bruce Momjian&quo

Re: [HACKERS] Security Issue..

2002-04-14 Thread Rod Taylor
definition schema as accessable only from the information schema. Long term goal of course. It would take a few releases to ensure that everything was setup to be done like that. -- Rod Taylor Your eyes are weary from staring at the CRT. You feel sleepy. Notice how restful it is to watch the cursor

Re: [HACKERS] Security Issue..

2002-04-14 Thread Rod Taylor
wanted so I'll start puttering away at it. Theres a number of minor things missing or slightly out of whack which I hope to add as well. Timestamps on trigger creation, access levels on data types, etc. -- Rod Taylor Your eyes are weary from staring at the CRT. You feel sleepy. Notice how re

Re: [HACKERS] [PATCHES] ANSI Compliant Inserts

2002-04-14 Thread Rod Taylor
forgotten to add the value -- easy to do on wide tables. Thoughts? -- Rod Taylor - Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> To: "Bruce Momjian" <[EMAIL PROTECTED]> Cc: "Rod Taylor" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>

Re: [HACKERS] [PATCHES] ANSI Compliant Inserts

2002-04-14 Thread Rod Taylor
> > INSERT INTO tab VALUES ('val1'); -- bad by spec (not enforced) > > INSERT INTO tab VALUES ('val1', 'val2'); -- good > > I recall that this was the behavior we agreed we wanted. IMHO, it would > be conditional on the INSERT ... VALUES (DEFAULT) capability being > provided. I'm not sure if tha

[HACKERS] Stumbled upon a time bug...

2002-04-15 Thread Rod Taylor
x27;s seem to automatically account for this and automatically adjust the value when it gets passed to mktime(&tm). Should FreeBSD have it's mktime() in libc updated? CREATE TABEL tt ( tt TIMESTAMP ); INSERT INTO tt VALUES ('2002-4-7 2:0:0.0'); -- Rod Tay

[HACKERS] Array Iterator functions

2002-04-15 Thread Rod Taylor
ence a base type and a procedure. Not very portable. Can anyone suggest a better and more portable way to do it ? See also array_iterator.sql for an example on how to use this module. -- Rod Taylor ---(end of broadcast)--- TIP 3: if posting/reading thr

Re: [HACKERS] Operators and schemas

2002-04-15 Thread Rod Taylor
> 2. Use a restricted, perhaps fixed search-path for searching for > operators. For example, we might force the search path to have > pg_catalog first even when this is not true for the table name search > path. But I'm not sure what an appropriate definition would be. > A restricted search path

Re: [HACKERS] [PATCHES] [SQL] 16 parameter limit

2002-04-15 Thread Rod Taylor
On the note of NAMEDATALEN, a view in the INFORMATION_SCHEMA definition is exactly 2 characters over the current limit. ADMINISTRABLE_ROLE_AUTHORIZATIONS Not that it's a great reason, but it isn't a bad one for increasing the limit ;) -- Rod Taylor > Are we staying at 16 as the

Re: [HACKERS] [PATCHES] YADP - Yet another Dependency Patch

2002-04-15 Thread Rod Taylor
[ copied to hackers ] > 1. I don't like the code that installs and removes ad-hoc dependencies > from relations to type Oid. On its own terms it's wrong (if it were ... > explicit representation of pinning in the pg_depends table, perhaps it > would work to create a row claiming that "table 0 /

[HACKERS] Foreign Key woes -- 7.2 and ~7.3

2002-04-16 Thread Rod Taylor
at all -- which shouldn't be an issue as there is still the unique. Not the brightest thing to do, but surely the primary key shouldn't be enforced to exist before a plain old unique. If thats the case, then unique indecies need to be blocked until there is a primary key, or the first one

Re: [BUGS] [HACKERS] Foreign Key woes -- 7.2 and ~7.3

2002-04-16 Thread Rod Taylor
Understood. It's not what I was expecting to happen. Normally I always specifically state the match, so I was a little surprised by the behaviour. Makes sense to match the primary key and only the primary key though. -- Rod Taylor Your eyes are weary from staring at the CRT. You feel s

Re: [HACKERS] Index Scans become Seq Scans after VACUUM ANALYSE

2002-04-17 Thread Rod Taylor
The fact that an index exists adds a choice -- so by no means is the index ignored. But just because a Freeway exists across town doesn't make it faster than the sideroads. It depends on the day of week, time of day, and uncontrollable anomolies (accidents). -- Rod Taylor Your eyes are

Re: [HACKERS] [PATCHES] YADP - Yet another Dependency Patch

2002-04-17 Thread Rod Taylor
> 3. Isn't there a better way to find the initial dependencies? That > SELECT is truly ugly, and more to the point is highly likely to break > anytime someone rearranges the catalogs. I'd like to see it generated > automatically (maybe using a tool like findoidjoins); or perhaps we > could do th

Re: [HACKERS] [PATCHES] YADP - Yet another Dependency Patch

2002-04-18 Thread Rod Taylor
). -- Rod - Original Message - From: "Tom Lane" <[EMAIL PROTECTED]> To: "Rod Taylor" <[EMAIL PROTECTED]> Cc: "Hackers List" <[EMAIL PROTECTED]> Sent: Thursday, April 18, 2002 1:24 AM Subject: Re: [HACKERS] [PATCHES] YADP - Yet another Dep

Re: [HACKERS] Schema (namespace) privilege details

2002-04-18 Thread Rod Taylor
> Should the owner of a database (assume he's not a superuser) have the > right to drop any schema in his database, even if he doesn't own it? > I can see arguments either way on that one. Given that you've chosen to allow the owner of a schema or the table to drop a table, it would be consistent

Re: [HACKERS] Schema (namespace) privilege details

2002-04-18 Thread Rod Taylor
> > Another thing that would be needed to prevent users from creating new > > tables is to prevent them from creating schemas for themselves. I am not > > sure how to handle that --- should the right to create schemas be treated > > as a user property (a column of pg_shadow), or should it be atta

Re: [HACKERS] Schema (namespace) privilege details

2002-04-18 Thread Rod Taylor
> I'm not real comfortable with this. The design I proposed is based > fairly firmly on the Unix directory/file protection model --- which > is assuredly not perfect, but it's survived a lot of use and is not > known to have major flaws. You're suggesting that we should invent Will we be able t

Re: [HACKERS] Schema (namespace) privilege details

2002-04-18 Thread Rod Taylor
> That is, of course, a BSD-ism that would confuse a lot of the SysV people... > :) Yup.. But it's been around quite a while and I don't know of any horrible problems with it -- that said I've not actually tried it on OpenBSD (different mindset) but would be surprised if it wasn't the same. Sur

Re: [HACKERS] Schema (namespace) privilege details

2002-04-18 Thread Rod Taylor
> > Will we be able to accomplish the equivelent of the below? > > I think what you're depicting is the equivalent of a schema owner > dropping a table in his schema, right? Yes, I proposed allowing that, Yes, thats what I was looking for. Sorry if I missed that in the initial proposal. > > Ye

[HACKERS] Really annoying comments...

2002-04-19 Thread Rod Taylor
COMMENT ON DATABASE db IS 'Comment'; Now switch databases. Comment is gone. Of course, adding the comments to template1 will carry comments forward (in pg_description) to future DBs. Not fatal, but quite annoying. I suppose in order to add a comment field to pg_database it would need to be to

[HACKERS] Foreign keys and indexes.

2002-04-20 Thread Rod Taylor
In order to apply a dependency of foreign keys against a column set the most obvious way to go is via the unique index which in turn depends on the expected columns. A(id) -> B(id) A.id -> Foreign key -> Index on B.id -> B.id If B.id is dropped it'll cascade forward. The trick? Foreign keys

Re: [HACKERS] Foreign keys and indexes.

2002-04-20 Thread Rod Taylor
> Of course, since Trigger on A depends on A we also have > Trigger on A -> B.id Should read: Trigger on A -> relation A Triggers depend on relation which owns it :) ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send a

Re: [HACKERS] On-disk Tuple Size

2002-04-21 Thread Rod Taylor
> Having per-transaction command IDs might allow us to reduce the range of > the t_cmin and t_cmax fields. Unfortunately, probably by not all that > much, since one doesn't want to limit the number of commands within a > single transaction to something as silly as 65536. If you can figure out how

Re: [HACKERS] Really annoying comments...

2002-04-21 Thread Rod Taylor
--- From: "Dave Page" <[EMAIL PROTECTED]> To: "'Tom Lane'" <[EMAIL PROTECTED]> Cc: "Rod Taylor" <[EMAIL PROTECTED]>; "Hackers List" <[EMAIL PROTECTED]> Sent: Sunday, April 21, 2002 2:49 PM Subject: RE: [HACKERS] Really annoyin

[HACKERS] NAMEDATALEN revisited

2002-04-22 Thread Rod Taylor
Using current CVS (yesterday) I've rerun the benchmarks to see the effects of various NAMEDATALEN settings. 3 times per setting. First time is pgbench inserts (-s 5) Second time is pgbench run (-t 3000 -s 5) Third time is the postmaster during both of the above. I'll run it again tonight on a

[HACKERS] namedatalen part 2 (cont'd)

2002-04-23 Thread Rod Taylor
Each test set has 3 time sets. First is on pgbench -i (-s 5) Second is on pgbench -t 3000 -s 5 Third is on postmaster during the run of the first 2. The first test on a slow harddrive has a large effect for increasing the namedatalen length. Second through 4th sets don't really show any issue

Re: [HACKERS] namedatalen part 2 (cont'd)

2002-04-23 Thread Rod Taylor
> Haven't several people observed that the results from pgbench are > very inconsistent? Perhaps some results from OSDB would be worthwhile... I've not looked very hard at OSDB. But it doesn't seem to run out of the box. > Based on that data, I'd vote against making any changes to NAMEDATALEN.

[HACKERS] pg_constraint

2002-04-25 Thread Rod Taylor
For tracking of Foreign Keys, Check constraints, and maybe NULL / NOT NULL (specific type of check constraint) I intend to create (as per suggestion) pg_constraint. conrelid conname contype ('c'heck, 'f'oreign key, ???) conkey (int2vector of columns of relid, like pg_index.indkey) connum int4 --

Re: [HACKERS] pg_constraint

2002-04-26 Thread Rod Taylor
> > For tracking of Foreign Keys, Check constraints, and maybe NULL / NOT > > NULL (specific type of check constraint) I intend to create (as per > > suggestion) pg_constraint. > > Hmmm...I don't see the need at all for NOT NULL constraint tracking. The > spec doesn't seem to require it and we do

Re: [HACKERS] pg_constraint

2002-04-26 Thread Rod Taylor
> Could we instead insist on a unique name per-table, and make this table's > key be (conrelid, conname)? Assigning a number seems quite artificial. The only problem with this is that I don't want the rename of a constraint to have to fall over into the pg_depend table. pg_depend is currently h

Re: [HACKERS] pg_constraint

2002-04-26 Thread Rod Taylor
> > The only problem with this is that I don't want the rename of a > > constraint to have to fall over into the pg_depend table. pg_depend > > is currently happy with system OIDS or a Relation OID and some unique > > number to represent it -- much as pg_description wouldn't want to know > > the n

[HACKERS] Arrays in system tables

2002-04-26 Thread Rod Taylor
Just exactly how does one get an array into a system table? Of course, _int2 and int2[] aren't normal C constructs so using it within CATALOG won't work. I suppose thats why the vector types were invented? -- Rod ---(end of broadcast)--- TIP 4: D

Re: [HACKERS] Arrays in system tables

2002-04-26 Thread Rod Taylor
Ahh.. no wonder my aimless greps couldn't find anything. I should just have read the BKI stuff ;) Thanks -- Rod - Original Message - From: "Bruce Momjian" <[EMAIL PROTECTED]> To: "Rod Taylor" <[EMAIL PROTECTED]> Cc: "Hackers List" <[EMA

[HACKERS] Temp tables are curious creatures....

2002-04-29 Thread Rod Taylor
Appears psql needs to know how to differentiate between it's own temp tables and those of another connection. On the plus side, this takes care of a TODO item to add temp table listings to psql. Connection 1: template1=# create temp table junk(col1 int4); CREATE template1=# select * from junk;

Re: [HACKERS] Civility of core/hackers group

2002-04-29 Thread Rod Taylor
Wrote a rather long message first time through. Anyway, basic problem is the major tickmarks on the next release. SMPng, KSEs, and various security overhauls are touching many portions of the sourcecode in a single shot. Normal development since the project started has been fairly isolated. So

Re: [HACKERS] Civility of core/hackers group

2002-04-29 Thread Rod Taylor
> > There sure are a lot of arguments in the hackers list tho :) I do wish > > people would be a little less 'ad hominem' in their argument styles, > > however. > > Yes, things do get a little testy sometimes, and it does worry me, but > it seems to blow over quickly. Bah.. You can't beat a good

Re: [HACKERS] Temp tables are curious creatures....

2002-04-30 Thread Rod Taylor
> Is anyoune working on information schema (or pg_xxx views) for use in > psql and other development frontends? I had started to try an information schema. Didn't make it very far. Way too much information missing to come anywhere near spec -- so I've started trying to fill in those holes. Give

Re: [HACKERS] [INTERFACES] Schemas: status report, call for developers

2002-04-30 Thread Rod Taylor
I think it would be much faster simply to list of the programs that use Postgresql internals that won't break. -- Rod - Original Message - From: "Ross J. Reedstrom" <[EMAIL PROTECTED]> To: "Christopher Kings-Lynne" <[EMAIL PROTECTED]> Cc: "Dave Page" <[EMAIL PROTECTED]>; "Tom Lane" <[EMAIL

[HACKERS] Analyze on large changes...

2002-05-01 Thread Rod Taylor
I've run into an interesting issue. A very long running transaction doing data loads is getting quite slow. I really don't want to break up the transactions (and for now it's ok), but it makes me wonder what exactly analyze counts. Since dead, or yet to be visible tuples affect the plan that sh

Re: [HACKERS] insert with multiple targetLists

2002-05-01 Thread Rod Taylor
> INSERT INTO t1 (c1) VALUES (1), (2); > > would be executed in a similar fashion to: > > INSERT INTO t1 (c1) VALUES (1); > INSERT INTO t1 (c1) VALUES (2); > > Does this sound reasonable? I debated doing the above too. In fact, I had a partial implementation at one point. Howeve

Re: [HACKERS] PostgreSQL mission statement?

2002-05-02 Thread Rod Taylor
> > I don't know about you, but I want PostgreSQL to be the best, be THE most > > reliable. Omitting "best" or "most" from the statement means that we should > > all just give up now, because PostgreSQL is pretty damn good already. > > i think a mission statement full of boastfulness is just a sou

Re: [HACKERS] Number of attributes in HeapTupleHeader

2002-05-06 Thread Rod Taylor
I think the real trick is keeping track of the difference between: begin; ALTER TABLE tab ADD COLUMN col1 int4 DEFAULT 4; commit; and begin; ALTER TABLE tab ADD COLUMN col1; ALTER TABLE tab ALTER COLUMN col1 SET DEFAULT 4; commit; The first should populate the column with the value of '4', the

[HACKERS] pg_sema.h

2002-05-07 Thread Rod Taylor
Doesn't appear that pg_sema is picking up the semaphore implementation on FreeBSD. bash-2.05a$ uname -a FreeBSD knight.zort.ca 4.5-RELEASE FreeBSD 4.5-RELEASE #3: Sun Feb 3 22:26:40 EST 2002 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/KNIGHT i386 In file included from ../../../../src/includ

[HACKERS] TRUNCATE

2002-05-12 Thread Rod Taylor
For my own protection I'm adding checks to truncate so that if there is an ON DELETE trigger it will not execute the truncate command. Anyway, should it really only be 'Disallow TRUNCATE on tables that are involved in referential constraints'? I'm thinking it should check for an on delete rule a

  1   2   3   4   5   6   7   8   9   10   >