Re: Parser - Query Analyser

From: Любен Каравелов <karavelov(at)mail(dot)bg>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Parser - Query Analyser
Date: 2012-11-17 16:01:41
Message-ID: 6b1a60652e2cca0b4ed037359f059dbc.mailbg@mail.bg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

----- Цитат от Michael Giannakopoulos (miccagiann(at)gmail(dot)com), на 17.11.2012 в 16:18 -----

> Hello guys,
>
> My name is Michail Giannakopoulos and I am a graduate student at University
> of Toronto. I have no previous experience in developing a system like
> postgreSQL before.
>
> What I am trying to explore is if it is possible to extend postgreSQL in
> order to accept queries of the form:
>
> Select function(att1, att2, att3) AS output(out1, out2, ..., outk) FROM
> [database_name];
>

Why invent non-standard syntax for something that you could do in SQL.

You could try something like this:

SELECT
(m.f).f_out_name1 AS out1,
(m.f).f_out_name2 AS out2,
(m.f).f_out_name3 AS out3
FROM (
SELECT f(att1,att2,att3) FROM input_table_name
) AS m;

Best regards

--
Luben Karavelov

In response to

Browse pgsql-general by date

  From Date Subject
Next Message T. E. Lawrence 2012-11-17 16:39:20 Re: Using a GIN index on an integer array to model sets of tags
Previous Message T. E. Lawrence 2012-11-17 15:33:40 Re: 9.2 streaming replication issue and solution strategy

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2012-11-17 16:07:18 Re: foreign key locks
Previous Message Tom Lane 2012-11-17 15:48:21 Re: Materialized views WIP patch