m
t1;
' Language SQL;
It was fine and created a function.
while i execute it as
select sel_t1;
I got the following
error.
ERROR: Cannot display a value
of type RECORD
How to solve this. Please
help.
Kumar
Dear Friends,
I am about to do a migration of
stored procedures from MS SQL Server to Postgres. What is there any free tools
available for it?
Shall I write a SQL function or
PL/pgSQL function for Stored Procedures? Please advise me on this. Thanks in
advance.
Kumar
at PgAdmin and at
Command prompt?
Please help me with this, as it is much helpful for my development
purpose.
Regards
Kumar
Dear Friends,
Using Postgres 7.3.4 over the linux server 7.3.
Is it possible to alter/change the data type of a existing
table's column, with out dropping and recreating a column of same
name.
Thanks for ur knowledge sharing.
Regards
Kumar
p_upd_add_001(int8, varchar, varchar, varchar,
varchar, varchar, varchar, varchar, varchar, varchar, varchar, timestamp) TO
wats;=
See it is difficult to pass the parameters with out name
them.
(2) I am getting error at the code
IF NOT EXISTS...
Is that not supported at Postgres?
Please shed ur light on this. pls
Regards
Kumar
Dear Gurus,
Is there a way to automate the backup databases using
pg_dump (like in SQL server)?
Regards
Kumar
?
How to get the datafile path of a database?
Please shed light.
Regards
Kumar
write or cast the _expression_
Please help me with this.
Regards
Senthil Kumar S
Pls shed some light.
Thank you very
much.
Kumar
While I issue
which pg_dump it is showed me
/usr/local/pg_dump
But how to run the backup utility pg_dump to backup my database.
- Original Message -
From: "Richard Huxton" <[EMAIL PROTECTED]>
To: "Kumar" <[EMAIL PROTECTED]>; "psql" <[EMAIL P
Dear Friend,
I understood what you are saying. But could you pls tell me how to change
the path of the pg_dump so that it should point to
/usr/local/pgsql/bin/pg_dump
Please help
- Original Message -
From: "Kumar" <[EMAIL PROTECTED]>
To: "Richard Huxton"
Dear Friends,
Can anyone suggest me the compatible datatype in Postgres
7.3.4 running on RH Linux 7.2 for 'image' datatype in SQL Server
Thanks for help.
kumar
hich I read from the manual). In this case what is
the best data type to use.
Please suggest me. The explanation of using LOB objects in a
table and to write them with image is not very clear in the documentation. Can
any one send me any link or white paper or examples about
it.
Thanks in advance.
Kumar
Dear Friends,
Any body could pls share their idea on creating object
DDL for the postgres data objects from the Postgres Server 7.3.4 running on
RH Linux 7.2.
Regards
Kumar
p_list_ids +
");" EXEC(@v_sql)
Actually to dynamically pass the values for the 'IN' the pass
the @p_list_ids (a comma separated string ) to the variable @v_sql and
then execute it.
How can I change it for postgres?
Thank you very much for ur support
Regards
Kumar
E
action_plan_id IN ('|| p_action_plan_ids || ')';
Error is
WARNING: plpgsql: ERROR during
compile of sp_del_met_001 near line 47 ERROR:
unterminated string
How can I specify a string charactor, as the PgAdmin3 is not
using double quotes for Strings. Anyone pls shed some light.
Regards
Kumar
n Postgres?
Anyone have a link or while paper on handling arrays in
functions?
Please enlighten me on this.
Regards
Kumar
re with me, please. I am looking for something
like sp_helptext in MS SQL server.
Regards
Kumar
as the output.
Is there any command or any system table from that I could
query the column names of a table (other than \d table name at the command
prompt).
Kumar
- Original Message -
From:
Jordan S.
Jones
To: Kumar
Cc: [EMAIL PROTECTED]
Sent: Friday, October 17
I am sorry. Yes it worked.
Thank you very much Mr. Jordan and Mr. Richard.
- Original Message -
From: "Richard Huxton" <[EMAIL PROTECTED]>
To: "Kumar" <[EMAIL PROTECTED]>; "Jordan S. Jones" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]&
#x27; for types 'name' and 'character
varying'
You will have to retype this query using an explicit cast
I have write many functions of the same structure and executed with out
problems. Where I am doing wrong here.
Please shed some light.
Regards
Kumar
----- Original M
Postgres 7.3.4 on RH Linux 7.2.
Note: I can't use 2 functions , one to insert 32 rows into the
table first and the update the remaining columns with other function. Because
there are only 27 columns that are not null.
Please shed some light.
Regards
Kumar
this pls.
Kumar
tables
only.
Is there a way?
Thanks
Kumar
.sql.tar.gz -u -F c
--Error msg
WARNING: owner of function "plpgsql_call_handler" appears to
be invalid
Could anyone tell me why I am getting this. I could able to do
normal back and restore.
Please shed some light.
Regards
Kumar
"Lookup_ID " = $2;END;' LANGUAGE 'plpgsql'
VOLATILE;
Here can I use as
CREATE OR REPLACE FUNCTION
public.fn_listtitle(%Lookups.Lookuptype, %Lookups.Lookup_ID)
Please shed some light.
Regards
Kumar
following statement
UPDATE pg_proc SET proowner = 1 where proname = 'plpgsql_call_handler';
I am asking this because to ensure not any wrong impact gets into the live
database. Pls advise.
Regards
Kumar
- Original Message -
From: "Peter Eisentraut" <[EMAIL PROTECT
ot;("
While I execute the following code it is working fine and
fetches values.
(SELECT * FROM history WHERE
obs_type = \'AA\' ) UNION (SELECT *
FROM history WHERE obs_type =
\'TA\');
Where I am wrong. Please shed some light,
Regards
Kumar
Hi Christoph Haller,
Thanks you very much. It worked.
- Original Message -
From: "Christoph Haller" <[EMAIL PROTECTED]>
To: ""Kumar"" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 3:56 PM
Subject: Re:
EN ref FOR SELECT * FROM
(SELECT * FROM history WHERE obs_type =3D \'AA\' )
UNION
(SELECT * FROM history WHERE obs_type =3D \'TA\') as foo;
Regards
Kumar
- Original Message -
From: "Tom Lane" <[EMAIL PROTECTED]>
To: "Christoph Haller&q
d with the user
'kumar', it gives me the following error
>>
pg_dump: query to get data of sequence "clients_client_id_seq"
failed: ERROR: clients_client_id_seq: permission deniedpg_dump: ***
aborted because of error
But as the user 'kumar' I could manage t
erval'n month';
For this I wanted to write a dynamic query.
EXECUTE 'select now()+ interval\'' || 3||
'month\'';
Error
ERROR: parser: parse error at or near
"'select now()+ interval\''" at character 9
Help help me with this. I wanted to use this query inside a
PLpgSQL function.
Regards
Kumar
I tried just to run the now() function with a dynamic query, I got the
following error. Please correct me.
test=> select now();
now
---
2003-11-10 17:06:36.783779+00
(1 row)
test=> execute 'select now()';
ERROR: parser: parse error at
FROM t1;
ERROR: Bad timestamp external representation
'Record_Not_Found'
SELECT
CASE WHEN c1 IS NULL THEN
'Record_Not_Found'::text ELSE c1 END as approval_date
FROM t1;
ERROR: CASE types 'timestamp without time zone' and 'text' not
matched
Where I am doing wrong? Please shed some light.
Regards
Senthil Kumar S
DBA
Thanks a lot. It worked.
- Original Message -
From: "Richard Huxton" <[EMAIL PROTECTED]>
To: "Kumar" <[EMAIL PROTECTED]>; "psql" <[EMAIL PROTECTED]>
Sent: Tuesday, November 25, 2003 9:44 PM
Subject: Re: [SQL] ::text problem
Kumar
Dear Friends,
I am doing a migration from SQL server to Postgres SQL. A
simple select fetches the following names.
select full_name FROM project_members where
project_members.project_role_id in (' + @p_res_ids + ') ;
Let us say if the results are
full_name
---
David
Postg
project_members.project_role_id
in ( ' x,y,z ') ;
full_name
---
David
Postgres
plpgsql
Expected return string is - 'David,Postgres,Plsql'
Regards
Kumar
- Original Message -
From: "Tomasz Myrta" <[EMAIL PROTECTED]>
To: "Kumar" &l
'INTO [variable_name]' inside a
dynamic query. Please shed some light.
Regards
Kumar
7.4 database
servers).
Please shed some light with a white paper or an article to do
it.
Regards
Kumar
populate the records,
as this will slow down the function. Is there any method for that
Please shed some light.
Regards
Kumar
MS outlook. Please shed some
light.
Regards
Kumar
database.
Please shed some idea.
Regards
Kumar
- Original Message -
From: "Josh Berkus" <[EMAIL PROTECTED]>
To: "Peter Eisentraut" <[EMAIL PROTECTED]>; "Kumar" <[EMAIL PROTECTED]>;
"psql" <[EMAIL PROTECTED]>
Sent: Wednesd
eck its recurrences pattern.
Please shed some light.
Regards
kumar
- Original Message -
From: "Chris Travers" <[EMAIL PROTECTED]>
To: "Kumar" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Peter Eisentraut"
<[EMAIL PROTECTED]>; "psql&q
use this
Last login: Fri Jan 9 16:54:14 from 192.168.2.117
[EMAIL PROTECTED] ssakkaravel]$ psql -E training test
* QUERY **
SELECT usesuper FROM pg_user WHERE usename = 'test'
**
Welcome to psql, the PostgreSQL interactive terminal.
Type: \copyright for
possible to fetch only one column (the 'msgcount') from
the function. Because I am interested in SUM(msgcount). Please shed some
light.
Regards
kumar
Yes it worked. Thanks
- Original Message -
From: "Tom Lane" <[EMAIL PROTECTED]>
To: "Kumar" <[EMAIL PROTECTED]>
Cc: "psql" <[EMAIL PROTECTED]>
Sent: Tuesday, January 20, 2004 9:28 PM
Subject: Re: [SQL] Fetching a single column from
ATILE;
Anybody pls help me with this. I am first time writing these
kind of function for TOP DOWN analysis. Please shed light.
Regards
Senthil Kumar S
Thanks a lot Mr.Richard Huxton. It managed to find a similar one and
modified to my need. It is working fine. Thanks a lot
- Original Message -
From: "Richard Huxton" <[EMAIL PROTECTED]>
To: "Kumar" <[EMAIL PROTECTED]>; "psql" <[EMAIL PROTECT
---
Note the change hereBEGINFOR rec_recurrence
IN SELECT * FROM crm.recurrences LOOPRAISE
NOTICE 'Hai';END LOOP; RETURN
'DONE';END;' LANGUAGE 'plpgsql' VOLATILE;
Why is that so? Anyone can please clear me.
Regards
Kumar
I am sorry. I didn't get you. Can u pls tell me more
Thanks
kumar
- Original Message -
From: "Tom Lane" <[EMAIL PROTECTED]>
To: "Kumar" <[EMAIL PROTECTED]>
Cc: "psql" <[EMAIL PROTECTED]>
Sent: Tuesday, February 10, 2004 2:02
e column
c1 is a string I might have replace it with empty string. I don't want to
substitute with '0' which could work.
sqlstr := 'insert into test(c1, c2) values
(' ||ISNULL(rec.c1,'0')||','
||'\''||rec.c2||'\')';
NOTICE: insert into test(c1, c2) values
(1,'Hai1')NOTICE: insert into test(c1, c2) values
(0,'Hai2')
Total query runtime: 47 ms.Data retrieval runtime: 0
ms.1 rows retrieved.
How can I do that. Please advise me.
Thanks
Kumar
7;;
NOTICE:
WARNING: Error occurred while executing PL/pgSQL function test_fn
WARNING: line 11 at execute statement
ERROR: cannot EXECUTE NULL query
That is the problem i am facing. Please shed some light.
Thanks
Kumar
- Original Message -
From: "Tomasz Myrta" <[EMAIL PROTEC
Dear all,
I solved it using ISNULL function.
sqlstr := 'insert into test(c1, c2) values ('||ISNULL(rec.c1,'NULL')||','
> ||'\''||rec.c2||'\')';
Thanks
kumar
- Original Message -
From: "Kumar" <[EMAIL PRO
tation 'NULL'
I think using 'CASE' this could be solved. But instead is there any other
simple way to do it.
Thanks a lot Mr. Tomasz Myrta
Kumar
- Original Message -
From: "Tomasz Myrta" <[EMAIL PROTECTED]>
To: "Kumar" <[EMAIL PROTECTED]&
Thanks Tomasz Myrta. It is wonderful. I am still amazed from where you guys
knowing the options like quote_literal, etc.
Kumar
- Original Message -
From: "Tomasz Myrta" <[EMAIL PROTECTED]>
To: "Kumar" <[EMAIL PROTECTED]>
Cc: "psql" <[EMAIL
x27;,current_date + ('5
month')::INTERVAL);ERROR: TIMESTAMP units 'week' not
supportedtest=#
Any idea on how to find the 3 rd Wednesday of any given month.
Thanks
Kumar
ason why you have included that?
Thanks
Kumar
- Original Message -
From: "sad" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 16, 2004 6:53 PM
Subject: Re: [SQL] Getting the week of a date
EXCUSE ME, GUYS !
i forgot to add one monome:
7*(
I am sorry. I didn't read the doc properly. I understood why it is written
in that way.
Sorry for the trouble. Thanks. It worked fine for me.
Thanks
Kumar
- Original Message -
From: "Kumar" <[EMAIL PROTECTED]>
To: "sad" <[EMAIL PROTECTED]>; <[EMAI
enabling a constraint, as follows.
update pg_class set reltriggers=0 where relname =
'crm.activities';update pg_class set reltriggers = count(*) from pg_trigger
where pg_class.oid=tgrelid and relname='crm.activities';
Also doesnt work.
Is there a way to do it?
Thanks
Kumar
Dear Friends,
Postgres 7.3.4 on RH Linux 7.2.
Get the following from the groupscreate or replace function ExpensiveDepartments() returns setof table1 as
'
declare
r table1%rowtype;
begin
for r in select departmentid, sum(salary) as totalsalary
from GetEmployees() group by de
return the
value of v_activity_start_date for every row in activities table.
How could I achieve this.
Please shed some light.
Thanks
Kumar
- Original Message -
From: "Stephan Szabo" <[EMAIL PROTECTED]>
To: "Kumar" <[EMAIL PROTECTED]>
Cc: "psql" &l
Dear Friends,
I have installed Linux Fedore and wanted to work with the
default installed postgres 7.3.4 database.
I could able to create to create user, but while try to
connect, I got the following error message
psql: FATAL 1: IDENT authentication failed for user
My pg_hba.conf file l
Dear Friends,
Postgres 7.3.2 on Linux 8.
I wanna move about 100 tables from one schema to
another (within a database). Is possible to do that? Seems pg_dump doesnt have
an option to script only the schema.
Else, it possible to rename the
schema.
Please shed some light.
Thanks
Kumar
t a result as
1
YzE=
But this is the encoded value for 'c1' and not for
the value 1.
Please shed some light.
Also is it possible to get the encoded values with
only 2 charactors, irrespective of the values of c1 ranging from 100 to 10
million
Thanks
Kumar
Dear Friends,
Postgres 7.3.2.
I have an database with owner USRA who owns about
300 objects (tables and functions). Now I want to give 'ALL' permission to all
the objects of USRA to another database user USRB.
If I use the grant i need to type all the objects
as comma separated, like th
YNYYY.
Please shed some light.
Thanks
Kumar
Dear Friends,
Postgres 7.3.2 Runing on Linux 7.2
I would like to convert any values in between 1 to
2^16 into a single charactor. And decode that single char to get back
the numeric value again. Any function to do that in Postgres SQL
Server.
Please shed some light.
Thanks
Kumar
Dear Friends,
I am using postgres 7.3.2. I wanna get the
binary value of number 65536. Is there anyway to get that postgres
functions.
Thanks
kumar
to convert any 16 bit to a single charactor.
Is there any function to do that in Postgres.
Thanks
Kumar
- Original Message -
From: "Richard Huxton" <[EMAIL PROTECTED]>
To: "kumar" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, April 27, 2004
Dear friends,
Is there any equivalent datatype of SQL Server's
NCHAR and NVARCHAR, available with Postgres 7.3.4. I want to store characters,
special characters and Numbers.
Please shed some light.
Thanks
Kumar
follows.
fn_xyz(refcursor,int4) returns
recordDeclaredata ALIAS $1;mview RECORD;FOR mview IN FETCH
ALL IN dataLOOP//Process the records.END LOOP;
Is this possible. Please shed some
light.
Thanks
Kumar
Dear friends,
Postgres 7.3.4
How to find the last sunday/mon/sat of any given
month.
Thanks
Kumar
er by
the priority value instead.
So you might have a table like follows:
priorityvalue
1 3
2 1
3 2
--
Prasanth Kumar
[EMAIL PROTECTED]
Hi,
Is it possible to allow a user to execute a procedure that will update
some tables without the user having any privileges on the underlying tables
themselves (like in Oracle where the procedure effectively runs with the
privilege of the creator)?
Regards,
___
Hi,
We are using postgresql 7.3.3, we are encountering
the following problems when we used temporary tables.
Here with i'm sending my Sample function.
create or replace function
TestTemp_refcur(refcursor) returns refcursor As 'declare refc alias
for $1; lString
Varchar(4000);be
Hi,
We are using postgresql7.3.3, we
are encountering some problems by using temporary tables.
Actually our requirement was,
1. create
temporary table.
2. insert
some values on that table by using some quries.
3.
select the inserted values from the temporary ta
Connection(DriverManager.java:517)
at
java.sql.DriverManager.getConnection(DriverManager.java:177)
at NotificationTest.main(NotificationTest.java:13)Pl give me the solution
for this problem
Waiting eagerly for ur reply
Regards
Anil Kumar.S
BEGIN:VCARD
VERSION:2.1
N:Kumar;Anil
FN:Anil K
e cast (idtype as idtype1) with function idtype2int(idtype) as
implicit;
Then execute the alter table command to convert the data type:
alter table mytab alter column id type idtype1;
--
Thanks& Regards,
Vibhor Kumar.
EnterpriseDB Corporation
The Enterprise Postgres Company
--
Sent via pg
On Sep 24, 2010, at 6:02 PM, Nicholas I wrote:
>
> pg_dump -Dt --insert table dbname > table.sql;
>
> i am not able to get the output. is this correct ?
Try following:
pg_dump --insert -t
Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
--
Sent via pgsql-sql
to delete that table . I am observing
application is getting hang while executing statement.execute().
Please suggest me how to fix this issue.
Thanks
Atul Kumar
DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the
property of Persistent Systems L
On Feb 1, 2011, at 10:31 PM, NEVIN ALEX wrote:
> Hi,
> I am Nevin Alex and I am using postgresql database for a year . But I
> have’nt used table partitions: Please help me to do it in a better way. I got
> it from the documentation that it is an inheritance capability and the
> Trigger
On Feb 24, 2011, at 5:33 AM, manuel antonio ochoa wrote:
> How Can I do to compare two structures of data bases ?
>
> DBA != DBB I need wich functions and wich tables are not equals
>
> thnks
You can try with apgdiff.
http://apgdiff.startnet.biz/
Thanks & Regards,
Vibhor
--
Sent via pgs
On Feb 25, 2011, at 2:39 AM, Jacques Lebrun wrote:
> What can I do to force PostGres to update the internat serial counter when I
> do an insert with a specified value for the serial?
>
After inserting the all the Data, use ALTER SEQUENCE Command:
http://www.postgresql.org/docs/8.4/static/sql-
a_fim, sum(t.num_itens * t.valor) AS total, count(t.*) AS
transacoes
FROM ofertas o
JOIN transacao t ON o.ofertas_id = t.ofertas_id
JOIN municipio m ON o.municipio_id = m.municipio_id
WHERE o.data_fim <= now() AND t.status IN('Aguardando Pagto', 'Em análise',
On Mar 24, 2011, at 2:42 AM, Sree wrote:
> How can i convert bigint to date format.
>
> bigint=6169625280
Please explain what;s this value shows.
Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
vibhor.ku...@enterprisedb.
om/index.php/2007/08/17/rownum-anyone-cumulative-sum-in-one-query/
Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
vibhor.ku...@enterprisedb.com
Blog:http://vibhork.blogspot.com
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make
(pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
>
> psql + editor is the basic tool set, certainly the most flexible.
> Also be sure to check out pgadmin: http://www.pgadmin.org/download/macosx.php
+1 for pgAdmi
Use Alter table notebook from control center
right click on the table and open alter table notebook
you can drop a column or add a column or change the datatype
Kumar
On 8/7/06, Judith <[EMAIL PROTECTED]> wrote:
Hello everybody, excuse me how can I change de data type of a field,I cur
Hi All,
I have a table called
vehicle_duty_cycle_summary
vehicle_master_id | starting_odometer |
ending_odometer | login_time |
logout_time
---+---+-++
4 |
--- Shane Ambler <[EMAIL PROTECTED]> wrote:
> Trilok Kumar wrote:
> > Hi All,
> >
> > I have a table called
> >
> > vehicle_duty_cycle_summary
> >
> >
> > vehicle_master_id | starting_odometer |
> > ending_o
i am searching for
autoincrement in table
in table employee
i want give empno as autoincrement
is there any syntax
like this
create table emp
(empno integer auto_increment);
send reply
ganesh
__
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE
I WANT TO TAKE BACK UP DAILY WORK DONE
WHAT IS PROCEDURE IS THERE ANY COMMMAND
GANESH
__
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com
sir ,
i am working 6.5.2 postgresql
in creation foregein key in table
syntax i am writing is
1)create table gk
(sno int primary key);
2)create table kk
(sno int references gk,
sname varchar(2));
i am getting message like this foregein key is not
implemented .
please write which version
"Michael Wagner" <[EMAIL PROTECTED]> writes:
> We need to export an SQL database to Excel. Is this within your scope and =
> what might your cost be?
>
> Please respond to Dan Beach
Why not just save it to text CSV format and Excel can then easily
import it
tement for Postgres?
> Thank you
>
> Best Regards,
> Howard
> CIM/MASTEC
> Tel:(65)8605283
You can do '\dt' to list all tables. There is also a system table
'pg_tables' which you can use if you like to do a select instead. Do
SELECT tablename FROM pg_tables where tableowner='postgres';
--
Prasanth Kumar
[EMAIL PROTECTED]
hankz in advance
>
> regards
> subha
>
>
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
>
>
> ---(end of broadcast)---
> TIP 4: Don't 'kill -9' t
7;203.196.129.1' between
start_ip and end_ip;
NOTICE: QUERY PLAN:
Seq Scan on ip_country_map (cost=0.00..1356.83 rows=5428 width=6)
EXPLAIN
access_log=#
IS THERE ANYTHING woring with my database schema?
how shud i be storing the the data of ipranges and
country for efficient utilizatio
--(end of broadcast)---
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,981125
and unsubscribe commands go to [EMAIL PROTECTED]
--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)
Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.
---(end
1 - 100 of 239 matches
Mail list logo