Re: [SQL] not sure about constraints

2005-09-02 Thread Jerome Alet
On Fri, Sep 02, 2005 at 04:43:15PM +0300, Achilleus Mantzios wrote: > O Jerome Alet ?? Sep 2, 2005 : > > > I've got 4 tables : > > > > CREATE TABLE tableA (id SERIAL PRIMARY KEY NOT NULL, > > blahA TEXT); > >

[SQL] not sure about constraints

2005-09-02 Thread Jerome Alet
ableA(id), idb INT4 REFERENCES tableB(id), blahD TEXT, CONSTRAINT checkAB FOREIGN KEY (ida, idb) REFERENCES tableC(ida, idb)); which looks superfluous to me. ??? Thanks in advance Jerome Alet ---(end of broa

Re: [SQL] string to date conversion

2005-04-22 Thread Jerome Alet
I missed the '::text' intermediate conversion it seems bye Jerome Alet ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] string to date conversion

2005-04-22 Thread Jerome Alet
insert into test1 values('2005/04/22') > > select date::timestamp from test1 Sorry, I should have said that I use 7.4.7... I know it's old but as already explained I can't do much about it for now... Thanks for your help bye Jerome Alet -

[SQL] string to date conversion

2005-04-22 Thread Jerome Alet
ith select. When I do : select mydatefield::timestamp from mytable; There's an error saying that converting from varchar to date is not possible How can I do this ? Thanks in advance Jerome Alet ---(end of broadcast)

[SQL] question about index

2004-12-16 Thread Jerome Alet
ast as possible. considering that almost 70% of the rows will be with 'VALUE1', 20% will be with 'VALUE2' and 10% will be with 'VALUE3' on the average. should I create an index to speedup the counts or not ? any idea of the impact of runni

Re: [SQL] Doubt :- Image_Insert

2004-11-22 Thread Jerome Alet
ple or as a whole ? Same question for 1GB. this is not really clear... bye Jerome Alet ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [SQL] How do you compare (NULL) and (non-NULL)?

2004-10-26 Thread Jerome Alet
e listed at the > > very beginning of the query result. you could try to use COALESCE to treat NULLs as either a minimal or maximal value so that your ordering is correct : SELECT Parent FROM Channels ORDER BY COALESCE(Parent, -1) ASC; to treat NULLs as -1 for example hth Jerome Alet

Re: [SQL] EXPORT / IMPORT

2004-05-07 Thread Jerome Alet
On Fri, May 07, 2004 at 10:20:52AM +0200, Freddy Villalba Arias wrote: > > Is there a simple way to generate an export / import script in > PostgreSQL (i.e. a script that contains INSERT statements for every row > in a table) ??? pg_dump bye Jerome Alet --

Re: [SQL] Database reporting tool

2004-03-09 Thread Jerome Alet
thanks in advance see : http://www.openoffice.org bye Jerome Alet ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] avoid circular references

2003-11-05 Thread Jerome Alet
a rule but maybe the best is a trigger > > (I'm not sure I really understand the difference) if I see > > what happens when I create new tables. But what can I do in > > my trigger to have PostgreSQL understand there's an integrity > > violation ? > > A trig

[SQL] avoid circular references

2003-11-05 Thread Jerome Alet
should use. I thought about creating a rule but maybe the best is a trigger (I'm not sure I really understand the difference) if I see what happens when I create new tables. But what can I do in my trigger to have PostgreSQL understand there's an integrity violation ? Thanks in adva

[SQL] Help with a "recursive" query

2002-06-19 Thread Jerome Alet
05 / \ /\ / \ 07 06 | | | 08 this example is simple because each node has at most one child, but in my real data there's no such limit. any idea ? thanks in advance Jerome Alet ---(end of broadcast)--- TIP 4: D

Re: [SQL] Storing image contents in TEXT fields

2001-06-27 Thread Jerome Alet
On Wed, Jun 27, 2001 at 11:17:28AM -0400, Jan Wieck wrote: > Jerome Alet wrote: > > Hi, > > > > I wanted to know if it's possible to store an image content in a TEXT field, > > or if another type is needed (in this case, then which one ?). > > > > I

[SQL] Storing image contents in TEXT fields

2001-06-26 Thread Jerome Alet
(I don't admin this server) in a TEXT field the image seems to be truncated at the first nul byte. Thanks in advance for any help. bye, Jerome Alet ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.o

Re: [SQL] ./configure problems

2000-11-09 Thread Jerome Alet
ou run configure, configure itself runs lots of commands, program compilations and etc... in order to test your environment. It's highly probable that one of these commands need free space in /tmp as well as in /usr/src/pgsql/postgresql-7.0.2/src/ IMHO you should check for free space in /tmp good luck. Jerome Alet

Re: [SQL] test

2000-07-21 Thread Jerome Alet
At least you could spell your ads correctly ! - Plusieurs centaines de magasins re'fe'rence's - Les ide'es d'olivia bye, Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Ave

Re: [SQL] GROUP by finish&&last day of month

2000-07-05 Thread Jerome Alet
d) or fields, in increasing or decreasing order. e.g.: you can do: SELECT id,eventdate FROM mytable ORDER BY eventdate DESC; and not: SELECT id,eventdate FROM mytable ORDER BY '2000-01-31' DESC; the latter one doesn't mean anything to me, nor to SQL I suppose. bye, Jerome

Re: [SQL] GROUP by

2000-07-05 Thread Jerome Alet
"where workgroup=" the "group by workgroup" can't do anything. bye, Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE