Re: [GENERAL] Problem: concat an array of arrays

2010-04-29 Thread Belka Lambda
:) Regards, Belka 29.04.10, 08:53, "Merlin Moncure" : > On Thu, Apr 29, 2010 at 8:46 AM, Merlin Moncure wrote: > > On Wed, Apr 28, 2010 at 8:48 PM, Belka Lambda wrote: > >> Hi! > >> > >> I tried to write a recursive SELECT, that would do the concatina

[GENERAL] Problem: concat an array of arrays

2010-04-28 Thread Belka Lambda
Hi! I tried to write a recursive SELECT, that would do the concatination, but a problem appeared: can't make a {1,2,3} from {{1,2,3}}. Here are some experiments: --- postgres=# select array[array[1,2,3

[GENERAL] Is there any easy way to determine a default value specified for table column?

2010-03-14 Thread Belka Lambda
Hi everyone! Is there a way to "nicely" determine a default value of a table column? A function, which could be used, like: SELECT default_of('my_table.my_integer_column') :: integer; ? I scanned pg_proc table: === postgres=# select proname from pg_proc where pro

[GENERAL] FOREIGN KEY composite_type.its_field REFERENCES ....

2010-02-23 Thread Belka Lambda
Hi everyone! Is there a way to construct FOREIGN KEYs from parts of composite-typed field? The code returns an error: - create table aaa ( a_id integer primary key, a_str varchar) ; create type content_of_bbb (a_id integer, b_str varchar); create table b