Re: [SQL] contrib/dblink suggestion

2002-07-30 Thread Bhuvan A
Dear Mr.Joe Conway, Thank you very much for your suggestion. Really nowhere i got to know about specific problem in dblink. But some discussions had went on this mailing list long back and here is that link http://archives.postgresql.org/pgsql-sql/2002-05/msg7.php Anyway thank you once ag

Re: [SQL] COUNT DISTINCT?

2002-07-30 Thread Josh Berkus
Stephan, > Would that be the same as: > select count(distinct skip_date) from weekend_list > where ... Yeah, that would be what I was looking for. -- -Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)--- TIP 4: Don't '

Re: [SQL] COUNT DISTINCT?

2002-07-30 Thread Stephan Szabo
On Tue, 30 Jul 2002, Josh Berkus wrote: > Folks, > > Anybody know a keen shortcut for the following: > > SELECT count(skip_date) > FROM (SELECT DISTINCT skip_date FROM weekend_list > WHERE ... ...) days_to_skip; > > That's a double aggregate, and is bound to be dog-slow. Would tha

Re: [SQL] Delete a FOREIGN KEY

2002-07-30 Thread Stephan Szabo
On Tue, 30 Jul 2002, Marcelo Henrique da Silva wrote: > Hi All, > > I'm beginner in PostgreSQL! > So, how can I delete a FOREIGN KEY in PostgreSQL? You'll need to drop the triggers related to the foreign key. You might want to look at the referential integrity documents on techdocs.postgresql.or

[SQL] formating numeric values

2002-07-30 Thread Elielson Fontanezi
Hello all! I have some doubts about numeric formating. The default formating for numeric values are "." as decimal representation and "," as milion separation. How can I change ###,###.&& to ###.###,&& .. A Question... Since bef

Re: [SQL] Returning PK of first insert for second insert use.

2002-07-30 Thread Christopher Kings-Lynne
You need to do something like this: SELECT proj_id FROM t_proj WHERE oid=xxx; To find value of primary key from oid. Chris > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Peter Atkins > Sent: Tuesday, 30 July 2002 2:33 AM > To: '[EMAIL PROTECTED]

[SQL] Delete a FOREIGN KEY

2002-07-30 Thread Marcelo Henrique da Silva
Hi All,   I'm beginner in PostgreSQL! So, how can I delete a FOREIGN KEY in PostgreSQL?   Thanks.   Marcelo Henrique da Silva.

Re: [SQL] contrib/dblink suggestion

2002-07-30 Thread Joe Conway
Bhuvan A wrote: > I am using postgresql 7.2.1. > I badly require to interconnect between databases. contrib/dblink seems to > be handy and ofcourse it well suits my requirement. But while browsing > across, i heard that it is not advicable to use it. So i wish to know > someone's experience in usi

Re: [SQL] contrib/dblink suggestion

2002-07-30 Thread Bruce Momjian
dblink is fine to use, and will continue to be shipped with PostgreSQL. Not sure where you heard about problems with it. --- Bhuvan A wrote: > Hi, > > I am using postgresql 7.2.1. > I badly require to interconnect between

[SQL] Is login_cnt is reserved attribute name?

2002-07-30 Thread Rajesh Kumar Mallah.
Hi i did nothing but changed attribute name from 'login_cnt' to 'cnt_login' and my update stmt started working? I am using DBD::Pg + postgresql 7.2.1 i will try to produce a test case. regds mallah. -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi ph