Ondrej Ivanič gmail.com> writes:
> On 14 August 2011 20:25, k_b yahoo.se> wrote:
> > Hi.
> > For learning purpose i would like to make a small database with a small
> > graph of locations, roads and public transport information.
> > Then calculate the fastest or cheapest way between two points.
Andre Majorel teaser.fr> writes:
>
> Suppose you want to write a program that connects to a
> PostgreSQL database and lists its tables and views, the type of
> their columns and their relationships (REFERENCES) for automatic
> joins.
I personally would try to hit the "informat_schema", which is
yahoo.com> writes:
>
> Hi,
>
> Yes. Computer based training.
A psql prompt and the excellent postgresql documentation?
(Sorry to be flip, but typing in examples and fixing mistakes and tweaking input
was how I learned... Hopefully one of the consulting guys on the list will come
back with
Sukuchha Shrestha yahoo.de> writes:
> Could anybody explain here how to connect in a detailed step ! Consider me
studying in class 1 of postgresql when explaining :)
It may not be much help to you, but on a Unix shell I tend to run psql through
some text manipulation pipes and then into a csv wh
Seb gmail.com> writes:
> The database stores information related to biological research. The
> bulk of the tables describe things like individual ID, morphometrics,
> and behavioural data on all the individuals in several studies.
> However, there are a few tables that do not relate to the resea
That solved it.
Thanks!
Michael
- Original Message
From: Tom Lane
To: Michael Fork
Cc: pgsql-general@postgresql.org
Sent: Tue, December 29, 2009 11:19:42 PM
Subject: Re: [GENERAL] Planner Row Estimate with Function
Michael Fork writes:
>> Also, what happened to the type=&
0'::text = ANY
(parsecardidfromreferencecode(reference_code)))
-> Bitmap Index Scan on idx_event_card_id (cost=0.00..1668821.37
rows=44565021 width=0)
Thanks.
Michael
- Original Message
From: Pavel Stehule
To: Michael Fork
Cc: pgsql-general@postgresql.org
Sent: Tue, December 2
, this is partial index. I should have included the index definition
earlier:
# CREATE INDEX CONCURRENTLY idx_event_card_id ON
trail.event(parsecardidfromreferencecode(reference_code)) WHERE type =
'CREDIT'; Thanks.
Michael
- Original Message
From: Tom Lane
To: Michae
=0.00..401311.59 rows=223890
width=103)
Index Cond: ("substring"(reference_code, 3, 13) = '057729970'::text)
(2 rows)
Thanks.
Michael
- Original Message
From: Pavel Stehule
To: Michael Fork
Cc: pgsql-general@postgresql.org
Sent: Tue, December 29, 2009 12:
I have an index scan on a custom function that is returning a wildly incorrect
row estimate that is throwing off the rest of the query planning. The result
of the function is roughly unique - there are a handful with multiple entries -
but the planner is estimating 227,745 rows. I re-ran ANALY
How about:
select to_char(mtrantime,'mm-dd hh AM') as datetime,
to_char(mtrantime,'AM') as sort_field,
count(*) as tot from memtran
group by sort_field, datetime
order by sort_field, datetime;
Then ignore the sort_field column?
Michael
"Mike Nolan" <[EMAIL PROTECTED]> wrote
You can use a where clause when selecting from a veiew, so the following
should work for you:
CREATE VIEW my_view AS SELECT o.*, n.descr, n.lang
FROM nation n, org o
WHERE o.nation = n.code
SELECT * FROM my_view WHERE n.lang = someKnownQuantity
Michael Fork - CCNA - MCP
Can someone tell me what I am missing here...
Thanks
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
radius=# BEGIN;
BEGIN
radius=# select age(tstamp, now()) from radacct limit 1;
age
--
03:37:08 ago
(1 row)
radius=# select age(now
, you recieve the last value used by *your backend*
(regardless of what others have done).
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On Fri, 2 Mar 2001, Gregory Wood wrote:
> SELECT currval('Table_SerialField_SEQ');
>
> Note: This selec
vals WHERE y > 0;
SELECT a.x/b.y FROM vals a, valid_vals b WHERE (a.x
/ b.y) > 1
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On Wed, 14 Feb 2001, Patrick Welche wrote:
> create table vals (
> x float,
> y float
> );
> insert
Indexes *can* and *will* be used if you create the appropiate
functional indexes, i.e:
CREATE INDEX idx_table_field_upper ON table(upper(field));
SELECT field FROM table WHERE upper(field) LIKE upper('some string');
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Inter
You can create a case insensitive, unique index like this:
CREATE UNIQUE INDEX indexname ON tablename (lower(fieldname))
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On Tue, 30 Jan 2001, Culley Harrelson wrote:
> is there a way to make a unique in
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On Tue, 30 Jan 2001, Nelio Alves Pereira Filho wrote:
> Yes, but how can I pass a reference of the row just inserted to the
> trigger??
>
> adb wrote:
> >
> > Sounds like you need to use a
Try these queries...
SELECT injdate, outcome, count(outcome) FROM safety GROUP BY
injdate,outcome;
or
SELECT outcome, count(outcome) FROM safety WHERE injdate='2000-11-14'
GROUP BY outcome;
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On T
acct on tiacct (cost=0.00..253.88 rows=96 width=44
^^
In this situation Postgres will use the seq scan, rather than the index
scan, due to its cheaper cost.
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
20 matches
Mail list logo