Re: [SQL] Isnumeric function?

2004-09-08 Thread Thomas Swan
Oliver Elphick wrote: On Wed, 2004-09-08 at 18:48, Josh Berkus wrote: Theo, Oliver, Any reason why you don't like ~ '^([0-9]?)+\.?[0-9]*$' ? Yes, because it also matches "." , which is not a valid numeric value. ~ '^([0-9]+|[0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)$' Ah, the brut

Re: [SQL] Limiting database size

2002-06-26 Thread Thomas Swan
Josh Berkus wrote: Eric, I like the idea of putting it on a hard disk or partition of fixed size and waiting for the DB to simply crash. hahaha Yeah. It's what MS SQL Server does, though. As I said, I think the whole concept of limiting database size in MB is fundamen

[SQL] Granting database level permissions...

2001-10-18 Thread Thomas Swan
Is it possible to grant database level access to a user in PostgreSQL? I have created a user and database, and I want the user to have full control over that database. I have been through the online docs and news groups but have not found a statement or answer to the question. Thomas

Re: [SQL] Auto incrementing an integer

2001-05-15 Thread Thomas Swan
Sylte wrote: >How do I construct a datatype that autoincrement in postgreSQL? > Use the SERIAL data type instead of an INT4.Serial is an integer (INT4) that's default value is base on a sequence. for example... create table foo ( my_id serial not null, my_data text ); ---

Re: [SQL] MySql 'REPLACE'

2001-04-26 Thread Thomas Swan
At 4/25/2001 07:38 AM, you wrote: I am working in porting the Slash software from MySql to PostgreSQL. I stepped in MySql's REPLACE command (a SQL command) that to my knowledge is not supported by PostgreSQL and it's not standard SQL. According to MySql's manual: "REPLACE works exactly like INSERT

Re: [SQL] Postgres-HOWTO

2001-02-07 Thread Thomas Swan
> Has been removed from the LDP website. >Good news indeed! > >Now what are we going to do with it? > >Can the original document's source be made available so that >somebody can do the needed work without having to re-key. > >There is a _lot_ of very good information in there buried underneath t

Re: [SQL] Postgres-HOWTO

2001-02-07 Thread Thomas Swan
> > Has been removed from the LDP website. > >>Good news indeed! >> >>Now what are we going to do with it? >> >>Can the original document's source be made available so that >>somebody can do the needed work without having to re-key. >> >>There is a _lot_ of very good information in there buried u

Re: [SQL] Serials

2001-01-14 Thread Thomas Swan
At 1/12/2001 10:35 AM, Josh Berkus wrote: >Mr. Naik, > > > What's the purpose of Serials in Data types of postgres ? > > TIA > > Sharmad SERIAL is the same as makeing a column and then setting the default value to a sequence. If you insert and don't specify the column that is of type serial it w

Re: [SQL] Using a postgres table to maintain unique id?

2000-11-14 Thread Thomas Swan
At 11/13/2000 06:22 PM -0800, Michael Teter wrote: > Can someone show me how to create (and use) an int8 > sequence? From what I can tell (both from docs and doing a describe on sequences in my database), a postgresql sequence is an int4, not an int8, and thus you are limited to a max of 2.1 bil

Re: [SQL] Functions with Null Arguments?

2000-08-15 Thread Thomas Swan
At 01:24 PM 8/15/2000, DalTech - CTE wrote: Known bug in some versions.  I believe it was fixed in v7.x, though.   Cheers - Original Message - From: Thomas Swan To: DalTech - CTE ; Thomas Swan Cc: Pgsql-sql Sent: Tuesday, August 15, 2000 1:43 PM Subject: Re: [SQL] Functions with

Re: [SQL] Functions with Null Arguments?

2000-08-15 Thread Thomas Swan
At 10:12 AM 8/15/2000, DalTech - CTE wrote: I would try using COALESCE(list) which will return the first non-NULL in the list. That worked! Thanks! The second part is why does postgresql not evaluate the function if one of the arguments is null?

Re: [SQL] 8K Limit, whats the best strategy?

2000-08-15 Thread Thomas Swan
this route.  I move the size limit on an x86 Linux box to 32K (the max) and have not had any problems.   In the next release, I don't believe the row size limit will exist (correct me if I'm wrong). Let me know the system your on, and I will try to help if I can. - - T

[SQL] Functions with Null Arguments?

2000-08-14 Thread Thomas Swan
---  0 | Abe | NULL  | NULL  1 | William | Bill  | Bill instead of id | name1   | name2 | prefname ---+-+---+---  0 | Abe | NULL  | Abe  1 | William | Bill  | Bill I assume this has to do with Postgres not executing the function is one of the arguments is missing..

[SQL] Classes, Inheritance, and Children

2000-07-27 Thread Thomas Swan
I think I may have asked this before... If I did I'm sorry, but maybe this attempt, assuming a prior one, may be a little more clear. create table foo (id int8); create table bar1 (name text) inherits (foo); create table bar2 (data text) inherits (foo); create table hybrid ( ) inherits (bar1, ba

[SQL] Altnerate Column Return Names

2000-07-07 Thread Thomas Swan
sure that the hash table they create to select rows is determined from the column names returned from a query. Thanks, Thomas ... I feel like I ask some weird questions ... - - Thomas Swan - - Graduate Student - Computer Science - The University of M

Re: [SQL] Finding the names of inheriting classes

2000-06-28 Thread Thomas Swan
Thanks... At the same time I had a friend guide me through the system tables... :) - - Thomas Swan - - Graduate Student  - Computer Science - The University of Mississippi - - "People can be sorted into two fundamental groups, - those that d

[SQL] Finding the names of inheriting classes

2000-06-28 Thread Thomas Swan
re a way to get a table that has all the columns (not just the ones in common) and put nulls in the columns for which there is no information or data? - - Thomas Swan - - Graduate Student  - Computer Science - The University of Mississippi - - "People