dbTalk Databases Forums  

select into not supported within stored procedures?

comp.databases.postgresql comp.databases.postgresql


Discuss select into not supported within stored procedures? in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #51  
Old   
Coniglio Sgabbiato
 
Posts: n/a

Default Re: select into not supported within stored procedures? - 12-23-2008 , 03:53 AM






Zeljko Peric ha scritto:
[CUT]
Quote:
Postgres documentation says:
"The PostgreSQL usage of SELECT INTO to represent table creation is
historical. It is best to use CREATE TABLE AS for this purpose in new
code."

But if you need to work with record variables in your procedure, the
best way is to use rowtype or record type:

http://www.postgresql.org/docs/8.3/s...RATION-RECORDS
Thank you very much for the hint, it works inside a stored procedure, I
missed this statement on the documentation. Now I know that "create
table as" was added to the standard by SQL 2003:
http://en.wikipedia.org/wiki/SQL:2003

Quote:

You can collect %ROWTYPE into ARRAY if you need Table in you procedure.
I use record type for other purposes, "create table as" it is perfect
for me in this case

Thanks you again,
Anselmo Canfora


Reply With Quote
  #52  
Old   
Coniglio Sgabbiato
 
Posts: n/a

Default Re: select into not supported within stored procedures? - 12-23-2008 , 03:53 AM






Zeljko Peric ha scritto:
[CUT]
Quote:
Postgres documentation says:
"The PostgreSQL usage of SELECT INTO to represent table creation is
historical. It is best to use CREATE TABLE AS for this purpose in new
code."

But if you need to work with record variables in your procedure, the
best way is to use rowtype or record type:

http://www.postgresql.org/docs/8.3/s...RATION-RECORDS
Thank you very much for the hint, it works inside a stored procedure, I
missed this statement on the documentation. Now I know that "create
table as" was added to the standard by SQL 2003:
http://en.wikipedia.org/wiki/SQL:2003

Quote:

You can collect %ROWTYPE into ARRAY if you need Table in you procedure.
I use record type for other purposes, "create table as" it is perfect
for me in this case

Thanks you again,
Anselmo Canfora


Reply With Quote
  #53  
Old   
Coniglio Sgabbiato
 
Posts: n/a

Default Re: select into not supported within stored procedures? - 12-23-2008 , 03:53 AM



Zeljko Peric ha scritto:
[CUT]
Quote:
Postgres documentation says:
"The PostgreSQL usage of SELECT INTO to represent table creation is
historical. It is best to use CREATE TABLE AS for this purpose in new
code."

But if you need to work with record variables in your procedure, the
best way is to use rowtype or record type:

http://www.postgresql.org/docs/8.3/s...RATION-RECORDS
Thank you very much for the hint, it works inside a stored procedure, I
missed this statement on the documentation. Now I know that "create
table as" was added to the standard by SQL 2003:
http://en.wikipedia.org/wiki/SQL:2003

Quote:

You can collect %ROWTYPE into ARRAY if you need Table in you procedure.
I use record type for other purposes, "create table as" it is perfect
for me in this case

Thanks you again,
Anselmo Canfora


Reply With Quote
  #54  
Old   
Coniglio Sgabbiato
 
Posts: n/a

Default Re: select into not supported within stored procedures? - 12-23-2008 , 03:53 AM



Zeljko Peric ha scritto:
[CUT]
Quote:
Postgres documentation says:
"The PostgreSQL usage of SELECT INTO to represent table creation is
historical. It is best to use CREATE TABLE AS for this purpose in new
code."

But if you need to work with record variables in your procedure, the
best way is to use rowtype or record type:

http://www.postgresql.org/docs/8.3/s...RATION-RECORDS
Thank you very much for the hint, it works inside a stored procedure, I
missed this statement on the documentation. Now I know that "create
table as" was added to the standard by SQL 2003:
http://en.wikipedia.org/wiki/SQL:2003

Quote:

You can collect %ROWTYPE into ARRAY if you need Table in you procedure.
I use record type for other purposes, "create table as" it is perfect
for me in this case

Thanks you again,
Anselmo Canfora


Reply With Quote
  #55  
Old   
Coniglio Sgabbiato
 
Posts: n/a

Default Re: select into not supported within stored procedures? - 12-23-2008 , 03:53 AM



Zeljko Peric ha scritto:
[CUT]
Quote:
Postgres documentation says:
"The PostgreSQL usage of SELECT INTO to represent table creation is
historical. It is best to use CREATE TABLE AS for this purpose in new
code."

But if you need to work with record variables in your procedure, the
best way is to use rowtype or record type:

http://www.postgresql.org/docs/8.3/s...RATION-RECORDS
Thank you very much for the hint, it works inside a stored procedure, I
missed this statement on the documentation. Now I know that "create
table as" was added to the standard by SQL 2003:
http://en.wikipedia.org/wiki/SQL:2003

Quote:

You can collect %ROWTYPE into ARRAY if you need Table in you procedure.
I use record type for other purposes, "create table as" it is perfect
for me in this case

Thanks you again,
Anselmo Canfora


Reply With Quote
  #56  
Old   
Coniglio Sgabbiato
 
Posts: n/a

Default Re: select into not supported within stored procedures? - 12-23-2008 , 03:53 AM



Zeljko Peric ha scritto:
[CUT]
Quote:
Postgres documentation says:
"The PostgreSQL usage of SELECT INTO to represent table creation is
historical. It is best to use CREATE TABLE AS for this purpose in new
code."

But if you need to work with record variables in your procedure, the
best way is to use rowtype or record type:

http://www.postgresql.org/docs/8.3/s...RATION-RECORDS
Thank you very much for the hint, it works inside a stored procedure, I
missed this statement on the documentation. Now I know that "create
table as" was added to the standard by SQL 2003:
http://en.wikipedia.org/wiki/SQL:2003

Quote:

You can collect %ROWTYPE into ARRAY if you need Table in you procedure.
I use record type for other purposes, "create table as" it is perfect
for me in this case

Thanks you again,
Anselmo Canfora


Reply With Quote
  #57  
Old   
Coniglio Sgabbiato
 
Posts: n/a

Default Re: select into not supported within stored procedures? - 12-23-2008 , 03:53 AM



Zeljko Peric ha scritto:
[CUT]
Quote:
Postgres documentation says:
"The PostgreSQL usage of SELECT INTO to represent table creation is
historical. It is best to use CREATE TABLE AS for this purpose in new
code."

But if you need to work with record variables in your procedure, the
best way is to use rowtype or record type:

http://www.postgresql.org/docs/8.3/s...RATION-RECORDS
Thank you very much for the hint, it works inside a stored procedure, I
missed this statement on the documentation. Now I know that "create
table as" was added to the standard by SQL 2003:
http://en.wikipedia.org/wiki/SQL:2003

Quote:

You can collect %ROWTYPE into ARRAY if you need Table in you procedure.
I use record type for other purposes, "create table as" it is perfect
for me in this case

Thanks you again,
Anselmo Canfora


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.