Hi All, Could someone please tell me the Correct syntex for implicit
curor in FOR loops
Thank you in advance.
--
Najm Hashmi
Tel:514-271-9791
www.mondo-live.com
www.flipr.com
Hi I have some data that is supose to be a date but in
ecpoche format. How can I reonvert it to data format.
Thanks in advance for help.
Regards,
--
Najm Hashmi
Tel:514-271-9791
www.mondo-live.com
www.flipr.com
this info somewhere in the docs?
Thanks in advance.
Regards,
--
Najm Hashmi
Tel:514-271-9791
www.mondo-live.com
www.flipr.com
into artist_details( artist_id,crh_id,labels_id, coll_ids,name,info)
values (art.artist_id,art.crh_id,lab_ids,coll_ids,art.name,art.extrinfo);
end loop;
return ''t'';
end;
' language 'plpgsql';
select populate_art_details();
Regards,
--
Najm Hashmi
Tel:514-271-9791
ww
or up without writing a function. Is there any possibility
> to use plain SQL only?
>
> Hans
>
>
> ---(end of broadcast)---
> TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Hey Hans try usting date_part function..
correctly? Any doc
links would also greatly appreciateld. Thank you all for your help.
Regards
--
Najm Hashmi
Tel:514-271-9791
www.mondo-live.com
www.flipr.com
Joel Burton wrote:
> On Wed, 11 Apr 2001, Najm Hashmi wrote:
>
> > Hi All,
> > From pgsql, I try to insert data in table using the \i command. Nothing
> > takes place and after this command pgsql is hung... i cant use it any more.
> > The same command works wit
Hi All,
From pgsql, I try to insert data in table using the \i command. Nothing
takes place and after this command pgsql is hung... i cant use it any more.
The same command works with all other tables but this is only one I am having
problem with.
I have attached my file with message. Could so
Hi all, I have posted my question since last Thurday and noone has answered it
yet. My problems is that I droped a table using pgaccess from pg_class. Now
If I try to create that table I get the following error: TypeCreate: type
links already defined.
Could some one help me out here.
Regards
HI all, I just posted a message about droping a table. I droped it
using pgaccess from the pg_class table. Now I want to recreate the
table and I get the following message:
TypeCreate: type links already defined
I need to fix this problem in hurry please someone could reply to it.
Thanks alo
Hi, I am trying to drop a table and I get the following error:
drop TABLE links;
ERROR: RelationBuildTriggers: 1 record(s) not found
for rel links
mondo=#
Could someone explain this to me. I would really appreciate the
help.
begin:vcard
n:Hashmi;Najm
x-mozilla-html:FALSE
org:Mondo-Live.com
Hi all, here is error I that am getting:
pg_dump -s mondo > mondo.out
PQgetvalue: ERROR! tuple number 0 is out of range 0..-1
I faced similar example in the past too. At that time, there was a
referentional constraint problem but this situation is different.
I am usning postgres 7.0.3 on redh
Hi all,
I have written a trigger to update a table called categories whenever
a tuple is either deleted or inserted in tables articles, media, and links.
It works fine for inserts but "pukes" on deletes :). I am using two auxiliary
addcount(varchar) and delecount (varchar)
I am getting the follow
Hi all, I was just wondering if there is way or some sort of utility to
incorporate XML in postgrres.
Thanks in advance.
begin:vcard
n:Hashmi;Najm
x-mozilla-html:FALSE
org:Mondo-Live.com;www.flipr.com
adr:;;
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;6144
fn:Najm Hashmi
en
We start a server and initiate 30 connections(with the libpq C interface)
which are stored in a stack to use and and to be reused.
After awhile I try to start another server that will also try to initiate 30
connections, for each connection I then get a PQErrorMessage like that :
"Sorry, too
I have PosgreSQL 7.1b3 running on one of our test servers. It seems like
PosgreSQL 7.1b3 is not very stable. I want to go back to 7.0.3v since it it
the most stable version available. I am just wondering what should I do. can
I reinstall 7.0.3 on 7.1b3 directly ? If not then what steps should
Roberto Mello wrote:
> On Thu, Mar 08, 2001 at 05:54:38PM -0500, Najm Hashmi wrote:
> > Hi all, I just want to know how to put quotes around a string. Is there a
> > function to do so?
> > If not how can I escape a single quote.
>
> Others have answered how
Hi all, I just want to know how to put quotes around a string. Is there a
function to do so?
If not how can I escape a single quote.
Thank you in advance.
begin:vcard
n:Hashmi;Najm
x-mozilla-html:FALSE
org:Mondo-Live.com;www.flipr.com
adr:;;
version:2.1
email;internet:[EMAIL PROTECTED]
x-m
Hi,
I was reading through Bruce's on line . I found follwing bit unclear...
"Notice that each query uses ORDER BY . Although this clause is not required,
LIMIT without ORDER BY returns random rows from the query, which would be
useless. "
When I run a query several time I get the same results
Hi All,
I am trying to define a new set of tables an I am getting this strange
syntex problem on date, or timestamp data types. I am also getting error on
not null constranit as well... Postgres is behaving strangely first
definations with not null
cmdb=# create table media_received (
cmd
Hi,
How can I concatnate two varialbles, seperated by a |, that are type text
together?
v, v1 text;
some work
then
res:= v ||''|''|| v1;
this syntex does not work in plpgsql??
Any ideas how to do it ???
Thanks.
Najm
Jie Liang wrote:
> I just know you can use implict cursor inside the plpgsql
> e.g
> declare
result text;
tcount int4;
>
> rec record;
> begin
> FOR rec IN select_clause LOOP
> statements
> END LOOP;
> end;
>
Thank you Jie for your help. I am bit confused about how it works. I want for
ea
Hi all,
Here is a plpgsql function:
flipr'#create function test_cur() returns text as'
flipr'# declare
flipr'# mycur cursor for select title from songs where song_id=10;
flipr'# usrrecord;
flipr'# resultstext;
flipr'# begin
flipr'# open mycur;
flipr'# fetch next from mycur into
Hi all, I am not sure If it is allowed to use cursor inside pgsql functions.
If it is possible, please someone could send exact synatx how it is used. If
it is not allowed is there a way arround it? I need to do some calculations
and then return this value as text.
Thanks in advance for all your
Hi all,
I am unable to understand why my inidcies are not used in the query.
I have following indices:
index on categories.root
index on media.category
unique index on categories.id
Here is my query :
mondo=# explain select m.id
form media m, categories c
Hey Rick,
I am sure there are more elegant solutions but I have a simple
one. Write a trigger that will grant the permissions before insert or
update and and revoke all privileges after the insert or update.
-Najm
Rick Delaney wrote:
> I'm using 7.0 and have noticed that I need to gr
>
>
> Working out the exact UPDATE command to use is left as an exercise
> for the student ;-)
>
> regards, tom lane
It is funny.. LOL
Najm
Josh Berkus wrote:
> Najm,
>
> > references age_list(id);
> > And I get the following error:
> > flipr=# alter table users
> > flipr-# add constraint age_fk foreign key(age) references
> > age_list(id);
> > NOTICE: ALTER TABLE ... ADD CONSTRAINT will create
> > implicit trigger(s)
> > for FOREIG
Hi All,
What is the correct syntax for adding a foreign key constraint from the
command line.
I am using v7.1 beta3. I am doing the follwoing:
alter table users
add constraint age_fk foreign key(age)
references age_list(id);
And I get th
Thank you all for your help.
Najm
Hi all,
It is a very simple but I am not able to recall how to do it I
just need to find out the current value of a seq. It is very simple
select statement but I can't recall it... Help me please before I get
myself get fired -:).
Regards, Najm
Hi All,
As it is known that any funtion, written in pl/pgsql, can only
retrun one tuple. I am just wondering it were true as well for function
written in C language. I need to write few function that will retrun
mulitiple rows satsifying a certain set of conditions. Where I can get
some ex
Hi All,
I have written a very simply function as follows:
create function song_info(int4) returns setof songs as'
select songs.* from songs
where $1=song_id'
language 'sql';
when iIcall it I get the following:flipr=# select song_info(4);
?column?
Hi all,
I am just wondering where can i find the link to down load
PostGreSql7.1 beta versoin . I heard it is very stable my be I can use
it see how many times I tumble on bugs I don't do it intentionally
but it happens to me all the time :)...
Regards.
Najm
Hi all,
I was trying to simply update single field in one of my tables as given
below:
fliprdb=# update artist set extrinfo='independent' where artist_id=6;
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or wh
Hi,
I have created a table songs as follwoing:
CREATE TABLE songs (
song_id serial NOT NULL,
title character varying(50) NOT NULL,
composer varchar(50),
performer varchar(50),
artist_id int4 not null,
file_size int4,
description text,
extrInfo t
Hi all,
while trying to dump db shcema and content, I am getting the
following error:
[najm@localhost najm]$ pg_dump -D fliprdb > flipr.sql
PQgetvalue: ERROR! tuple number 0 is out of range 0..-1
Segmentation fault (core dumped)
Any suggestion what I am doing wrong and why i am
Hi All,
I am trying to do a simple insert, and I am getting cache look failure
error.
Could someone explain what causing it? My query and error are given
below:
fliprdb=# insert into collection(name, artist_id) values('El Baile
Aleman',2);
ERROR: fmgr_info: function 24011: cache lookup failed
Tha
Hi All, I am trying to insert a tuple in the tuple, and i am getting
the follwoing error message:
fliprdb=# insert into collection(name, artist_id) values('El Baile
Aleman',2);
ERROR: fmgr_info: function 24011: cache lookup failed
Can someone help me out here. Thnaks in advance for your help.
I am facing a dilemma at my work, I am using postgres first time. For
some reason, my co-workers think that in Postgres joins i.e.
simple joins of two or three tables are so bad that their cost is
exponential. They believe that postgres simply takes Cartesian product
of joining table in order t
Andreas Tille wrote:
> On Mon, 6 Nov 2000, Grant Finnemore wrote:
>
> > Whilst this is an unfortunate position at the moment, it has been my experience
>that it does not cause insurmountable problems.
> > (Some short term headaches - yes. ;-)
> After learning this as a fact you have short term h
Edmar Wiggers wrote:
> > If I try to insert some row which in the table already exist the
> > postgre don't insert it and tell some error. Everything ok.
> > I'll insert only if there is not the same (same key) record,
> > else don't insert and don't tell me errors about i
Hi every one, I have just strated to use postgres. I wrote a vert
simple pl/pgsql function as given below:
CREATE FUNCTION
add_new_user(varchar(32),char(8),varchar(128),varchar(128),varchar(32),
varchar(32)) RETURNS boolean AS' DECLARE
oldUser RECORD;
USR ALIAS FOR $1;
PWORD ALIAS FOR $2;
EMAIL A
Hi, I would to know if there is any articles or books that talk about
pl/pgsql performance especially versus C. Thanking you in advance for
your help.
Regards.
Najm
44 matches
Mail list logo