Re: [SQL] UPDATE with WHERE clause on joined table

2006-07-28 Thread Erik Jones
Fabian Peters wrote: Hi, I'm only very rarely using SQL, so please forgive me if I show any obvious signs of ignorance... I've got three tables "customer", "address" and "country". I want to set the "language" attribute on "customer" on rows returned by a SELECT such as this: SELECT title

[SQL] UPDATE with WHERE clause on joined table

2006-07-28 Thread Fabian Peters
Hi, I'm only very rarely using SQL, so please forgive me if I show any obvious signs of ignorance... I've got three tables "customer", "address" and "country". I want to set the "language" attribute on "customer" on rows returned by a SELECT such as this: SELECT title, first_names, last

Re: [SQL] primary keys as TEXT

2006-07-28 Thread Manlio Perillo
Michael Glaesemann ha scritto: > > On Jul 28, 2006, at 17:37 , Manlio Perillo wrote: > >> There can be performancs problems in having primary keys of type TEXT? >> What about having a primary key of 3 columns (all of type TEXT)? > > What defines a problem in terms of performance is heavily depen

Re: [SQL] primary keys as TEXT

2006-07-28 Thread Scott Marlowe
On Fri, 2006-07-28 at 03:37, Manlio Perillo wrote: > Hi. > > There can be performancs problems in having primary keys of type TEXT? > What about having a primary key of 3 columns (all of type TEXT)? The biggest problem with using text as a primary key or foreign key is that text types are locale

Re: [SQL] primary keys as TEXT

2006-07-28 Thread Aaron Bono
On 7/28/06, Manlio Perillo <[EMAIL PROTECTED]> wrote: Hi.There can be performancs problems in having primary keys of type TEXT?What about having a primary key of 3 columns (all of type TEXT)? If you are really worried about it, why not just use surrogate keys?  They are very easy to use.  Then your

Re: [SQL] Storing an ordered list

2006-07-28 Thread Aaron Bono
On 7/26/06, Michael Artz <[EMAIL PROTECTED]> wrote: On 7/26/06, Bruno Wolff III <[EMAIL PROTECTED]> wrote:> If you use numeric instead of int, then it is easy to insert new values.Hmm, hadn't thought about that.  How would you normally implement it? I'm thinking that, if I wanted to insert between

Re: [SQL] return setof records

2006-07-28 Thread Chris Lukenbill
I think that actually solved the problem. The fact that I was sending back a bigint.  One of those things that's hard to spot when I don't know if I was on the right track to begin with.  Thank you everyone for your help. ChrisOn 7/28/06, Michael Fuhr <[EMAIL PROTECTED]> wrote: On Thu, Jul 27, 2006

Re: [SQL] return setof records

2006-07-28 Thread Michael Fuhr
On Thu, Jul 27, 2006 at 03:41:31PM -0500, Chris Lukenbill wrote: > Everywhere I've looked the agreement was that making a call to the > function had to be done as follows: > > SELECT * FROM sp_frontalerts_summary(1,'2006-07-27 18:08:09','2006-07-27 > 19:58:15' ) as (numitems int, region int); Tha

Re: [SQL] Disk is full, what's cool to get rid of?

2006-07-28 Thread Erik Jones
Tom Lane wrote: Andrew Sullivan <[EMAIL PROTECTED]> writes: If the data isn't critical, you maybe could truncate a table to clear enough space. Deleting anything under pg_xlog is more or less guaranteed to mean your database is garbage. If you're desperate you could shut down the post

Re: [SQL] PostgreSQL server terminated by signal 11

2006-07-28 Thread Tom Lane
"Daniel Caune" <[EMAIL PROTECTED]> writes: > The statement "copy gslog_event to stdout;" leads to "ERROR: invalid memory > alloc request size 4294967293" after awhile. > ... > I did other tests on some other tables that contain less data but that seem > also corrupted: This is a bit scary as it

Re: [SQL] PostgreSQL server terminated by signal 11

2006-07-28 Thread Daniel Caune
> De : Tom Lane [mailto:[EMAIL PROTECTED] > Envoyé : vendredi, juillet 28, 2006 09:38 > À : Daniel Caune > Cc : pgsql-admin@postgresql.org; pgsql-sql@postgresql.org > Objet : Re: [SQL] PostgreSQL server terminated by signal 11 > > "Daniel Caune" <[EMAIL PROTECTED]> writes: > > Program received sig

Re: [SQL] PostgreSQL server terminated by signal 11

2006-07-28 Thread Tom Lane
"Daniel Caune" <[EMAIL PROTECTED]> writes: > Program received signal SIGSEGV, Segmentation fault. > 0x08079e2a in slot_attisnull () > (gdb) bt > #0 0x08079e2a in slot_attisnull () > #1 0x0807a1d0 in slot_getattr () > #2 0x080c6c73 in FormIndexDatum () > #3 0x080c6ef1 in IndexBuildHeapScan () >

Re: [SQL] PostgreSQL server terminated by signal 11

2006-07-28 Thread Daniel Caune
> -Message d'origine- > De : Tom Lane [mailto:[EMAIL PROTECTED] > Envoyé : jeudi, juillet 27, 2006 19:26 > À : Daniel Caune > Cc : pgsql-admin@postgresql.org; pgsql-sql@postgresql.org > Objet : Re: [SQL] PostgreSQL server terminated by signal 11 > > "Daniel Caune" <[EMAIL PROTECTED]> wri

Re: [SQL] primary keys as TEXT

2006-07-28 Thread Michael Glaesemann
On Jul 28, 2006, at 17:37 , Manlio Perillo wrote: There can be performancs problems in having primary keys of type TEXT? What about having a primary key of 3 columns (all of type TEXT)? What defines a problem in terms of performance is heavily dependent on your particular needs and requirem

[SQL] primary keys as TEXT

2006-07-28 Thread Manlio Perillo
Hi. There can be performancs problems in having primary keys of type TEXT? What about having a primary key of 3 columns (all of type TEXT)? Regards Manlio Perillo ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster