Re: [GENERAL] How to specify/mock the statistic data of tables in PostgreSQL

2014-01-10 Thread Amit Langote
o optimize the join order (by setting > join_collapse_limit and from_collapse_limit to 1) , is there any other > factor that may affect the structure of execution plan regardless of the > data access method. > > 2014-01-10 > ____ > ygnhzeus > _

Re: [GENERAL] how is text-equality handled in postgresql?

2014-01-15 Thread Amit Langote
strings are * equal. Believing that would be bad news for a number of reasons, * so we follow Perl's lead and sort "equal" strings according to * strcmp(). */ if (result == 0) result = strc

Re: [GENERAL] how is text-equality handled in postgresql?

2014-01-15 Thread Amit Langote
On Wed, Jan 15, 2014 at 9:02 PM, Ivan Voras wrote: > On 15/01/2014 12:36, Amit Langote wrote: >> On Wed, Jan 15, 2014 at 7:39 PM, Ivan Voras wrote: >>> On 15/01/2014 10:10, Gábor Farkas wrote: >>>> hi, >>>> >>>> when i create an uniqu

Re: [GENERAL] pg_depend OBJID not found

2014-01-15 Thread Amit Langote
where c.oid = rw.ev_class and rw.oid = d.objid and d.refobjid = p.oid and p.proname = 'f_sanjeev'; here, d.objid => oid of the rewrite rule d.refobjid => oid of the function So, the referencing object for 'f_sanjeev' i

Re: [GENERAL] How are pg_operator and pg_type related with each other?

2014-01-15 Thread Amit Langote
may be overloaded for different types; but point to take from this is that any "<" uses the statistic called histogram.) -- Amit Langote -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] execute table query in backend

2014-03-05 Thread Amit Langote
programming interface" (chapter 44 on the above page) can be used to issue SQLs from a server extension module. Read more about it here (documentation also includes few examples to get started with): http://www.postgresql.org/docs/9.3/static/spi.html -- Amit -- Sent via pgsql-general mai

Re: [NOVICE][GENERAL] Convert Datum to an user-defined data type?

2014-03-10 Thread Amit Langote
es) * Once you have a TupleDesc, call: TupleDesc BlessTupleDesc(TupleDesc tupdesc) * With the blessed tupdesc, given user data in Datum form, to build a HeapTuple, use: HeapTuple heap_form_tuple(TupleDesc tupdesc, Datum *values, bool *isnull) -- Amit -- Sent via pgsql-general mailing list (pgsq

[GENERAL] Table Rewrite During ALTER TABLE ... ADD COLUMN ... DEFAULT NULL

2014-04-02 Thread Amit Langote
odifier like numeric(x), char(x) etc. do, this happens. Is this intentional and/or documented somewhere else? If not, should it be documented? -- Amit -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Table Rewrite During ALTER TABLE ... ADD COLUMN ... DEFAULT NULL

2014-04-02 Thread Amit Langote
On Thu, Apr 3, 2014 at 12:54 PM, Tom Lane wrote: > Amit Langote writes: >> When I do the following: > >> ALTER TABLE table ADD COLUMN numeric(x) DEFAULT NULL; > >> The table is rewritten whereas notes section on the manual page for >> ALTER TABLE says otherwise

Re: [GENERAL] Table Rewrite During ALTER TABLE ... ADD COLUMN ... DEFAULT NULL

2014-04-02 Thread Amit Langote
On Thu, Apr 3, 2014 at 1:19 PM, Tom Lane wrote: > Amit Langote writes: >> On Thu, Apr 3, 2014 at 12:54 PM, Tom Lane wrote: >>> Some experimentation suggests that we are smart about "DEFAULT NULL" >>> unless the column type requires a length-coercio

Re: [GENERAL] Table Rewrite During ALTER TABLE ... ADD COLUMN ... DEFAULT NULL

2014-04-02 Thread Amit Langote
On Thu, Apr 3, 2014 at 1:19 PM, Tom Lane wrote: > Amit Langote writes: >> On Thu, Apr 3, 2014 at 12:54 PM, Tom Lane wrote: >>> Some experimentation suggests that we are smart about "DEFAULT NULL" >>> unless the column type requires a length-coercio

[GENERAL] About upgrading a (tuple?) lock in a rollback'd sub-transaction

2014-04-09 Thread Amit Langote
to modify the tuple (inconistently, off course) -- Although, if [3] were before [2], this wouldn't happen I know it is still a warned-against usage; but, is it useful to clarify this nuance of the behavior? -- Amit -- Sent via pgsql-gener

Re: [GENERAL] About upgrading a (tuple?) lock in a rollback'd sub-transaction

2014-04-10 Thread Amit Langote
sappearance of certain locks is complete enough. -- Amit -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [DOCS] [GENERAL] About upgrading a (tuple?) lock in a rollback'd sub-transaction

2014-04-10 Thread Amit Langote
On Fri, Apr 11, 2014 at 11:52 AM, Alvaro Herrera wrote: > Amit Langote wrote: >> On Thu, Apr 10, 2014 at 10:25 PM, Rob Sargent wrote: >> > And it also tells you how to stop it --bibtex iirc >> >> Yeah, it's a caution against a potentially harmful usage anyway

Re: [GENERAL] Request for Unsubscribe

2014-04-24 Thread Amit Langote
ty/lists/subscribe/ -- Amit

[GENERAL] Indexing question

2012-08-14 Thread amit sehas
In SQL, given a table T, with two fields f1, f2, is it possible to create an index such that the same record is indexed in the index, once with field f1 and once with field f2. (I am not looking for a compound index in which the key would look like , instead there should be two entries in the

[GENERAL] Behavior difference for walsender and walreceiver for n/w breakdown case

2012-09-10 Thread Amit Kapila
PostgreSQL or is it a bug or a new feature in itself. In case it is not clear, I will raise a bug. With Regards, Amit Kapila

[GENERAL] In one of negative test row-level trigger results into loop

2012-09-24 Thread Amit Kapila
NTO TEST_TABLE VALUES('jack',25); Now, You will see an always loop. I understand that user can change his code to make it proper. However shouldn’t PostgreSQL also throws errors in such cases for recursion level or something related? With Regards, Amit Kapila.

Re: [GENERAL] In one of negative test row-level trigger results into loop

2012-09-24 Thread Amit Kapila
> On Monday, September 24, 2012 7:44 PM Adrian Klaver > On 09/24/2012 07:03 AM, Amit Kapila wrote: > > Below test results into Loop: > > > > 1.create test table > > > > CREATE TABLE TEST_TABLE (NAME VARCHAR2, AGE INT); > > > > 2.create trigger funct

Re: [GENERAL] In one of negative test row-level trigger results into loop

2012-09-25 Thread Amit Kapila
On Monday, September 24, 2012 8:19 PM Tom Lane wrote: > Amit Kapila writes: > > Below test results into Loop: > > > [ AFTER INSERT trigger does another insert into its target table ] > > Well, of course. The INSERT results in scheduling another AFTER event. > >

Re: [GENERAL] In one of negative test row-level trigger results into loop

2012-09-25 Thread Amit Kapila
nside some app logic which at the time of dev, got missed for test then it might reach production stage. With Regards, Amit Kapila. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Cursor fetch Problem.

2012-12-26 Thread Amit Kapila
d(pid) and then pg_terminate_backend. With Regards, Amit Kapila. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Cursor fetch Problem.

2012-12-27 Thread Amit Kapila
On Thursday, December 27, 2012 11:51 AM Harry wrote: > Hi Amit, > Thanks for Reply. > Kindly see my below output. > 16650;"sampledb";11965;10;"enterprisedb";"";"192.168.0.231";"";53897;"* > 2012-12-19 > 11:39:48.234799+05:3

Re: [GENERAL] Cursor fetch Problem.

2012-12-27 Thread Amit Kapila
On Thursday, December 27, 2012 11:51 AM Harry wrote: > Hi Amit, > Thanks for Reply. > Kindly see my below output. > > Also, tried to Kill it Firstly by using Cancel Backend and then > Terminate > Backend output showing "True" but still remaining as a process (i.e. i

Re: [GENERAL] Cursor fetch Problem.

2012-12-28 Thread Amit Kapila
r you call cancel/terminate Backend API? FATAL: terminating connection due to administrator command ERROR: canceling statement due to user request With Regards, Amit Kapila. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://

Re: [GENERAL] Cursor fetch Problem.

2012-12-30 Thread Amit kapila
th psql. verify the entry for same in pg_stat_activity. call terminate API for this session. check again if the new entry has gone from pg_stat_activity? With Regards, Amit Kapila. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] indexes and tables

2011-12-18 Thread amit sehas
HI, we have a schema related question. We have 10 types of resource records. Each one of these resource records has 3 fields (attributes) (lets say f1, f2, f3)...these fields have similar meaning to the corresponding 3 fields in each resource record although they be named slightly differently in

Re: [GENERAL] indexes and tables

2011-12-18 Thread amit sehas
inheritance works in POstgres... any help is greatly appreciated... thanks --- On Sun, 12/18/11, David Johnston wrote: > From: David Johnston > Subject: RE: [GENERAL] indexes and tables > To: "'amit sehas'" , pgsql-general@postgresql.org > Date: Sunday, December 1

[GENERAL] Behavior of subselects in target lists and order by

2012-02-24 Thread amit sehas
select. Or the results returned by the inner select are treated as if they are part of a single tuple which includes the tuple from table T1 ? Is this an implementation specific behaviour or it conforms to the SQL standard ...? thanks -Amit -- Sent via pgsql-general mailing list (pgsql-general

[GENERAL] postgres service does not start after windows restart

2005-10-18 Thread Amit Sanon
when i try to manually start it it gives an error   Could not start PostgreSQL Database Server 8.0 service on local computer Error 1069: Service did not start due to logon failure   Kindly guide me as to how to restart this service after a windows restart   thanks and rgds Amit Sanon

[GENERAL] windows - silent uninstall question

2006-12-20 Thread Amit Mody
Hi, I am packaging the postgres database in my application and for this I need to do a silent install and uninstall, the msiexec for install works great. Is there a similar utility for uninstall. If not, are there any other options to achieve this?? Thanks Amit

[GENERAL] how to get size of array in function

2005-11-28 Thread Amit Soni
Hi list, i made one function and the argument of that function is string array, now how can i get the size of that array?? Thanks, Amit Soni -- Netcore Solutions Pvt. Ltd. Website: http://www.netcore.co.in Spamtraps: http

[GENERAL] plpgsql: type of array cells

2011-10-05 Thread Amit Dor-Shifer
"." SQL state: 42601 Character: 272 Isn't arr[i] of type test_t?? Thanks, Amit -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] plpgsql: type of array cells

2011-10-05 Thread Amit Dor-Shifer
e: 42601 Character: 272 Isn't arr[i] of type test_t?? Thanks, Amit -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] partitioning a dataset + employing hysteresis condition

2011-11-13 Thread Amit Dor-Shifer
Hi, I've got this table: create table phone_calls ( start_time timestamp, device_id integer, term_status integer ); It describes phone call events. A 'term_status' is a sort-of an exit status for the call, whereby a value != 0 indicates some sort of error. Given that, I wish to retriev

Re: [GENERAL] partitioning a dataset + employing hysteresis condition

2011-11-13 Thread Amit Dor-Shifer
On Mon, Nov 14, 2011 at 4:29 PM, Amit Dor-Shifer wrote: > Hi, > I've got this table: > create table phone_calls > ( > start_time timestamp, > device_id integer, > term_status integer > ); > > It describes phone call events. A 'term_status

Re: [GENERAL] partitioning a dataset + employing hysteresis condition

2011-11-16 Thread Amit Dor-Shifer
On Wed, Nov 16, 2011 at 4:58 PM, David Johnston wrote: > On Nov 15, 2011, at 15:28, Gavin Flower > wrote: > > On 14/11/11 18:35, Amit Dor-Shifer wrote: > > > On Mon, Nov 14, 2011 at 4:29 PM, Amit Dor-Shifer < > amit.dor.shi...@gmail.com> wrote: > >> Hi,

[GENERAL] PLEASE HELP ME

2005-04-21 Thread amit kumar awasthi
  Hello sir actually i am working with Qt using postgresql i have to get connection {(database("trainee"),user("trainee"))} from the network (database remote accessing) so i have configured postgresql.conf and pg_hba.conf upto some extents the fields that i  have configured r as follows even t

<    1   2