Re: [GENERAL] Installing repmgr alongside PostgreSQL installed via EnterpriseDB installer instead of repositories?

2017-05-11 Thread Vibhor Kumar
> On May 11, 2017, at 10:40 AM, Adrian Klaver wrote: > > On 05/11/2017 07:32 AM, Vibhor Kumar wrote: >>> On May 11, 2017, at 10:17 AM, Adrian Klaver >> <mailto:adrian.kla...@aklaver.com> <mailto:adrian.kla...@aklaver.com >>> <mailto:adrian.kla...@a

Re: [GENERAL] Installing repmgr alongside PostgreSQL installed via EnterpriseDB installer instead of repositories?

2017-05-11 Thread Vibhor Kumar
around this? > > Not sure how deep you are into your present situation. The only thing I can > think of is to install Postgres using the PGDG repos and then migrating the > data from the EDB install to the RPM install. You would probably have to > change the port numbers, at least temporarily, while you do the migration. > This way you could use the packaging system without resorting to work-arounds. I don’t think Martin has to migrate database. He has installed PostgreSQL 9.6 using EDB one-click installer. I can see two options here: 1. Install PostgreSQL using RPM as mentioned by Adrian. Stop the PostgreSQL using one click installer binaries and start using RPM binary. After that Martin can install repmgr using RPM. 2. Compile repmgr with existing installation. https://github.com/2ndQuadrant/repmgr <https://github.com/2ndQuadrant/repmgr> Thanks & Regards, Vibhor Kumar Blogs:https://vibhorkumar.blog

Re: [GENERAL] 9.3-beta postgres-fdw COPY error

2013-06-21 Thread Vibhor Kumar
On Jun 21, 2013, at 3:38 PM, Lonni J Friedman wrote: > On Fri, Jun 21, 2013 at 11:17 AM, Vibhor Kumar > wrote: >> >> On Jun 21, 2013, at 2:05 PM, Lonni J Friedman wrote: >> >>> On Fri, Jun 21, 2013 at 10:56 AM, Vibhor Kumar >>> wrote: >&

Re: [GENERAL] 9.3-beta postgres-fdw COPY error

2013-06-21 Thread Vibhor Kumar
database. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Postgres Database Company Blog:http://vibhork.blogspot.com -- 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] 9.3-beta postgres-fdw COPY error

2013-06-21 Thread Vibhor Kumar
> You would like to try something like: COPY (SELECT id, testname FROM my_foreigntbl) TO '/tmp/testlist_aid' (DELIMITER ','); I am curious to know, why do you want to execute COPY command through fdw, why not run directly on server, which has table? Thank

Re: [GENERAL] pg_upgrade failed for 9.0 to 9.2

2013-01-13 Thread Vibhor Kumar
CT pg_stat_activity.procpid, (('now'::text)::timesta... > ^ > It failed. Reason is: From postgreSQL 9.2 onwards, pg_stat_activity.procpid is renamed as pg_stat_activity.pid. http://www.postgresql.org/docs/9.2/interactive/release-9-2.html Thanks & Regards, Vibhor Ku

Re: [GENERAL] citext question

2012-10-13 Thread Vibhor Kumar
nt, if that fulfill your requirement as given below: create table test2(col citext check(length(col) < 3)); Or you can create a domain which you can use in CREATE TABLE command as given below: CREATE domain citext_char as CITEXT CHECK(length(value) <= 3); Thanks & Regards, Vibho

Re: [GENERAL] UFS2 Snapshots and Postgres

2012-06-25 Thread Vibhor Kumar
t; Even if i do a pg_start_backup()? I thought it set db data/ files in a > consistent state and puts in wal files the new transactions and apply them > when call pg_stop_backup(). > > I must do it other way then :( > > Thanks If you are doing pg_start_backup(), taking snapshot and pg_

Re: [GENERAL] v9.1.3 WITH with_query UPDATE

2012-06-16 Thread Vibhor Kumar
not in (SELECT MIN(ctid) FROM file_test WHERE md5sum='0010a3e4cc6cb8623c014f5bb95b5be1'; Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company Blog: http://vibhork.blogspot.com -- Sent via pgsql-general mailing list (pgsql-gener

Re: [GENERAL] dblink.sql not found

2012-06-11 Thread Vibhor Kumar
ind / -name dblink.sql > > What am I missing? > > Regards, Clodoaldo After installing the contrib module you have to execute following command in Database: CREATE EXTENSION dblink; Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company Blog: h

Re: [GENERAL] casting behavior of oids and relation names

2012-05-16 Thread Vibhor Kumar
ce WHERE c.relkind='r' and c.oid=$1 $$ language sql; Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company Blog: http://vibhork.blogspot.com -- 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] Postgres Table level statement logging

2012-02-07 Thread Vibhor Kumar
u can set log_statement parameter. http://www.postgresql.org/docs/current/static/runtime-config-logging.html#GUC-LOG-STATEMENT Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company Blog: http://vibhork.blogspot.com -- Sent via pgsql-general mailing list (

Re: [GENERAL] Cannot connect to 2nd cluster database remotely

2012-01-03 Thread Vibhor Kumar
rror message, you are getting. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company Blog: http://vibhork.blogspot.com -- 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] PG 9.1.1 - availability of xslt_process()

2011-10-27 Thread Vibhor Kumar
e parameter version of xslt_process() > is available. > > Perhaps is need to run some script to have it available ? xslt_process function is part of xml2 contrib module. Execute following for xml2 CREATE EXTENSION xml2; Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation T

Re: [GENERAL] Book

2011-07-20 Thread Vibhor Kumar
On Jul 21, 2011, at 3:59 AM, Tatsuo Ishii wrote: >> On Jul 20, 2011, at 18:11, Andrej wrote: >> >>> Can anyone recommend "PostgreSQL 9.0 High Performance" by G. Smith? >> >> Yes. > > +1. +1. Thanks & Regards, Vibhor Kumar Enterprise

Re: [GENERAL] COPY TO '|gzip > /my/cool/file.gz'

2011-07-20 Thread Vibhor Kumar
t to a shell command and STDIN to read input from shell command. Something like given below: psql -c "COPY mytable to STDOUT"|gzip >/home/tgl/mytable.dump.gz cat filename|psql -c "COPY mytable from STDIN;" OR psql -c "COPY mytable from STDIN;" < filename

Re: [GENERAL] Schema for Website Comments

2011-07-12 Thread Vibhor Kumar
suggest me some guidelines to follow and some links too. I think you would like to go through following thread: http://archives.postgresql.org/pgsql-sql/2010-04/msg6.php Presentation: http://wiki.postgresql.org/images/9/91/Pguswest2008hnd.pdf Thanks & Regards, Vibhor Kumar EnterpriseDB Corpora

Re: [GENERAL] maximum size limit for a query string?

2011-06-07 Thread Vibhor Kumar
larger then query > size. > Thanks. my bad :(. I understood this question wrong. > Regards > > Pavel Stehule > > > 2011/6/7 Vibhor Kumar : >> >> On Jun 7, 2011, at 4:09 PM, AI Rumman wrote: >> >>> Is there any maximu

Re: [GENERAL] maximum size limit for a query string?

2011-06-07 Thread Vibhor Kumar
On Jun 7, 2011, at 4:09 PM, AI Rumman wrote: > Is there any maximum size limit for a query string in Postgresql 9.0.1? > If yes, what is it ?. track_activity_query_size parameter. http://www.postgresql.org/docs/9.0/static/runtime-config-statistics.html Thanks & Regards, Vi

Re: [GENERAL] EnterpriseDB-xDBReplicationServer java process on OS X.

2011-06-06 Thread Vibhor Kumar
sql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general Please post the questions about xDB Replication on following link: http://forums.enterprisedb.com/forums/show/3.page Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise

Re: [GENERAL] Suppress "INSERT x x" messages

2011-05-16 Thread Vibhor Kumar
On May 17, 2011, at 3:17 AM, Gauthier, Dave wrote: > Is there a way to suppress the "INSERT x x" and "DELETE y" (etc...) messages > in psql? psql -q Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@e

Re: [GENERAL] Converting between varchar and float when updating

2011-04-28 Thread Vibhor Kumar
t. This I have missed. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subsc

Re: [GENERAL] Converting between varchar and float when updating

2011-04-28 Thread Vibhor Kumar
On Apr 28, 2011, at 3:22 PM, Dmitriy Igrishin wrote: > NB: I am sure that OP is not sure :-) And since foo.bar is varchar, > it is better to use numeric instead of float :-) Now, this make to ask question, why numeric? How its better than float? Thanks & Regards, Vibhor Kumar En

Re: [GENERAL] Converting between varchar and float when updating

2011-04-28 Thread Vibhor Kumar
On Apr 28, 2011, at 2:56 PM, Thomas Larsen Wessel wrote: > UPDATE foo SET bar = TO_VARCHAR( TO_FLOAT(bar) * 2); -- INCORRECT If you are sure bar contains float value, then try following: UPDATE foo SET bar = bar::float * 2; Thanks & Regards, Vibhor Kumar EnterpriseDB Corporat

Re: [GENERAL] Which version of postgresql supports replication on RHEL6?

2011-04-22 Thread Vibhor Kumar
ql.org/wiki/Streaming_Replication Thanks & Regards, Vibhor On Apr 22, 2011, at 11:08 AM, Tiruvenkatasamy Baskaran wrote: > Hi Vibhor Kumar, > > Here is the configuration changes. > Changes made on Master DB > - > 1. tar –xzvf

Re: [GENERAL] Which version of postgresql supports replication on RHEL6?

2011-04-21 Thread Vibhor Kumar
On Apr 21, 2011, at 4:23 PM, Tiruvenkatasamy Baskaran wrote: > Which version of postgresql supports replication on RHEL6? > RHEL version : 2.6.32-71.el6.x86_64 Why are you re-posting your question, if it has been answered? Thanks & Regards, Vibhor Kumar Blog:http://vibhork.bl

Re: [GENERAL] Which version of postgresql supports replication on RHEL6?

2011-04-21 Thread Vibhor Kumar
: the database system is starting up > Master DB is running and able to query table. But slave DB is not running and > not able to query table. Please confirm if you have made Slave DB using PITR/Hot Backup of Master. Also, please let me know the steps which you have followed. Thanks &a

Re: [GENERAL] Which version of postgresql supports replication on RHEL6?

2011-04-21 Thread Vibhor Kumar
cation of PG Database Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscrip

Re: [GENERAL] pg_reorg

2011-04-18 Thread Vibhor Kumar
able. > There's a proposal about an alternative to pg_reorg on depesz' Blog: > http://www.depesz.com/index.php/2010/10/17/reduce-bloat-of-table-without-longexclusive-locks/ For huge bloats, mentioned Method is slower. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The

Re: [GENERAL] pg_reorg

2011-04-18 Thread Vibhor Kumar
times. Yes it requires double space. However it has given me what I needed. Online VACUUM FULL (for primary key table), Online CLUSTER. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -

Re: [GENERAL] CREATE RULE _copy AS ON COPY TO ...

2011-04-11 Thread Vibhor Kumar
On Apr 11, 2011, at 11:56 PM, Willy-Bas Loos wrote: > My ON INSERT rule won't go off when I copy into it. > Is there a way to COPY into a RULE? COPY Command does not respect rule on table, so please use trigger. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterp

Re: [GENERAL] Attaching/detaching tablespaces (or, in general, parts of a DB)

2011-04-07 Thread Vibhor Kumar
> space. Thanks in advance. No. You can't do that. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] Protecting stored procedures

2011-04-07 Thread Vibhor Kumar
tm#P134_8474 Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgre

Re: [GENERAL] Critical Bug

2011-04-06 Thread Vibhor Kumar
ing subquery with single comparison operator (like "=" ) in condition clause. Please share the query which is giving this error message Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspo

Re: [GENERAL] Dumping functions with pg_dump

2011-04-06 Thread Vibhor Kumar
ace where nspname='schemaname');" ; Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make change

Re: [GENERAL] schema access privs

2011-04-05 Thread Vibhor Kumar
On Apr 5, 2011, at 6:07 PM, Ray Stell wrote: > On Tue, Apr 05, 2011 at 03:58:46PM +0530, Vibhor Kumar wrote: >> >> Following are details: >> postgres=UC/postgres+ >> [user] [privs] /[ ROLE who granted privs. > > What's the logic for reporting the U pr

Re: [GENERAL] schema access privs

2011-04-05 Thread Vibhor Kumar
[ Please don't overpost the list. Adding PG General List] On Apr 5, 2011, at 3:30 AM, Ray Stell wrote: > On Tue, Apr 05, 2011 at 02:42:30AM +0530, Vibhor Kumar wrote: >> >> On Apr 5, 2011, at 2:31 AM, Ray Stell wrote: >> >>> What does the results in col

Re: [GENERAL] schema access privs

2011-04-04 Thread Vibhor Kumar
ECT T -- TEMPORARY arwdDxt -- ALL PRIVILEGES (for tables, varies for other objects) * -- grant option for preceding privilege / -- role that granted this privilege Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enter

Re: [GENERAL] RPM for ODBC driver

2011-03-29 Thread Vibhor Kumar
is? Try Following link: http://rpm.pbone.net/index.php3/stat/4/idpl/14282865/dir/opensuse/com/psqlODBC-08.03.0200-9.2.i586.rpm.html Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- S

Re: [GENERAL] OSX Postgres PL/Perl Problem with Finance::Quote/Options

2011-03-29 Thread Vibhor Kumar
readline was installed via ports) > - Perl 5.12.3 (compled from source under /usr/local/ linked via enviromentab > le variables in .profile / config options ./configure.gnu -des -Duseshrplib > --prefix=/usr/local/perl5) Any Error Message? Thanks & Regards, Vibhor Kumar Enter

Re: [GENERAL] Curious case of the unstoppable user

2011-03-29 Thread Vibhor Kumar
ious connection kept You have created role and trying to login as role. Create user and then try. USER=ROLE+Login Privilege. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent vi

Re: [GENERAL] Postgres 9 silent installation on Windows

2011-03-28 Thread Vibhor Kumar
If you are using one-click installer by EnterpriseDB then you can use "unattended mode" of installer. Following is a link: http://www.enterprisedb.com/docs/en/8.4/instguide/Postgres_Plus_Advanced_Server_Installation_Guide-15.htm#P889_74430 Thanks & Regards, Vibhor Kumar Enterpri

Re: [GENERAL] Backups with continuous archiving

2011-03-23 Thread Vibhor Kumar
lete based on the age > of the file? What the the best way to manage the removal of old archive logs? Its totally upto you which method you want to follow. tar command gives an option of deleting of files, after archiving it (--remove-files). Thanks & Regards, Vibhor Kumar Blog:http://vib

Re: [GENERAL] Utilities for managing streaming replication servers?

2011-03-23 Thread Vibhor Kumar
of syncing and restarting to bring up a new slave. You can try repmgr developed by 2nd Quadrant. Link is given below: http://projects.2ndQuadrant.com/repmgr You can also try with pgpool failover feature: http://pgpool.projects.postgresql.org/ Thanks & Regards, Vibhor Kumar Enterpris

Re: [GENERAL] Passing a table as parameter

2011-03-21 Thread Vibhor Kumar
mething like given below: ERROR: SQLPROTECT: Illegal Query: relations Which stops user guessing relation. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent via pgsql-general mailing lis

Re: [GENERAL] Passing a table as parameter

2011-03-21 Thread Vibhor Kumar
text) RETURNS SETOF text AS $$ BEGIN RETURN QUERY EXECUTE 'SELECT content FROM ' || quote_ident(tablename); END; $$ LANGUAGE plpgsql; To prevent from sql injection user can try with SQL Protect: http://www.enterprisedb.com/docs/en/9.0/sqlprotect/Table%20of%20Contents.htm Thanks &

Re: [GENERAL] Passing a table as parameter

2011-03-21 Thread Vibhor Kumar
'select empno from '||$1||' where id = 1' LOOP return next rec.empno; END LOOP; return next rec.empno; END; $$ language plpgsql; Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterpr

Re: [GENERAL] query execution time

2011-03-21 Thread Vibhor Kumar
irst statement. B > A, if the there is any change happened Or Any session has evicted the cached data. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent via pgsql-general ma

Re: [GENERAL] Doubt in Backup

2011-03-21 Thread Vibhor Kumar
pen. If the Binaries version is same and Data Directory is same, then \l should show all databases. Please reconfirm the data directory and Version of PG. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blo

Re: [GENERAL] How do I do this in plpgsql ?

2011-03-19 Thread Vibhor Kumar
and can also use array of that http://www.postgresql.org/docs/8.4/static/sql-createtype.html Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent via pgsql-general mailing list (pgsql-g

Re: [GENERAL] Insert value input syntax of an array of types without ARRAY/ROW nor casting?

2011-03-19 Thread Vibhor Kumar
ed end of line. Try following, it should work: INSERT INTO mytypetable VALUES ( 6,ARRAY[row('a', 'aa'), row('b', 'bb')]::mytype[] ); Thanks & Reg

Re: [GENERAL] A join of 2 tables with sum(column) > 30

2011-03-15 Thread Vibhor Kumar
um(completed) > 30 group by... >^ Use having clause for aggrgate function, group by col1, col2 having sum(col) > Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com B

Re: [GENERAL] A join of 2 tables with sum(column) > 30

2011-03-15 Thread Vibhor Kumar
m where u.id=m.id and u.id like 'DE%' group by u.id, u.first_name having sum(m.completed > 30 order by sum desc limit 3; > > On Tue, Mar 15, 2011 at 10:43 PM, Vibhor Kumar > wrote: >> >> On Mar 16, 2011, at 3:03 AM, Alexander Farber wrote: >> >>

Re: [GENERAL] A join of 2 tables with sum(column) > 30

2011-03-15 Thread Vibhor Kumar
ers u, pref_match m where u.id=m.id and u.id like 'DE%' and sum(m.completed > 30 group by u.id, u.first_name order by sum desc limit 3; Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blo

Re: [GENERAL] Enable/Disable Triggers

2011-03-15 Thread Vibhor Kumar
R [ trigger_name | ALL | USER ] Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] DBMS upgrade and backups

2011-03-14 Thread Vibhor Kumar
up with Filesystem Backup before any upgrade. Can you explain, why are you upgrading to 9.1? Currently there is no Prduction release of 9.1. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blog

Re: [GENERAL] Compare an integer to now() - interval '3 days'

2011-03-11 Thread Vibhor Kumar
o timestamp without time zone Use to_timestamp function. For more detail refer following documentation: http://www.postgresql.org/docs/8.3/static/functions-formatting.html Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprise

Re: [GENERAL] [ADMIN] FW: backup using pg_dump postgreSQL 8.3.8

2011-03-09 Thread Vibhor Kumar
password when prompted? Include following in dos script. set PGPASSWORD= Or you can use pgpass.conf file option. > 3. Is there a way of running the pg_dump with a user that doesn't have a > password? For that user, you have to mention trust with hostname in pg_hba.conf Thanks

Re: [GENERAL] procedure in db

2011-03-09 Thread Vibhor Kumar
On Mar 9, 2011, at 9:56 AM, abcdef wrote: > I use postgresql in red hat linux . > I want to know how I can find out all the procedure stored in the database . > Any SQL command to do it ??? pg_catalog.pg_proc can be use to find all the functions. Thanks & Regards, Vibhor Kumar

Re: [GENERAL] PG and dynamic statements in stored procedures/triggers?

2011-03-07 Thread Vibhor Kumar
ql: http://www.postgresql.org/docs/8.4/static/plpgsql-statements.html Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.or

Re: [GENERAL] How to Create Table from CSV

2011-03-06 Thread Vibhor Kumar
r near "TABLE" > SQL state: 42601 > Character: 6 You can't create a table using CSV. However try following: 1. Create structure of table (Parse the column using some script or manually) 2. Import data using COPY Command. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporati

Re: [GENERAL] Copying few tables from one database to another

2011-03-06 Thread Vibhor Kumar
below: psql -c 'COPY tablename to STDOUT;' dbname|psql -c 'COPY tablename from STDIN;' dbname Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent via pgsql-gener

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Vibhor Kumar
d argument types. You might need > to add explicit type casts. Error Message is only saying nvl(integer,integer) does not exists. Please check offload database is having function nvl and then, grant all on that function. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enter

Re: [GENERAL] Unprivileged access to pgsql functions?

2011-03-04 Thread Vibhor Kumar
ar with. > Is this part of EntepriseDB's Postgres+ package or something? You should > probably contact them via their support channels. GRANT all on function nvl to public would help. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibho

Re: [GENERAL] Pgdump error "invalid page header in block"

2011-03-04 Thread Vibhor Kumar
lassid, objid, refclassid, refobjid, > deptype FROM pg_depend WHERE deptype != 'p' ORDER BY 1,2 > pg_dump: *** aborted because of error reindexdb -s will resolve the issue. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Co

Re: [GENERAL] updating all records of a table

2011-03-04 Thread Vibhor Kumar
ua > suggested. > > A +1 If UPDATE is for all rows, then 1. CTAS with change value in SELECT 2. Rename the tables. -- This will give zero Bloats. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...@enterprisedb.com Blog:http://vibhork

Re: [GENERAL] Dynamic binding in plpgsql function

2011-03-01 Thread Vibhor Kumar
my example. You don't need any table to assign value of function to Variable, if function returning single value. You can use EXECUTE 'SELECT '||$1||'(y)' into x; Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.ku...

Re: [GENERAL] restore a server backup

2011-02-28 Thread Vibhor Kumar
tp://www.pgadmin.org/docs/1.10/backup.html Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- 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] Permission denied when inserting

2011-02-28 Thread Vibhor Kumar
; CONTEXT: SQL statement "SELECT 1 FROM ONLY "public"."out2cp" x WHERE > "site"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text AND > "cp"::pg_catalog.text OPERATOR(pg_catalog.=) $2::pg_catalog.text FOR SHARE OF > x"

Re: [GENERAL] ERROR: missing chunk number 0 for toast value 382548694 in pg_toast_847386

2011-02-27 Thread Vibhor Kumar
backup_label information. Try following steps: 1. Untar all the gzipped WAL File in One Location 2. Use Following restore command: cp /%f %p > We were concerned that shutting down / starting up while recovery is ongoing > might cause some problems, but the pg documentation indicat

Re: [GENERAL] ERROR: missing chunk number 0 for toast value 382548694 in pg_toast_847386

2011-02-27 Thread Vibhor Kumar
kup + PITR. Did you verify base backup (Restoring without PITR) ? Thanks & Regards, Vibhor Kumar vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.post

Re: [GENERAL] ERROR: missing chunk number 0 for toast value 382548694 in pg_toast_847386

2011-02-27 Thread Vibhor Kumar
nks & Regards, Vibhor Kumar vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- 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] PostgreSQL group sort

2011-02-24 Thread Vibhor Kumar
} > 2 | {4,5,6} | {sm4,sm5,sm6} Try with intarray Module: http://www.postgresql.org/docs/8.4/static/intarray.html Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company Cell: +91-932-568-2279 vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogsp

Re: [GENERAL] Recreate database but old tables still present

2011-02-24 Thread Vibhor Kumar
erify if those tables are in template1 database. Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company Cell: +91-932-568-2279 vibhor.ku...@enterprisedb.com Blog:http://vibhork.blogspot.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] Reordering a table

2011-02-22 Thread Vibhor Kumar
ber as given below: select id,stamp, row_number() over(order by stamp) from test; Or Create table test1 as select row_number() over(order by stamp) as id, stamp from test; Thanks & Regards, Vibhor Kumar -- 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] Covert database from ASCII to UTF-8

2011-02-22 Thread Vibhor Kumar
y-many > hour dump-restore. > > Using Postgres 8.4.X. > > I assume slony replication is an option. Right! Replication would help. You can also try Bucardo. > What about some sort of wal log shipping replication? WAL Log shipping won't help. Thanks & Regards,

Re: [GENERAL] Schema Archive cant find table

2011-02-21 Thread Vibhor Kumar
gt; Thinking I was missing something I tried using -t servers, and I get : > pg_dump: No matching tables were found > It should not. Try schemaname.tablename with switch -t. Thanks & Regards, Vibhor Kumar -- Sent via pgsql-general mailing list (pgsql-general@postgresql.o

Re: [GENERAL] Duplicated tables of certain columns

2011-02-21 Thread Vibhor Kumar
On Feb 21, 2011, at 1:39 PM, Yan Cheng CHEOK wrote: > INSERT INTO backup_table SELECT * FROM unit_11 WHERE status = 1; You can try something like, INSERT INTO backup_table select unit_id, 99, status, value from unit_11 where status=1; Thanks & Regards, Vibhor Kumar EnterpriseDB Corp

Re: [GENERAL] How to create index on only some of the rows

2011-02-07 Thread Vibhor Kumar
ant you can do that Or You can use proper where clause as given below: CREATE INDEX indexname on tablename(columname) where condition; example: create index directed_graph_idx on directed_graph(node_from) where node_from in ('A','B'); Thanks & Regards, Vibhor

Re: [GENERAL] Comments on tables

2010-11-10 Thread Vibhor Kumar
o $$ Declare t text; begin t:='COMMENT ON TABLE TEST_COPY IS '||''''||'TEST WITH '||current_date||''''; execute t; end; $$ language plpgsql; Thanks & Regards, Vibhor Kumar -- Sent via pgsql-general mailing list (pgsql-general@postg

Re: [GENERAL] pg_filedump binary for CentOS

2010-09-27 Thread Vibhor Kumar
inary hidden somewhere > in the packages. Yes, you are right. pg_filedump is not part of PG Source. Its a separate module, which needs to be compile. Thanks & Regards, Vibhor Kumar -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscripti

Re: [GENERAL] How to dump only the the data without schema?

2010-09-27 Thread Vibhor Kumar
--help Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation -- 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] Setting up pgpass.conf for the postgres OS user on windows for pgAgent

2010-08-12 Thread Vibhor Kumar
On Aug 12, 2010, at 2:43 PM, Peter Geoghegan wrote: > Hello, > > I would like to set up pgAgent on windows. I'm using the EDB 8.4.4 > package. I know that it is bad practice to put the password directly > in the conninfo string, so I've avoided that. I want to use pgpass > authentication, per th

Re: [GENERAL] pgtune

2010-08-10 Thread Vibhor Kumar
On Aug 9, 2010, at 11:40 AM, tuanhoanganh wrote: > What is the name of DW in --type=DW > Sorry for my English. > DW: Data Warehouse > Tuan Hoang Anh > > On Mon, Aug 9, 2010 at 6:21 PM, Amitabh Kant wrote: > 2010/8/9 Sim Zacks > > > > I just found out about pgtune and am trying it out o

Re: [GENERAL] Scheduling backup

2010-06-30 Thread Vibhor Kumar
; Regards, Vibhor Kumar. EnterpriseDB Corporation The Enterprise Postgres Company Office: 732-331-1300 Ext-2022 Website: www.enterprisedb.com EnterpriseDB Blog: http://blogs.enterprisedb.com Follow us on Twitter: http://www.twitter.com/enterprisedb -- Sent via pgsql-general mailing list (pgs

Re: [GENERAL] Prepared statement issue in Pgpool-II

2010-06-28 Thread Vibhor Kumar
e992e" does not exist Try with reset_query_list= 'ABORT; DISCARD ALL' -- Thanks& Regards, Vibhor Kumar. EnterpriseDB Corporation The Enterprise Postgres Company Office: 732-331-1300 Ext-2022 Website: www.enterprisedb.com EnterpriseDB Blog: http://blogs.enterprisedb.com Fo

Re: [GENERAL] postgres user password: Log on failure

2010-06-28 Thread Vibhor Kumar
he services. -- Thanks& Regards, Vibhor Kumar. EnterpriseDB Corporation The Enterprise Postgres Company Office: 732-331-1300 Ext-2022 Website: www.enterprisedb.com EnterpriseDB Blog: http://blogs.enterprisedb.com Follow us on Twitter: http://www.twitter.com/enterprisedb -- Sent via pgsql-

Re: [GENERAL] disable password prompt - command line

2010-06-23 Thread Vibhor Kumar
er% -U %username% -d %database% -p %port% --file File.sql >> xx -- Thanks& Regards, Vibhor Kumar. Senior System Engineer. EnterpriseDB Corporation The Enterprise Postgres Company Office: 732-331-1300 Ext-2022 Website: www.enterprisedb.com EnterpriseDB Blog: http://blogs.enterprisedb.com Foll

Re: [GENERAL] Postgresql with open-ssl support

2010-05-04 Thread Vibhor Kumar
-pgport=5444' '--with-ldap' '--with-pam' '--with-libmemcached' 'CC=/usr/local/gcc41/bin/gcc' 'CPPFLAGS=-I/home/edb/AS83R2/build/AS83R2/edb-postgres/src/include' LIBS = -lpgport -lmemcached -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lz -ledit -ltermcap -lcrypt -ldl -lm Thanks & Regards, Vibhor Kumar EnterpriseDB Co.

Re: [GENERAL] Postgresql with open-ssl support

2010-05-04 Thread Vibhor Kumar
-pgport=5444' '--with-ldap' '--with-pam' '--with-libmemcached' 'CC=/usr/local/gcc41/bin/gcc' 'CPPFLAGS=-I/home/edb/AS83R2/build/AS83R2/edb-postgres/src/include' LIBS = -lpgport -lmemcached -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lz -ledit -

Re: [GENERAL] postgres crashes - could not reattach to shared memory

2010-05-02 Thread Vibhor Kumar
ewall/antivirus software and restart the PostgreSQL. Following is a thread, which has good discussion on it: http://www.mail-archive.com/pgsql-general@postgresql.org/msg132613.html -- Thanks & Regards, Vibhor Kumar.

Re: [GENERAL] [NOVICE] Is there any oracle user_source table equivalent in postgre?

2010-03-05 Thread Vibhor Kumar
> > Hello, > > Can any one help me if oracle like any user_source table is there in postgre > 8.4 (in pg_catalog or information_schema). > Actually we migrated code from Oracle to Postgre. Now i want to search in how > many places( i.e. in functions ) we have used a particular syntax( e.g.

Re: [GENERAL] Error ::- “ 'more' is not recognized as an internal or external command, operable program or batch file. “

2009-06-23 Thread Vibhor Kumar
"more" exists in C:\Windows\System32. So, please set the path in PATH Environment Variable. and then try. My Computer (Right Click) -> Properties -> then go to Advanced tab -> Environment Variable -> set the path. Thanks & Regards, Vibhor Kumar www.enterprisedb.com

Re: [GENERAL] problem with locale :

2009-03-29 Thread Vibhor Kumar
: http://www.postgresql.org/docs/8.1/static/app-pgcontroldata.html Thanks & Regards, Vibhor Kumar www.enterprisedb.com Vibhor Kumar wrote: Hi Eugenio, Use the following command to know about the locale. pg_controldata For more information, please follow the link given below:

Re: [GENERAL] problem with locale :

2009-03-29 Thread Vibhor Kumar
Hi Eugenio, Use the following command to know about the locale. pg_controldata For more information, please follow the link given below: http://www.postgresql.org/docs/8.3/static/app-pgcontroldata.html Thanks & Regards, Vibhor Kumar www.enteprisedb.com Stefan Kaltenbrunner wrote: Eug

Re: [GENERAL] Multidatabase query

2009-03-27 Thread Vibhor Kumar
priseDB_OraCompat_EN_8.3-49.htm Regards, Vibhor Kumar www.enterprisedb.com Mauro Bertoli wrote: Hi all, is possible in PostgreSQL to create query between multidatabase like Sql Server 2005? An example: SELECT db1.a.id FROM db1.a UNION db2.b.id FROM db2.b Where "db1" is a databas