am Thu, dem 26.07.2007, um 0:33:09 -0700 mailte Bryce Nesbitt folgendes:
> How do I specify a cast, if the type name has spaces? foo::integer is
> easy,
> but foo::'timestamp without time zone' is more murky.
Hehe, it works without the ', see:
test=# select '2007-01-01'::timestamp without tim
Phillip Smith wrote:
Whoops, I forgot the JOIN conditions! Fixed below
-Original Message-
From: Phillip Smith [mailto:[EMAIL PROTECTED]
Sent: Friday, 27 July 2007 11:47
To: 'pgsql-sql@postgresql.org'
Subject: RE: [SQL] Join question
This might give you a starting point if I understan
I have a database in a parts sales environment that I am having a little
difficulty with a join query - trying to figure out which way to join
things.
I have a parts_invoice_header table, containing the header record for
each invoice.
I have a parts_invoice_lines table, containing the parts de
Dmitry Ruban <[EMAIL PROTECTED]> writes:
> I'm trying to find a solution for unique index on fields with possible
> null values.
You appear to be hoping that a unique index would constrain a column to
contain at most one null entry. It doesn't work like that, and I
strongly urge you to reconsider
Whoops, I forgot the JOIN conditions! Fixed below
-Original Message-
From: Phillip Smith [mailto:[EMAIL PROTECTED]
Sent: Friday, 27 July 2007 11:47
To: 'pgsql-sql@postgresql.org'
Subject: RE: [SQL] Join question
This might give you a starting point if I understand you correctly...
SELE
This might give you a starting point if I understand you correctly...
SELECT h.invoice_number,
h.customer,
l.item,
l.amount
FROMlines AS l
JOINheaders AS h
UNION
SELECT h.invoice_number,
h.customer,
s.item,
s.amount
FROMsundries AS
having problem joining these correctly:
schedule
- cal_id references calendar not null
- usr_id references users not null
= unique( calZ_id, usr_id )
- result_no not null
activity
- cal_id references calendar not null
- usr_id references users not null
= unique( cal_id, usr_id )
- from_ts timesta
Hello pgsql-sql,
I'm trying to find a solution for unique index on fields with possible
null values.
Example table:
CREATE TABLE test (
a integer NOT NULL,
b integer NULL
);
As long as unique index can't check if there are records with null
values i found the only one solution for this proble
On Thu, 26 Jul 2007, Bryce Nesbitt wrote:
> How do I specify a cast, if the type name has spaces? foo::integer is
> easy,
> but foo::'timestamp without time zone' is more murky.
foo::timestamp without time zone should work (no quotes). Another
alternative if you don't like the way that looks is
Hello,
I'm developing a BI and as database it's using postgresql 8.2, how data
are very detailed, I'm creating a view to consolidate the most important
data, but the performance of view is very poor, 1 minute to perform more
or less without where clause.
I need to know how I can increase the perf
How do I specify a cast, if the type name has spaces? foo::integer is
easy,
but foo::'timestamp without time zone' is more murky.
In my case I have a table, and a view. For no apparent reason the table
has
timestamp without time zone, but I need timestamp with time zone.
I'm using "select column
am Thu, dem 26.07.2007, um 0:33:09 -0700 mailte Bryce Nesbitt folgendes:
> How do I specify a cast, if the type name has spaces? foo::integer is
> easy,
> but foo::'timestamp without time zone' is more murky.
Use timestamp instead ;-)
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/4
One down. Total runtime of the simplest query went from 34661.572 ms to
.634 ms (45,000 times faster).
stage=> explain analyze select * from eg_order_summary_view where
invoice_id=1432655;
QUERY
PLAN
13 matches
Mail list logo