Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Facebook
Downloads
Home
>
mailing lists
Nested composite types again - Mailing list pgsql-novice
From
Michael Kolomeitsev
Subject
Nested composite types again
Date
November 28, 2012
11:02:50
Msg-id
CAABbzO3RJb_4sobpkNy3hE2JZXZuWAGwy6Fr_bqvdM+0C5KJbQ@mail.gmail.com
Whole thread
Raw
Responses
Re: Nested composite types again
List
pgsql-novice
Tree view
Hi,
I have already read this
http://www.postgresql.org/docs/9.2/static/rowtypes.html#AEN7304
but it didn't help.
CREATE TABLE nodes (
id SERIAL NOT NULL PRIMARY KEY,
name TEXT NOT NULL
);
CREATE TYPE pathId AS (
id INTEGER,
node nodes
);
CREATE OR REPLACE FUNCTION test_AEN7304() RETURNS void AS $$
DECLARE
r pathId;
n nodes;
BEGIN
n.name
:= 'abc';
r.id
:= 1;
r.node := n; -- All is ok
--
r.node.name
:= 'def'; -- << Error here
-- (r).
node.name
:= 'def'; -- << and here
((r).node).name := 'def'; -- << and here
END;
$$ LANGUAGE 'plpgsql';
And I can't even make 'n' as ALIAS FOR r.node (to simulate C-like pointer).
What is the right syntax?
Thanks
pgsql-novice
by date:
Previous
From:
Gavan Schneider
Date:
26 November 2012, 23:57:35
Subject:
Re: Curiosity: what is PostgreSQL doing with data when "nothing" is happening?
Next
From:
Vibhor Kumar
Date:
28 November 2012, 15:37:27
Subject:
Re: Nested composite types again
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
I confirm that I have read and accepted PostgresPro’s
Privacy Policy
.
I agree to get Postgres Pro discount offers and other marketing communications.
✖
×
×
Everywhere
Documentation
Mailing list
List:
all lists
pgsql-general
pgsql-hackers
buildfarm-members
pgadmin-hackers
pgadmin-support
pgsql-admin
pgsql-advocacy
pgsql-announce
pgsql-benchmarks
pgsql-bugs
pgsql-chat
pgsql-cluster-hackers
pgsql-committers
pgsql-cygwin
pgsql-docs
pgsql-hackers-pitr
pgsql-hackers-win32
pgsql-interfaces
pgsql-jdbc
pgsql-jobs
pgsql-novice
pgsql-odbc
pgsql-patches
pgsql-performance
pgsql-php
pgsql-pkg-debian
pgsql-pkg-yum
pgsql-ports
pgsql-rrreviewers
pgsql-ru-general
pgsql-sql
pgsql-students
pgsql-testers
pgsql-translators
pgsql-www
psycopg
Period
anytime
within last day
within last week
within last month
within last 6 months
within last year
Sort by
date
reverse date
rank
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
By continuing to browse this website, you agree to the use of cookies. Go to
Privacy Policy
.
I accept cookies