pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedStored Procedure
2+ messages / 2 participants
[nested] [flat]
* Stored Procedure
@ 2001-11-21 13:35 Fernández Mariano <mfernandez@infoauto.gov.ar>
0 siblings, 1 reply; 2+ messages in thread
From: Fernández Mariano @ 2001-11-21 13:35 UTC (permalink / raw)
To: pgsql-sql
Hello Pasha
I'm trying to create a function that return a (select * from table1, table2..where attrib = $1...) of join. But I can't make this.
Like to Stored Procederue in MS-SQL Server
Can you help me?
Sincerely
Fernández Mariano.
Argentina.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Stored Procedure
@ 2001-11-24 09:48 Andrew G. Hammond <drew@xyzzy.dhs.org>
parent: Fernández Mariano <mfernandez@infoauto.gov.ar>
0 siblings, 0 replies; 2+ messages in thread
From: Andrew G. Hammond @ 2001-11-24 09:48 UTC (permalink / raw)
To: Fernández Mariano <mfernandez@infoauto.gov.ar>; pgsql-sql
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2001 November 21 08:35 am, Fernández Mariano wrote:
> Hello Pasha
>
> I'm trying to create a function that return a (select * from table1,
> table2..where attrib = $1...) of join. But I can't make this. Like to
> Stored Procederue in MS-SQL Server
> Can you help me?
Looks more like you want a VIEW. For example:
CREATE TABLE a (id SERIAL PRIMARY KEY, name TEXT);
CREATE TABLE b (id SERIAL PRIMARY KEY, data TEXT,
key_a INTEGER REFERENCES a(id));
CREATE VIEW c AS SELECT name, data FROM a, b WHERE a.id = b.key_a;
Then simply SELECT from the VIEW.
- --
Andrew G. Hammond mailto:drew@xyzzy.dhs.org http://xyzzy.dhs.org/~drew/
56 2A 54 EF 19 C0 3B 43 72 69 5B E3 69 5B A1 1F 613-389-5481
5CD3 62B0 254B DEB1 86E0 8959 093E F70A B457 84B1
"To blow recursion you must first blow recur" -- me
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iEYEARECAAYFAjv/bNsACgkQCT73CrRXhLFGkQCfbEwNXXH7/frMpprQtccQ/bEA
J5kAnjgH1z/BzRX4WFnS9rFgIRPg2r3H
=lrRa
-----END PGP SIGNATURE-----
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-11-24 09:48 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-11-21 13:35 Stored Procedure Fernández Mariano <mfernandez@infoauto.gov.ar>
2001-11-24 09:48 ` Andrew G. Hammond <drew@xyzzy.dhs.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox