Re: [HACKERS] UTF8 national character data type support WIP patch and list of open issues.

2013-11-11 Thread Tatsuo Ishii
> I'd be much more impressed by seeing a road map for how we get to a > useful amount of added functionality --- which, to my mind, would be > the ability to support N different encodings in one database, for N>2. > But even if you think N=2 is sufficient, we haven't got a road map, and > commandee

Re: [HACKERS] Updatable security_barrier views (was: [v9.4] row level security)

2013-11-11 Thread Craig Ringer
On 11/12/2013 02:35 PM, Tom Lane wrote: >> [ lots o details snipped ] >> Totally crazy? Or workable? I'm extremely new to the planner, so I know >> this might be unworkable, and would value advice. > > The main omission I notice in your sketch is that the join tree that is > the source of tuples

Re: [HACKERS] Updatable security_barrier views (was: [v9.4] row level security)

2013-11-11 Thread Tom Lane
Craig Ringer writes: > On 11/12/2013 05:40 AM, Robert Haas wrote: >> I haven't studied this issue well enough to know what's really needed >> here, but Dean Rasheed's approach sounded like a promising tack to me. > I've been looking further into adding update support for security > barrier views

Re: [HACKERS] Fwd: Test of Algorithm || Indexing Scheme

2013-11-11 Thread Atri Sharma
On Tue, Nov 12, 2013 at 11:53 AM, Craig Ringer wrote: > On 11/12/2013 03:26 AM, Rohit Goyal wrote: >> Hi, >> >> Actually, >> >> I want to test an algorithm in which I will use store tuple_id in some >> other data structure and value of the key of index will contain some >> random created by me. Co

Re: [HACKERS] Fwd: Test of Algorithm || Indexing Scheme

2013-11-11 Thread Craig Ringer
On 11/12/2013 03:26 AM, Rohit Goyal wrote: > Hi, > > Actually, > > I want to test an algorithm in which I will use store tuple_id in some > other data structure and value of the key of index will contain some > random created by me. Could you please tel me which file need to be > change for it.

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Craig Ringer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/11/2013 09:59 PM, Rafael Martinez wrote: > * We need a pg_dump solution that can generate in one step all the > necessary pieces of information needed when restoring or cloning a > database. (schema, data, privileges, users and alter database/r

[HACKERS] Updatable security_barrier views (was: [v9.4] row level security)

2013-11-11 Thread Craig Ringer
On 11/12/2013 05:40 AM, Robert Haas wrote: > I haven't studied this issue well enough to know what's really needed > here, but Dean Rasheed's approach sounded like a promising tack to me. I've been looking further into adding update support for security barrier views and after reading the code for

Re: [HACKERS] ECPG FETCH readahead

2013-11-11 Thread Noah Misch
On Mon, Nov 11, 2013 at 10:17:54AM +0100, Boszormenyi Zoltan wrote: > The old contents of my GIT repository was removed so you need to > clone it fresh. https://github.com/zboszor/ecpg-readahead.git > I won't post the humongous patch again, since sending a 90KB > compressed file to everyone on the

Re: [HACKERS] Re: Exempting superuser from row-security isn't enough. Run predicates as DEFINER?

2013-11-11 Thread Craig Ringer
On 11/11/2013 06:37 PM, Kohei KaiGai wrote: > Hi Craig, > > I'd like to vote the last options. It is a separate problem (or, might > be specification), I think. I tend to agree, but I'm nervous about entirely hand-waving around this, as doing so would *expand* the existing problem. "Solving" thi

Re: [HACKERS] Heavily modified big table bloat even in auto vacuum is running

2013-11-11 Thread Amit Kapila
On Mon, Nov 11, 2013 at 3:14 PM, Haribabu kommi wrote: > On 08 November 2013 18:35 Amit Kapila wrote: >> On Fri, Nov 8, 2013 at 10:56 AM, Haribabu kommi >> wrote: >> > On 07 November 2013 09:42 Amit Kapila wrote: >> >> I am not sure whether the same calculation as done for >> new_rel_tuples >> >>

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Fabrízio de Royes Mello
On Mon, Nov 11, 2013 at 8:20 PM, Josh Berkus wrote: > > > [...] > > Well, then we just need pg_restore to handle the "role already exists" > error message gracefully. That's all. Or a "CREATE ROLE IF NOT EXISTS" > statement, and use that for roles. > I'm working in a patch to add IF NOT EXISTS

Re: [HACKERS] Clang 3.3 Analyzer Results

2013-11-11 Thread Tom Lane
Kevin Grittner writes: > It does seem hard to believe that clang tools would find as enough > problems that were missed by Coverity and Valgrind to account for > all the warnings that are scrolling by; but it looks like it has > pointed out at least *one* problem that's worth fixing. Yeah, that's

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Andrew Dunstan
On 11/11/2013 05:50 PM, David Johnston wrote: Andrew Dunstan wrote A general ability to rename things would be good. In particular, restoring schema x into schema y or table x into table y would be very useful, especially if you need to be able to compare old with new. compare old and new what

Re: [HACKERS] Fast insertion indexes: why no developments

2013-11-11 Thread Jeff Janes
On Thu, Oct 31, 2013 at 12:43 AM, Leonardo Francalanci wrote: > Jeff Janes wrote > > True, but that is also true of indexes created in bulk. It all has to > > reach disk eventually-- > > [...] > > If the checkpoint interval is as long as the partitioning period, then > > hopefully the active inde

Re: [HACKERS] Clang 3.3 Analyzer Results

2013-11-11 Thread Jeffrey Walton
On Mon, Nov 11, 2013 at 6:01 PM, Kevin Grittner wrote: > Peter Geoghegan wrote: >> Kevin Grittner wrote: >> >>> I'm currently capturing a text version of all the warnings from >>> this. Will gzip and post when it finishes. It's generating a lot >>> of warnings; I have no idea how many are Post

Re: [HACKERS] Fast insertion indexes: why no developments

2013-11-11 Thread Jeff Janes
On Tue, Nov 5, 2013 at 9:52 AM, Leonardo Francalanci wrote: > Jeff Janes wrote > > Some experiments I did a few years ago showed that applying sorts to the > > data to be inserted could be helpful even when the sort batch size was as > > small as one tuple per 5 pages of existing index. Maybe eve

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Josh Berkus
On 11/11/2013 03:06 PM, David Johnston wrote: > Josh Berkus wrote >> Well, then we just need pg_restore to handle the "role already exists" >> error message gracefully. That's all. Or a "CREATE ROLE IF NOT EXISTS" >> statement, and use that for roles. > > My only qualm here is if the exists chec

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread David Johnston
Josh Berkus wrote > Well, then we just need pg_restore to handle the "role already exists" > error message gracefully. That's all. Or a "CREATE ROLE IF NOT EXISTS" > statement, and use that for roles. My only qualm here is if the exists check is based off of role name only. If database "A" and

Re: [HACKERS] Clang 3.3 Analyzer Results

2013-11-11 Thread Kevin Grittner
Peter Geoghegan wrote: > Kevin Grittner wrote: > >> I'm currently capturing a text version of all the warnings from >> this.  Will gzip and post when it finishes.  It's generating a lot >> of warnings; I have no idea how many are PostgreSQL problems and >> how many are false positives; will just

Re: [HACKERS] Clang 3.3 Analyzer Results

2013-11-11 Thread Jeffrey Walton
On Mon, Nov 11, 2013 at 5:51 PM, Peter Geoghegan wrote: > On Mon, Nov 11, 2013 at 2:45 PM, Jeffrey Walton wrote: >> I think you are right. Coverity is a very nice tool, and Clang has >> some growing to do. > > To be fair to the LLVM/Clang guys, it's not as if static analysis is a > very high prio

Re: [HACKERS] Clang 3.3 Analyzer Results

2013-11-11 Thread Jeffrey Walton
On Mon, Nov 11, 2013 at 5:18 PM, Kevin Grittner wrote: > [moving the discussion to pgsql-hackers] > > Jeffrey Walton wrote: >> ... >> ## >> # Sanitizers >> >> make distclean >> >> export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib/clang/3.3/lib/darwin/ >> export CC=/usr/local/bin/clang

Re: [HACKERS] Clang 3.3 Analyzer Results

2013-11-11 Thread Peter Geoghegan
On Mon, Nov 11, 2013 at 2:45 PM, Jeffrey Walton wrote: > I think you are right. Coverity is a very nice tool, and Clang has > some growing to do. To be fair to the LLVM/Clang guys, it's not as if static analysis is a very high priority for them. -- Peter Geoghegan -- Sent via pgsql-hackers

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread David Johnston
Andrew Dunstan wrote > A general ability to rename things would be good. In particular, > restoring schema x into schema y or table x into table y would be very > useful, especially if you need to be able to compare old with new. compare old and new what? I would imagine that schema comparisons

Re: [HACKERS] Clang 3.3 Analyzer Results

2013-11-11 Thread Jeffrey Walton
On Mon, Nov 11, 2013 at 5:29 PM, Peter Geoghegan wrote: > On Mon, Nov 11, 2013 at 2:18 PM, Kevin Grittner wrote: >> I'm currently capturing a text version of all the warnings from >> this. Will gzip and post when it finishes. It's generating a lot >> of warnings; I have no idea how many are Pos

Re: [HACKERS] Clang 3.3 Analyzer Results

2013-11-11 Thread Peter Geoghegan
On Mon, Nov 11, 2013 at 2:18 PM, Kevin Grittner wrote: > I'm currently capturing a text version of all the warnings from > this. Will gzip and post when it finishes. It's generating a lot > of warnings; I have no idea how many are PostgreSQL problems and > how many are false positives; will just

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Josh Berkus
On 11/11/2013 06:24 AM, Stephen Frost wrote: > * Rafael Martinez (r.m.guerr...@usit.uio.no) wrote: >> * We need a pg_dump solution that can generate in one step all the >> necessary pieces of information needed when restoring or cloning a >> database. (schema, data, privileges, users and alter data

Re: [HACKERS] Clang 3.3 Analyzer Results

2013-11-11 Thread Kevin Grittner
[moving the discussion to pgsql-hackers] Jeffrey Walton wrote: > The Analyzer is invoked with scan-build. Its used when compiling > the package because it performs static analysis. > > The Santizers are invoked with the runtime flags. They are used > with the `check` program because they perform

Re: [HACKERS] stats for network traffic WIP

2013-11-11 Thread Nigel Heron
On Thu, Nov 7, 2013 at 8:21 PM, Greg Stark wrote: > > > The most interesting thing that I could see calculating from these stats > would require also knowing how much time was spent waiting on writes and > reads on the network. With the cumulative time spent as well as the count of > syscalls you

Re: [HACKERS] [v9.4] row level security

2013-11-11 Thread Robert Haas
On Thu, Nov 7, 2013 at 9:08 PM, Craig Ringer wrote: > On 11/07/2013 09:47 PM, Greg Stark wrote: >> Incidentally I still feel this is at root the problem with updateable >> views in general. I know it's a bit off to be tossing in concerns from >> the peanut gallery when I'm not actually offering to

Re: [HACKERS] [v9.4] row level security

2013-11-11 Thread Robert Haas
On Wed, Nov 6, 2013 at 1:38 AM, Craig Ringer wrote: > (a) Updatable views are implemented in the rewriter, not the planner. > The rewriter is not re-run when plans are invalidated or when the > session authorization changes, etc. This means that we can't simply omit > the RLS predicate for superus

Re: [HACKERS] alter_table regression test problem

2013-11-11 Thread Andres Freund
Robert Haas schrieb: >On Mon, Nov 11, 2013 at 4:00 PM, Robert Haas >wrote: >> On Thu, Nov 7, 2013 at 12:18 PM, Andres Freund > wrote: >>> On 2013-11-07 10:10:34 -0500, Tom Lane wrote: Andres Freund writes: > On 2013-11-07 06:49:58 -0800, Kevin Grittner wrote: >> It's up to the c

Re: [HACKERS] Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist

2013-11-11 Thread Pavel Stehule
2013/11/11 Pavel Stehule > > > > 2013/11/11 Tom Lane > >> Andres Freund writes: >> > Turns out that's bogus - ALTER TABLE has two levels of NOT EXISTS. >> >> > Maybe we should just do the same for DROP TRIGGER? >> >> > DROP TRIGGER [ IF EXISTS ] name ON table_name [ IF EXISTS ] [ CASCADE | >> R

Re: [HACKERS] alter_table regression test problem

2013-11-11 Thread Robert Haas
On Mon, Nov 11, 2013 at 4:00 PM, Robert Haas wrote: > On Thu, Nov 7, 2013 at 12:18 PM, Andres Freund wrote: >> On 2013-11-07 10:10:34 -0500, Tom Lane wrote: >>> Andres Freund writes: >>> > On 2013-11-07 06:49:58 -0800, Kevin Grittner wrote: >>> >> It's up to the committer whether to indent >>> >

Re: [HACKERS] alter_table regression test problem

2013-11-11 Thread Robert Haas
On Thu, Nov 7, 2013 at 12:18 PM, Andres Freund wrote: > On 2013-11-07 10:10:34 -0500, Tom Lane wrote: >> Andres Freund writes: >> > On 2013-11-07 06:49:58 -0800, Kevin Grittner wrote: >> >> It's up to the committer whether to indent >> >> after review and make both substantive and whitespace chan

Re: [HACKERS] subquery q2 does not have attribute 0

2013-11-11 Thread Tom Lane
Kevin Grittner writes: > I get: > ERROR:  subquery q2 does not have attribute 0 > I checked and found it broken on 9.2 and 9.3, but working on 9.1. > git bisect, says it was broken by commit > 1cb108efb0e60d87e4adec38e7636b6e8efbeb57. My fault, eh? Will look. regards,

[HACKERS] subquery q2 does not have attribute 0

2013-11-11 Thread Kevin Grittner
In playing with a sample query from another thread I found this query is broken on the master branch: select q1.*   from (select 'a'::text) q1(c)   where not exists    (select * from (select 'A'::text) q2(c) where q2 = q1); I get: ERROR:  subquery q2 does not have attribute 0 I checked and foun

Re: [HACKERS] Add %z support to elog/ereport?

2013-11-11 Thread Tom Lane
Andres Freund writes: > On 2013-11-11 12:31:55 -0500, Robert Haas wrote: >> I seem to recall that our %m support involves rewriting the error >> string twice, which I think is actually kind of expensive if, for >> example, you've got a loop around a PL/pgsql EXCEPTION block. > Yes, it does that.

Re: [HACKERS] Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist

2013-11-11 Thread Pavel Stehule
2013/11/11 Tom Lane > Andres Freund writes: > > Turns out that's bogus - ALTER TABLE has two levels of NOT EXISTS. > > > Maybe we should just do the same for DROP TRIGGER? > > > DROP TRIGGER [ IF EXISTS ] name ON table_name [ IF EXISTS ] [ CASCADE | > RESTRICT ] > > Works for me. > for me too

Re: [HACKERS] Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist

2013-11-11 Thread Pavel Stehule
I can agree, so DROP TRIGGER doesn't need a IF EXISTS clause when it is executed after DROP TABLE. pg_dump -c produces: DROP TRIGGER jjj ON public.foo; DROP TABLE public.foo; DROP FUNCTION public.f1(); DROP EXTENSION plpgsql; DROP SCHEMA public; Is there some reason why we use explicitly DROP TR

Re: [HACKERS] all_visible replay aborting due to uninitialized pages

2013-11-11 Thread Tom Lane
Bruce Momjian writes: > On Mon, Nov 11, 2013 at 01:42:07AM +0100, Andres Freund wrote: >> The fix is included in 9.2.5, it's just not noted in the release notes. > Yes, I missed it because I didn't understand the importance of these > commit messages: > commit 17fa4c321ccf9693de406faffe6b2

Re: [HACKERS] regclass error reports improperly downcased

2013-11-11 Thread Tom Lane
Jim Nasby writes: > Is anyone opposed to some kind of hint? Would depend on the text of the hint. I'm a bit dubious that we can come up with something that's not wildly inappropriate in other scenarios. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-h

Re: [HACKERS] Re: [COMMITTERS] pgsql: Fix whitespace issues found by git diff --check, add gitattribut

2013-11-11 Thread Andrew Dunstan
On 11/11/2013 02:17 PM, Peter Eisentraut wrote: On 11/11/13, 10:26 AM, Tom Lane wrote: Peter Eisentraut writes: Fix whitespace issues found by git diff --check, add gitattributes Set per file type attributes in .gitattributes to fine-tune whitespace checks. With the associated cleanups, the

Re: [HACKERS] all_visible replay aborting due to uninitialized pages

2013-11-11 Thread Bruce Momjian
On Mon, Nov 11, 2013 at 01:42:07AM +0100, Andres Freund wrote: > Hi, > > On 2013-11-10 17:40:31 -0700, Noah Yetter wrote: > > Like your customer, this bug has blown up my standby servers, twice in the > > last month: the first time all 4 replicas, the second time (mysteriously > > but luckily) onl

Re: [HACKERS] Fwd: Test of Algorithm || Indexing Scheme

2013-11-11 Thread Rohit Goyal
Hi, Actually, I want to test an algorithm in which I will use store tuple_id in some other data structure and value of the key of index will contain some random created by me. Could you please tel me which file need to be change for it. you said something about usage of GiST opclass. Can you ple

[HACKERS] Re: [COMMITTERS] pgsql: Fix whitespace issues found by git diff --check, add gitattribut

2013-11-11 Thread Peter Eisentraut
On 11/11/13, 10:26 AM, Tom Lane wrote: > Peter Eisentraut writes: >> Fix whitespace issues found by git diff --check, add gitattributes >> Set per file type attributes in .gitattributes to fine-tune whitespace >> checks. With the associated cleanups, the tree is now clean for git > > Hmm, I thou

Re: [HACKERS] logical changeset generation v6.5

2013-11-11 Thread Andres Freund
On 2013-11-10 14:45:17 -0500, Steve Singer wrote: > On 11/10/2013 09:41 AM, Andres Freund wrote: > >Still give me the following: > >update disorder.do_inventory set ii_in_stock=2 where ii_id=251; > >UPDATE 1 > >test1=# LOG: tuple in table with oid: 35122 without primary key > >Hm. Could it be tha

Re: [HACKERS] better atomics - spinlock fallback?

2013-11-11 Thread Andres Freund
Hi, Instead of de-supporting platforms that don't have CAS support or providing parallel implementations we could relatively easily build a spinlock based fallback using the already existing requirement for tas(). Something like an array of 16 spinlocks, indexed by a more advanced version of ((cha

Re: [HACKERS] regclass error reports improperly downcased

2013-11-11 Thread Jim Nasby
On 11/8/13 2:21 PM, Tom Lane wrote: Jim Nasby writes: Ahh, duh. Hrm... I ran across this because someone here got confused by this: SELECT pg_total_relation_size( schema_name || '.' || relname ) FROM pg_stat_all_tables ERROR: relation "moo" does not exist Personally I'd do that like

Re: [HACKERS] Add %z support to elog/ereport?

2013-11-11 Thread Andres Freund
On 2013-11-11 12:31:55 -0500, Robert Haas wrote: > On Mon, Nov 11, 2013 at 10:50 AM, Andres Freund > wrote: > > Hi, > > > > I'd like to add support for the length modifier %z. Linux' manpages > > describes it as: > > z A following integer conversion corresponds to a size_t or ssize_t > >

Re: [HACKERS] Add %z support to elog/ereport?

2013-11-11 Thread Andres Freund
On 2013-11-11 12:18:46 -0500, Tom Lane wrote: > Andres Freund writes: > > gettext has support for it afaics, it's part of POSIX: > > Really? [ pokes around at pubs.opengroup.org ] Hm, I don't see it > in Single Unix Spec v2 (1997), but it is there in POSIX issue 7 (2008). > Also, the POSIX page

Re: [HACKERS] Add %z support to elog/ereport?

2013-11-11 Thread Robert Haas
On Mon, Nov 11, 2013 at 10:50 AM, Andres Freund wrote: > Hi, > > I'd like to add support for the length modifier %z. Linux' manpages > describes it as: > z A following integer conversion corresponds to a size_t or ssize_t > argument. > > Since gcc's printf format checks understand it, we

Re: [HACKERS] Add %z support to elog/ereport?

2013-11-11 Thread Andres Freund
On 2013-11-11 12:01:40 -0500, Tom Lane wrote: > Andres Freund writes: > >> I'm less than sure that every version of gcc will recognize %z, either > >> ... > > > It's been in recognized in 2.95 afaics, so I think we're good. Hm. Strange. Has to have been backpatched to the ancient debian I have a

Re: [HACKERS] Add %z support to elog/ereport?

2013-11-11 Thread Tom Lane
Andres Freund writes: > gettext has support for it afaics, it's part of POSIX: Really? [ pokes around at pubs.opengroup.org ] Hm, I don't see it in Single Unix Spec v2 (1997), but it is there in POSIX issue 7 (2008). Also, the POSIX page says it defers to the C standard, and I see it in C99. T

Re: [HACKERS] Fwd: Test of Algorithm || Indexing Scheme

2013-11-11 Thread Rohit Goyal
Hi, Can you pls tel me how can achieve which sound pretty exotic to you. Can u please share some relevant documents. I havw no clue from where to start. Regards Rohit On 11.11.2013 14:12, Rohit Goyal wrote: > Hi, > Thanks for reply. > I actually want to make some changes in all operations on in

Re: [HACKERS] Minmax indexes

2013-11-11 Thread Jeff Janes
On Mon, Nov 11, 2013 at 12:53 AM, Erik Rijkers wrote: > On Fri, November 8, 2013 21:11, Alvaro Herrera wrote: > > > > Here's a version 7 of the patch, which fixes these bugs and adds > > opclasses for a bunch more types (timestamp, timestamptz, date, time, > > timetz), courtesy of Martín Marqués.

Re: [HACKERS] Add %z support to elog/ereport?

2013-11-11 Thread Tom Lane
Andres Freund writes: > On 2013-11-11 11:18:22 -0500, Tom Lane wrote: >> I think you'll find that %m is a totally different animal, because it >> doesn't involve consuming an argument position. > I was thinking of just replacing '%z' by '%l', '%ll' or '%' as needed > and not expand it inplace. Th

Re: [HACKERS] Add %z support to elog/ereport?

2013-11-11 Thread Andres Freund
On 2013-11-11 17:33:53 +0100, Andres Freund wrote: > On 2013-11-11 11:18:22 -0500, Tom Lane wrote: > > Andres Freund writes: > > > I'd like to add support for the length modifier %z. Linux' manpages > > > describes it as: > > > z A following integer conversion corresponds to a size_t or >

Re: [HACKERS] Comment - uniqueness of relfilenode

2013-11-11 Thread Antonin Houska
On 11/10/2013 12:57 AM, Robert Haas wrote: > On Thu, Nov 7, 2013 at 10:56 AM, Antonin Houska > wrote: >> catalog/catalog.c:GetNewRelFileNode() and its calls indicate that the >> following change makes sense: >> >> >> diff --git a/src/include/storage/relfilenode.h >> b/src/include/storage/relfileno

Re: [HACKERS] Fwd: Test of Algorithm || Indexing Scheme

2013-11-11 Thread Heikki Linnakangas
On 11.11.2013 14:12, Rohit Goyal wrote: Hi, Thanks for reply. I actually want to make some changes in all operations on index like insert, update, delete. for example, i want store a new customized value for every key inserted in b tree instead of storing Tuple Id as value. That sounds pretty e

Re: [HACKERS] Add %z support to elog/ereport?

2013-11-11 Thread Andres Freund
On 2013-11-11 11:18:22 -0500, Tom Lane wrote: > Andres Freund writes: > > I'd like to add support for the length modifier %z. Linux' manpages > > describes it as: > > z A following integer conversion corresponds to a size_t or ssize_t > > argument. > > > Since gcc's printf format checks

Re: [HACKERS] Add %z support to elog/ereport?

2013-11-11 Thread Tom Lane
Andres Freund writes: > I'd like to add support for the length modifier %z. Linux' manpages > describes it as: > z A following integer conversion corresponds to a size_t or ssize_t > argument. > Since gcc's printf format checks understand it, we can add support for > it similar to the wa

Re: [HACKERS] Execute query with EXCEPT, INTERSECT as anti-join, join?

2013-11-11 Thread Tom Lane
"Colin 't Hart" writes: > Would these be difficult to build in? Well, you'd have to worry about the ALL cases, as well as how to determine whether you're actually getting a win (which would probably be rather tough, really, as the choice would have to be made before we've fired up any of the plan

[HACKERS] Add %z support to elog/ereport?

2013-11-11 Thread Andres Freund
Hi, I'd like to add support for the length modifier %z. Linux' manpages describes it as: z A following integer conversion corresponds to a size_t or ssize_t argument. Since gcc's printf format checks understand it, we can add support for it similar to the way we added %m support. Curren

Re: [HACKERS] TABLE not synonymous with SELECT * FROM?

2013-11-11 Thread David Johnston
Colin 't Hart wrote > Methinks we should fix the documentation, something like: > > The command > > TABLE name > > is equivalent to > > SELECT * FROM name > > It can be used as a top-level command or as a space-saving syntax > variant in parts of complex queries. Only the WITH, ORDER BY, LIMIT

Re: [HACKERS] Another bug(?) turned up by the llvm optimization checker

2013-11-11 Thread Greg Stark
On Mon, Nov 11, 2013 at 4:00 AM, Tom Lane wrote: > In any case, the issue looks bigger than just addRangeTableEntry > itself. Do you want to write up a patch? > I was going to include it in the overflow patch but I'm now thinking I should make it a separate commit to make sure the change in the

Re: [HACKERS] Datatyp of a column

2013-11-11 Thread Ishaya Bhatt
Yes!! Thats exactly what I was looking for !! Thanks :) On Mon, Nov 11, 2013 at 7:58 PM, Tom Lane wrote: > Ishaya Bhatt writes: > > In the sorting code, I need to determine the datatype of my sort > keys > > and call some code conditionally based on the datatype. Is there any way > to > >

Re: [HACKERS] TABLE not synonymous with SELECT * FROM?

2013-11-11 Thread Colin 't Hart
On 11 November 2013 15:03, Tom Lane wrote: > "Colin 't Hart" writes: >> I would've thought it was implemented as a shortcut for "SELECT * >> FROM" at the parse level (ie encounter "TABLE" and insert "SELECT * >> FROM" into the parse tree and continue), but it seems there is more to >> it. > > If

Re: [HACKERS] Execute query with EXCEPT, INTERSECT as anti-join, join?

2013-11-11 Thread Colin 't Hart
On 11 November 2013 15:16, Tom Lane wrote: > "Colin 't Hart" writes: >> On 11 November 2013 14:34, Tom Lane wrote: >>> No, and it probably won't ever be, since the semantics aren't the same. >>> EXCEPT/INTERSECT imply duplicate elimination. > >> Can't we just use DISTINCT for that? > > If you ha

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Andrew Dunstan
On 11/11/2013 08:59 AM, Rafael Martinez wrote: * It would be great to be able to tell pg_restore that user1 in the dump will became user2 in the restored/cloned database. The same for the name of the database. A general ability to rename things would be good. In particular, restoring schema

Re: [HACKERS] Datatyp of a column

2013-11-11 Thread Tom Lane
Ishaya Bhatt writes: > In the sorting code, I need to determine the datatype of my sort keys > and call some code conditionally based on the datatype. Is there any way to > determine the datatype of a column from the *backend* PostGreSQL code. is > the datatype of the column available in the

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Stephen Frost
* Rafael Martinez (r.m.guerr...@usit.uio.no) wrote: > * We need a pg_dump solution that can generate in one step all the > necessary pieces of information needed when restoring or cloning a > database. (schema, data, privileges, users and alter database/role data) This sounds pretty reasonable and

Re: [HACKERS] Execute query with EXCEPT, INTERSECT as anti-join, join?

2013-11-11 Thread Tom Lane
"Colin 't Hart" writes: > On 11 November 2013 14:34, Tom Lane wrote: >> No, and it probably won't ever be, since the semantics aren't the same. >> EXCEPT/INTERSECT imply duplicate elimination. > Can't we just use DISTINCT for that? If you have to do a DISTINCT it's not clear to me that you're g

[HACKERS] Datatyp of a column

2013-11-11 Thread Ishaya Bhatt
Hi, In the sorting code, I need to determine the datatype of my sort keys and call some code conditionally based on the datatype. Is there any way to determine the datatype of a column from the *backend* PostGreSQL code. is the datatype of the column available in the query plan? Any help on th

Re: [HACKERS] TABLE not synonymous with SELECT * FROM?

2013-11-11 Thread Tom Lane
"Colin 't Hart" writes: > I would've thought it was implemented as a shortcut for "SELECT * > FROM" at the parse level (ie encounter "TABLE" and insert "SELECT * > FROM" into the parse tree and continue), but it seems there is more to > it. If you look at the PG grammar you'll see that "TABLE rel

[HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Rafael Martinez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello After some discussions in #pgconfeu, this is an attempt to relaunch the discussion about how pg_dump and pg_dumpall work and the challenges they give us in real life. We have got bitten sometimes because of their behavior and we can see it is a

Re: [HACKERS] Execute query with EXCEPT, INTERSECT as anti-join, join?

2013-11-11 Thread Colin 't Hart
On 11 November 2013 14:34, Tom Lane wrote: > "Colin 't Hart" writes: >> I can't get Postgresql to execute a query with EXCEPT (or INTERSECT) >> as an anti-join (or join). > >> Is this even possible? > > No, and it probably won't ever be, since the semantics aren't the same. > EXCEPT/INTERSECT imp

Re: [HACKERS] streaming header too small

2013-11-11 Thread Magnus Hagander
On Wed, Feb 20, 2013 at 5:02 PM, Heikki Linnakangas wrote: > On 20.02.2013 17:53, Selena Deckelmann wrote: >> >> On Wed, Feb 20, 2013 at 6:23 AM, Magnus >> Haganderwrote: >> >>> Selena, was this reasonably reproducible for you? Would it be possible to >>> get a network trace of it to show of that'

Re: [HACKERS] Execute query with EXCEPT, INTERSECT as anti-join, join?

2013-11-11 Thread Tom Lane
"Colin 't Hart" writes: > I can't get Postgresql to execute a query with EXCEPT (or INTERSECT) > as an anti-join (or join). > Is this even possible? No, and it probably won't ever be, since the semantics aren't the same. EXCEPT/INTERSECT imply duplicate elimination. rega

Re: [HACKERS] Fwd: Test of Algorithm || Indexing Scheme

2013-11-11 Thread Rohit Goyal
Hi, Thanks for reply. I actually want to make some changes in all operations on index like insert, update, delete. for example, i want store a new customized value for every key inserted in b tree instead of storing Tuple Id as value. Can you also pls explain me more about appoach to follow to use

Re: [HACKERS] Fwd: Test of Algorithm || Indexing Scheme

2013-11-11 Thread Heikki Linnakangas
On 11.11.2013 13:19, Rohit Goyal wrote: Hi All, I want to implement and test my indexing approach. I would like to know which are the main files to look for b tree indexing scheme modification. It would be great, if can share some helpful links which are needed to understand how to modify and t

[HACKERS] Fwd: Test of Algorithm || Indexing Scheme

2013-11-11 Thread Rohit Goyal
Hi All, I want to implement and test my indexing approach. I would like to know which are the main files to look for b tree indexing scheme modification. It would be great, if can share some helpful links which are needed to understand how to modify and test an indexing scheme in postgresql. Reg

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2013-11-11 Thread Kohei KaiGai
Hi, I tried to write up a wikipage to introduce how custom-scan works. https://wiki.postgresql.org/wiki/CustomScanAPI Any comments please. 2013/11/6 Kohei KaiGai : > The attached patches provide a feature to implement custom scan node > that allows extension to replace a part of plan tree with

[HACKERS] Re: Exempting superuser from row-security isn't enough. Run predicates as DEFINER?

2013-11-11 Thread Kohei KaiGai
Hi Craig, I'd like to vote the last options. It is a separate problem (or, might be specification), I think. According to the document of view, http://www.postgresql.org/docs/devel/static/sql-createview.html | Access to tables referenced in the view is determined by permissions of | the view own

Re: [HACKERS] Heavily modified big table bloat even in auto vacuum is running

2013-11-11 Thread Haribabu kommi
On 08 November 2013 18:35 Amit Kapila wrote: > On Fri, Nov 8, 2013 at 10:56 AM, Haribabu kommi > wrote: > > On 07 November 2013 09:42 Amit Kapila wrote: > >> I am not sure whether the same calculation as done for > new_rel_tuples > >> works for new_dead_tuples, you can once check it. > > > > I did

[HACKERS] Execute query with EXCEPT, INTERSECT as anti-join, join?

2013-11-11 Thread Colin 't Hart
Hi, I can't get Postgresql to execute a query with EXCEPT (or INTERSECT) as an anti-join (or join). Is this even possible? If not currently possible, is this something we would like to have? Cheers, Colin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

Re: [HACKERS] Minmax indexes

2013-11-11 Thread Erik Rijkers
On Mon, November 11, 2013 09:53, Erik Rijkers wrote: > On Fri, November 8, 2013 21:11, Alvaro Herrera wrote: >> >> Here's a version 7 of the patch, which fixes these bugs and adds >> opclasses for a bunch more types (timestamp, timestamptz, date, time, >> timetz), courtesy of Martín Marqués. It's

Re: [HACKERS] Get more from indices.

2013-11-11 Thread Kyotaro HORIGUCHI
Hello, > Your patch fails the isolation test because of changed query plans: > > http://pgci.eisentraut.org/jenkins/job/postgresql_commitfest_world/175/artifact/src/test/isolation/regression.diffs/*view*/ Thank you for pointing out. I wasn't aware of that.. # Because it is not launched from the

Re: [HACKERS] Get more from indices.

2013-11-11 Thread Kyotaro HORIGUCHI
Thank you, > In any case, it seems like a bad idea to me to conflate > distinct-ness with ordering, so I don't like what you did to > PathKeys. Hmm, that sounds quite resonable in general. But the conflation is already found in grouping_planner to some extent. The name distinct_pathkey itself ass

Re: [HACKERS] ECPG FETCH readahead

2013-11-11 Thread Boszormenyi Zoltan
2013-10-11 00:16 keltezéssel, Alvaro Herrera írta: Boszormenyi Zoltan escribió: 2013-09-10 03:04 keltezéssel, Peter Eisentraut írta: You need to update the dblink regression tests. Done. Dude, this is an humongous patch. I was shocked by it initially, but on further reading, I observed that

[HACKERS] TABLE not synonymous with SELECT * FROM?

2013-11-11 Thread Colin 't Hart
Hi, According to http://www.postgresql.org/docs/9.3/static/sql-select.html#SQL-TABLE " The command TABLE name is completely equivalent to SELECT * FROM name It can be used as a top-level command or as a space-saving syntax variant in parts of complex queries. " However, this isn't true:

Re: [HACKERS] Minmax indexes

2013-11-11 Thread Erik Rijkers
On Fri, November 8, 2013 21:11, Alvaro Herrera wrote: > > Here's a version 7 of the patch, which fixes these bugs and adds > opclasses for a bunch more types (timestamp, timestamptz, date, time, > timetz), courtesy of Martín Marqués. It's also been rebased to apply > cleanly on top of today's mast

Re: [HACKERS] Race condition in b-tree page deletion

2013-11-11 Thread Heikki Linnakangas
On 10.11.2013 01:47, Robert Haas wrote: I think we've tried pretty hard to avoid algorithms where the maximum number of lwlocks that must be held at one time is not a constant, and I think we're in for a bad time of it if we start to deviate from that principal. I'm not sure what to do about thi