Re: [SQL] a "catch all" type ... such a thing?

2005-09-08 Thread Michael Glaesemann
On Sep 9, 2005, at 3:09 PM, Eugene E. wrote: Marc G. Fournier wrote: Are there any data types that can hold pretty much any type of character? UTF-16 isn't supported (or its missing from teh docs), and UTF-8 doesn't appear to have a big enough range ... PLEASE Note: type of caracter is

Re: [SQL] a "catch all" type ... such a thing?

2005-09-08 Thread Eugene E.
Marc G. Fournier wrote: Are there any data types that can hold pretty much any type of character? UTF-16 isn't supported (or its missing from teh docs), and UTF-8 doesn't appear to have a big enough range ... PLEASE Note: type of caracter is generally not a matter of _datatype_

Re: [SQL] how to replace

2005-09-08 Thread A. Kretschmer
am 08.09.2005, um 23:25:05 +0200 mailte "Michael Höller" folgendes: > Hello, > > I initially thought this is simple.. I want to relpace a character to > nothing. Eg. relace "B" to "" -> ABCD to ACD. In the new version 8.1 there are a regex_replace() - function. A other solution: write your own

Re: [SQL] Numeric Columns

2005-09-08 Thread Tom Lane
miwalsh <[EMAIL PROTECTED]> writes: > I need to make a column that is capable of holding numeric values along with > certain modifiers such as "<" or ">". The column needs to be searchable by > numbers. For example, if someone searches for values lower than 10.0 the > column should return the re

[SQL] Numeric Columns

2005-09-08 Thread miwalsh
I need to make a column that is capable of holding numeric values along with certain modifiers such as "<" or ">". The column needs to be searchable by numbers. For example, if someone searches for values lower than 10.0 the column should return the relevant values. However, the column needs to

Re: [SQL] queries problems

2005-09-08 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > I don't know if there's an easier way to check if an int2 is a > member of an int2vector, but you could write a function to convert > an int2vector to an int2 array and then use an "= ANY" expression. FWIW, as of 8.1 an int2vector *is* an int2 array, so =

Re: [SQL] queries problems

2005-09-08 Thread Michael Fuhr
On Thu, Sep 08, 2005 at 10:33:48PM +, Joÿffe3o Carvalho wrote: > The problem here is to compare int2vector with int2. Presumably you're talking about joining pg_index.indkey against pg_attribute.attnum -- is that correct? Will pg_get_indexdef() not work for your needs? I don't know i

Re: [SQL] queries problems

2005-09-08 Thread Joÿffffffffffe3o Carvalho
The problem here is to compare int2vector with int2.   Regards João Carvalho Michael Fuhr <[EMAIL PROTECTED]> escreveu: [Please copy the mailing list on replies so others can contributeto and learn from the discussion.]On Thu, Sep 01, 2005 at 10:33:44PM -0300, João Carvalho wrote:> Michael Fuhr <[E

Re: [SQL] Statistics from Sequences

2005-09-08 Thread Michael Fuhr
[Again, please copy the mailing list on replies so others can participate in and learn from the discussion.] On Thu, Sep 08, 2005 at 06:25:33PM -0300, Joÿffe3o Carvalho wrote: > There's one thing. If the sequence name was fooseq in uppercase > (FOOSEQ) it does not work. In that case it ret

Re: [SQL] how to replace

2005-09-08 Thread Anthony Molinaro
Michael, You practically solved it yourself in the subject of the email ;) select replace('abcd','b','') from your_table; Hope that helps, Anthony -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of "Michael Höller" Sent: Thursday, September 08, 2005 5:

Re: [SQL] how to replace

2005-09-08 Thread Owen Jacobson
Michael Höller wrote: > Hello, > > I initially thought this is simple.. I want to relpace a character to > nothing. Eg. relace "B" to "" -> ABCD to ACD. > > All me approches vaild but I am sure that I have seen it already and > think it was not tricky.. > > Can someone please help me ? From t

[SQL] how to replace

2005-09-08 Thread Michael Höller
Hello, I initially thought this is simple.. I want to relpace a character to nothing. Eg. relace "B" to "" -> ABCD to ACD. All me approches vaild but I am sure that I have seen it already and think it was not tricky.. Can someone please help me ? Thanks a lot Michael -

[SQL] a "catch all" type ... such a thing?

2005-09-08 Thread Marc G. Fournier
Are there any data types that can hold pretty much any type of character? UTF-16 isn't supported (or its missing from teh docs), and UTF-8 doesn't appear to have a big enough range ... Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: [EMAIL PROTECTED]

Re: [SQL] Statistics from Sequences

2005-09-08 Thread Joÿffffffffffe3o Carvalho
Michael Fuhr <[EMAIL PROTECTED]> escreveu: [Please copy the mailing list on replies so others can participatein and learn from the discussion.]On Thu, Sep 08, 2005 at 02:32:12PM -0300, Joÿffe3o Carvalho wrote:> Can you give me a help about:> > > The min value> > The max value> > The increm

Re: [SQL] column names, types, properties for a table

2005-09-08 Thread thomas.silvi
Hello, there is the view "columns" in the schema "information_schema" that can give you most of the informations you need ( for PosgreSQL version >= 7.4.8 if I'm right). SELECT * FROM information_schema.columns WHEREtable_name = 'mytable'; See http://www

Re: [SQL] Statistics from Sequences

2005-09-08 Thread Michael Fuhr
[Please copy the mailing list on replies so others can participate in and learn from the discussion.] On Thu, Sep 08, 2005 at 02:32:12PM -0300, Joÿffe3o Carvalho wrote: > Can you give me a help about: > > >The min value > >The max value > >The increment value > >The last u

Re: [SQL] Indexing an array?

2005-09-08 Thread Tom Lane
Silke Trissl <[EMAIL PROTECTED]> writes: > I have a problem with arrays in Postgres. I want to create a really > large array, lets say 3 billion characters long. Forget it --- quite aside from indexing inefficiencies, the max size of an array (or any other single field) is just 1Gb. Don't try to

Re: [SQL] Indexing an array?

2005-09-08 Thread Dmitri Bichko
Really seems like that array should be a separate table, then Postgres would definitely know how to index it. Dmitri > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Silke Trissl > Sent: Thursday, September 08, 2005 12:14 PM > To: pgsql-sql@postgre

Re: [SQL] Indexing an array?

2005-09-08 Thread Josh Berkus
Silke, > I have a problem with arrays in Postgres. I want to create a really > large array, lets say 3 billion characters long. Change your application design. -- Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)--- TIP 2

[SQL] Indexing an array?

2005-09-08 Thread Silke Trissl
Hi, I have a problem with arrays in Postgres. I want to create a really large array, lets say 3 billion characters long. As far I could read from the documentation - this should be possible. But my question is, is there a kind of index on the array. Lets say, I want to get element 2,675,345,328.