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

2003-09-25 Thread Kumar
Dear Friends,   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.   Regards Kumar

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

2003-09-25 Thread Peter Eisentraut
Michael A Nachbaur writes: > a) am I missing any characters that need to be converted? In Unicode, any character can be dynamically combined with any number of accent characters, so an enumerated list will never do. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of br

Re: [SQL] Date interval

2003-09-25 Thread sad
On Friday 26 September 2003 09:18, you wrote: > I am looking for a way to convert an interval into a number of days ( > integer); > > In sybase I would use : > > days(today()-r_expire) SELECT now()::DATE - '1900-12-10'::DATE; ?column? 375

Re: [SQL] Date interval

2003-09-25 Thread Tomasz Myrta
I am looking for a way to convert an interval into a number of days ( integer); In sybase I would use : days(today()-r_expire) where r_expire is the timestamp I am comparing against. How do we do this in postgres? date_trunc(today()-r_expire) does not seem to do it select extract(epoch f

[SQL] Date interval

2003-09-25 Thread Richard Sydney-Smith
I am looking for a way to convert an interval into a number of days ( integer);   In sybase I would use :   days(today()-r_expire)   where r_expire is the timestamp I am comparing against.   How do we do this in postgres?   date_trunc(today()-r_expire) does not seem to do it   thanks   Richa

Re: [SQL] Case Insensitive comparison

2003-09-25 Thread Josh Berkus
Roberto, > > Another problem is in creating function... > > How can i create a function that accept and return any type. the type > > "any" is not allowing as parameter or return type. Is it possible? i want > > to create a function similar to NULLIF(). > > Use the standard coalesce(). NULLIF is

Re: [SQL] tsearch2 question

2003-09-25 Thread Tom Lane
Wei Weng <[EMAIL PROTECTED]> writes: > In my tsearch2.sql there are statements like : > --dict interface > CREATE FUNCTION lexize(oid, text) > returns _text > as '$libdir/tsearch2' > language 'C' > with (isstrict); > I don't think $libdir is the real value that we want. Y

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

2003-09-25 Thread Michael A Nachbaur
On Thursday 25 September 2003 05:06 pm, Manuel Sugawara wrote: > Michael A Nachbaur <[EMAIL PROTECTED]> writes: > > b) is there a better and/or faster way of implementing this? I > > don't want searches to bog down (at least too badly) as a result of > > this. > > Use to_ascii(text), [snip] D'oh

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

2003-09-25 Thread Manuel Sugawara
Michael A Nachbaur <[EMAIL PROTECTED]> writes: > b) is there a better and/or faster way of implementing this? I > don't want searches to bog down (at least too badly) as a result of > this. Use to_ascii(text), masm=# select to_ascii('áéíóú'); to_ascii -- aeiou (1 row) Regards, Manuel

[SQL] RFC: i18n2ascii(TEXT) stored procedure

2003-09-25 Thread Michael A Nachbaur
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 converted? My first (and only language) is English, so I'm in the d

[SQL] tsearch2 question

2003-09-25 Thread Wei Weng
In my tsearch2.sql there are statements like : --dict interface CREATE FUNCTION lexize(oid, text) returns _text as '$libdir/tsearch2' language 'C' with (isstrict); I don't think $libdir is the real value that we want. Do I need to set some special parameters wit

Re: [SQL] weird(to me) request

2003-09-25 Thread Larry Rosenman
--On Thursday, September 25, 2003 20:09:35 +0100 Richard Huxton <[EMAIL PROTECTED]> wrote: On Thursday 25 September 2003 19:51, Larry Rosenman wrote: I have the following rows (in addition to others): acct_num text, master_acct_num text, These are in the same table. What I want to enforce is

Re: [SQL] weird(to me) request

2003-09-25 Thread Richard Huxton
On Thursday 25 September 2003 19:51, Larry Rosenman wrote: > I have the following rows (in addition to others): > > acct_num text, > master_acct_num text, > > > These are in the same table. > > What I want to enforce is that if the master_acct_num field is NOT NULL (it > can be NULL, and > that's f

Re: [SQL] weird(to me) request

2003-09-25 Thread Larry Rosenman
--On Thursday, September 25, 2003 20:59:25 +0200 Adam Wieckowski <[EMAIL PROTECTED]> wrote: U¿ytkownik Larry Rosenman napisa³: I have the following rows (in addition to others): acct_num text, master_acct_num text, These are in the same table. What I want to enforce is that if the master_acc

Re: [SQL] weird(to me) request

2003-09-25 Thread Adam Wieckowski
Użytkownik Larry Rosenman napisał: I have the following rows (in addition to others): acct_num text, master_acct_num text, These are in the same table. What I want to enforce is that if the master_acct_num field is NOT NULL (it can be NULL, and that's fine), that the value appears in some row a

[SQL] weird(to me) request

2003-09-25 Thread Larry Rosenman
I have the following rows (in addition to others): acct_num text, master_acct_num text, These are in the same table. What I want to enforce is that if the master_acct_num field is NOT NULL (it can be NULL, and that's fine), that the value appears in some row as acct_num. acct_num has a unique

Re: [SQL] Large Objects and Bytea

2003-09-25 Thread elein
In this week's General Bits, we talk about using large objects. Perhaps this might help you understand what is involved with using them. http://www.varlena.com/GeneralBits/ cheers, [EMAIL PROTECTED] On Thu, Sep 25, 2003 at 09:41:28AM +0530, Kumar wrote: > Hi Friends, > > I am running Postgre

[SQL] [pg-sql] Character encoding

2003-09-25 Thread BenLaKnet
How is it possible to convert a database in SQL_ASCII to UNICODE ? Thx a lot Regards Ben ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Case Insensitive comparison

2003-09-25 Thread George A.J
Thanks to all of you for your valuable suggesstions does postgresql internally uses the = operator(text,text) for any other purposes. i think that overloading it solves the index problem too...     Tom Lane <[EMAIL PROTECTED]> wrote: Josh Berkus <[EMAIL PROTECTED]>writes:>> How can i create a f

Re: [SQL] Case Insensitive comparison

2003-09-25 Thread Bruno Wolff III
On Wed, Sep 24, 2003 at 23:30:08 -0600, Roberto Mello <[EMAIL PROTECTED]> wrote: > On Wed, Sep 24, 2003 at 08:35:50PM -0700, George A.J wrote: > > > Another problem is in creating function... > > How can i create a function that accept and return any type. the type "any" is not > > allowing as

Re: [SQL] few questions ..?

2003-09-25 Thread vijaykumar M
Thanks richards ..i will go through that doc.. With Regards Vijay From: Richard Huxton <[EMAIL PROTECTED]> To: "vijaykumar M" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Subject: Re: [SQL] few questions ..? Date: Thu, 25 Sep 2003 11:07:00 +0100 On Thursday 25 September 2003 09:36, vijaykumar M wrote:

Re: [SQL] plpgsql triggers question -> foo := NEW ?

2003-09-25 Thread Christoph Haller
> > Thanks a lot for Your reply by I wanted to create some *foo* variable ( > in declare part of pl/pgsql trigger function) and to set : > foo := NEW > > That's why I've posted the link from interactive docs - there is the > same question > > http://www.postgresql.org/docs/7.3/interactive/plpgsql-t

Re: [SQL] few questions ..?

2003-09-25 Thread Richard Huxton
On Thursday 25 September 2003 09:36, vijaykumar M wrote: > Hi All, > I have few questions, kindly suggest your comments on this.. > > 1. Is that postgres supports distributed database ? > In oracle, by creating Dblink we can communicate the remorte > database from the local o

[SQL] few questions ..?

2003-09-25 Thread vijaykumar M
Hi All, I have few questions, kindly suggest your comments on this.. 1. Is that postgres supports distributed database ? In oracle, by creating Dblink we can communicate the remorte database from the local one. How you could implement this in postgres database. 2. Is the

Re: [SQL] Sequenties in pgSQL 7.3.x

2003-09-25 Thread Przemysław Słupkowski
HI Thanks for help I'm found this solution and this works, but I'm use something like that PERFORM setval(seq_name, value); It looks better but thanks a lot - Original Message - From: "Richard Huxton" <[EMAIL PROTECTED]> To: "Przemysław Słupkowski" <[EMAIL PROTECTED]>; "Lista dyskusyjna pg

[SQL]

2003-09-25 Thread vijaykumar M
Hi all, I have few questions to clear my self.. 1. Is that postgres supports distributed database ? _ Talk to Karthikeyan. Watch his stunning feats. http://server1.msn.co.in/sp03/tataracing/index.asp Download images. ---

Re: [SQL] Sequenties in pgSQL 7.3.x

2003-09-25 Thread Richard Huxton
On Thursday 25 September 2003 07:36, Przemysław Słupkowski wrote: > Hi > I am using postgresql 7.3.x. I am upgrating a database PostgreSQL. > The main problem is how to change field last value in sequencde which > exists in database. I created script to read this field and then I'm drop > the table

Re: [SQL] Sequenties in pgSQL 7.3.x

2003-09-25 Thread Oliver Elphick
On Thu, 2003-09-25 at 07:36, Przemysław Słupkowski wrote: > Hi > I am using postgresql 7.3.x. I am upgrating a database PostgreSQL. > The main problem is how to change field last value in sequencde which > exists in database. > I created script to read this field and then I'm drop the table, do >

Re: [SQL] Sequenties in pgSQL 7.3.x

2003-09-25 Thread Tomasz Myrta
Hi I am using postgresql 7.3.x. I am upgrating a database PostgreSQL. The main problem is how to change field last value in sequencde which exists in database. I created script to read this field and then I'm drop the table, do modification and i'm must change this value to another value. But DBM