Re: newbie - syntax question - Mailing list pgsql-general

From Thomas Lockhart
Subject Re: newbie - syntax question
Date
Msg-id 3CDB1FED.99909B36@fourpalms.org
Whole thread Raw
In response to Re: newbie - syntax question  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
...
> > select distinct
> >        uid              = 'c' + trim(char(m.ctc_uid)),
> >        command          = e.msg_command,
> I think you probably want something like
> e.msg_command AS command,

and something like

  ('c' + trim(char(m.ctc_uid))) as uid,

which have forms more closely tied to SQL9x standards than your original
form.

While you are at it you might want to evaluate your needs for character
strings and choose the type (char, varchar, or text) which best matches
your application. You may be able to eliminate some of these
conversions.

                    - Thomas

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: trouble with (lack of) indexing
Next
From: "R.Tichy"
Date:
Subject: [why copy ? its not correct working outside static sytax ? ]