(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
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
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.
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 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-
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 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
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 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
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
[ sorry if it is a repost, i am not sure if i am subscribed in -general ]
Dear List,
There are many opensource applications that support postgresql
(eg , gforge , bricolage , dspam ..) but does not use schemas(namespaces)
as a result of which you are forced to use/create a new database and loose
have you tried Join using , eg
SELECT e.eid, e.name
FROM entry e join access a ON( e.eid = 120
AND (e.ownid = 66 OR e.aid = a.aid) ) ;
some sample data might also help in understanding the prob
more clrearly.
regds
rajesh kumar mallah.
On Fri, Feb 6, 2009 at 3:27 AM, Michael B Allen
On Jan 12, 2008 10:54 AM, Tom Lane <[EMAIL PROTECTED]> wrote:
> "Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes:
> > Am I correct in understanding that the current behavior is inappropriate
> > and shall be corrected at some point of time in future versions ?
On Jan 12, 2008 1:26 AM, Tom Lane <[EMAIL PROTECTED]> wrote:
> "Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes:
> > looks like constraint exclusion is being too aggressive in excluding null
> > values
>
> Hmm, you're right. Looks like I broke
Update the phenomenon does not exists in 8.2.0 but exists in 8.2.5.
On Jan 11, 2008 12:28 PM, Rajesh Kumar Mallah <[EMAIL PROTECTED]> wrote:
> Hi ,
>
> looks like constraint exclusion is being too aggressive in excluding null
> values
> although its well known that check
Hi ,
looks like constraint exclusion is being too aggressive in excluding null values
although its well known that check constraints apply on not null values only.
Hope the minimal test session below explains the problem we facing.
BTW: we are very impressed with the performance gains we achieved
--- 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
Hi All,
I have a table called
vehicle_duty_cycle_summary
vehicle_master_id | starting_odometer |
ending_odometer | login_time |
logout_time
---+---+-++
4 |
more methods:
1. select * from pg_stat_activity;
see what all running and pid of your current query also.
2. SELECT h.pid AS blocker, w.pid AS blockee
FROM ONLY pg_locks h, ONLY pg_locks w
WHERE h."granted" AND NOT w."granted" AND (h.relation = w.relation
AND h."database" = w."database" OR h.
>I dont think i clearly understand your requirement.
>
>Are you wanting to restore the "PLAIN" backup of a database
>with a different database name ?
>
Yes
Are you getting any particular error?
what platform are you in ?
>what do you mean "deleting information of current database ..."
>
Clear
se (the database I used to make the backup).
I think that's why pgAdmin does not work with plain backups on Restore.
What does occurs with the information schema when I restore from one database
with a name to other with another name ?
Regards
Ezequias
Em Thu, 29 Mar 2007 23:46:31 +0530
psql> TRUNCATE TABLE ;
if you have too many tables , generate the above commands
by using a query on tables information schema table.
hope it helps.
On 3/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi list,
I have many tables with many constraints and I would like to empty all my
table
L PROTECTED]> wrote:
>
> Thanks Buddy, really appreciate ur help on this
>
> problem solved...
>
> Is there any way this query can be optimized...i'm running it on a huge
> table with joins
>
> - Sumeet
>
>
> On 2/23/07, Rajesh Kumar Mallah <[E
On 2/24/07, Sumeet <[EMAIL PROTECTED]> wrote:
Hi all,
I'm trying to write a query to select random values from a set of 'GROUP
BY'
see the scenario below to understand the problem here (the actual
problem cannot be discussed here so i'm taking an example scenario)
Assume there is a table
Hi,
we know that rows in a table are not stored in any particular order
and explicit order by clause is required to get data in any particular
order.
but does it apply to select queries from ordered subselects also ?
eg
select id , name , expensive_func(name) from
( select id , name f
On 12/11/06, Shoaib Mir <[EMAIL PROTECTED]> wrote:
I just noticed an abnormal behavior for the subquery:
create table myt1 (a numeric);
create table myt2 (b numeric);
select a from myt1 where a in (select a from myt2);
This should be giving an error that column 'a' does not exist in myt2 b
On 12/6/06, Tom Lane <[EMAIL PROTECTED]> wrote:
"Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes:
> what is the proper way for iterating over column names of a table using
> SPI_* functions.
You need to pay attention to the attisdropped field of the TupleDesc
entri
Hi,
I am trying to interate over column names of a table on which a C trigger
function is called on UPDATE/DELETE and INSERT. SPI function
char * SPI_fname(TupleDesc rowdesc, int colnumber)
is being used. looks like the function is returning column names like
"pg.dropped.2" for d
On 12/1/06, Tom Lane <[EMAIL PROTECTED]> wrote:
"Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes:
> data->time_stamp =
> DirectFunctionCall1(timestamptz_in, CStringGetDatum("now"));
This code is incorrect, as timestamptz_in takes three argument
On 12/1/06, Tom Lane <[EMAIL PROTECTED]> wrote:
"Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes:
> data->time_stamp =
> DirectFunctionCall1(timestamptz_in, CStringGetDatum("now"));
This code is incorrect, as timestamptz_in takes three arguments
Hi ,
In certain C trigger function following code snippet causes ERROR:
---
elog (NOTICE , "before calling DirectFunctionCall1");
data->time_stamp =
DirectFunctionCall1(timestamptz_in, CStringGetDatum("now"));
elog (NOTICE , "after calling Direct
On 11/19/06, Tom Lane <[EMAIL PROTECTED]> wrote:
"Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes:
> In our webapps, we use the same username to connect to the database
> for all kind of updates. Hence we are not able to makeout whoo modified
> what . Howev
On 11/18/06, A. Kretschmer <[EMAIL PROTECTED]> wrote:
am Sat, dem 18.11.2006, um 23:02:33 +0530 mailte Rajesh Kumar Mallah
folgendes:
> >select from order by random() limit 1;
>
> This query will tend to get slower as the table grows because of the
> sorting.
Right.
&
On 11/18/06, Volkan YAZICI <[EMAIL PROTECTED]> wrote:
Hi,
On Nov 18 06:00, Rajesh Kumar Mallah wrote:
> Is there any way to set a variable from a web application (using
> dbi/perl , libpq etc), and access the same variable from a C trigger
> inside a transaction ?
Why don't
On 11/17/06, A. Kretschmer <[EMAIL PROTECTED]> wrote:
am Thu, dem 16.11.2006, um 16:31:14 -0200 mailte Ezequias Rodrigues da
Rocha folgendes:
> Hi list,
>
> I have a bigint collumn and I would like to generate a random number
within the
> numbers of my column.
select from order by random()
hi,
We do not want to modify our apps for doing auditing.
we are considering table level auditing
auditrail http://gborg.postgresql.org/project/audittrail/projdisplay.php
seems to be doing a good job. i just need to access the "username"
that starts the transaction in webapp from the trigger in a
Hi ,
Is there any way to set a variable from a web application (using dbi/perl ,
libpq etc),
and access the same variable from a C trigger inside a transaction ?
the %_SHARED hash available in plperl provides only session level isolation
and
does not suit the requirement.
Original problem:
we
Can we convert from Postgres to Oracle !!???
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing
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
Dear group, i created a user named 'dataviewer' and grant only select permission to that user, but now the user could able to create tables. how to restrict this, i want to give permission to create views and do selects on tables and views.
how to do it? plz help.-- Sathish Kumar.SSpireT
Dear group
Its my mistake that i did not reveal the whole scenario. Actually within that begin and commit, i insert in 10 tables. The above said table is the key table. I fetch the consultatioin_no and add one to it, i should know this consultation_no to save the other 10 tables. because
faced the problem, then we run in three system the record is saved, after that we simulate the run once again, we face the problem,
i could not predict the problem precisely - what might be the problem. thanks in advance- Show quoted text -
On 6/16/06, Richard Huxton <dev@archonet.c
Dear group, Let me explain my issue. We use Database - postgresql-8.1 JDBC Driver - postgresql-8.1-407.jdbc3.jar Java - jdk1.5 The default transaction isolation level is - Read Committed
Auto Commit is fals
On 10/26/05, Richard Huxton wrote:
> Rajesh Kumar Mallah wrote:
> > Hi,
> >
> > Can anyone tell me how to convert epoch to timestamp ?
> >
> > ie reverse of :
> >
> > SELECT EXTRACT( epoch FROM now() );
>
> I'd start with either Googl
Hi,
Can anyone tell me how to convert epoch to timestamp ?
ie reverse of :
SELECT EXTRACT( epoch FROM now() );
+--+
|date_part |
+--+
| 1130317518.61997 |
+--+
(1 row)
Regds
mallah.
---(end of broadcast)--
On 9/23/05, Kenneth Hutchinson <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm sorry if this has been sent to the community multiple times. I am
> not able to determine whether my posts have gotten through. If you have
> rec'd this multiple times, please let me know.
>
> We have recently migrated to
> Basically, what I've got is the first person and the tag_type. I can do
> it with a function from PHP:
>
> function get_spouses($p) {
> $handle = pg_query("select person from principals
>where event in (select event from principals
>where person
Fuhr,Tom and Everyone
Extremely sorry for not consulting the docs.
I was doing this:
CREATE INDEX foo_name_idx ON foo (name)
WHERE name IS NOT NULL TABLESPACE testspace ;
Regds
Rajesh Kumar Mallah.
On 6/18/05, Michael Fuhr <[EMAIL PROTECTED]> wrote:
> On Sat, Jun 18, 2005 at 10:24:0
the TODO
Regds
Rajesh Kumar Mallah.
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly
Ganesh,
Did you have a look at example Example 35-2. A PL/pgSQL
http://www.postgresql.org/docs/current/static/plpgsql-trigger.html
Regds
maLLAH
---(end of broadcast)---
TIP 8: explain analyze is your friend
Hi There,
We are using tsearch2 for FTS implementation. For highlighting the search term
in the result we are displaying the output of headline function which is
supposed to tag (mark up) those stemmed words in the text that match any of the
stemmed words in search term. The problem is that some
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
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
aesemann
grzm myrealbox com
!DSPAM:4134745e87571738116768!
--
regds
Mallah.
Rajesh Kumar Mallah
+---+
| Tradeindia.com (3,11,246) Registered Users |
| Indias' Leading B2B eMarketPlace
Michael Glaesemann wrote:
On Aug 31, 2004, at 8:55 PM, Rajesh Kumar Mallah wrote:
The docs says that numeric type supports numbers upto
any precision
However
tradein_clients=# SELECT cast(2^100 as numeric);
1. Does the specs not require pgsql to print a warning or info ,
will it not be
any way to do such calculation using pgsql, i understand
bc is a better tool for it.
Warm Regards
Rajesh Kumar Mallah.
--
regds
Mallah.
Rajesh Kumar Mallah
+---+
| Tradeindia.com (3,11,246) Registered Users |
| Indias' Leading B2B eMarket
Achilleus Mantzios wrote:
O kyrios Rajesh Kumar Mallah egrapse stis Jul 12, 2004 :
Achilleus Mantzios wrote:
O kyrios Rajesh Kumar Mallah egrapse stis Jul 12, 2004 :
Dear Mantzios,
I have to get set of banners from database in
response to a search term. I want that the search term
---(end of broadcast)---
TIP 8: explain analyze is your friend
--
regds
Mallah.
Rajesh Kumar Mallah
+---+
| Tradeindia.com (3,11,246) Registered Users |
| Indias' Leading B2B eMarketPlace |
|
Achilleus Mantzios wrote:
O kyrios Rajesh Kumar Mallah egrapse stis Jul 12, 2004 :
Dear Mantzios,
I have to get set of banners from database in
response to a search term. I want that the search term
be compared to the keyword corresponding to the
banners stored in database. current i am doing
and keywords).
So that the banners for the adword say 'incense exporter' is
shown even if 'incenses exporter' or 'incense exporters' is
searched.
I hope i am able to clarify.
Regds
Mallah.
Achilleus Mantzios wrote:
O kyrios Rajesh Kumar Mallah egrapse stis Jul 12, 20
rator matches the given name and argument type(s). You may
need to add explicit type casts.
tradein_clients=#
--
regds
Mallah.
Rajesh Kumar Mallah
+---+
| Tradeindia.com (3,11,246) Registered Users |
|
ear "AS" (for CREATE TYPE
command)
psql:Procedures.sql:40: NOTICE: return type 'pointtype' is only a shell
CREATE
WHEN I EXECUTE THE FUNCTION USING
SELECT (pp_readparameter(42,null));
ERROR: fmgr_info: function 0: cache lookup failed.
any value inputs on why this is happening.
HI,
The problem was solved by reducing the effective_cache_size from 102400
to 10240
my total RAM is 4GB.
Regds
mallah.
Tom Lane wrote:
[EMAIL PROTECTED] writes:
tradein_clients=# explain analyze select email_id ,email ,contact from
t_a a join email_source f using(email_id) j
Hi,
Is there any solution to this issue ? I am facing it every week.
Warm Regds
Mallah.
Rajesh Kumar Mallah wrote:
Tom Lane wrote:
[EMAIL PROTECTED] writes:
tradein_clients=# explain analyze select email_id ,email ,contact from
t_a a join email_source f using(email_id) join email_subscriptions
Dear friends,
Postgres 7.3.4
How to find the last sunday/mon/sat of any given
month.
Thanks
Kumar
Even the first query used to run fine before but one fine day
it changed plans i think.
Regds
Mallah.
Rajesh Kumar Mallah wrote:
Tom Lane wrote:
[EMAIL PROTECTED] writes:
tradein_clients=# explain analyze select email_id ,email ,contact from
t_a a join email_source f using(email_id) join
Dear Darren,
Your question is not very clear to me.
On what columns do you want to aggregate?
suppose u want to aggregate on outsite and inside ip
you shud group by those columns and run a aggregate function
like sum or avg etc , suppose u want the total traffic for
every pair you can do this:
sele
Tom Lane wrote:
[EMAIL PROTECTED] writes:
tradein_clients=# explain analyze select email_id ,email ,contact from
t_a a join email_source f using(email_id) join email_subscriptions h
using(email_id) where 1=1 and f.source_id =1 and h.sub_id = 3 ;
Runs for Eve
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
Can you tell us about the postgresql versions in 7.3 and 9.0
also post the actuall error message from postgresql.
regds
mallah.
Ramesh Patel wrote:
Hi
i have one problem in Trigger.
this trigger alread work
on Red Hat Linux 7.3 but now i shift to RHL9.0
in RHL 9.0 not
working . in this problem in
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
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,
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
kumar wrote:
Dear Friends,
Postgres 7.3.2 on Linux 7.
I want to compare to columns and get the logical result as follows.
C1 is 'YNYNY' . C2 is 'NNYYY'.
I want to compare like AND and OR operators.
C1 AND C2 should give result like NNYNY.
C1 OR C2 should give res
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
YNYYY.
Please shed some light.
Thanks
Kumar
hi,
its not possible to join cross database tables .
you may keep tables in different schemas instead
of databases.
you may also try contrib/dblink to use tables from
different database.
Regds
mallah.
Pallav Kalva wrote:
Hi,
I am new to postgres and I need to do a query which joins two table
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
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 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
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
Greetings!
My original problem is to de duplicate a list of around 0.3 million
company names.
Since a company name can be potentially (mis)spelt in numerous ways
exactmatch
obviously wont work.
To make the searches faster i am using tsearch. For each company name i
want to
search other compa
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
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
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
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*(
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
Dear friends,I am having an lengthy SQL, which will be called every
conditions of if...else statement. I tried with passing that via a string and
execute it.But I got error.
v_sql := 'INSERT INTO activities(
activity_id, parent_activity_id,
activity_type_id, subject,
descrip
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
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]&
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
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
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
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
---
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
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
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
Dear Ganesan,
pgautodoc (for dot output) + dot (from graphviz.org , creates
postscript) +
epssplit ( splits the postscript into multipage so that one can create
poster size
diagrams) works well for me.
I have 45 tables in the database though.
Regds
mallah.
Chris Travers wrote:
There is a fre
Greetings!
can anyone explain why
SELECT array_lower(array_prepend(0, ARRAY[1,2,3]), 1);
returns 0 not 1
because
tradein_clients=# SELECT array_prepend(0, ARRAY[1,2,3]);
+---+
| array_prepend |
+---+
| {0,1,2,3} |
+---+
(1 row)
and
tradein_clients=# SE
1 - 100 of 239 matches
Mail list logo