Skip to content

Столбец с названием реальной таблицы #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
socketpair opened this issue Apr 12, 2016 · 2 comments
Closed

Comments

@socketpair
Copy link

#5:

Добавить в документацию пример о том как получить для каждой записи столбец с названием реальной таблицы

@socketpair
Copy link
Author

select *, xxx from megatable ....

record1 | col1 | col2 | "real_table_name1"
record2 | col2 | col3 | "real_table_name1"
record3 | col3 | col4 | "real_table_name2"

@funbringer
Copy link
Collaborator

Думаю, проще всего будет получить колонку tableoid и привести ее к типу regclass:

select tableoid::regclass, * from partitioned_table;

@postgrespro postgrespro locked and limited conversation to collaborators Jun 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants