Re: [HACKERS] inherit support for foreign tables

2014-06-30 Thread Ashutosh Bapat
be > useful to have attr_needed for child rels. > > regards, tom lane > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

Re: [HACKERS] inherit support for foreign tables

2014-06-30 Thread Ashutosh Bapat
On Mon, Jun 30, 2014 at 4:17 PM, Etsuro Fujita wrote: > (2014/06/30 17:47), Ashutosh Bapat wrote: > >> I checked that it's reporting the right tableoid now. >> > > Thank you for the check. > > > BTW, why aren't you using the tlist passed to this fun

Re: [HACKERS] inherit support for foreign tables

2014-06-30 Thread Ashutosh Bapat
ote: > (2014/06/24 16:30), Etsuro Fujita wrote: > >> (2014/06/23 18:35), Ashutosh Bapat wrote: >> > > Selecting tableoid on parent causes an error, "ERROR: cannot extract >>> system attribute from virtual tuple". The foreign table has an OID which >&

Re: [HACKERS] inherit support for foreign tables

2014-06-23 Thread Ashutosh Bapat
hanges to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

Re: [HACKERS] using array of char pointers gives wrong results

2014-05-06 Thread Ashutosh Bapat
e Debian GNU/Linux, PostgreSQL > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

Re: [HACKERS] using array of char pointers gives wrong results

2014-05-05 Thread Ashutosh Bapat
Let me bring the bug fix again to the surface. Is anybody looking at this fix? On Tue, Apr 29, 2014 at 2:25 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > Hi, > When array of char * is used as target for the FETCH statement returning > more than one row, it tri

[HACKERS] using array of char pointers gives wrong results

2014-04-29 Thread Ashutosh Bapat
ogue(), use the address instead of the value at that address 3. The pointer arithmetic should treat such variable as char **, instead of char * ECPG regression tests do not show any failures with this patch. -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company d

Re: [HACKERS] Question about optimising (Postgres_)FDW

2014-04-16 Thread Ashutosh Bapat
emillion_pgsql.id, onemillion_pgsql.inserted, > >> onemillion_pgsql.data > >>Hash Cond: (onemillion_pgsql.id = onemillion.id) > >>-> Foreign Scan on public.onemillion_pgsql (cost=100.00..38434.00 > >> rows=100 width=30) > >> Output: onemillion_pgsql.id, onemillion_pgsql.inserted, > >> onemillion_pgsql.data > >> Remote SQL: SELECT id, inserted, data FROM public.onemillion > >>-> Hash (cost=21.85..21.85 rows=100 width=4) > >> Output: onemillion.id > >> -> Limit (cost=0.00..20.85 rows=100 width=4) > >>Output: onemillion.id > >>-> Seq Scan on public.onemillion (cost=0.00..20834.00 > >> rows=99918 width=4) > >> Output: onemillion.id > >> Filter: (onemillion.data > '0.9'::text) > >> Planning time: 0.215 ms > >> (14 rows) > >> > >> Thanks, > >> > >> Best regards, > >> Etsuro Fujita > >> > >> > > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

Re: [HACKERS] Pointer to structure in ECPG

2014-04-09 Thread Ashutosh Bapat
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org > Jabber: michael.meskes at gmail dot com > VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

[HACKERS] Pointer to structure in ECPG

2014-04-08 Thread Ashutosh Bapat
_a_simple() we should dump the variable with arrsize "-1" if it's part of an outer structure. The patch attached, includes solutions to both the problems and also a testcase preproc/pointer_to_struct.pgc. This test is a copy of test preproc/array_of_struct.pgc with the structure arrays repla

Re: [HACKERS] using arrays within structure in ECPG

2014-04-03 Thread Ashutosh Bapat
complex structure. On Tue, Apr 1, 2014 at 4:34 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > Hi MIchael, > I tried to fix the offset problem. PFA the patch. It does solve the > problem of setting wrong offset in ECPGdo() call. > > But then there is problem of in

Re: [HACKERS] using arrays within structure in ECPG

2014-04-02 Thread Ashutosh Bapat
ere we are dumping a pointer to a structure, this code dumps each member with offset = size of that member, thus again corrupting memory, if there are more than one rows being saved through pointer. On Wed, Apr 2, 2014 at 3:10 PM, Michael Meskes wrote: > On Wed, Apr 02, 2014 at 09:33:15AM +0530

Re: [HACKERS] using arrays within structure in ECPG

2014-04-01 Thread Ashutosh Bapat
l) dot Org > Jabber: michael.meskes at gmail dot com > VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

Re: [HACKERS] using arrays within structure in ECPG

2014-04-01 Thread Ashutosh Bapat
not understand that the "field" is an array of integers (or for that matter array of anything) and store all the values in contiguous memory at the given address. On Thu, Mar 27, 2014 at 11:05 PM, Michael Meskes wrote: > On Mon, Mar 24, 2014 at 11:52:30AM +0530, Ashutosh Bapat wrote

Re: [HACKERS] using arrays within structure in ECPG

2014-03-24 Thread Ashutosh Bapat
On Mon, Mar 24, 2014 at 3:40 PM, Boszormenyi Zoltan wrote: > 2014-03-24 07:22 keltezéssel, Ashutosh Bapat írta: > > Hi, > I tried using integer array within a structure array in ECPG code. But > it resulted in some garbage values being printed from the table. Here are > the

Re: [HACKERS] About adding a column to system catalog pg_attribute

2014-03-24 Thread Ashutosh Bapat
ute for getting an oid > for a column also. How do we add a column into pg_attribute ? > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

[HACKERS] using arrays within structure in ECPG

2014-03-23 Thread Ashutosh Bapat
ide with the real arr_col member's address. Am I missing something here? -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company array_test.pgc Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

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

2014-03-04 Thread Ashutosh Bapat
ndependent of the internal function signatures, supporting custom scan looks difficult. > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

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

2014-03-03 Thread Ashutosh Bapat
gt; > Or we could add a > > new API like ExecPrefetchNode() that tells nodes to prepare to have > > tuples pulled, and they can do things like kick off asynchronous > > queries. But I still don't see any clean way for the Append node to > > find out which one is ready to return results first. > > Yeah, that's tricky. > > Thanks, > > Stephen > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

Re: [HACKERS] Avoiding deeply nested AND/OR trees in the parser

2014-02-26 Thread Ashutosh Bapat
e. > > regards, tom lane > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

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

2014-02-25 Thread Ashutosh Bapat
the operation like grouping, sorting, aggregation, as some sort of relation, we can create paths for each of the relation like we do (I am heavily borrowing from Tom's idea of pathifying those operations). We will need much lesser hooks in custom scan node. BTW, from the patch

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

2014-02-25 Thread Ashutosh Bapat
particular data structure being declared with CREATE FOREIGN TABLE. > > In other words, extension's responsibility is to generate a view of > "something" > > according to PostgreSQL' internal data structure, instead of the object > itself. > > On the other

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Ashutosh Bapat
dd, esp. when the work around exists. OR, other option is when sufficiently large output is encountered (larger than some predefined value MAX_ROWS or something), psql behaves as if FETCH_COUNT is set to MAX_ROWS. Documenting this behaviour wouldn't be a problem and would not be a problem

Re: [HACKERS] Priority table or Cache table

2014-02-20 Thread Ashutosh Bapat
on access pattern. >> > > Yes it is useful in cases where the application always expects the faster > results whether the table is used regularly or not. > In such case, it might be valuable to see if we should play with the maximum usage parameter, which is set to 5 currently

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Ashutosh Bapat
On Thu, Feb 20, 2014 at 3:26 PM, Bernd Helmle wrote: > > > --On 20. Februar 2014 14:49:28 +0530 Ashutosh Bapat < > ashutosh.ba...@enterprisedb.com> wrote: > > If I set some positive value for this variable, psql runs smoothly with >> any size of data. But unset tha

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Ashutosh Bapat
icitly that psql can run out of memory while collecting the result set. Either the documentation or the behaviour should be modified. On Thu, Feb 20, 2014 at 2:35 PM, Pavan Deolasee wrote: > > > > On Thu, Feb 20, 2014 at 2:32 PM, Ashutosh Bapat < > ashutosh.ba...@enterprised

Re: [HACKERS] Selecting large tables gets killed

2014-02-20 Thread Ashutosh Bapat
t; I installed from HEAD(ae5266f25910d6e084692a7cdbd02b9e52800046) > > > I failed to reproduce it, do I missing something? > > Regards, > > Amul Sul > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

[HACKERS] Selecting large tables gets killed

2014-02-19 Thread Ashutosh Bapat
g unix sockets [ashutosh@ubuntu repro]ls /tmp/.s.PGSQL.5432* /tmp/.s.PGSQL.5432 /tmp/.s.PGSQL.5432.lock Looks like a bug in psql to me. Does anybody see that behaviour? -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

Re: [HACKERS] LIKE INCLUDING CONSTRAINTS is broken

2014-01-29 Thread Ashutosh Bapat
attribute 4 has wrong type > DETALLE: Table has type text, but query expects integer. > > If I take out the INHERITS clause in table a, the error disappears. > > -- > Álvaro Herrerahttp://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Training & Services > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

Re: [HACKERS] identify table oid for an AggState during plan tree initialization

2014-01-15 Thread Ashutosh Bapat
the table. Though this is simple for simple query given as example in your mail, the process is tricky for complex queries. On Wed, Jan 15, 2014 at 6:05 PM, Masterprojekt Naumann1 < mpws201...@gmail.com> wrote: > 2014/1/15 Ashutosh Bapat > >> Hi Cathleen, >> An aggregat

Re: [HACKERS] identify table oid for an AggState during plan tree initialization

2014-01-15 Thread Ashutosh Bapat
d the > mail :( > > resultAsAggState is of the type AggState. As you can see I tried to get > the Oid with the ScanState inside of the AggState, but its Relation > ss_currentRelation is not set already. Is there another way to get the Oid? > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

Re: [HACKERS] Example query causing param_info to be set in plain rel path

2013-12-18 Thread Ashutosh Bapat
baserels. So, we do have a testcase which tests this code path as well. On Mon, Oct 28, 2013 at 12:30 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > No adding OFFSET there too didn't give the expected result. The lateral > was handled in subquery and passed

Re: [HACKERS] Question about sorting internals

2013-12-11 Thread Ashutosh Bapat
; > I know I'm not sorting using "rok", which means I'm getting "undefined > functionality". Fine. But what exactly is happening that regardless of > order of rows in subquery, I get the same, always lower, rok in output? > > Best regards, > > depesz > > -- > The best thing about modern society is how easy it is to avoid contact > with it. > > http://depesz.com/ > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

Re: [HACKERS] Compile and test in netbeans

2013-11-19 Thread Ashutosh Bapat
sole when I create a table or an > index. I am printing just for testing purpose to get a feel of code. > > Please tel me the procedure to run and print using printf(). > > -- > Regards, > Rohit Goyal > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

Re: [HACKERS] [BUGS] BUG #8542: Materialized View with another column_name does not work?

2013-10-31 Thread Ashutosh Bapat
a few days. > > -- > Kevin Grittner > EDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

Re: [HACKERS] Example query causing param_info to be set in plain rel path

2013-10-28 Thread Ashutosh Bapat
tInfo of a table, then it's very likely that relevant code is untested in PostgreSQL. On Fri, Oct 25, 2013 at 7:11 PM, Tom Lane wrote: > Ashutosh Bapat writes: > > In order to test various cases of LATERAL join in Postgres-XC, I am > trying > > to find a query where RelOptI

[HACKERS] Example query causing param_info to be set in plain rel path

2013-10-25 Thread Ashutosh Bapat
by tab2.val) q using(val); This at least caused the outer reference to be added as parameter, but again no lateral_relid. Is there an example query (however impractial query it would be), which can make the lateral_relids set in RelOptInfo of plain base relation? -- Best Wishes, Ashutosh Ba

Re: [HACKERS] git apply vs patch -p1

2013-09-15 Thread Ashutosh Bapat
gt; > git reset? > > git reset wouldn't remove the files that were newly added by the patch, would it? > Greetings, > > Andres Freund > > -- > Andres Freund http://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Training & Services > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company

Re: [HACKERS] Clarification on materialized view restriction needed

2013-08-27 Thread Ashutosh Bapat
I would be good, if this set gets documented, lest users will be confused. Can you point me to relevant sections of document? I can add this documentation. On Wed, Aug 28, 2013 at 10:12 AM, Noah Misch wrote: > On Tue, Aug 27, 2013 at 01:57:49PM +0530, Ashutosh Bapat wrote: > > I want

[HACKERS] Clarification on materialized view restriction needed

2013-08-27 Thread Ashutosh Bapat
listing as to "these are security-restricted operations ...". I am wondering what are other restrictions on the queries whose results can be used to create materialized views. -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Postgres Database Company

Re: [HACKERS] pass-through queries to foreign servers

2013-08-11 Thread Ashutosh Bapat
r if evaluated on the Datanodes, which itself is not right in some cases.) 2. Right now it works only for PostgreSQL (but can be extended easily for all SQL based databases). It might be worth to look at the XC planner and pick up pieces of work that fit in PostgreSQL.

Re: [HACKERS] query_planner() API change

2013-08-05 Thread Ashutosh Bapat
- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Postgres Database Company

Re: [HACKERS] LATERAL quals revisited

2013-07-19 Thread Ashutosh Bapat
Right, now, we do not have that capability in pull_up_subqueries() but given its recursive structure, it might be easier to do it there. > Thoughts, better ideas? > > regards, tom lane > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Postgres Database Company

Re: [HACKERS] AGG_PLAIN thinks sorts are free

2013-07-18 Thread Ashutosh Bapat
he top of the to-do list either, as yet. > > regards, tom lane > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Postgres Database Company

Re: [HACKERS] Removing Inner Joins

2013-07-09 Thread Ashutosh Bapat
ng,though. > > Thoughts/Comments? > > Regards, > > Atri > > Regards, > > Atri > l'apprenant > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mail

Re: [HACKERS] Problem building in a directory shared from Mac to Ubuntu

2013-06-24 Thread Ashutosh Bapat
On Tue, Jun 25, 2013 at 12:03 PM, Craig Ringer wrote: > On 06/25/2013 01:14 PM, Ashutosh Bapat wrote: > > Hi, > > I am observing a strange problem when I build latest PostgreSQL head on > > Ubuntu 12.04. I am running Ubuntu 12.04 as VM on Mac 10.7. The build > >

[HACKERS] Problem building in a directory shared from Mac to Ubuntu

2013-06-24 Thread Ashutosh Bapat
in a directory local to VM, the build goes fine. Is this a known issue? What's the cure? -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Postgres Database Company

Re: [HACKERS] Functional dependencies and GROUP BY - for subqueries

2013-04-29 Thread Ashutosh Bapat
On Mon, Apr 29, 2013 at 7:31 PM, Tom Lane wrote: > Ashutosh Bapat writes: > > Is there any reason why do we want to check the functional dependencies > at > > the time of parsing and not after rewrite? Obviously, by doing so, we > will > > allow creation of cer

Re: [HACKERS] Functional dependencies and GROUP BY - for subqueries

2013-04-28 Thread Ashutosh Bapat
so, we will allow creation of certain views which will start throwing errors after the underlying table changes the primary key. Is it mandatory that we throw "functional dependency" related errors at the time of creation of views? > regards, tom lane > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Postgres Database Company

Re: [HACKERS] Functional dependencies and GROUP BY - for subqueries

2013-04-26 Thread Ashutosh Bapat
On Fri, Apr 26, 2013 at 7:54 PM, Tom Lane wrote: > Ashutosh Bapat writes: > > The reason being, it doesn't look into the subqueries (in FROM clause) to > > infer that p.product_id is essentially product.product_id which is a > > primary key. > > Right. > >

Re: [HACKERS] Functional dependencies and GROUP BY - for subqueries

2013-04-26 Thread Ashutosh Bapat
ch is crude and needs a better shape. If community is willing to accept the extension, I can work on it further. -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Postgres Database Company gb_subquery_pk.patch Description: Binary data -- Sent via pgsql-hackers mailing list

Re: [HACKERS] pg_ctl idempotent option

2013-01-28 Thread Ashutosh Bapat
ng. > > Agfeed. > > > -- > Josh Berkus > PostgreSQL Experts Inc. > http://pgexperts.com > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company

Re: [HACKERS] pg_ctl idempotent option

2013-01-23 Thread Ashutosh Bapat
? On Thu, Jan 24, 2013 at 12:36 AM, Bruce Momjian wrote: > On Wed, Jan 23, 2013 at 09:00:25PM +0200, Heikki Linnakangas wrote: >> On 23.01.2013 20:56, Bruce Momjian wrote: >> >On Tue, Jan 22, 2013 at 06:03:28PM +0530, Ashutosh Bapat wrote: >> >>anyway, +1 for making this

Re: [HACKERS] pg_ctl idempotent option

2013-01-22 Thread Ashutosh Bapat
ng server > *not* be an error. So +1 for forgetting about the option entirely > and just making it idempotent all the time. > > regards, tom lane > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: &g

[HACKERS] Expressions without type

2012-08-22 Thread Ashutosh Bapat
criteria like they can not be composite type etc. exprType() throws error when it's passed expressions which do not have type and hence I can not use it directly. Is there a function, which would tell me whether a given expression can have a type or not? -- Best Wishes, Ashutosh Bapat Entepr

[HACKERS] Potential for bugs while using COPY_POINTER_FIELD to copy NULL pointer

2012-04-09 Thread Ashutosh Bapat
NTER_FIELD return NULL, if the pointer to be copied is NULL? -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company

Re: [HACKERS] Reconstructing Insert queries with indirection

2012-03-21 Thread Ashutosh Bapat
On Wed, Mar 21, 2012 at 10:58 PM, Tom Lane wrote: > Ashutosh Bapat writes: > > Consider following sequence of commands > > > create type complex as (r float8, i float8); > > create type quad as (c1 complex, c2 complex); > > create temp table quadtable(f1 i

[HACKERS] Reconstructing Insert queries with indirection

2012-03-20 Thread Ashutosh Bapat
et alone display comprehensibly. So in that case I punted and just made it print the source expression(s). So, there doesn't seem to be any serious reason behind the restriction. -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company

Re: [HACKERS] Confusing EXPLAIN output in case of inherited tables

2012-02-01 Thread Ashutosh Bapat
will be "better" than what we have today. If you agree, I will provide a patch to fix the relation names problems by ignoring the eref (for RTE_RELATION only) in ruleutils. > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company

Re: [HACKERS] Confusing EXPLAIN output in case of inherited tables

2012-02-01 Thread Ashutosh Bapat
On Wed, Feb 1, 2012 at 10:53 PM, Tom Lane wrote: > Ashutosh Bapat writes: > > Looking at the code, it seems that the fake aliases (eref) for relations > > (may be views as well) are not generated per say, but they do not get > > changed when the relation name changes OR

Re: [HACKERS] Confusing EXPLAIN output in case of inherited tables

2012-02-01 Thread Ashutosh Bapat
name in get_from_clause_item() and get_variable() instead of use eref->aliasname. I have noticed that the logic in get_rte_attribute_name() gives preference to the column names in catalog tables over eref->colnames. Anyone? On Mon, Jan 30, 2012 at 10:26 PM, Tom Lane wrote: > Ashutosh Bapa

Re: [HACKERS] Confusing EXPLAIN output in case of inherited tables

2012-01-30 Thread Ashutosh Bapat
come into picture when we schema qualify the fake aliases in the generated query. See examples in first post. >regards, tom lane > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company

Re: [HACKERS] Confusing EXPLAIN output in case of inherited tables

2012-01-30 Thread Ashutosh Bapat
lect * from s1.t1 tx > where exists (select 1 from s2.t1 where s2.t1.f1 = tx.f1); > > If s2.t1 is renamed to s2.tx, there's no longer any way to reference the > upper alias tx, unless you alias the lower RTE to some different name. > I think that when we put in the fake-alias behavior, we made a value > judgment that this type of situation was more common than the other, > but I'm not really sure why. > > Maybe what we need to do instead is create totally-made-up, unique > aliases when something like this happens. > >regards, tom lane > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company

Re: [HACKERS] Confusing EXPLAIN output in case of inherited tables

2012-01-11 Thread Ashutosh Bapat
On Wed, Jan 11, 2012 at 5:25 PM, Chetan Suttraway < chetan.suttra...@enterprisedb.com> wrote: > > > On Wed, Jan 11, 2012 at 5:13 PM, Ashutosh Bapat < > ashutosh.ba...@enterprisedb.com> wrote: > >> Hi, >> After running regression, I ran EXPLAIN on on

[HACKERS] Confusing EXPLAIN output in case of inherited tables

2012-01-11 Thread Ashutosh Bapat
| 1779 strcmp(rte->eref->aliasname, objectname) != 0) 1780 appendStringInfo(es->str, " %s", 1781 quote_identifier(rte->eref->aliasname)); Based on this, here is patch to not add schemaname in the prefix for a var

Re: [HACKERS] Doubt about boundParams

2011-08-02 Thread Ashutosh Bapat
On Tue, Aug 2, 2011 at 3:45 PM, Heikki Linnakangas < heikki.linnakan...@enterprisedb.com> wrote: > On 02.08.2011 12:54, Ashutosh Bapat wrote: > >> Hi All, >> I am looking at usage of bound parameters. >> >> In functions SPI_cursor_open_with_args() and SPI_curso

[HACKERS] Doubt about boundParams

2011-08-02 Thread Ashutosh Bapat
folded into queries, it looks like parameter values stored in EState are never used. Is this correct? Or somewhere we use those parameter values? -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company

Re: [HACKERS] dropping table in testcase alter_table.sql

2011-07-12 Thread Ashutosh Bapat
I think you misunderstood what I was saying. I wanted take out the > cleanup parts out of all test cases and make it a choice whether to run > them. Right now we have a lot of test cases that clean up after > themselves, which is useful in some cases (testing the cleaning, for one > thing), but not useful for 2. and 3. > > > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company

Re: [HACKERS] dropping table in testcase alter_table.sql

2011-07-07 Thread Ashutosh Bapat
On Thu, Jul 7, 2011 at 9:41 PM, Robert Haas wrote: > On Thu, Jul 7, 2011 at 3:05 AM, Ashutosh Bapat > wrote: > > I noticed that the test alter_table.sql is creating two tables tab1 and > tab2 > > and it's not dropping it. Any test which follows this test and tries

[HACKERS] dropping table in testcase alter_table.sql

2011-07-07 Thread Ashutosh Bapat
b1 in alter_table.sql). PFA patch which drops these two tables from alter_table.sql and corresponding OUT change. The regression run clean with this patch. -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company diff --git a/src/test/regress/expected/alter_table.out

Re: [HACKERS] What would AggrefExprState nodes' args contain?

2011-04-29 Thread Ashutosh Bapat
M, Vaibhav Kaushal < vaibhavkaushal...@gmail.com> wrote: > I tried all aggregates - min,max,sum,count and avg. all are working. What > do you suggest now? > > > On Fri, Apr 29, 2011 at 11:30 AM, Ashutosh Bapat < > ashutosh.ba...@enterprisedb.com> wrote: > >&g

Re: [HACKERS] What would AggrefExprState nodes' args contain?

2011-04-28 Thread Ashutosh Bapat
bhav > > > On Thu, Apr 28, 2011 at 2:38 PM, Ashutosh Bapat < > ashutosh.ba...@enterprisedb.com> wrote: > >> The args in AggrefExprState, are used in the functions ExecAgg, >> ExecInitAgg and their minions to evaluate the aggregates. The >> ExecEvalAggref() mere

Re: [HACKERS] What would AggrefExprState nodes' args contain?

2011-04-28 Thread Ashutosh Bapat
ot;); > > *isNull = econtext->ecxt_aggnulls[aggref->aggno]; > return econtext->ecxt_aggvalues[aggref->aggno]; > } > > > What is the use of args in AggrefExprState node here? Is it there just for > some historical reason? > > Regards, > Vaibhav > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company

<    5   6   7   8   9   10