Jonathan Vanasco wrote:
Does anyone have a trick to list all columns in a db ?
No trickery, just exploit the availability of the SQL standard
information_schema views:
select table_schema, table_name, column_name
from information_schema.columns
where table_schema not in ('pg_cat
brian wrote:
I'm trying to create a select statement that will show me the number of
new memberships or an organisation by date (first of each month). The
member table has a date column to reflect when the member was inserted.
So far, i've gotten as far as:
SELECT applied AS date_applied, cou
Cultural Sublimation wrote:
SELECT comments.comment_id, users.user_name
FROM comments, users
WHERE comments.comment_story = 100 AND comments.comment_author = users.user_id;
The problem is that this query takes a *very* long time. With the said
1,000,000 comments, it needs at least 1100ms on my
Madison Kelly wrote:
> I want to create a query that will allow me to say "show me all 'foo'
> rows and tell me if a specific 'baz_id' belongs to it". Normally, I
> would do this:
>
> SELECT foo_id FROM foo;
> (for each returned row)
> {
> # Where '$foo_id' is the current 'foo_id' and '$
Raymond O'Donnell wrote:
> This is probably a very simple one, but I just can't see the answer and
> it's driving me nuts. I have a table holding details of academic terms,
> and I need an SQL query such that for any given term I want to find the
> next term by starting date (or just NULL if there
Kynn Jones wrote:
> Hi. I'm looking for Pg- and OSX-friendly software for generating schema
> diagrams. It its most basic level, I'm looking for the graphics
> counterpart of pg_dump -s, although it would be nice if the program
> could take as input the name of a file containing an arbitrary sche
Leif B. Kristensen wrote:
> On Thursday 26. April 2007 17:10, Joshua D. Drake wrote:
>>> Actually, I've a feeling that it would be trivial to do with just
>>> about any existing packaging system ...
>> Yes pretty much every version of Linux, and FreeBSD, heck even Solaris
>> if you are willing to r
Andrus wrote:
How to create function which returns persons age in years?
Function parameters:
ldDob - Day Of birth
ldDate - Day where age is returned
I tried
CREATE OR REPLACE FUNCTION public.age(date, date, out integer) IMMUTABLE AS
$_$
SELECT floor(INT($2::text::integer-$1::text::integer)/1