at the implicit rtrimming is going to cause
problems in cases where you are trying to do things with fixed-length
fields, which is really where one is likely to use bpchar anyway. It is
not a showstopper, but I can see why some people don't like it. But
can't please everyon
UP BY
dept_name;
SELECT dept_id, dept_name, count(*) FROM employee_list GROUP BY
dept_name, dept_id;
SELECT dept_id, MIN(dept_name), count(*) FROM employee_list GROUP BY
dept_id;
And yes, it is bad design in every case I can think of.//
Why is this a problem?
Best Wishes,
Chris Tra
Correct me if I am wrong, but isn't COALESCE standard in this way?
Best Wishes,
Chris Travers
Metatron Technology Consulting
Michael Glaesemann wrote:
[Please do not email me directly. Please post to the list so others
may help and benefit from the discussion.]
On Oct 19, 2005, at
INTO table_a
SELECT firstname, lastname FROM table_b
WHERE table_b IN (SELECT id FROM (SELECT id, sum(labor) as total_hours
from table_c group by id) WHERE total_hours <> n);
Best Wishes,
Chris Travers
Metatron Technology Consulting
begin:vcard
fn:Chris Travers
n:Travers;Chris
email;internet:
nt to
various snippets. I'd rather just alter the nullif
function.
SELECT NULLIF('' = '', TRUE);
Does this work? You could write a wrapper function if necessary.
Best Wishes,
Chris Travers
Metatron Technology Consulting
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
need a
couple with a true/false value.
I'm not joining tables on NULLS, just filtering w/
them.
Sounds like a partial index would be your best bet. Something like:
CREATE index ON my_table WHERE my_bool IS NOT NULL
Best Wishes,
Chris Travers
Metatron Technology Consulting
--
is no good way to do this. If you are
worried about this, the technology isn't going to save you. No
technology will save you. Instead, I would highly suggest discussing
the matter with an attourney and see if there is a legal remedy that
might provide adequate protection.
Best Wishes,
ead. It may require some editing.
Best Wishes,
Chris Travers
Metatron Technology Consulting
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
Hi all;
I found the problem (stupid human error ;-) ) Basically it was a
broken join condition.
Best Wishes,
Chris Travers
Metatron Technology Consulting
begin:vcard
fn:Chris Travers
n:Travers;Chris
email;internet:[EMAIL PROTECTED]
x-mozilla-html:FALSE
version:2.1
end:vcard
d), the trigger vs.
rule systems in PostgreSQL (warning MS SQL uses something they call
rules but it is something different), and features like inherited
tables. Again, read the online documentation.
Best Wishes,
Chris Travers
Metatron Technology Consulting
---(e
m seems to be somehow assuming that all amount columns in
day_source_pre are null. Is there something wrong in how this view is
working, or is it (more likely) my SQL syntax?
That I want to do is fill in a value from day_inc_source if and only if
it is not found in day_source_pre with the sam
P installations but the data is
not generally being updated there.)
In this case, I would create a view (with appropriate rules) which would
automatically populate the common fields from the parent if it exists.
The issue should not be one of storage but of presentation.
Best Wishes,
Chris T
_id FROM t1)
group by case_id;
CREATE VIEW t3 AS select case_id, min(timekeeper_id) AS tk_id
FROM authorized_timekeepers
WHERE tk_id NOT IN (SELECT tk_id FROM t1)
AND tk_id NOT IN (SELECT tk_id FROM t2)
GROUP BY case_id;
Etc.
Then you do a left join among the views.
Hope that this helps.
You can also use PGexecParams() (see the libpq
documentation). It can be a little more cumbersome to use,
though.
Best Wishes,
Chris Travers
- Original Message -
From:
MUKTA
To: [EMAIL PROTECTED]
Sent: Thursday, January 29, 2004 8:08
PM
Subject: [SQL
ing).
Is there a workaround? Any other help? Or do I need to write a UDF?
Best Wishes,
Chris Travers
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED]
There is a free Perl script which is called something like pgautodoc which
creates DIA diagrams from databases. Take a look for it on Freshmeat.
- Original Message -
From: "Ganesan Kanavathy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, January 20, 2004 1
it on my system (cygwin), at
the moment. Perhaps someone else can help.
Failing that, you can write your own function to
return each row. I was working on a quick proof of concept but it was not
working properly.
Best Wishes,
Chris Travers
- Original Message -
From:
Bronx
actly
what you need.
Best Wishes,
Chris Travers
- Original Message -
From: "Kumar" <[EMAIL PROTECTED]>
To: "Chris Travers" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Peter
Eisentraut" <[EMAIL PROTECTED]>; "psql" <[
cation. I think that the source for this would likely be one
of those things that might be best LGPL'd if added to my app.
Best Wishes,
Chris Travers
- Original Message -
From: "Kumar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Peter Eisentraut" &
Title: Message
SELECT * FROM customers ORDER BY last_name,
first_name
Works for me.
- Original Message -
From:
Andy Lewis
To: [EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 8:15
AM
Subject: [SQL] sort by on two
columns
Hi
All,
Is it possible to
=y.
Hope this explains things.
Best Wishes,
Chris Travers
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
indicating whether the employee is a manager, teacher, or sub.
Best Wishes,
Chris Travers
- Original Message -
From: "Michael Glaesemann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 24, 2003 4:42 AM
Subject: [SQL] Distributed keys
Hell
Hi Pedro;
I understand that at the moment it is more of a design limitation than a
bug. I think we should vote the desired behavior as a feature request,
however.
Best Wishes,
Chris Travers
- Original Message -
From: "Pedro" <[EMAIL PROTECTED]>
> >> Foreign
led me to discover
that I needed to put in the second update query. Just figured I would check.
Best Wishes,
Chris Travers
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send &
t user. The CURRENT_USER then returns the name of the definer
rather than the invoker of the function.
So this being said-- are there any workarounds that don't allow anyone
to change anyone else's password?
Best Wishes,
Chris Travers
---(end of broadcast
currently logged in user. How do I do this? Any ideas?
Best Wishes,
Chris Travers
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
Try running the initdb program first.
Best Wishes,
Chris Travers
- Original Message -
From: "Zengfa Gao" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 08, 2003 9:43 AM
Subject: [SQL] PgSQL 7.3: /opt/pgsql/bin/postgres: Execute permission
27 matches
Mail list logo