[SQL] Pg_Restore with --clean option

2009-09-30 Thread Jyoti Seth
I want to restore data of a single table. Before restoring the data I disabled all the triggers and constraints on that table. I used the restore command with --clean option so that data gets deleted from that table and then fresh data get inserted. But this is throwing error: duplicate key value

[SQL] Disable Constraints in Postgresql 8.4

2009-09-29 Thread Jyoti Seth
I want to execute a sql file for that I need to disable constraints. In postgres version 8.3, I was executing the script by doing the following: 1. Disabling triggers by updating “reltriggers” field of pg_class to 0 . 2. Executing sql file 3. Then updating “reltriggers” field of

[SQL] SQL File in encrypted form

2009-06-19 Thread Jyoti Seth
Hi All, I want to send the sql script file to a client but wants to hide the details in it. Can I send the sql script file in encrypted form which they can execute but can't view the details. Thanks, Jyoti

[SQL] dynamic columns in a query

2009-06-11 Thread Jyoti Seth
Hi All, Is there any way in postgres to write a query to display the result in matrix form. (where column names are dynamic) For eg. Employee Name Client1 Client2 Client3 Client4 Emp1100 102 90 23 Emp256

Re: [SQL] backup

2009-06-09 Thread Jyoti Seth
] backup On 2009-06-09, Jyoti Seth wrote: > This is a multipart message in MIME format. > > --=_NextPart_000_003C_01C9E916.43A8D460 > Content-Type: text/plain; > charset="us-ascii" > Content-Transfer-Encoding: 7bit > > Hi all, > > > > Can we

Re: [SQL] backup

2009-06-09 Thread Jyoti Seth
Subject: Re: [SQL] backup On 2009-06-09, Jyoti Seth wrote: > This is a multipart message in MIME format. > > --=_NextPart_000_003C_01C9E916.43A8D460 > Content-Type: text/plain; > charset="us-ascii" > Content-Transfer-Encoding: 7bit > > Hi all, > &

[SQL] backup

2009-06-09 Thread Jyoti Seth
Hi all, Can we take backup of specific data of a table (using where clause)? Thanks, Jyoti

[SQL] pg_restore

2009-06-09 Thread Jyoti Seth
Hi all, I have two databases db1 and db2 with no network connection. I want to take backup of few master tables from db1 and restore it to db2 at frequent intervals.. I do not want to delete data from the tables and restores the fresh data as this data is getting referenced in other tables. I

[SQL] Creation of file from postgresql function

2009-06-03 Thread Jyoti Seth
Hi, I want to create a file on a disk through postgres function. I am trying to use large objects functions (lo_create, lo_open and lo_write) for this. In this, lo_open command is throwing error "invalid mode" or "Syntax error whereas I have given the value of INV_WRITE from libpq-fs.h as mode.

[SQL] backup and restore

2009-05-08 Thread Jyoti Seth
Hello, I have two databases db1 and db2 with the same database structure on different systems with no network connection. In the first system with the db1 database user updates the master data. At the end of every day, the user needs to take the backup of updated data of master tables on db1 and u

Re: [SQL] unique constraint on views

2008-12-10 Thread Jyoti Seth
response to Jyoti Seth : > Hi All, > > Is it possible to add unique constraint on updateable views in postgres? Add the constraint to the base-table. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4

[SQL] unique constraint on views

2008-12-10 Thread Jyoti Seth
Hi All, Is it possible to add unique constraint on updateable views in postgres? Thanks, Jyoti Seth -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] postgresql function not accepting null values inselect statement

2008-02-24 Thread Jyoti Seth
I have tried this, but it is showing following error: ERROR: syntax error at or near "DISTINCT" SQL state: 42601 Thanks, Jyoti -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of johnf Sent: Friday, February 22, 2008 10:01 PM To: pgsql-sql@postgresql.org Sub

Re: [SQL] postgresql function not accepting null values in select statement

2008-02-22 Thread Jyoti Seth
l value in p_statecd it doesn't show anything whereas it has values and if I write the select statement separately it gives values Thanks, Jyoti -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: Friday, February 22, 2008 2:35 PM To: Jyoti Seth Cc: pgsql-sql

[SQL] postgresql function not accepting null values in select statement

2008-02-22 Thread Jyoti Seth
Hi, If I pass null value as the parameter of postgresql function, which is used in the where clause of select statement is not functioning properly. I have also changed the value of transform_null_equals = on in the conf file and restarted postgresql. But it is still giving error. Is t

[SQL] Packages

2008-02-15 Thread Jyoti Seth
Hi, Is there any concept of Package in postgresql to group functions ? Thanks, Jyoti Seth

Re: [SQL] Multiple postgresql functions in a single transaction

2008-02-05 Thread Jyoti Seth
Thanks. I am not using sequences. I tried an example and it worked. From: Robins Tharakan [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 06, 2008 12:54 PM To: Jyoti Seth Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Multiple postgresql functions in a single transaction It can be

[SQL] Multiple postgresql functions in a single transaction

2008-02-05 Thread Jyoti Seth
value generated in the second function should also roll back. Please let me know if we can execute two functions of postgresql in a single transaction. Thanks, Jyoti Seth ---(end of broadcast)--- TIP 5: don't forget to increase your free spac

[SQL] Does postgresql8.2 supports multithreading?

2007-09-11 Thread Jyoti Seth
Hi , Does postgresql8.2 supports multithreading? Thanks, Jyoti Seth

Re: [SQL] Database synchronization

2007-07-31 Thread Jyoti Seth
ma 'smssch'. Here, the country table is present in two different schemas. Can I replicate the country table data from schema stocksch to schema smssch or I have to create a schema with the same name for replication. Thanks, Jyoti Seth On 7/26/07, Jyoti Seth <[EMAIL PROTECTED]> wrot

Re: [SQL] Database synchronization

2007-07-25 Thread Jyoti Seth
Thanks a lot for your suggestion. It will help me in taking the decision. -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 25, 2007 6:10 PM To: Jyoti Seth Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Database synchronization Jyoti Seth wrote

Re: [SQL] Database synchronization

2007-07-25 Thread Jyoti Seth
nks, Jyoti -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 25, 2007 3:54 PM To: Jyoti Seth Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Database synchronization Try not to start a new thread (question) by replying to an old one - it can mean some people

[SQL] Database synchronization

2007-07-25 Thread Jyoti Seth
problem is my master database changes frequently and I always require the latest information. Please suggest which is the right approach in this situation. Thanks, Jyoti Seth ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Database Synchronization

2007-07-24 Thread Jyoti Seth
6 I have also tried changing the value of libdir to the directory where xxid.so file is there but couldn't resolve the problem. Thanks, Jyoti Seth -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Sullivan Sent: Monday, July 23, 2007 11:43 PM

Re: [SQL] Database Synchronization

2007-07-23 Thread Jyoti Seth
l and configure slony-I through source, it gives the message please make sure tp build and install postgresql from the sources first. I am new to both linux and postgres. Please help me in installing and configuring slony-I on my suse linux m/c. Thanks, Jyoti Seth -Original Message-

Re: [SQL] Database Synchronization

2007-07-18 Thread Jyoti Seth
Thanks a lot for your suggestions. I have ony single master. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Huxton Sent: Wednesday, July 18, 2007 9:13 PM To: Chris Browne Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Database Synchronization Ch

[SQL] Database Synchronization

2007-07-18 Thread Jyoti Seth
Hello , I have two postgres databases on different linux servers. Postgres database on one server has some tables that needs to be synchronized from the other postgres database . What should be the best method for this. Please let me know if someone has idea. Thanks, Jyoti Seth

Re: [OBORONA-SPAM] [SQL] calling webservice through postgresql function

2007-07-16 Thread Jyoti Seth
Hello Dmity, As suggested by Richard Huxton in this forum we can use any of the "untrusted" procedural languages to access resources outside the database (e.g. pl/perlu). You can get the code to call the webservice from the postgresql function from this url. http://www.pgsql.cz/index.php/PL/Perlu

Re: [SQL] calling webservice through postgresql function

2007-07-13 Thread Jyoti Seth
hanks, Jyoti Setj -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: Friday, July 13, 2007 12:57 PM To: Jyoti Seth Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] calling webservice through postgresql function Jyoti Seth wrote: > Hi all, > > I want to call w

[SQL] calling webservice through postgresql function

2007-07-13 Thread Jyoti Seth
Hi all, I want to call webservice from my postgresql database. Please let me know if anyone has idea. Thanks, Jyoti Seth

Re: [SQL] setof or array as input parameter to postgresql 8.2 functions

2007-06-13 Thread Jyoti Seth
Thanks a lot. Regards, Jyoti -Original Message- From: Pavel Stehule [mailto:[EMAIL PROTECTED] Sent: Thursday, June 14, 2007 11:27 AM To: Jyoti Seth Cc: [EMAIL PROTECTED]; pgsql-sql@postgresql.org Subject: Re: [SQL] setof or array as input parameter to postgresql 8.2 functions 2007/6/14

Re: [SQL] setof or array as input parameter to postgresql 8.2 functions

2007-06-13 Thread Jyoti Seth
:25 PM To: Jyoti Seth Cc: [EMAIL PROTECTED]; pgsql-sql@postgresql.org Subject: Re: [SQL] setof or array as input parameter to postgresql 8.2 functions Hello maybe: create function foo(varchar[][]) returns void as $$ begin end$$ language plpgsql; postgres=# select foo(array[array[1,2], array[2,2

[SQL] setof or array as input parameter to postgresql 8.2 functions

2007-06-13 Thread Jyoti Seth
Hi, I have to pass a set of values and arrays in postgresql 8.2 functions. But I am not getting any help on that. Please let me know if any one has idea. Thanks, Jyoti