Re: [SQL] Function To Log Changes
On Mon, 5 Apr 2004 13:01:39 -0400 (EDT) "Gavin" <[EMAIL PROTECTED]> wrote: > Hi All, I have been tinkering with a function to log the changes made on > any column through a function and trigger. However, I cant think of a way > to make this work through pl/pgsql. Any one have any ideas, or is it just > not possible? http://gborg.postgresql.org/project/tablelog/projdisplay.php is this what you are looking for? cu erik -- Erik Thiele ---(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
Re: [SQL] SQL Standatd
Thank you. I think there is an error in the Develpoer's FAQ... http://developer.postgresql.org/ http://developer.postgresql.org/readtext.php?src/FAQ/FAQ_DEV.html+Developers-FAQ A lot of ugly characters. Em Ter, 2004-04-06 às 16:01, Bruce Momjian escreveu: > Ricardo Vaz Mannrich wrote: > > In PostgreSQL documentation, there is a section "Compatibility" > > (Reference -> SQL Commands -> Any command). > > > > There, alway has something like: > > > > The ADD COLUMN form conforms with the SQL standard... > > > > Where can I find this "SQL standard"? What is its official site? > > See the developer's FAQ for URL's. -- Ricardo Vaz Mannrich <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [SQL] SQL Standatd
Ricardo Vaz Mannrich wrote: > Thank you. > > I think there is an error in the Develpoer's FAQ... > > http://developer.postgresql.org/ > http://developer.postgresql.org/readtext.php?src/FAQ/FAQ_DEV.html+Developers-FAQ > > A lot of ugly characters. Until we fix the web site, please see doc/src/FAQ/FAQ_DEV.html in the source tree. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [SQL] distinct values without seq scan
Bret, > I have a table indexed on a char(35) field and want a query to return a > distinct list of the values in this column. Is there some syntactical > magic I can do to get these values without a sequential scan? I assume, > ( here we go again ) that these values are in the index somewhere and I > seem to recall a select DISTINCT using an index in DB2 way back when but > I may be mistaken. > > Searching the archives I found an email that indicated this was possible > in 7.4 and infact is the reason I upgraded from 7.2x. Well, leaving aside that you have a data normalization issue (these values should really be in a reference list with an FK), to take advantage of the 7.4 optimization, try: SELECT advertiser FROM logrecords GROUP BY advertiser ORDER BY advertiser; -- Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
[SQL] notify and leaks?
I am using postgresql as the backend to a job tracking system. My front app is running only on Mac OS X. I have been using notifications from postgresql to tell my user if the current record they are looking at has been updated by someone else. Obviously I am only 'listening' when a user is looking at a particular job. I am concerned about usage of the listen and unlisten. How does the backend know if my app didn't quit unexpectidly? I mean I don't think my app has ever crashed :)... and I do make sure if the user quits that I close the connection. But I have a few users that are using laptops on a wireless network. We are in a building in manhattan and not infrequently the wireless connection is lost. After all this conversation.. I guess my question is.. am I leaking 'listens' if I don't close them properly? I only created a few users and most of the connections are from one of the user accounts. I do not have separate user accounts. Is this a problem waiting to bite me later? Ted __ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [SQL] notify and leaks?
Theodore Petrosky <[EMAIL PROTECTED]> writes: > After all this conversation.. I guess my question is.. > am I leaking 'listens' if I don't close them properly? No. It may take awhile for the backend to realize the connection is dead (this is driven by RFC-specified TCP timeouts). Once it does, though, it will clean up before exiting. regards, tom lane ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
[SQL] varray? table of varchar?
Hi, I posted asking about varray a few days ago. Also I've run into an Oracle type that is defined as "table of varchar2(4000) index by binary_integer". Has anyone encountered either of these before? I'm not exactly sure what they do as I'm not an Oracle expert. So it is hard for me to see what these should be in PostgreSQL. D ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
[SQL] Row count after SELECT INTO?
Dear SQL and plPgSQL gurus, I seek for your wisdom. I have a variable assignment via SELECT INTO in my function, and I want to separate 3 cases: 1) no rows found; 2) one row found; 3) many rows found (ambiguous select). The first case is simple, I use FOUND variable for it. But how about the third? I tried to GET DIAGNOSTICS nrows = ROW_COUNT, bit it seems to get only value of 0 or 1. Is this how it supposed to be when SELECTing INTO a single variable? The only way I see now is a FOR ... IN SELECT loop, and I woner if there is a simpler solution. Could you please help me? -- Fduch M. Pravking ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [SQL] SQL Standatd
El Mié 07 Abr 2004 11:26, escribió: > Ricardo Vaz Mannrich wrote: > > Thank you. > > > > I think there is an error in the Develpoer's FAQ... > > > > http://developer.postgresql.org/ > > http://developer.postgresql.org/readtext.php?src/FAQ/FAQ_DEV.html+Develop > >ers-FAQ > > > > A lot of ugly characters. > > Until we fix the web site, please see doc/src/FAQ/FAQ_DEV.html in the > source tree. http://db.konkuk.ac.kr/present/SQL3.pdf doesn't exist anymore. Also, for some reason I can't get to sqlstandards.org. Is there any other place where I can get the SQL200X docs? -- 18:11:01 up 29 days, 22:38, 2 users, load average: 0.56, 0.53, 0.43 - Martín Marqués| select 'mmarques' || '@' || 'unl.edu.ar' Centro de Telematica | DBA, Programador, Administrador Universidad Nacional del Litoral - ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [SQL] SQL Standatd
Martin Marques wrote: > El Mi? 07 Abr 2004 11:26, escribi?: > > Ricardo Vaz Mannrich wrote: > > > Thank you. > > > > > > I think there is an error in the Develpoer's FAQ... > > > > > > http://developer.postgresql.org/ > > > http://developer.postgresql.org/readtext.php?src/FAQ/FAQ_DEV.html+Develop > > >ers-FAQ > > > > > > A lot of ugly characters. > > > > Until we fix the web site, please see doc/src/FAQ/FAQ_DEV.html in the > > source tree. > > http://db.konkuk.ac.kr/present/SQL3.pdf doesn't exist anymore. Thanks. Removed from FAQ_DEV. > > Also, for some reason I can't get to sqlstandards.org. Is there any other > place where I can get the SQL200X docs? Not sure. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(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
Re: [SQL] SQL Standatd
Bruce Momjian wrote: Martin Marques wrote: Also, for some reason I can't get to sqlstandards.org. Is there any other place where I can get the SQL200X docs? Not sure. See: http://www.wiscorp.com/sql/sql_2003_standard.zip Joe ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [SQL] SQL Standatd
Joe Conway wrote: > Bruce Momjian wrote: > > Martin Marques wrote: > >>Also, for some reason I can't get to sqlstandards.org. Is there any other > >>place where I can get the SQL200X docs? > > > > Not sure. > > See: > http://www.wiscorp.com/sql/sql_2003_standard.zip Thanks, I have added this to the developer's FAQ, and removed the sqlstandads.org url. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 8: explain analyze is your friend
