Re: [SQL] [pg-sql] Character encoding

2003-09-26 Thread Vivien Malerba
Le jeu 25/09/2003 à 17:20, BenLaKnet a écrit : > How is it possible to convert a database in SQL_ASCII to UNICODE ? > > Thx a lot I did a pg_dump to a file, converted that file to UTF-8 encoding using iconv, created a new DB using the "-E unicode" option, and imported the data into that new DB fr

Re: [SQL] RFC: i18n2ascii(TEXT) stored procedure

2003-09-26 Thread scott.marlowe
On Thu, 25 Sep 2003, Michael A Nachbaur wrote: > I've created the following stored procedure to allow me to do > international-insensitive text searches, e.g. a search for "Resume" would > match the text "Résumé". > > I wanted to know: > > a) am I missing any characters that need to be convert

Re: [SQL] How to generate object DDL of the database objects

2003-09-26 Thread Tom Lane
"Kumar" <[EMAIL PROTECTED]> writes: > Any body could pls share their idea on creating object DDL for the postgres= > data objects from the Postgres Server 7.3.4 running on RH Linux 7.2. Perhaps you are looking for "pg_dump -s". regards, tom lane -

Re: [SQL] tsearch2 question

2003-09-26 Thread Wei Weng
But then when I do a psql < tsearch2.sql, it complains: bash-2.05a$ psql testdb < tsearch2.sql SET BEGIN NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'pg_ts_dict_pkey' for table 'pg_ts_dict' CREATE TABLE ERROR: stat failed on file '$libdir/tsearch2': No such file or directory

Re: [SQL] tsearch2 question

2003-09-26 Thread Tom Lane
Wei Weng <[EMAIL PROTECTED]> writes: > But then when I do a psql < tsearch2.sql, it complains: > bash-2.05a$ psql testdb < tsearch2.sql > ERROR: stat failed on file '$libdir/tsearch2': No such file or directory > Where did I do wrong?? Did you do "make install" after building tsearch2? If you d

Re: [SQL] tsearch2 question

2003-09-26 Thread Wei Weng
When I run psql < tsearch2.sql, is psql going to substitute $libdir internally with what $libdir really is (in my case, it would be /usr/lib/pgsql)? Thanks Wei On Fri, 26 Sep 2003, Tom Lane wrote: > Wei Weng <[EMAIL PROTECTED]> writes: > > But then when I do a psql < tsearch2.sql, it compla

Re: [SQL] tsearch2 question

2003-09-26 Thread Tom Lane
Wei Weng <[EMAIL PROTECTED]> writes: > When I run psql < tsearch2.sql, is psql going to substitute $libdir > internally with what $libdir really is (in my case, it would be > /usr/lib/pgsql)? Not psql, the backend. The point of this is that your CREATE FUNCTION definition can be platform-indep

Re: [SQL] Case Insensitive comparison

2003-09-26 Thread Roberto Mello
On Thu, Sep 25, 2003 at 08:46:39PM -0700, Josh Berkus wrote: > > NULLIF is the converse of COALESCE(). Oh, ooops! My apologies. > Any idea when you're going to overhaul the CookBook? *sighs* The software is pretty much ready. I'll have time to install and configure it next week, after my e

[SQL] Capturing pgsql ERRORS/NOTICES to file

2003-09-26 Thread George Weaver
I am in the process of creating a batch file that will update some functions in a database for a remote user similar to:   psql -o output dbname < functionupdate.sql   Is there any way to save any ERROR and NOTICE messages to a file?    The -o option doesn't capture this information.   Tha

Re: [SQL] Capturing pgsql ERRORS/NOTICES to file

2003-09-26 Thread Josh Berkus
George, > I am in the process of creating a batch file that will update some > functions in a database for a remote user similar to: > > psql -o output dbname < functionupdate.sql > > Is there any way to save any ERROR and NOTICE messages to a file? > > The -o option doesn't capture this informati

Re: [SQL] tsearch2 question

2003-09-26 Thread Wei Weng
When I ran psql testdb < untsearch2.sql I got the following error message: psql:untsearch2.sql:15: ERROR: RemoveAggregate: aggregate stat(tsvector) does not exist I didn't really do anything before this. Only dropped the trigger and gist index I created (in order to use tsearch2), and alter t

Re: [SQL] Capturing pgsql ERRORS/NOTICES to file

2003-09-26 Thread George Weaver
Hi Josh, Thanks for the reply. What I am trying to achieve is to have errors go to a file, rather than show up on the screen. Is this possible? George - Original Message - From: "Josh Berkus" <[EMAIL PROTECTED]> To: "George Weaver" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday

Re: [SQL] Capturing pgsql ERRORS/NOTICES to file

2003-09-26 Thread Wei Weng
George: Have you tried psql {whatever operations} 2> error_output ? (for Bash) Thanks Wei On Fri, 26 Sep 2003, George Weaver wrote: > Hi Josh, > > Thanks for the reply. > > What I am trying to achieve is to have errors go to a file, rather than show > up on the screen. > > Is this possibl

Re: [SQL] Capturing pgsql ERRORS/NOTICES to file

2003-09-26 Thread George Weaver
Hi Wei, I hadn't tried that, and it did the trick! Thank you! George - Original Message - From: "Wei Weng" <[EMAIL PROTECTED]> To: "George Weaver" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, September 26, 2003 2:16 PM Subject: Re: [SQL] Capturing pgsql ERRORS/NOTICES to f

Re: [SQL] does postgresql execute unions in parallel?

2003-09-26 Thread Gaetano Mendola
teknokrat wrote: If I have several selects joined with unions does postgresql execute the concurrently or not? nope. Regards Gaetan Mendola ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgre

Re: [SQL] does postgresql execute unions in parallel?

2003-09-26 Thread Christopher Browne
[EMAIL PROTECTED] (Gaetano Mendola) writes: > teknokrat wrote: >> If I have several selects joined with unions does postgresql >> execute the concurrently or not? > > nope. I was talking with Jan about that very idea yesterday; this would seem to be the place where PostgreSQL might take some (poss

[SQL] Removing simliar elements from a set

2003-09-26 Thread Dan Langille
Hi folks, I'm trying to remove items from a set which are similar to items in another set. This is the set (MASTER) from which I wish to remove items: /ports/Mk/bsd.python.mk /ports/lang/python-doc-html/distinfo /ports/lang/python/Makefile /ports/lang/python/distinfo /ports/lang/python/file

Re: [SQL] Removing simliar elements from a set

2003-09-26 Thread Josh Berkus
Dan, > I'm trying to remove items from a set which are similar to items in > another set. > In short, we remove all items from MASTER which are under the directories > specified in MATCHES. from your example, you are trying to remove all directories which do *not* match. What do you want, e

Re: [SQL] [HACKERS] plpgsql doesn't coerce boolean expressions to boolean

2003-09-26 Thread Bruce Momjian
Where are we on this --- we all decided on #4. Does this just require an announcment in the release notes. (I need to complete the release notes soon.) --- Tom Lane wrote: > Following up this gripe > http://archives.postgr

Re: [SQL] [HACKERS] plpgsql doesn't coerce boolean expressions to boolean

2003-09-26 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Where are we on this --- we all decided on #4. Does this just require > an announcment in the release notes. I haven't done anything about it --- been busy with other stuff, and I wasn't sure we'd agreed to change it for 7.4 anyway. I'm willing to make