Re: [SQL] discover a toast table name

2003-05-27 Thread Eric Anderson Vianet SAO
when i try that i´v got an error ERROR: "pg_toast_26474986" is a system table. call REINDEX under standalone postgres with -O -P options so I kill postmaster and up it standalone. but the reindex command doesn´t have options. and postmaster doesn´t have these ones too. tnx. Eric Anderson Martin

[SQL] little doubt

2003-05-27 Thread Eric Anderson Vianet SAO
Shoul I thank the guys who help me? Or to post other message saying ´it worked well etc´? or it will flood the lists?   I´m new(bie) on the lists.   tnx   Eric Anderson Martins MirandaNet Admin @ Via Net SAO

Re: [SQL] [Fwd: SQL book]

2003-05-27 Thread Josh Berkus
Jodi, > I am looking to purchase a SQL book to use with our postgresql database. > Can anyone recommend a good one? See: http://techdocs.postgresql.org/techdocs/bookreviews.php (HEY EVERYONE ELSE: I could use some more book reviews. It's 100 words, it's not hard ... e-mail me!) -- Josh Ber

Re: [SQL] little doubt

2003-05-27 Thread Josh Berkus
Eric, > Shoul I thank the guys who help me? > Or to post other message saying ´it worked well etc´? > or it will flood the lists? I suggest sending a thank-you directly to the people who helped you, but not to the list. -- Josh Berkus Aglio Database Solutions San Francisco ---

Re: [SQL] [Fwd: SQL book]

2003-05-27 Thread Josh Berkus
Thomas, > I use SQL In A Nutshell as I have to switch gears between Oracle, Postgres > and MySQL. Also I have limited time for reading and am a very cheap guy. > It goes for $30 US. FYI, as I mention in my review, I found that SQL in a Nutshell omits several important SQL commands. But it does

Re: [SQL] [PHP] faster output from php and postgres

2003-05-27 Thread Chadwick Rolfs
So, I have the same problem, but I need all authors for each publication to show up in it's own column. I tried the full join query from a suggestion off pgsql-sql, but it only returns ONE author id TWICE instead of ALL authors at once. I'll do some RTFMing of the joins.. and post any results I g

Re: [SQL] little doubt

2003-05-27 Thread Richard Huxton
On Tuesday 27 May 2003 4:37 pm, Eric Anderson Vianet SAO wrote: > Shoul I thank the guys who help me? A private "thank you" is always appreciated (well, by me anyway), or a public "thanks to all who..." > Or to post other message saying ´it worked well etc´? > or it will flood the lists? If pos

Re: [SQL] alter column witdh

2003-05-27 Thread Frank Bax
At 10:38 AM 5/27/03, Eric Anderson Vianet SAO wrote: >how can I alter the column width http://techdocs.postgresql.org/techdocs/updatingcolumns.php fbax=# create table tablename (columnname text); CREATE fbax=# \d tablename Table "tablename" Attribute | Type | Modifier +--+-

Re: [SQL] [PHP] faster output from php and postgres

2003-05-27 Thread Richard Huxton
On Tuesday 27 May 2003 5:34 pm, Chadwick Rolfs wrote: > So, I have the same problem, but I need all authors for each publication > to show up in it's own column. I tried the full join query from a > suggestion off pgsql-sql, but it only returns ONE author id TWICE instead > of ALL authors at once.

Re: [SQL] [PHP] faster output from php and postgres

2003-05-27 Thread Chadwick Rolfs
On Tue, 27 May 2003, Richard Huxton wrote: > On Tuesday 27 May 2003 5:34 pm, Chadwick Rolfs wrote: > > So, I have the same problem, but I need all authors for each publication > > to show up in it's own column. I tried the full join query from a > > suggestion off pgsql-sql, but it only returns O

Re: [SQL] [PHP] faster output from php and postgres

2003-05-27 Thread Rod Taylor
On Tue, 2003-05-27 at 14:19, Richard Huxton wrote: > On Tuesday 27 May 2003 5:34 pm, Chadwick Rolfs wrote: > > So, I have the same problem, but I need all authors for each publication > > to show up in it's own column. I tried the full join query from a > > suggestion off pgsql-sql, but it only re

Re: [SQL] [PHP] faster output from php and postgres

2003-05-27 Thread Jean-Luc Lachance
KISS why not use PHP to concatenate the authors while pub_id is the same??? If you insist on having each author in its own column, put them at the end and concatenate with . jll Chadwick Rolfs wrote: > > So, I have the same problem, but I need all authors for each publication > to show up in

Re: [SQL] [PHP] faster output from php and postgres

2003-05-27 Thread Chadwick Rolfs
Yes, this may be better than foreach()ing through each publication returned. But a plpgsql function may suit these needs much better. On Tue, 27 May 2003, Jean-Luc Lachance wrote: > KISS > > why not use PHP to concatenate the authors while pub_id is the same??? > If you insist on having each au

[SQL] Getting rid of accents..

2003-05-27 Thread mallah
Is there any easy way for converting accented text to closest text without accents in postgresql ? eg: BÂLÂ MORGHÂB to BALA MORGHAB Regds Mallah. - Get your free web based email at trade-india.com. "India's Leading B2B eMarketplace.!" http://w

Re: [SQL] Getting rid of accents..

2003-05-27 Thread Randall Lucas
Hi Mallah, I had this problem once, and put together this bunch of regexes. It's by no means optimal, but should solve 90% and would easily be adapted into a plperl function. Begin perl: $value =~ s/[\xc0-\xc6]/A/g; $value =~ s/[\xc7]/C/g; $value =~ s/[\xc8-\xcb]/E/g; $value =~ s/[\xcc

Re: [SQL] Getting rid of accents..

2003-05-27 Thread Randall Lucas
Full disclosure on previously posted Perl code: I think I may have cribbed all or part of that previous code from something (Perl cookbook?). In any case, the issue is essentially a mapping of which ascii codes "look like" low-ascii, so I don't think there are any authorship issues. Best, Ra

Re: [SQL] Getting rid of accents..

2003-05-27 Thread Ian Barwick
On Tuesday 27 May 2003 22:55, [EMAIL PROTECTED] wrote: > Is there any easy way for converting accented text to > closest text without accents in postgresql ? > > eg: > > BÂLÂ MORGHÂB to BALA MORGHAB Have you looked at to_ascii()? Something along the lines of select to_ascii('Â', 'LATIN1') Ia

[SQL] Empty queries guaranteed to work?

2003-05-27 Thread Forest Wilkinson
Tom Lane mentioned in this post that an empty query can be sent to the server to determine whether the connection is still good: http://archives.postgresql.org/pgsql-hackers/2001-10/msg00643.php Is a query of "" guaranteed to work as long as the connection is good? What about ";" or " "? Backgro

Re: [SQL] Getting rid of accents..

2003-05-27 Thread mallah
Thanks Ian , Indeed its the simplest/easiest solution to this problem i feel. i did tried to_ascii function but was not specifying 'LATIN1' do i was getting error tradein_clients=# SELECT to_ascii('BÂLÂ MORGHÂB' ); ERROR: pg_to_ascii(): unsupported encoding from SQL_ASCII would u like to exp